From 9b68dbe5467650d557af97ae41e08c1250f861a4 Mon Sep 17 00:00:00 2001 From: Carson Katri Date: Thu, 17 Oct 2024 11:34:19 -0400 Subject: [PATCH 1/4] Swift 6 language mode --- Package.resolved | 19 +- Package.swift | 6 +- .../BuiltinRegistryGeneratorPlugin.swift | 40 +- ...ocumentationExtensionGeneratorPlugin.swift | 12 +- .../BuiltinRegistry+applyBinding.swift | 1 + .../Coordinators/LiveConnectionError.swift | 4 +- .../LiveSessionConfiguration.swift | 6 +- .../Coordinators/LiveSessionCoordinator.swift | 153 ++-- .../Coordinators/LiveViewCoordinator.swift | 34 +- Sources/LiveViewNative/Environment.swift | 15 +- Sources/LiveViewNative/Live/LiveElement.swift | 10 +- Sources/LiveViewNative/Live/LiveView.swift | 7 +- .../Live/ReconnectLiveViewAction.swift | 4 +- .../Property Wrappers/ChangeTracked.swift | 9 +- .../Property Wrappers/Event.swift | 37 +- .../Property Wrappers/FormState.swift | 4 +- .../Property Wrappers/LiveContext.swift | 1 + .../Property Wrappers/ObservedElement.swift | 3 +- .../Protocols/ContentBuilder.swift | 5 +- .../Registries/AggregateRegistry.swift | 3 +- .../Registries/BuiltinRegistry.swift | 1 + .../Registries/CustomRegistry.swift | 4 +- .../Stylesheets/AttributeReference.swift | 1 + .../Modifiers/Shapes/ShapeModifier.swift | 2 + .../AnyCoordinateSpaceProtocol.swift | 3 +- .../AnyGesture+ParseableModifierValue.swift | 9 +- .../AnyPresentationSizing.swift | 3 +- .../AnyScrollTargetBehavior.swift | 3 +- .../ParseableRangeExpression.swift | 2 +- ...AnyShapeStyle+ParseableModifierValue.swift | 8 +- .../Color+ParseableModifierValue.swift | 39 +- .../ShadowStyle+ParseableModifierValue.swift | 3 + ...extFieldStyle+ParseableModifierValue.swift | 3 +- .../Stylesheets/Stylesheet.swift | 5 +- .../Stylesheets/StylesheetParser.swift | 6 +- .../Stylesheets/ViewReference.swift | 10 + .../Utils/ElixirDateFormats.swift | 2 +- Sources/LiveViewNative/ViewModel.swift | 18 +- Sources/LiveViewNative/ViewTree.swift | 8 +- .../LiveViewNative/_GeneratedModifiers.swift | 831 +++++++++--------- .../ModifierParseError.swift | 5 +- .../Parsing/External/AnyNodeParser.swift | 6 +- .../Parsing/External/Metadata.swift | 2 +- .../Parsing/External/ParseableModifier.swift | 4 +- .../ParseableExpressionMacro.swift | 4 +- .../ModifierGenerator/ModifierGenerator.swift | 42 +- Sources/ModifierGenerator/Signature.swift | 9 +- .../Subcommands/DocumentationExtensions.swift | 25 +- .../Subcommands/Source.swift | 3 +- .../Visitors/ParseableModifierVisitor.swift | 2 +- 50 files changed, 789 insertions(+), 647 deletions(-) diff --git a/Package.resolved b/Package.resolved index bb082b0cc..167b3154e 100644 --- a/Package.resolved +++ b/Package.resolved @@ -1,4 +1,5 @@ { + "originHash" : "0c8c0017d472c5597b7cc8792d28815383d1ad3b06694e0f377e0c0261862bd4", "pins" : [ { "identity" : "liveview-native-core-swift", @@ -14,8 +15,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-argument-parser", "state" : { - "revision" : "fee6933f37fde9a5e12a1e4aeaa93fe60116ff2a", - "version" : "1.2.2" + "revision" : "41982a3656a71c768319979febd796c6fd111d5c", + "version" : "1.5.0" } }, { @@ -32,8 +33,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/pointfreeco/swift-case-paths", "state" : { - "revision" : "40773cbaf8d71ed5357f297b1ba4073f5b24faaa", - "version" : "1.1.0" + "revision" : "bc92c4b27f9a84bfb498cdbfdf35d5a357e9161f", + "version" : "1.5.6" } }, { @@ -77,8 +78,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/swiftlang/swift-syntax.git", "state" : { - "revision" : "64889f0c732f210a935a0ad7cda38f77f876262d", - "version" : "509.1.1" + "revision" : "0687f71944021d616d34d922343dcef086855920", + "version" : "600.0.1" } }, { @@ -104,10 +105,10 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/pointfreeco/xctest-dynamic-overlay", "state" : { - "revision" : "23cbf2294e350076ea4dbd7d5d047c1e76b03631", - "version" : "1.0.2" + "revision" : "770f990d3e4eececb57ac04a6076e22f8c97daeb", + "version" : "1.4.2" } } ], - "version" : 2 + "version" : 3 } diff --git a/Package.swift b/Package.swift index 39e451c3d..57e30bff5 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version: 5.9 +// swift-tools-version: 6.0 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription @@ -29,10 +29,10 @@ let package = Package( .package(url: "https://github.com/apple/swift-async-algorithms", from: "0.1.0"), .package(url: "https://github.com/liveview-native/liveview-native-core-swift.git", exact: "0.2.1"), - .package(url: "https://github.com/apple/swift-argument-parser", from: "1.2.2"), + .package(url: "https://github.com/apple/swift-argument-parser", from: "1.5.0"), .package(url: "https://github.com/swiftlang/swift-markdown.git", from: "0.2.0"), - .package(url: "https://github.com/swiftlang/swift-syntax.git", from: "509.0.2"), + .package(url: "https://github.com/swiftlang/swift-syntax.git", from: "600.0.1"), .package(url: "https://github.com/pointfreeco/swift-parsing", from: "0.13.0"), ], diff --git a/Plugins/BuiltinRegistryGeneratorPlugin/BuiltinRegistryGeneratorPlugin.swift b/Plugins/BuiltinRegistryGeneratorPlugin/BuiltinRegistryGeneratorPlugin.swift index cc5fa73ce..8449dfb64 100644 --- a/Plugins/BuiltinRegistryGeneratorPlugin/BuiltinRegistryGeneratorPlugin.swift +++ b/Plugins/BuiltinRegistryGeneratorPlugin/BuiltinRegistryGeneratorPlugin.swift @@ -11,32 +11,36 @@ import Foundation @main struct BuiltinRegistryGeneratorPlugin: BuildToolPlugin { func createBuildCommands(context: PluginContext, target: Target) async throws -> [Command] { - guard let target = target as? SourceModuleTarget else { return [] } + guard let target = target as? SwiftSourceModuleTarget else { return [] } let tool = try context.tool(named: "BuiltinRegistryGenerator") - let output = context.pluginWorkDirectory.appending("BuiltinRegistry+Views.swift") + let output = context.pluginWorkDirectoryURL.appending(path: "BuiltinRegistry+Views.swift") let viewFiles = target.sourceFiles - .filter({ $0.path.string.starts(with: target.directory.appending("Views").string) }) + .filter({ $0.url.pathComponents.starts(with: target.directoryURL.appending(path: "Views").pathComponents) }) .filter({ $0.type == .source }) - .map(\.path) + .map(\.url) let modifierFiles = target.sourceFiles - .filter({ $0.path.string.hasSuffix("_GeneratedModifiers.swift") }) + .filter({ $0.url.lastPathComponent == "_GeneratedModifiers.swift" }) .filter({ $0.type == .source }) - .map(\.path) + .map(\.url) + let arguments: [String] = [target.directoryURL.path(percentEncoded: false), output.path(percentEncoded: false)] + + viewFiles + .reduce(into: [String]()) { partialResult, url in + partialResult.append("--view") + partialResult.append(url.path(percentEncoded: false)) + } + + modifierFiles + .reduce(into: [String]()) { partialResult, url in + partialResult.append("--modifier") + partialResult.append(url.path(percentEncoded: false)) + } + print(viewFiles) + print(modifierFiles) + print(arguments) return [ .buildCommand( displayName: tool.name, - executable: tool.path, - arguments: [target.directory.string, output.string] + - viewFiles - .reduce(into: [String]()) { partialResult, path in - partialResult.append("--view") - partialResult.append(path.string) - } - + modifierFiles - .reduce(into: [String]()) { partialResult, path in - partialResult.append("--modifier") - partialResult.append(path.string) - }, + executable: tool.url, + arguments: arguments, environment: [:], inputFiles: viewFiles + modifierFiles, outputFiles: [output] diff --git a/Plugins/DocumentationExtensionGeneratorPlugin/DocumentationExtensionGeneratorPlugin.swift b/Plugins/DocumentationExtensionGeneratorPlugin/DocumentationExtensionGeneratorPlugin.swift index 884c7a96d..fb50b8cdd 100644 --- a/Plugins/DocumentationExtensionGeneratorPlugin/DocumentationExtensionGeneratorPlugin.swift +++ b/Plugins/DocumentationExtensionGeneratorPlugin/DocumentationExtensionGeneratorPlugin.swift @@ -5,19 +5,19 @@ import Foundation struct DocumentationExtensionGeneratorPlugin: CommandPlugin { func performCommand(context: PluginContext, arguments: [String]) throws { let process = Process() - process.executableURL = URL(fileURLWithPath: try context.tool(named: "DocumentationExtensionGenerator").path.string) + process.executableURL = try context.tool(named: "DocumentationExtensionGenerator").url - let target = context.package.targets.first(where: { $0.name == "LiveViewNative" })! as! SourceModuleTarget + let target = context.package.targets.first(where: { $0.name == "LiveViewNative" })! as! SwiftSourceModuleTarget let viewFiles = target.sourceFiles - .filter({ $0.path.string.starts(with: target.directory.appending("Views").string) }) + .filter({ $0.url.pathComponents.starts(with: target.directoryURL.appending(path: "Views").pathComponents) }) .filter({ $0.type == .source }) - .map(\.path) + .map(\.url) process.arguments = arguments + viewFiles - .reduce(into: [String]()) { partialResult, path in + .reduce(into: [String]()) { partialResult, url in partialResult.append("--view") - partialResult.append(path.string) + partialResult.append(url.path()) } try process.run() diff --git a/Sources/LiveViewNative/BuiltinRegistry+applyBinding.swift b/Sources/LiveViewNative/BuiltinRegistry+applyBinding.swift index 776ecc696..c36ea2b39 100644 --- a/Sources/LiveViewNative/BuiltinRegistry+applyBinding.swift +++ b/Sources/LiveViewNative/BuiltinRegistry+applyBinding.swift @@ -17,6 +17,7 @@ public enum _EventBinding: String { } extension BuiltinRegistry { + @MainActor @ViewBuilder static func applyBinding( _ binding: _EventBinding, diff --git a/Sources/LiveViewNative/Coordinators/LiveConnectionError.swift b/Sources/LiveViewNative/Coordinators/LiveConnectionError.swift index 8650afbeb..74eca4be2 100644 --- a/Sources/LiveViewNative/Coordinators/LiveConnectionError.swift +++ b/Sources/LiveViewNative/Coordinators/LiveConnectionError.swift @@ -6,7 +6,7 @@ // import Foundation -import SwiftPhoenixClient +@preconcurrency import SwiftPhoenixClient /// An error that occurred when connecting to a live view. public enum LiveConnectionError: Error, LocalizedError { @@ -43,7 +43,7 @@ public enum LiveConnectionError: Error, LocalizedError { } } - public enum InitialParseComponent: CustomStringConvertible { + public enum InitialParseComponent: CustomStringConvertible, Sendable { case document case csrfToken case phxMain diff --git a/Sources/LiveViewNative/Coordinators/LiveSessionConfiguration.swift b/Sources/LiveViewNative/Coordinators/LiveSessionConfiguration.swift index 70f313500..b35f9d887 100644 --- a/Sources/LiveViewNative/Coordinators/LiveSessionConfiguration.swift +++ b/Sources/LiveViewNative/Coordinators/LiveSessionConfiguration.swift @@ -51,10 +51,10 @@ public struct LiveSessionConfiguration { self.reconnectBehavior = reconnectBehavior } - public struct ReconnectBehavior { - let delay: ((_ tries: Int) -> TimeInterval)? + public struct ReconnectBehavior: Sendable { + let delay: (@Sendable (_ tries: Int) -> TimeInterval)? - public init(_ delay: @escaping (_ tries: Int) -> TimeInterval) { + public init(_ delay: @escaping @Sendable (_ tries: Int) -> TimeInterval) { self.delay = delay } diff --git a/Sources/LiveViewNative/Coordinators/LiveSessionCoordinator.swift b/Sources/LiveViewNative/Coordinators/LiveSessionCoordinator.swift index c284af983..712491d5f 100644 --- a/Sources/LiveViewNative/Coordinators/LiveSessionCoordinator.swift +++ b/Sources/LiveViewNative/Coordinators/LiveSessionCoordinator.swift @@ -228,25 +228,26 @@ public class LiveSessionCoordinator: ObservableObject { self.rootLayout = try LiveViewNativeCore.Document.parse(doc.outerHtml()) + let styleURLs = try doc.select("Style").compactMap { + URL(string: try $0.attr("url"), relativeTo: url) + } async let stylesheet = withThrowingTaskGroup(of: Stylesheet.self) { group in - for style in try doc.select("Style") { - guard let url = URL(string: try style.attr("url"), relativeTo: url) - else { continue } + for url in styleURLs { group.addTask { if let cachedStylesheet = await StylesheetCache.shared.read(for: url, registry: R.self) { return cachedStylesheet } else { let (data, _) = try await self.urlSession.data(from: url) guard let contents = String(data: data, encoding: .utf8) - else { return Stylesheet(content: [], classes: [:]) } - let stylesheet = try Stylesheet(from: contents, in: .init()) + else { return await Stylesheet(content: [], classes: [:]) } + let stylesheet = try await Stylesheet(from: contents, in: .init()) await StylesheetCache.shared.write(stylesheet, for: url, registry: R.self) return stylesheet } } } return try await group.reduce(Stylesheet(content: [], classes: [:])) { result, next in - return result.merge(with: next) + return await result.merge(with: next) } } @@ -279,12 +280,8 @@ public class LiveSessionCoordinator: ObservableObject { private func disconnect(preserveNavigationPath: Bool = false) async { // disconnect all views - await withTaskGroup(of: Void.self) { group in - for entry in self.navigationPath { - group.addTask { - await entry.coordinator.disconnect() - } - } + for entry in navigationPath { + await entry.coordinator.disconnect() } // reset all documents if navigation path is being reset. if !preserveNavigationPath { @@ -346,14 +343,14 @@ public class LiveSessionCoordinator: ObservableObject { /// Request the dead render with the given `request`. /// /// Returns the dead render HTML and the HTTP response information (including the final URL after redirects). - nonisolated func deadRender( + func deadRender( for request: URLRequest, domValues: DOMValues? ) async throws -> (String, HTTPURLResponse) { var request = request request.url = request.url!.appendingLiveViewItems() - request.allHTTPHeaderFields = await configuration.headers + request.allHTTPHeaderFields = configuration.headers if let domValues { request.setValue(domValues.phxCSRFToken, forHTTPHeaderField: "x-csrf-token") @@ -418,50 +415,49 @@ public class LiveSessionCoordinator: ObservableObject { ) } - private func connectSocket(_ domValues: DOMValues) async throws { - self.socket = try await withCheckedThrowingContinuation { [weak self] continuation in + private nonisolated func connectSocket(_ domValues: DOMValues) async throws { + var wsEndpoint = await URLComponents(url: self.url, resolvingAgainstBaseURL: true)! + wsEndpoint.scheme = await self.url.scheme == "https" ? "wss" : "ws" + wsEndpoint.path = "/live/websocket" + let configuration = await self.urlSession.configuration + let socket = Socket( + endPoint: wsEndpoint.string!, + transport: { + URLSessionTransport(url: $0, configuration: configuration) + }, + paramsClosure: { + [ + "_csrf_token": domValues.phxCSRFToken, + "_format": "swiftui" + ] + } + ) + + socket.onClose { @Sendable in logger.debug("[Socket] Closed") } + socket.logger = { @Sendable message in logger.debug("[Socket] \(message)") } + + try await withCheckedThrowingContinuation { [weak self] (continuation: CheckedContinuation) in guard let self else { return continuation.resume(throwing: LiveConnectionError.sessionCoordinatorReleased) } - var wsEndpoint = URLComponents(url: self.url, resolvingAgainstBaseURL: true)! - wsEndpoint.scheme = self.url.scheme == "https" ? "wss" : "ws" - wsEndpoint.path = "/live/websocket" - let configuration = self.urlSession.configuration - let socket = Socket( - endPoint: wsEndpoint.string!, - transport: { - URLSessionTransport(url: $0, configuration: configuration) - }, - paramsClosure: { - [ - "_csrf_token": domValues.phxCSRFToken, - "_format": "swiftui" - ] - } - ) - // set to `reconnecting` when the socket asks for the delay duration. - socket.reconnectAfter = { [weak self] tries in - Task { - await MainActor.run { - self?.state = .reconnecting - } + socket.reconnectAfter = { @Sendable [weak self] tries in + Task { @MainActor [weak self] in + self?.state = .reconnecting } return Defaults.reconnectSteppedBackOff(tries) } socket.onOpen { [weak self] in - guard case .reconnecting = self?.state else { return } - Task { - await MainActor.run { - self?.state = .connected - } + Task { @MainActor [weak self] in + guard case .reconnecting = await self?.state else { return } + self?.state = .connected } } var refs = [String]() - refs.append(socket.onOpen { [weak self, weak socket] in + refs.append(socket.onOpen { [weak self, weak socket, refs] in guard let socket else { return } guard self != nil else { socket.disconnect() @@ -469,9 +465,9 @@ public class LiveSessionCoordinator: ObservableObject { } logger.debug("[Socket] Opened") socket.off(refs) - continuation.resume(returning: socket) + continuation.resume() }) - refs.append(socket.onError { [weak self, weak socket] (error, response) in + refs.append(socket.onError { [weak self, weak socket, refs] (error, response) in guard let socket else { return } guard self != nil else { socket.disconnect() @@ -483,38 +479,44 @@ public class LiveSessionCoordinator: ObservableObject { }) socket.connect() } - self.socket?.onClose { logger.debug("[Socket] Closed") } - self.socket?.logger = { message in logger.debug("[Socket] \(message)") } - - self.state = .connected + await MainActor.run { + self.socket = socket + self.state = .connected + } if domValues.liveReloadEnabled { await self.connectLiveReloadSocket(urlSessionConfiguration: urlSession.configuration) } } - private func connectLiveReloadSocket(urlSessionConfiguration: URLSessionConfiguration) async { - if let liveReloadSocket = self.liveReloadSocket { - liveReloadSocket.disconnect() - self.liveReloadSocket = nil + private nonisolated func connectLiveReloadSocket(urlSessionConfiguration: URLSessionConfiguration) async { + await MainActor.run { + if let liveReloadSocket = self.liveReloadSocket { + liveReloadSocket.disconnect() + self.liveReloadSocket = nil + } + + logger.debug("[LiveReload] attempting to connect...") + + var liveReloadEndpoint = URLComponents(url: self.url, resolvingAgainstBaseURL: true)! + liveReloadEndpoint.scheme = self.url.scheme == "https" ? "wss" : "ws" + liveReloadEndpoint.path = "/phoenix/live_reload/socket" + self.liveReloadSocket = Socket(endPoint: liveReloadEndpoint.string!, transport: { + URLSessionTransport(url: $0, configuration: urlSessionConfiguration) + }) + liveReloadSocket!.connect() + self.liveReloadChannel = liveReloadSocket!.channel("phoenix:live_reload") } - logger.debug("[LiveReload] attempting to connect...") - - var liveReloadEndpoint = URLComponents(url: self.url, resolvingAgainstBaseURL: true)! - liveReloadEndpoint.scheme = self.url.scheme == "https" ? "wss" : "ws" - liveReloadEndpoint.path = "/phoenix/live_reload/socket" - self.liveReloadSocket = Socket(endPoint: liveReloadEndpoint.string!, transport: { - URLSessionTransport(url: $0, configuration: urlSessionConfiguration) - }) - liveReloadSocket!.connect() - self.liveReloadChannel = liveReloadSocket!.channel("phoenix:live_reload") - self.liveReloadChannel!.join().receive("ok") { msg in - logger.debug("[LiveReload] connected to channel") - }.receive("error") { msg in - logger.debug("[LiveReload] error connecting to channel: \(msg.payload)") - } - self.liveReloadChannel!.on("assets_change") { [weak self] _ in + await self.liveReloadChannel!.join() + .receive("ok") { @Sendable msg in + logger.debug("[LiveReload] connected to channel") + } + .receive("error") { @Sendable msg in + logger.debug("[LiveReload] error connecting to channel: \(msg.payload)") + } + + await self.liveReloadChannel!.on("assets_change") { @Sendable [weak self] _ in logger.debug("[LiveReload] assets changed, reloading") Task { await StylesheetCache.shared.removeAll() @@ -561,18 +563,19 @@ public class LiveSessionCoordinator: ObservableObject { } /// A delegate that adds the `_format` query parameter to any redirects. -class LiveSessionURLSessionDelegate: NSObject, URLSessionTaskDelegate { +final class LiveSessionURLSessionDelegate: NSObject, URLSessionTaskDelegate { func urlSession(_ session: URLSession, task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse, newRequest request: URLRequest) async -> URLRequest? { guard let url = request.url else { return request } var newRequest = request - newRequest.url = url.appendingLiveViewItems() + newRequest.url = await url.appendingLiveViewItems() return newRequest } } +@MainActor enum LiveSessionParameters { static var platform: String { "swiftui" } static var platformParams: [String:Any] { @@ -701,7 +704,8 @@ enum LiveSessionParameters { } fileprivate extension URL { - nonisolated func appendingLiveViewItems() -> Self { + @MainActor + func appendingLiveViewItems() -> Self { var result = self let components = URLComponents(url: self, resolvingAgainstBaseURL: false) let existingQueryItems = (components?.queryItems ?? []).reduce(into: Set()) { $0.insert($1) } @@ -712,3 +716,6 @@ fileprivate extension URL { return result } } + +extension Socket: @unchecked Sendable {} +extension Channel: @unchecked Sendable {} diff --git a/Sources/LiveViewNative/Coordinators/LiveViewCoordinator.swift b/Sources/LiveViewNative/Coordinators/LiveViewCoordinator.swift index 307c04ae3..319750ffe 100644 --- a/Sources/LiveViewNative/Coordinators/LiveViewCoordinator.swift +++ b/Sources/LiveViewNative/Coordinators/LiveViewCoordinator.swift @@ -6,14 +6,14 @@ // import Foundation -import SwiftPhoenixClient +@preconcurrency import SwiftPhoenixClient import SwiftSoup import SwiftUI import Combine import LiveViewNativeCore import OSLog -private var PUSH_TIMEOUT: Double = 30000 +private let PUSH_TIMEOUT: Double = 30000 private let logger = Logger(subsystem: "LiveViewNative", category: "LiveViewCoordinator") @@ -108,6 +108,10 @@ public class LiveViewCoordinator: ObservableObject { ) } + struct ReplyPayload: @unchecked Sendable { + let payload: [String: Any] + } + @discardableResult internal func doPushEvent(_ event: String, payload: Payload) async throws -> [String:Any]? { guard let channel = channel else { @@ -116,15 +120,15 @@ public class LiveViewCoordinator: ObservableObject { let token = self.currentConnectionToken - let replyPayload: [String:Any] = try await withCheckedThrowingContinuation({ [weak channel] continuation in + let replyPayload: ReplyPayload = try await withCheckedThrowingContinuation({ [weak channel] continuation in guard channel?.isJoined == true else { return continuation.resume(throwing: LiveConnectionError.viewCoordinatorReleased) } channel?.push(event, payload: payload, timeout: PUSH_TIMEOUT) - .receive("ok") { reply in - continuation.resume(returning: reply.payload) + .receive("ok") { @Sendable reply in + continuation.resume(returning: ReplyPayload(payload: reply.payload)) } - .receive("error") { message in + .receive("error") { @Sendable message in continuation.resume(throwing: LiveConnectionError.eventError(message)) } }) @@ -134,14 +138,14 @@ public class LiveViewCoordinator: ObservableObject { throw CancellationError() } - if let diffPayload = replyPayload["diff"] as? Payload { + if let diffPayload = replyPayload.payload["diff"] as? Payload { try self.handleDiff(payload: diffPayload, baseURL: self.url) if let reply = diffPayload["r"] as? [String:Any] { return reply } - } else if let redirect = (replyPayload["live_redirect"] as? Payload).flatMap({ LiveRedirect(from: $0, relativeTo: self.url) }) { + } else if let redirect = (replyPayload.payload["live_redirect"] as? Payload).flatMap({ LiveRedirect(from: $0, relativeTo: self.url) }) { try await session.redirect(redirect) - } else if let redirect = (replyPayload["redirect"] as? Payload), + } else if let redirect = (replyPayload.payload["redirect"] as? Payload), let destination = (redirect["to"] as? String).flatMap({ URL.init(string: $0, relativeTo: self.url) }) { try await session.redirect(.init(kind: .push, to: destination, mode: .replaceTop)) @@ -337,12 +341,12 @@ public class LiveViewCoordinator: ObservableObject { } } - enum JoinResult { + enum JoinResult: @unchecked Sendable { case rendered(Payload) case redirect(LiveRedirect) } - private func join(channel: Channel) -> AsyncThrowingStream { + private nonisolated func join(channel: Channel) -> AsyncThrowingStream { return AsyncThrowingStream { [weak channel] (continuation: AsyncThrowingStream.Continuation) -> Void in channel?.join() .receive("ok") { [weak self, weak channel] message in @@ -367,7 +371,7 @@ public class LiveViewCoordinator: ObservableObject { return } - Task { [weak self] in + Task { @Sendable [weak self] in guard let self else { continuation.finish(throwing: LiveConnectionError.viewCoordinatorReleased) return @@ -379,8 +383,10 @@ public class LiveViewCoordinator: ObservableObject { default: await self.disconnect() } - - if let redirect = (message.payload["live_redirect"] as? Payload).flatMap({ LiveRedirect(from: $0, relativeTo: self.url) }) { + + let url = await self.url + + if let redirect = (message.payload["live_redirect"] as? Payload).flatMap({ LiveRedirect(from: $0, relativeTo: url) }) { continuation.yield(.redirect(redirect)) } else { continuation.finish(throwing: LiveConnectionError.joinError(message)) diff --git a/Sources/LiveViewNative/Environment.swift b/Sources/LiveViewNative/Environment.swift index 566076e3e..f423fc384 100644 --- a/Sources/LiveViewNative/Environment.swift +++ b/Sources/LiveViewNative/Environment.swift @@ -9,11 +9,13 @@ import SwiftUI import LiveViewNativeCore import Combine -private struct FormModelKey: EnvironmentKey { +@MainActor +private struct FormModelKey: @preconcurrency EnvironmentKey { static let defaultValue: FormModel? = nil } -private struct ModifierChangeTrackingContextKey: EnvironmentKey { +@MainActor +private struct ModifierChangeTrackingContextKey: @preconcurrency EnvironmentKey { static let defaultValue: ModifierChangeTrackingContext? = nil } @@ -39,11 +41,13 @@ final class ModifierChangeTrackingContext { } } -private struct ElementKey: EnvironmentKey { +@MainActor +private struct ElementKey: @preconcurrency EnvironmentKey { static let defaultValue: ElementNode? = nil } -private struct LiveContextStorageKey: EnvironmentKey { +@MainActor +private struct LiveContextStorageKey: @preconcurrency EnvironmentKey { static var defaultValue: Any? = nil } @@ -78,7 +82,8 @@ struct CoordinatorEnvironment { self.storage = .init(coordinator, document: document) } - fileprivate struct Key: EnvironmentKey { + @MainActor + fileprivate struct Key: @preconcurrency EnvironmentKey { static var defaultValue: CoordinatorEnvironment? = nil } } diff --git a/Sources/LiveViewNative/Live/LiveElement.swift b/Sources/LiveViewNative/Live/LiveElement.swift index 6e857a453..25d3d7967 100644 --- a/Sources/LiveViewNative/Live/LiveElement.swift +++ b/Sources/LiveViewNative/Live/LiveElement.swift @@ -77,7 +77,9 @@ public protocol _LiveElementTrackedContent { init(from element: ElementNode) throws } -@propertyWrapper public struct _LiveElementTracked: DynamicProperty { +@MainActor +@propertyWrapper +public struct _LiveElementTracked: @preconcurrency DynamicProperty { /// The ``ElementNode`` used to build a live element. @ObservedElement public var element /// The ``LiveContext`` for a live element. @@ -114,6 +116,7 @@ public extension _LiveElementTracked { /// You can provide a custom `predicate` to filter different elements. /// /// - Parameter predicate: The filter used to select child nodes for render. + @MainActor func children(_ predicate: (Node) -> Bool = { node in !node.attributes.contains(where: { $0.name.namespace == nil && $0.name.name == "template" }) }) -> some View { @@ -124,6 +127,7 @@ public extension _LiveElementTracked { /// /// - Parameter template: The ``Template`` used to filter child elements. A String literal can be provided for simple template values. /// - Parameter includeDefault: Whether elements without a `template` attribute should be included in the filter. Defaults to `false`. + @MainActor func children(in template: Template, default includeDefault: Bool = false) -> some View { children { $0.attributes.contains(where: { @@ -136,6 +140,7 @@ public extension _LiveElementTracked { /// /// - Parameter template: The ``Template`` used to filter child elements. A String literal can be provided for simple template values. /// - Parameter includeDefault: Whether elements without a `template` attribute should be included in the filter. Defaults to `false`. + @MainActor func hasTemplate(_ template: Template, default includeDefault: Bool = false) -> Bool { _element.children.contains(where: { for attribute in $0.attributes { @@ -149,15 +154,18 @@ public extension _LiveElementTracked { }) } + @MainActor func hasTemplate(_ name: String, value: String) -> Bool { hasTemplate(.init(name, value: value)) } /// Array containing children of the ``ElementNode``. + @MainActor var childNodes: [LiveViewNativeCore.Node] { _element.children } + @MainActor func childNodes(in template: Template, default includeDefault: Bool = false) -> [LiveViewNativeCore.Node] { _element.children.filter { $0.attributes.contains(where: { diff --git a/Sources/LiveViewNative/Live/LiveView.swift b/Sources/LiveViewNative/Live/LiveView.swift index 9291c736b..f85f7f1dd 100644 --- a/Sources/LiveViewNative/Live/LiveView.swift +++ b/Sources/LiveViewNative/Live/LiveView.swift @@ -131,6 +131,7 @@ public macro LiveView< /// - ``body`` /// ### See Also /// - ``LiveViewModel`` +@MainActor public struct LiveView< R: RootRegistry, PhaseView: View, @@ -149,6 +150,7 @@ public struct LiveView< let reconnectingView: (_ConnectedContent, Bool) -> ReconnectingView let errorView: (Error) -> ErrorView + @MainActor @ViewBuilder func buildPhaseView(_ phase: LiveViewPhase) -> some View { if PhaseView.self != Never.self { @@ -208,6 +210,7 @@ public struct LiveView< } } + @MainActor public var body: some View { SwiftUI.Group { buildPhaseView(phase) @@ -267,10 +270,10 @@ public struct _ConnectedContent: View { extension EnvironmentValues { enum LiveViewStateViewsKey: EnvironmentKey { - static let defaultValue: [ObjectIdentifier:(Any) -> AnyView] = [:] + static let defaultValue: [ObjectIdentifier: @MainActor (Any) -> AnyView] = [:] } - var liveViewStateViews: [ObjectIdentifier:(Any) -> AnyView] { + var liveViewStateViews: [ObjectIdentifier: @MainActor (Any) -> AnyView] { get { self[LiveViewStateViewsKey.self] } set { self[LiveViewStateViewsKey.self] = newValue } } diff --git a/Sources/LiveViewNative/Live/ReconnectLiveViewAction.swift b/Sources/LiveViewNative/Live/ReconnectLiveViewAction.swift index 51d99b470..371c543ab 100644 --- a/Sources/LiveViewNative/Live/ReconnectLiveViewAction.swift +++ b/Sources/LiveViewNative/Live/ReconnectLiveViewAction.swift @@ -8,6 +8,7 @@ import SwiftUI /// Calls ``LiveSessionCoordinator/reconnect(url:httpMethod:httpBody:)`` in the current context. +@MainActor public struct ReconnectLiveViewAction { let baseURL: URL? let action: (_ url: URL?, _ httpMethod: String?, _ httpBody: Data?) async -> () @@ -30,7 +31,8 @@ public struct ReconnectLiveViewAction { } extension EnvironmentValues { - private enum ReconnectLiveViewActionKey: EnvironmentKey { + @MainActor + private enum ReconnectLiveViewActionKey: @preconcurrency EnvironmentKey { static let defaultValue: ReconnectLiveViewAction = .init(baseURL: nil, action: { _, _, _ in }) } diff --git a/Sources/LiveViewNative/Property Wrappers/ChangeTracked.swift b/Sources/LiveViewNative/Property Wrappers/ChangeTracked.swift index ba17e57f6..605eb86cf 100644 --- a/Sources/LiveViewNative/Property Wrappers/ChangeTracked.swift +++ b/Sources/LiveViewNative/Property Wrappers/ChangeTracked.swift @@ -30,7 +30,8 @@ import Combine /// def handle_event("update-value", new_value, socket), do: ... /// ``` @propertyWrapper -public struct ChangeTracked: DynamicProperty { +@MainActor +public struct ChangeTracked: @preconcurrency DynamicProperty, Sendable { @StateObject private var localValue: LocalValue @ObservedElement var element @Environment(\.coordinatorEnvironment) var coordinator @@ -181,7 +182,7 @@ extension ChangeTracked where Value: FormValue { guard let self, self.sendChangeEvent else { return } - try await pushChangeEvent(to: changeTracked) + try await self.pushChangeEvent(to: changeTracked) } } }) @@ -213,10 +214,6 @@ extension ChangeTracked where Value: FormValue { try await changeTracked.event(value: JSONSerialization.jsonObject(with: JSONEncoder().encode([self.attribute.rawValue: encodedValue]), options: .fragmentsAllowed)) } } - - func pushChangeEvent() async throws { - try await (self.localValue as? FormLocalValue)?.pushChangeEvent(to: self) - } } private protocol LocalValueProtocol: ObservableObject { diff --git a/Sources/LiveViewNative/Property Wrappers/Event.swift b/Sources/LiveViewNative/Property Wrappers/Event.swift index d74f6f727..a758297cd 100644 --- a/Sources/LiveViewNative/Property Wrappers/Event.swift +++ b/Sources/LiveViewNative/Property Wrappers/Event.swift @@ -65,8 +65,9 @@ import AsyncAlgorithms ///- ``wrappedValue`` ///### Supporting Types ///- ``EventHandler`` +@MainActor @propertyWrapper -public struct Event: DynamicProperty, Decodable { +public struct Event: @preconcurrency DynamicProperty, @preconcurrency Decodable { @ObservedElement private var element: ElementNode @Environment(\.coordinatorEnvironment) private var coordinatorEnvironment @StateObject var handler = Handler() @@ -123,8 +124,16 @@ public struct Event: DynamicProperty, Decodable { } } + @MainActor final class Handler: ObservableObject { - let channel = AsyncChannel<(String, String, Any, Int?)>() + let channel = AsyncChannel() + + struct EventPayload: @unchecked Sendable { + let type: String + let event: String + let payload: Any + let target: Int? + } private var handlerTask: Task<(), Error>? @@ -144,21 +153,21 @@ public struct Event: DynamicProperty, Decodable { if let debounce = debounce { handlerTask = Task { [weak didSendSubject] in for await event in channel.debounce(for: .milliseconds(debounce)) { - _ = try await coordinator?.pushEvent(event.0, event.1, event.2, event.3) + _ = try await coordinator?.pushEvent(event.type, event.event, event.payload, event.target) didSendSubject?.send() } } } else if let throttle = throttle { - handlerTask = Task { [weak didSendSubject] in + handlerTask = Task { @MainActor [weak didSendSubject] in for await event in channel.throttle(for: .milliseconds(throttle)) { - _ = try await coordinator?.pushEvent(event.0, event.1, event.2, event.3) + _ = try await coordinator?.pushEvent(event.type, event.event, event.payload, event.target) didSendSubject?.send() } } } else { - handlerTask = Task { [weak didSendSubject] in + handlerTask = Task { @MainActor [weak didSendSubject] in for await event in channel { - _ = try await coordinator?.pushEvent(event.0, event.1, event.2, event.3) + _ = try await coordinator?.pushEvent(event.type, event.event, event.payload, event.target) didSendSubject?.send() } } @@ -327,7 +336,12 @@ public struct Event: DynamicProperty, Decodable { guard let event else { return } - await owner.handler.channel.send((owner.type, event, owner.params ?? value, owner.target ?? owner.element.attributeValue(for: "phx-target").flatMap(Int.init))) + await owner.handler.channel.send(.init( + type: owner.type, + event: event, + payload: owner.params ?? value, + target: owner.target ?? owner.element.attributeValue(for: "phx-target").flatMap(Int.init) + )) } public func callAsFunction(value: Any = [String:String](), in context: LiveContext) async throws { @@ -340,7 +354,12 @@ public struct Event: DynamicProperty, Decodable { debounce: owner.debounce, throttle: owner.throttle ) - await handler.channel.send((owner.type, event, owner.params ?? value, owner.target)) + await handler.channel.send(.init( + type: owner.type, + event: event, + payload: owner.params ?? value, + target: owner.target + )) } } } diff --git a/Sources/LiveViewNative/Property Wrappers/FormState.swift b/Sources/LiveViewNative/Property Wrappers/FormState.swift index 809ee790b..742ea2a02 100644 --- a/Sources/LiveViewNative/Property Wrappers/FormState.swift +++ b/Sources/LiveViewNative/Property Wrappers/FormState.swift @@ -54,6 +54,7 @@ private let logger = Logger(subsystem: "LiveViewNative", category: "FormState") /// } /// } /// ``` +@MainActor @propertyWrapper public struct FormState { private let defaultValue: Value @@ -236,7 +237,7 @@ public struct FormState { } } -extension FormState: DynamicProperty { +extension FormState: @preconcurrency DynamicProperty { public func update() { resolveMode() } @@ -244,6 +245,7 @@ extension FormState: DynamicProperty { // This class contains any data that may need to change during a view update (since @State can't be used). // It also serves to notify SwiftUI when this @FormState's particular field has changed (as opposed to updates for other fields). +@MainActor private class FormStateData: ObservableObject { var mode: Mode = .unknown diff --git a/Sources/LiveViewNative/Property Wrappers/LiveContext.swift b/Sources/LiveViewNative/Property Wrappers/LiveContext.swift index 6be675a15..0b654cf18 100644 --- a/Sources/LiveViewNative/Property Wrappers/LiveContext.swift +++ b/Sources/LiveViewNative/Property Wrappers/LiveContext.swift @@ -20,6 +20,7 @@ import LiveViewNativeCore /// } /// } /// ``` +@MainActor @propertyWrapper public struct LiveContext: DynamicProperty { @Environment(\.anyLiveContextStorage) private var anyStorage diff --git a/Sources/LiveViewNative/Property Wrappers/ObservedElement.swift b/Sources/LiveViewNative/Property Wrappers/ObservedElement.swift index 77c73f01e..e8c43f8d8 100644 --- a/Sources/LiveViewNative/Property Wrappers/ObservedElement.swift +++ b/Sources/LiveViewNative/Property Wrappers/ObservedElement.swift @@ -49,6 +49,7 @@ import Combine /// } /// } /// ``` +@MainActor @propertyWrapper public struct ObservedElement { @Environment(\.coordinatorEnvironment) private var coordinator: CoordinatorEnvironment? @@ -92,7 +93,7 @@ public struct ObservedElement { var children: [Node] { overrideElement.flatMap({ Array($0.children()) }) ?? observer.resolvedChildren } } -extension ObservedElement: DynamicProperty { +extension ObservedElement: @preconcurrency DynamicProperty { public mutating func update() { guard let coordinator else { fatalError("Cannot use @ObservedElement on view that does not have an element and coordinator in the environment") diff --git a/Sources/LiveViewNative/Protocols/ContentBuilder.swift b/Sources/LiveViewNative/Protocols/ContentBuilder.swift index e09f768de..61a5ff0d9 100644 --- a/Sources/LiveViewNative/Protocols/ContentBuilder.swift +++ b/Sources/LiveViewNative/Protocols/ContentBuilder.swift @@ -215,6 +215,7 @@ import LiveViewNativeStylesheet /// } /// } /// ``` +@MainActor public protocol ContentBuilder { /// An enum with the supported element names. associatedtype TagName: RawRepresentable @@ -309,8 +310,9 @@ public extension ContentBuilder { /// } /// } /// ``` +@MainActor @propertyWrapper -public struct ContentBuilderContext: DynamicProperty { +public struct ContentBuilderContext: @preconcurrency DynamicProperty { @Environment(\.coordinatorEnvironment) private var coordinatorEnvironment @LiveContext private var context @Environment(\.stylesheet) private var stylesheet @@ -333,6 +335,7 @@ public struct ContentBuilderContext: D ) } + @MainActor public struct Value { let coordinatorEnvironment: CoordinatorEnvironment? public let context: LiveContext diff --git a/Sources/LiveViewNative/Registries/AggregateRegistry.swift b/Sources/LiveViewNative/Registries/AggregateRegistry.swift index 30c16f4a2..fba12bea8 100644 --- a/Sources/LiveViewNative/Registries/AggregateRegistry.swift +++ b/Sources/LiveViewNative/Registries/AggregateRegistry.swift @@ -135,7 +135,8 @@ public enum _EitherCustomModifier _ParserType(context: context) } - public struct _ParserType: Parser { + @MainActor + public struct _ParserType: @preconcurrency Parser { let context: ParseableModifierContext public func parse(_ input: inout Substring.UTF8View) throws -> _EitherCustomModifier { diff --git a/Sources/LiveViewNative/Registries/BuiltinRegistry.swift b/Sources/LiveViewNative/Registries/BuiltinRegistry.swift index 0c7e912b4..9afd3447c 100644 --- a/Sources/LiveViewNative/Registries/BuiltinRegistry.swift +++ b/Sources/LiveViewNative/Registries/BuiltinRegistry.swift @@ -15,6 +15,7 @@ protocol BuiltinRegistryProtocol { associatedtype BuiltinModifier: ViewModifier & ParseableModifierValue } +@MainActor struct BuiltinRegistry: BuiltinRegistryProtocol { static func lookup(_ name: String, _ element: ElementNode) -> some View { return BuiltinElement(name: name, element: element) diff --git a/Sources/LiveViewNative/Registries/CustomRegistry.swift b/Sources/LiveViewNative/Registries/CustomRegistry.swift index 2478e29ef..03c270da3 100644 --- a/Sources/LiveViewNative/Registries/CustomRegistry.swift +++ b/Sources/LiveViewNative/Registries/CustomRegistry.swift @@ -71,6 +71,7 @@ public macro Addon() = #externalMacro(module: "LiveViewNativeMacros", type: "Add /// ### Supporting Types /// - ``EmptyRegistry`` /// - ``ViewModifierBuilder`` +@MainActor public protocol CustomRegistry { /// The root custom registry type that the live view coordinator and context use. /// @@ -247,7 +248,8 @@ extension CustomRegistry where TagName == EmptyRegistry.None, CustomView == Neve public protocol RootRegistry: CustomRegistry where Root == Self { } -public struct CustomModifierGroupParser: Parser where P.Input == Substring.UTF8View, P.Output == Output { +@MainActor +public struct CustomModifierGroupParser: @preconcurrency Parser where P.Input == Substring.UTF8View, P.Output == Output { public let parser: P @inlinable diff --git a/Sources/LiveViewNative/Stylesheets/AttributeReference.swift b/Sources/LiveViewNative/Stylesheets/AttributeReference.swift index d3bf08233..ac34a99e5 100644 --- a/Sources/LiveViewNative/Stylesheets/AttributeReference.swift +++ b/Sources/LiveViewNative/Stylesheets/AttributeReference.swift @@ -22,6 +22,7 @@ import LiveViewNativeCore /// ``` /// /// The attribute will be automatically decoded to the correct type using the conformance to ``AttributeDecodable``. +@MainActor public struct AttributeReference: ParseableModifierValue { enum Storage { case constant(Value) diff --git a/Sources/LiveViewNative/Stylesheets/Modifiers/Shapes/ShapeModifier.swift b/Sources/LiveViewNative/Stylesheets/Modifiers/Shapes/ShapeModifier.swift index 9ce9ba36d..f2d8ac9f6 100644 --- a/Sources/LiveViewNative/Stylesheets/Modifiers/Shapes/ShapeModifier.swift +++ b/Sources/LiveViewNative/Stylesheets/Modifiers/Shapes/ShapeModifier.swift @@ -9,6 +9,7 @@ import SwiftUI import LiveViewNativeStylesheet /// A `ViewModifier` that can be applied directly to `Shape`. +@MainActor protocol ShapeModifier { associatedtype Root: RootRegistry associatedtype ModifiedShape: SwiftUI.Shape @@ -17,6 +18,7 @@ protocol ShapeModifier { } /// A `ViewModifier` that can be applied directly to `Shape`. +@MainActor protocol ShapeFinalizerModifier { associatedtype Root: RootRegistry associatedtype FinalizedShape: SwiftUI.View diff --git a/Sources/LiveViewNative/Stylesheets/ParseableTypes/AnyCoordinateSpaceProtocol.swift b/Sources/LiveViewNative/Stylesheets/ParseableTypes/AnyCoordinateSpaceProtocol.swift index 06f72c943..20293b56c 100644 --- a/Sources/LiveViewNative/Stylesheets/ParseableTypes/AnyCoordinateSpaceProtocol.swift +++ b/Sources/LiveViewNative/Stylesheets/ParseableTypes/AnyCoordinateSpaceProtocol.swift @@ -9,7 +9,7 @@ import SwiftUI import LiveViewNativeStylesheet @available(iOS 17.0, macOS 14.0, tvOS 17.0, watchOS 10.0, *) -extension AnyCoordinateSpaceProtocol: CoordinateSpaceProtocol {} +extension AnyCoordinateSpaceProtocol: @preconcurrency CoordinateSpaceProtocol {} /// See [`SwiftUI.CoordinateSpaceProtocol`](https://developer.apple.com/documentation/swiftui/CoordinateSpaceProtocol) for more details. /// @@ -30,6 +30,7 @@ extension AnyCoordinateSpaceProtocol: CoordinateSpaceProtocol {} /// .scrollView(axis: .horizontal) /// ``` @_documentation(visibility: public) +@MainActor struct AnyCoordinateSpaceProtocol: ParseableModifierValue { let coordinateSpace: CoordinateSpace diff --git a/Sources/LiveViewNative/Stylesheets/ParseableTypes/AnyGesture+ParseableModifierValue.swift b/Sources/LiveViewNative/Stylesheets/ParseableTypes/AnyGesture+ParseableModifierValue.swift index ce4687cd2..c460c4279 100644 --- a/Sources/LiveViewNative/Stylesheets/ParseableTypes/AnyGesture+ParseableModifierValue.swift +++ b/Sources/LiveViewNative/Stylesheets/ParseableTypes/AnyGesture+ParseableModifierValue.swift @@ -208,6 +208,7 @@ struct _AnyGesture: ParseableModifierValue { case .onEnded(let onEnded): return AnyGesture(gesture.onEnded({ value in Task { + @MainActor func sendEventValue(_ eventValue: [String:Any]) async throws { let eventValue = eventValue.merging(element.buildPhxValuePayload(), uniquingKeysWith: { $1 }) try await onEnded.action(value: eventValue, in: context) @@ -311,6 +312,7 @@ struct _AnyGesture: ParseableModifierValue { } #if !os(tvOS) + @MainActor @ParseableExpression struct Drag { static let name = "DragGesture" @@ -339,6 +341,7 @@ struct _AnyGesture: ParseableModifierValue { } #if os(iOS) || os(macOS) || os(visionOS) + @MainActor @ParseableExpression struct Magnify { static let name = "MagnifyGesture" @@ -353,6 +356,7 @@ struct _AnyGesture: ParseableModifierValue { } } + @MainActor @ParseableExpression struct Rotate { static let name = "RotateGesture" @@ -369,6 +373,7 @@ struct _AnyGesture: ParseableModifierValue { #endif #if !os(tvOS) + @MainActor @ParseableExpression struct SpatialTap { static let name = "SpatialTapGesture" @@ -380,6 +385,7 @@ struct _AnyGesture: ParseableModifierValue { } #endif + @MainActor @ParseableExpression struct Tap { static let name = "TapGesture" @@ -392,7 +398,8 @@ struct _AnyGesture: ParseableModifierValue { } extension EnvironmentValues { - private enum GestureStateKey: EnvironmentKey { + @MainActor + private enum GestureStateKey: @preconcurrency EnvironmentKey { static let defaultValue: GestureState<[String:Any]> = .init(initialValue: [:]) } diff --git a/Sources/LiveViewNative/Stylesheets/ParseableTypes/AnyPresentationSizing.swift b/Sources/LiveViewNative/Stylesheets/ParseableTypes/AnyPresentationSizing.swift index e7f169ab3..e6fb533f6 100644 --- a/Sources/LiveViewNative/Stylesheets/ParseableTypes/AnyPresentationSizing.swift +++ b/Sources/LiveViewNative/Stylesheets/ParseableTypes/AnyPresentationSizing.swift @@ -21,7 +21,8 @@ import LiveViewNativeStylesheet /// - `sticky(horizontal: Bool, vertical: Bool)` @_documentation(visibility: public) @available(iOS 18.0, watchOS 11.0, tvOS 18.0, macOS 15.0, visionOS 2.0, *) -struct AnyPresentationSizing: PresentationSizing, ParseableModifierValue { +@MainActor +struct AnyPresentationSizing: @preconcurrency PresentationSizing, ParseableModifierValue { let value: any PresentationSizing func proposedSize(for root: PresentationSizingRoot, context: PresentationSizingContext) -> ProposedViewSize { diff --git a/Sources/LiveViewNative/Stylesheets/ParseableTypes/AnyScrollTargetBehavior.swift b/Sources/LiveViewNative/Stylesheets/ParseableTypes/AnyScrollTargetBehavior.swift index 7a926e085..c08e034fe 100644 --- a/Sources/LiveViewNative/Stylesheets/ParseableTypes/AnyScrollTargetBehavior.swift +++ b/Sources/LiveViewNative/Stylesheets/ParseableTypes/AnyScrollTargetBehavior.swift @@ -23,7 +23,8 @@ import LiveViewNativeStylesheet /// ``` @_documentation(visibility: public) @available(iOS 17.0, macOS 14.0, tvOS 17.0, watchOS 10.0, *) -struct AnyScrollTargetBehavior: ParseableModifierValue, ScrollTargetBehavior { +@MainActor +struct AnyScrollTargetBehavior: ParseableModifierValue, @preconcurrency ScrollTargetBehavior { let _updateTarget: (inout ScrollTarget, ScrollTargetBehaviorContext) -> () func updateTarget(_ target: inout ScrollTarget, context: Self.TargetContext) { diff --git a/Sources/LiveViewNative/Stylesheets/ParseableTypes/ParseableRangeExpression.swift b/Sources/LiveViewNative/Stylesheets/ParseableTypes/ParseableRangeExpression.swift index e19a10988..038cfc451 100644 --- a/Sources/LiveViewNative/Stylesheets/ParseableTypes/ParseableRangeExpression.swift +++ b/Sources/LiveViewNative/Stylesheets/ParseableTypes/ParseableRangeExpression.swift @@ -45,7 +45,7 @@ import LiveViewNativeStylesheet /// 1..<10 /// ``` @_documentation(visibility: public) -struct ParseableRangeExpression: RangeExpression, ParseableModifierValue { +struct ParseableRangeExpression: @preconcurrency RangeExpression, ParseableModifierValue { let value: any RangeExpression func relative(to collection: C) -> Range where C : Collection, Bound == C.Index { diff --git a/Sources/LiveViewNative/Stylesheets/ParseableTypes/ShapeStyles/AnyShapeStyle+ParseableModifierValue.swift b/Sources/LiveViewNative/Stylesheets/ParseableTypes/ShapeStyles/AnyShapeStyle+ParseableModifierValue.swift index feb6b58d6..34bb78a49 100644 --- a/Sources/LiveViewNative/Stylesheets/ParseableTypes/ShapeStyles/AnyShapeStyle+ParseableModifierValue.swift +++ b/Sources/LiveViewNative/Stylesheets/ParseableTypes/ShapeStyles/AnyShapeStyle+ParseableModifierValue.swift @@ -229,7 +229,8 @@ public extension AnyShapeStyle { BaseParser(context: context) } - private struct BaseParser: Parser { + @MainActor + private struct BaseParser: @preconcurrency Parser { let context: ParseableModifierContext func parse(_ input: inout Substring.UTF8View) throws -> Storage { @@ -287,6 +288,7 @@ public extension AnyShapeStyle { } } + @MainActor @ParseableExpression enum _angularGradient { static let name = "angularGradient" @@ -346,6 +348,7 @@ public extension AnyShapeStyle { } } + @MainActor @ParseableExpression enum _conicGradient { static let name = "conicGradient" @@ -385,6 +388,7 @@ public extension AnyShapeStyle { } } + @MainActor @ParseableExpression enum _ellipticalGradient { static let name = "ellipticalGradient" @@ -424,6 +428,7 @@ public extension AnyShapeStyle { } } + @MainActor @ParseableExpression enum _linearGradient { static let name = "linearGradient" @@ -463,6 +468,7 @@ public extension AnyShapeStyle { } } + @MainActor @ParseableExpression enum _radialGradient { static let name = "radialGradient" diff --git a/Sources/LiveViewNative/Stylesheets/ParseableTypes/ShapeStyles/Color+ParseableModifierValue.swift b/Sources/LiveViewNative/Stylesheets/ParseableTypes/ShapeStyles/Color+ParseableModifierValue.swift index a9e86ec0c..f093059a9 100644 --- a/Sources/LiveViewNative/Stylesheets/ParseableTypes/ShapeStyles/Color+ParseableModifierValue.swift +++ b/Sources/LiveViewNative/Stylesheets/ParseableTypes/ShapeStyles/Color+ParseableModifierValue.swift @@ -65,28 +65,30 @@ import LiveViewNativeCore /// ``` @_documentation(visibility: public) public extension SwiftUI.Color { + @MainActor struct Resolvable: ParseableModifierValue { + @MainActor enum Storage { case reference(AttributeName) case constant(SwiftUI.Color) case named(AttributeReference) case components( - colorSpace: AttributeReference = .init(storage: .constant(.sRGB)), + colorSpace: AttributeReference?, red: AttributeReference, green: AttributeReference, blue: AttributeReference, - opacity: AttributeReference = .init(storage: .constant(1)) + opacity: AttributeReference? ) case monochrome( - colorSpace: AttributeReference = .init(storage: .constant(.sRGB)), + colorSpace: AttributeReference?, white: AttributeReference, - opacity: AttributeReference = .init(storage: .constant(1)) + opacity: AttributeReference? ) case hsb( hue: AttributeReference, saturation: AttributeReference, brightness: AttributeReference, - opacity: AttributeReference = .init(storage: .constant(1)) + opacity: AttributeReference? ) } @@ -113,24 +115,24 @@ public extension SwiftUI.Color { SwiftUI.Color.init(name.resolve(on: element, in: context), bundle: nil) case let .components(colorSpace, red, green, blue, opacity): SwiftUI.Color( - colorSpace.resolve(on: element, in: context), + colorSpace?.resolve(on: element, in: context) ?? .sRGB, red: red.resolve(on: element, in: context), green: green.resolve(on: element, in: context), blue: blue.resolve(on: element, in: context), - opacity: opacity.resolve(on: element, in: context) + opacity: opacity?.resolve(on: element, in: context) ?? 1 ) case let .monochrome(colorSpace, white, opacity): SwiftUI.Color( - colorSpace.resolve(on: element, in: context), + colorSpace?.resolve(on: element, in: context) ?? .sRGB, white: white.resolve(on: element, in: context), - opacity: opacity.resolve(on: element, in: context) + opacity: opacity?.resolve(on: element, in: context) ?? 1 ) case let .hsb(hue, saturation, brightness, opacity): SwiftUI.Color( hue: hue.resolve(on: element, in: context), saturation: saturation.resolve(on: element, in: context), brightness: brightness.resolve(on: element, in: context), - opacity: opacity.resolve(on: element, in: context) + opacity: opacity?.resolve(on: element, in: context) ?? 1 ) } return modifiers.reduce(into: base) { @@ -148,24 +150,24 @@ public extension SwiftUI.Color { SwiftUI.Color.init(name.constant(default: ""), bundle: nil) case let .components(colorSpace, red, green, blue, opacity): SwiftUI.Color( - colorSpace.constant(default: .sRGB), + colorSpace?.constant(default: .sRGB) ?? .sRGB, red: red.constant(default: 0), green: green.constant(default: 0), blue: blue.constant(default: 0), - opacity: opacity.constant(default: 1) + opacity: opacity?.constant(default: 1) ?? 1 ) case let .monochrome(colorSpace, white, opacity): SwiftUI.Color( - colorSpace.constant(default: .sRGB), + colorSpace?.constant(default: .sRGB) ?? .sRGB, white: white.constant(default: 0), - opacity: opacity.constant(default: 1) + opacity: opacity?.constant(default: 1) ?? 1 ) case let .hsb(hue, saturation, brightness, opacity): SwiftUI.Color( hue: hue.constant(default: 0), saturation: saturation.constant(default: 0), brightness: brightness.constant(default: 0), - opacity: opacity.constant(default: 1) + opacity: opacity?.constant(default: 1) ?? 1 ) } } @@ -175,6 +177,7 @@ public extension SwiftUI.Color { .map(\.base) } + @MainActor @ParseableExpression struct CustomColor { static let name = "Color" @@ -261,7 +264,8 @@ public extension SwiftUI.Color { } } -struct _ColorParser: Parser where Members.Input == Substring.UTF8View { +@MainActor +struct _ColorParser: @preconcurrency Parser where Members.Input == Substring.UTF8View { let context: ParseableModifierContext @ParserBuilder let members: Members @@ -321,15 +325,18 @@ struct _ColorParser: Parser where Members.Input == Substring.UT } } + @MainActor private enum AnyColorModifier { case colorModifier(ColorModifier) case member(Members.Output) } } +@MainActor enum ColorModifier { case opacity(Opacity) + @MainActor @ParseableExpression struct Opacity { static let name = "opacity" diff --git a/Sources/LiveViewNative/Stylesheets/ParseableTypes/ShapeStyles/ShadowStyle+ParseableModifierValue.swift b/Sources/LiveViewNative/Stylesheets/ParseableTypes/ShapeStyles/ShadowStyle+ParseableModifierValue.swift index 79b2dd1b0..c429119bc 100644 --- a/Sources/LiveViewNative/Stylesheets/ParseableTypes/ShapeStyles/ShadowStyle+ParseableModifierValue.swift +++ b/Sources/LiveViewNative/Stylesheets/ParseableTypes/ShapeStyles/ShadowStyle+ParseableModifierValue.swift @@ -38,6 +38,7 @@ import LiveViewNativeStylesheet /// .inner(color: .red, radius: 8, x: 10, y: -8) /// ``` @_documentation(visibility: public) +@MainActor enum _ShadowStyle: ParseableModifierValue { case drop(_drop) case inner(_inner) @@ -70,6 +71,7 @@ enum _ShadowStyle: ParseableModifierValue { } } + @MainActor @ParseableExpression struct _drop { static let name = "drop" @@ -92,6 +94,7 @@ enum _ShadowStyle: ParseableModifierValue { } } + @MainActor @ParseableExpression struct _inner { static let name = "inner" diff --git a/Sources/LiveViewNative/Stylesheets/ParseableTypes/Styles/AnyTextFieldStyle+ParseableModifierValue.swift b/Sources/LiveViewNative/Stylesheets/ParseableTypes/Styles/AnyTextFieldStyle+ParseableModifierValue.swift index ae4d1e0e5..0fb610743 100644 --- a/Sources/LiveViewNative/Stylesheets/ParseableTypes/Styles/AnyTextFieldStyle+ParseableModifierValue.swift +++ b/Sources/LiveViewNative/Stylesheets/ParseableTypes/Styles/AnyTextFieldStyle+ParseableModifierValue.swift @@ -15,7 +15,8 @@ import LiveViewNativeStylesheet /// - `.roundedBorder` /// - `.plain` @_documentation(visibility: public) -enum AnyTextFieldStyle: String, CaseIterable, ParseableModifierValue, TextFieldStyle { +@MainActor +enum AnyTextFieldStyle: String, CaseIterable, ParseableModifierValue, @preconcurrency TextFieldStyle { typealias _ParserType = ImplicitStaticMember> case automatic diff --git a/Sources/LiveViewNative/Stylesheets/Stylesheet.swift b/Sources/LiveViewNative/Stylesheets/Stylesheet.swift index e37692047..ad0a150e1 100644 --- a/Sources/LiveViewNative/Stylesheets/Stylesheet.swift +++ b/Sources/LiveViewNative/Stylesheets/Stylesheet.swift @@ -8,7 +8,8 @@ private let logger = Logger(subsystem: "LiveViewNative", category: "Stylesheet") /// A type that stores a map between classes and an array of modifiers. /// /// The raw content of the stylesheet is retained so it can re-parsed in a different context. -public struct Stylesheet { +@MainActor +public struct Stylesheet: Sendable { let content: [String] let classes: [String:[BuiltinRegistry.BuiltinModifier]] @@ -45,7 +46,7 @@ actor StylesheetCache { } } -extension Stylesheet: AttributeDecodable { +extension Stylesheet: @preconcurrency AttributeDecodable { public init(from attribute: LiveViewNativeCore.Attribute?, on element: ElementNode) throws { guard let value = attribute?.value else { throw AttributeDecodingError.missingAttribute(Self.self) } diff --git a/Sources/LiveViewNative/Stylesheets/StylesheetParser.swift b/Sources/LiveViewNative/Stylesheets/StylesheetParser.swift index 50621a0a9..220396850 100644 --- a/Sources/LiveViewNative/Stylesheets/StylesheetParser.swift +++ b/Sources/LiveViewNative/Stylesheets/StylesheetParser.swift @@ -5,7 +5,8 @@ import OSLog private let logger = Logger(subsystem: "LiveViewNative", category: "Stylesheet") -struct StylesheetParser: Parser { +@MainActor +struct StylesheetParser: @preconcurrency Parser { let context: ParseableModifierContext func parse(_ input: inout Substring.UTF8View) throws -> Dictionary> { @@ -52,7 +53,8 @@ struct StylesheetParser: Parser { return classes } - struct RecoverableModifier: Parser { + @MainActor + struct RecoverableModifier: @preconcurrency Parser { let className: String let context: ParseableModifierContext diff --git a/Sources/LiveViewNative/Stylesheets/ViewReference.swift b/Sources/LiveViewNative/Stylesheets/ViewReference.swift index 59d0e26c5..c9e2ffb22 100644 --- a/Sources/LiveViewNative/Stylesheets/ViewReference.swift +++ b/Sources/LiveViewNative/Stylesheets/ViewReference.swift @@ -232,7 +232,9 @@ private enum FromNodeValue { } /// A builder for `ToolbarContent`. +@MainActor struct ToolbarTreeBuilder { + @MainActor func fromNodes(_ e: Nodes, context c: LiveContextStorage) -> some ToolbarContent where Nodes: RandomAccessCollection, Nodes.Index == Int, Nodes.Element == Node { @@ -264,11 +266,13 @@ struct ToolbarTreeBuilder { } // alias for typing + @MainActor @inline(__always) fileprivate func f(_ n: FromNodeValue?, _ c: LiveContextStorage) -> some ToolbarContent { return n.flatMap({ fromNode($0, context: c) }) } + @MainActor @ToolbarContentBuilder fileprivate func fromNode(_ node: FromNodeValue, context: LiveContextStorage) -> some ToolbarContent { // ToolbarTreeBuilder.fromNode may not be called with a root or leaf node @@ -284,6 +288,7 @@ struct ToolbarTreeBuilder { } } + @MainActor @ToolbarContentBuilder static func lookup(_ node: ElementNode) -> some ToolbarContent { switch node.tag { @@ -302,7 +307,9 @@ struct ToolbarTreeBuilder { } /// A builder for `CustomizableToolbarContent`. +@MainActor struct CustomizableToolbarTreeBuilder { + @MainActor func fromNodes(_ e: Nodes, context c: LiveContextStorage) -> some CustomizableToolbarContent where Nodes: RandomAccessCollection, Nodes.Index == Int, Nodes.Element == Node { @@ -334,11 +341,13 @@ struct CustomizableToolbarTreeBuilder { } // alias for typing + @MainActor @inline(__always) fileprivate func f(_ n: FromNodeValue?, _ c: LiveContextStorage) -> some CustomizableToolbarContent { return n.flatMap({ fromNode($0, context: c) }) } + @MainActor @ToolbarContentBuilder fileprivate func fromNode(_ node: FromNodeValue, context: LiveContextStorage) -> some CustomizableToolbarContent { // CustomizableToolbarTreeBuilder.fromNode may not be called with a root or leaf node @@ -354,6 +363,7 @@ struct CustomizableToolbarTreeBuilder { } } + @MainActor @ToolbarContentBuilder static func lookup(_ node: ElementNode) -> some CustomizableToolbarContent { switch node.tag { diff --git a/Sources/LiveViewNative/Utils/ElixirDateFormats.swift b/Sources/LiveViewNative/Utils/ElixirDateFormats.swift index 78d7a952c..797b21438 100644 --- a/Sources/LiveViewNative/Utils/ElixirDateFormats.swift +++ b/Sources/LiveViewNative/Utils/ElixirDateFormats.swift @@ -8,7 +8,7 @@ import Foundation /// A formatter that parses ISO8601 dates as produced by Elixir's `DateTime`. -fileprivate let dateTimeFormatter: ISO8601DateFormatter = { +nonisolated(unsafe) fileprivate let dateTimeFormatter: ISO8601DateFormatter = { let formatter = ISO8601DateFormatter() formatter.formatOptions = [.withFullDate, .withFullTime, .withFractionalSeconds] return formatter diff --git a/Sources/LiveViewNative/ViewModel.swift b/Sources/LiveViewNative/ViewModel.swift index 200a59bfe..8f51ca827 100644 --- a/Sources/LiveViewNative/ViewModel.swift +++ b/Sources/LiveViewNative/ViewModel.swift @@ -13,6 +13,7 @@ import LiveViewNativeCore /// The working-copy data model for a ``LiveView``. /// /// In a view in the LiveView tree, a model can be obtained using `@EnvironmentObject`. +@MainActor public class LiveViewModel: ObservableObject { private var forms = [String: FormModel]() @@ -39,11 +40,12 @@ public class LiveViewModel: ObservableObject { /// A form model stores the working copy of the data for a specific `
` element. /// /// To obtain a form model, use ``LiveViewModel/getForm(elementID:)`` or the `\.formModel` environment key. +@MainActor public class FormModel: ObservableObject, CustomDebugStringConvertible { let elementID: String - @_spi(LiveForm) public var pushEventImpl: ((String, String, Any, Int?) async throws -> [String:Any]?)! + @_spi(LiveForm) public var pushEventImpl: (@MainActor (String, String, Any, Int?) async throws -> [String:Any]?)! - var changeEvent: ((Any) -> ())? + var changeEvent: ((Any) async throws -> ())? var submitEvent: String? /// An action called when no `phx-submit` event is present. /// @@ -61,10 +63,13 @@ public class FormModel: ObservableObject, CustomDebugStringConvertible { self.elementID = elementID } - @_spi(LiveForm) public func updateFromElement(_ element: ElementNode, submitAction: @escaping () -> ()) { + @_spi(LiveForm) @preconcurrency public func updateFromElement(_ element: ElementNode, submitAction: @escaping () -> ()) { + let pushEventImpl = pushEventImpl! self.changeEvent = element.attributeValue(for: .init(name: "phx-change")).flatMap({ event in { value in - Task { [weak self] in try await self?.pushEventImpl("form", event, value, nil) } + Task { + _ = try await pushEventImpl("form", event, value, nil) + } } }) self.submitEvent = element.attributeValue(for: .init(name: "phx-submit")) @@ -76,7 +81,6 @@ public class FormModel: ObservableObject, CustomDebugStringConvertible { /// This method has no effect if the `` does not have a `phx-change` event configured. /// /// See ``LiveViewCoordinator/pushEvent(type:event:value:target:)`` for more information. - @MainActor public func sendChangeEvent(_ value: any FormValue, for name: String, event: Event?) async throws { guard let event = sendChangeEventForFormElement(value, for: name, event?.wrappedValue.callAsFunction) ?? sendChangeEventForForm(for: name, changeEvent) else { return } @@ -89,7 +93,6 @@ public class FormModel: ObservableObject, CustomDebugStringConvertible { /// This method has no effect if the `` does not have a `phx-submit` event configured. /// /// See ``LiveViewCoordinator/pushEvent(type:event:value:target:)`` for more information. - @MainActor public func sendSubmitEvent() async throws { formWillSubmit.send(()) if let submitEvent = submitEvent { @@ -153,13 +156,12 @@ public class FormModel: ObservableObject, CustomDebugStringConvertible { return components } - @MainActor private func pushFormEvent(_ event: String) async throws { // the `form` event type expects a URL encoded payload (e.g., `a=b&c=d`) _ = try await pushEventImpl("form", event, try buildFormQuery(), nil) } - public var debugDescription: String { + nonisolated public var debugDescription: String { return "FormModel(element: #\(elementID), id: \(ObjectIdentifier(self))" } diff --git a/Sources/LiveViewNative/ViewTree.swift b/Sources/LiveViewNative/ViewTree.swift index 00436e0c2..8b78a4916 100644 --- a/Sources/LiveViewNative/ViewTree.swift +++ b/Sources/LiveViewNative/ViewTree.swift @@ -10,6 +10,7 @@ import SwiftUI import LiveViewNativeCore import LiveViewNativeStylesheet +@MainActor struct ViewTreeBuilder { func fromNodes(_ nodes: NodeChildrenSequence, coordinator: LiveViewCoordinator, url: URL) -> some View { let context = LiveContextStorage(coordinator: coordinator, url: url) @@ -119,9 +120,10 @@ extension CodingUserInfoKey { static var modifierAnimationScale: Self { .init(rawValue: "modifierAnimationScale")! } } +@MainActor @propertyWrapper @LiveElement -struct ClassModifiers: DynamicProperty { +struct ClassModifiers: @preconcurrency DynamicProperty { @LiveAttribute(.init(name: "class")) private var `class`: String? @LiveAttribute(.init(name: "style")) private var style: String? @@ -218,7 +220,8 @@ private struct ModifierObserver: View { } extension EnvironmentValues { - private enum StylesheetKey: EnvironmentKey { + private enum StylesheetKey: @preconcurrency EnvironmentKey { + @MainActor static let defaultValue: Any = Stylesheet(content: [], classes: [:]) } @@ -303,6 +306,7 @@ enum ForEachElement: Identifiable { } } // not fileprivate because List needs to use it so it has access to ForEach modifiers +@MainActor func forEach(nodes: some Collection, context: LiveContextStorage) -> some DynamicViewContent { let elements = nodes.map { (node) -> ForEachElement in if let element = node.asElement(), diff --git a/Sources/LiveViewNative/_GeneratedModifiers.swift b/Sources/LiveViewNative/_GeneratedModifiers.swift index 876831753..cfe08f904 100644 --- a/Sources/LiveViewNative/_GeneratedModifiers.swift +++ b/Sources/LiveViewNative/_GeneratedModifiers.swift @@ -59,7 +59,7 @@ struct _accessibilityActionModifier: ViewModifier { enum Value { case _never - indirect case _0(label: ViewReference=ViewReference(value: [])) + indirect case _0(label: ViewReference) } @@ -109,7 +109,7 @@ struct _accessibilityActionsModifier: ViewModifier { indirect case _0(category: Any,content: Any) #endif - indirect case _1(content: ViewReference=ViewReference(value: [])) + indirect case _1(content: ViewReference) } @@ -125,7 +125,7 @@ struct _accessibilityActionsModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(tvOS 18.0,macOS 15.0,visionOS 2.0,iOS 18.0,watchOS 11.0, *) + @available(tvOS 18.0,watchOS 11.0,visionOS 2.0,iOS 18.0,macOS 15.0, *) init(category: SwiftUI.AccessibilityActionCategory,content content: ViewReference=ViewReference(value: [])) { self.value = ._0(category: category, content: content) @@ -145,7 +145,7 @@ struct _accessibilityActionsModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(category, content): - if #available(tvOS 18.0,macOS 15.0,visionOS 2.0,iOS 18.0,watchOS 11.0, *) { + if #available(tvOS 18.0,watchOS 11.0,visionOS 2.0,iOS 18.0,macOS 15.0, *) { let category = category as! SwiftUI.AccessibilityActionCategory let content = content as! ViewReference @@ -177,7 +177,7 @@ struct _accessibilityChildrenModifier: ViewModifier { enum Value { case _never - indirect case _0(children: ViewReference=ViewReference(value: [])) + indirect case _0(children: ViewReference) } @@ -224,7 +224,7 @@ struct _accessibilityIgnoresInvertColorsModifier: ViewModifier enum Value { case _never - indirect case _0(active: AttributeReference = .init(storage: .constant(true)) ) + indirect case _0(active: AttributeReference) } @@ -271,7 +271,7 @@ struct _accessibilityRepresentationModifier: ViewModifier { enum Value { case _never - indirect case _0(representation: ViewReference=ViewReference(value: [])) + indirect case _0(representation: ViewReference) } @@ -318,7 +318,7 @@ struct _accessibilityShowsLargeContentViewerModifier: ViewModif enum Value { case _never - indirect case _0(largeContentView: ViewReference=ViewReference(value: [])) + indirect case _0(largeContentView: ViewReference) case _1 @@ -388,25 +388,25 @@ struct _alertModifier: ViewModifier { enum Value { case _never - indirect case _0(titleKey: SwiftUICore.LocalizedStringKey,actions: ViewReference=ViewReference(value: [])) + indirect case _0(titleKey: SwiftUICore.LocalizedStringKey,actions: ViewReference) - indirect case _1(title: AttributeReference,actions: ViewReference=ViewReference(value: [])) + indirect case _1(title: AttributeReference,actions: ViewReference) - indirect case _2(title: TextReference,actions: ViewReference=ViewReference(value: [])) + indirect case _2(title: TextReference,actions: ViewReference) - indirect case _3(titleKey: SwiftUICore.LocalizedStringKey,actions: ViewReference=ViewReference(value: []),message: ViewReference=ViewReference(value: [])) + indirect case _3(titleKey: SwiftUICore.LocalizedStringKey,actions: ViewReference,message: ViewReference) - indirect case _4(title: AttributeReference,actions: ViewReference=ViewReference(value: []),message: ViewReference=ViewReference(value: [])) + indirect case _4(title: AttributeReference,actions: ViewReference,message: ViewReference) - indirect case _5(title: TextReference,actions: ViewReference=ViewReference(value: []),message: ViewReference=ViewReference(value: [])) + indirect case _5(title: TextReference,actions: ViewReference,message: ViewReference) - indirect case _6(error: AnyLocalizedError,actions: ViewReference=ViewReference(value: [])) + indirect case _6(error: AnyLocalizedError,actions: ViewReference) } @@ -681,7 +681,7 @@ struct _allowsWindowActivationEventsModifier: ViewModifier { #if os(iOS) || os(macOS) || os(visionOS) - @available(iOS 18.0,visionOS 2.0,macOS 15.0, *) + @available(macOS 15.0,visionOS 2.0,iOS 18.0, *) init(_ value: AttributeReference? = .init(storage: .constant(true)) ) { self.value = ._0(value: value) @@ -694,7 +694,7 @@ struct _allowsWindowActivationEventsModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(visionOS) case let ._0(value): - if #available(iOS 18.0,visionOS 2.0,macOS 15.0, *) { + if #available(macOS 15.0,visionOS 2.0,iOS 18.0, *) { let value = value as? AttributeReference __content @@ -784,7 +784,7 @@ struct _aspectRatioModifier: ViewModifier { enum Value { case _never - indirect case _0(aspectRatio: AttributeReference? = .init(storage: .constant(nil)), contentMode: SwiftUICore.ContentMode) + indirect case _0(aspectRatio: AttributeReference?, contentMode: SwiftUICore.ContentMode) indirect case _1(aspectRatio: CoreFoundation.CGSize,contentMode: SwiftUICore.ContentMode) @@ -868,7 +868,7 @@ struct _autocapitalizationModifier: ViewModifier { #if os(iOS) || os(tvOS) || os(visionOS) - @available(iOS 16.0,visionOS 1.0,tvOS 16.0, *) + @available(iOS 16.0,tvOS 16.0,visionOS 1.0, *) init(_ style: UIKit.UITextAutocapitalizationType) { self.value = ._0(style: style) @@ -881,7 +881,7 @@ struct _autocapitalizationModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(tvOS) || os(visionOS) case let ._0(style): - if #available(iOS 16.0,visionOS 1.0,tvOS 16.0, *) { + if #available(iOS 16.0,tvOS 16.0,visionOS 1.0, *) { let style = style as! UIKit.UITextAutocapitalizationType __content @@ -901,7 +901,7 @@ struct _autocorrectionDisabledModifier: ViewModifier { enum Value { case _never - indirect case _0(disable: AttributeReference = .init(storage: .constant(true)) ) + indirect case _0(disable: AttributeReference) } @@ -948,28 +948,28 @@ struct _backgroundModifier: ViewModifier { enum Value { case _never - indirect case _0(background: InlineViewReference,alignment: AttributeReference = .init(storage: .constant(.center)) ) + indirect case _0(background: InlineViewReference,alignment: AttributeReference) - indirect case _1(alignment: AttributeReference = .init(storage: .constant(.center)), content: ViewReference=ViewReference(value: [])) + indirect case _1(alignment: AttributeReference, content: ViewReference) - indirect case _2(edges: SwiftUICore.Edge.Set = .all ) + indirect case _2(edges: SwiftUICore.Edge.Set ) - indirect case _3(style: AnyShapeStyle.Resolvable,edges: SwiftUICore.Edge.Set = .all ) + indirect case _3(style: AnyShapeStyle.Resolvable,edges: SwiftUICore.Edge.Set ) - indirect case _4(shape: AnyShape,fillStyle: SwiftUICore.FillStyle = FillStyle() ) + indirect case _4(shape: AnyShape,fillStyle: SwiftUICore.FillStyle ) - indirect case _5(style: AnyShapeStyle.Resolvable,shape: AnyShape,fillStyle: SwiftUICore.FillStyle = FillStyle() ) + indirect case _5(style: AnyShapeStyle.Resolvable,shape: AnyShape,fillStyle: SwiftUICore.FillStyle ) - indirect case _6(shape: AnyInsettableShape,fillStyle: SwiftUICore.FillStyle = FillStyle() ) + indirect case _6(shape: AnyInsettableShape,fillStyle: SwiftUICore.FillStyle ) - indirect case _7(style: AnyShapeStyle.Resolvable,shape: AnyInsettableShape,fillStyle: SwiftUICore.FillStyle = FillStyle() ) + indirect case _7(style: AnyShapeStyle.Resolvable,shape: AnyInsettableShape,fillStyle: SwiftUICore.FillStyle ) } @@ -1232,28 +1232,28 @@ struct _badgeModifier: ViewModifier { #if os(iOS) || os(macOS) || os(visionOS) - @available(iOS 15.0,visionOS 1.0,macOS 12.0, *) + @available(visionOS 1.0,macOS 12.0,iOS 15.0, *) init(_ count: AttributeReference) { self.value = ._0(count: count) } #endif #if os(iOS) || os(macOS) || os(visionOS) - @available(iOS 15.0,visionOS 1.0,macOS 12.0, *) + @available(visionOS 1.0,macOS 12.0,iOS 15.0, *) init(_ label: TextReference?) { self.value = ._1(label: label) } #endif #if os(iOS) || os(macOS) || os(visionOS) - @available(iOS 15.0,visionOS 1.0,macOS 12.0, *) + @available(iOS 15.0,macOS 12.0,visionOS 1.0, *) init(_ key: SwiftUICore.LocalizedStringKey?) { self.value = ._2(key: key) } #endif #if os(iOS) || os(macOS) || os(visionOS) - @available(iOS 15.0,visionOS 1.0,macOS 12.0, *) + @available(iOS 15.0,macOS 12.0,visionOS 1.0, *) init(_ label: AttributeReference) { self.value = ._3(label: label) @@ -1266,7 +1266,7 @@ struct _badgeModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(visionOS) case let ._0(count): - if #available(iOS 15.0,visionOS 1.0,macOS 12.0, *) { + if #available(visionOS 1.0,macOS 12.0,iOS 15.0, *) { let count = count as! AttributeReference __content @@ -1277,7 +1277,7 @@ struct _badgeModifier: ViewModifier { #endif #if os(iOS) || os(macOS) || os(visionOS) case let ._1(label): - if #available(iOS 15.0,visionOS 1.0,macOS 12.0, *) { + if #available(visionOS 1.0,macOS 12.0,iOS 15.0, *) { let label = label as? TextReference __content._observeTextReference(label, on: element, in: context) { __content in __content @@ -1288,7 +1288,7 @@ struct _badgeModifier: ViewModifier { #endif #if os(iOS) || os(macOS) || os(visionOS) case let ._2(key): - if #available(iOS 15.0,visionOS 1.0,macOS 12.0, *) { + if #available(iOS 15.0,macOS 12.0,visionOS 1.0, *) { let key = key as? SwiftUICore.LocalizedStringKey __content @@ -1299,7 +1299,7 @@ struct _badgeModifier: ViewModifier { #endif #if os(iOS) || os(macOS) || os(visionOS) case let ._3(label): - if #available(iOS 15.0,visionOS 1.0,macOS 12.0, *) { + if #available(iOS 15.0,macOS 12.0,visionOS 1.0, *) { let label = label as! AttributeReference __content @@ -1333,7 +1333,7 @@ struct _badgeProminenceModifier: ViewModifier { #if os(iOS) || os(macOS) || os(visionOS) - @available(visionOS 1.0,iOS 17.0,macOS 14.0, *) + @available(iOS 17.0,macOS 14.0,visionOS 1.0, *) init(_ prominence: SwiftUI.BadgeProminence) { self.value = ._0(prominence: prominence) @@ -1346,7 +1346,7 @@ struct _badgeProminenceModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(visionOS) case let ._0(prominence): - if #available(visionOS 1.0,iOS 17.0,macOS 14.0, *) { + if #available(iOS 17.0,macOS 14.0,visionOS 1.0, *) { let prominence = prominence as! SwiftUI.BadgeProminence __content @@ -1413,7 +1413,7 @@ struct _blurModifier: ViewModifier { enum Value { case _never - indirect case _0(radius: AttributeReference,opaque: AttributeReference = .init(storage: .constant(false)) ) + indirect case _0(radius: AttributeReference,opaque: AttributeReference) } @@ -1460,7 +1460,7 @@ struct _borderModifier: ViewModifier { enum Value { case _never - indirect case _0(content: AnyShapeStyle.Resolvable,width: AttributeReference = .init(storage: .constant(1)) ) + indirect case _0(content: AnyShapeStyle.Resolvable,width: AttributeReference) } @@ -1671,7 +1671,7 @@ struct _clipShapeModifier: ViewModifier { enum Value { case _never - indirect case _0(shape: AnyShape,style: SwiftUICore.FillStyle = FillStyle() ) + indirect case _0(shape: AnyShape,style: SwiftUICore.FillStyle ) } @@ -1718,7 +1718,7 @@ struct _clippedModifier: ViewModifier { enum Value { case _never - indirect case _0(antialiased: AttributeReference = .init(storage: .constant(false)) ) + indirect case _0(antialiased: AttributeReference) } @@ -1953,22 +1953,22 @@ struct _confirmationDialogModifier: ViewModifier { enum Value { case _never - indirect case _0(titleKey: SwiftUICore.LocalizedStringKey,titleVisibility: AttributeReference = .init(storage: .constant(.automatic)), actions: ViewReference=ViewReference(value: [])) + indirect case _0(titleKey: SwiftUICore.LocalizedStringKey,titleVisibility: AttributeReference, actions: ViewReference) - indirect case _1(title: AttributeReference,titleVisibility: AttributeReference = .init(storage: .constant(.automatic)), actions: ViewReference=ViewReference(value: [])) + indirect case _1(title: AttributeReference,titleVisibility: AttributeReference, actions: ViewReference) - indirect case _2(title: TextReference,titleVisibility: AttributeReference = .init(storage: .constant(.automatic)), actions: ViewReference=ViewReference(value: [])) + indirect case _2(title: TextReference,titleVisibility: AttributeReference, actions: ViewReference) - indirect case _3(titleKey: SwiftUICore.LocalizedStringKey,titleVisibility: AttributeReference = .init(storage: .constant(.automatic)), actions: ViewReference=ViewReference(value: []),message: ViewReference=ViewReference(value: [])) + indirect case _3(titleKey: SwiftUICore.LocalizedStringKey,titleVisibility: AttributeReference, actions: ViewReference,message: ViewReference) - indirect case _4(title: AttributeReference,titleVisibility: AttributeReference = .init(storage: .constant(.automatic)), actions: ViewReference=ViewReference(value: []),message: ViewReference=ViewReference(value: [])) + indirect case _4(title: AttributeReference,titleVisibility: AttributeReference, actions: ViewReference,message: ViewReference) - indirect case _5(title: TextReference,titleVisibility: AttributeReference = .init(storage: .constant(.automatic)), actions: ViewReference=ViewReference(value: []),message: ViewReference=ViewReference(value: [])) + indirect case _5(title: TextReference,titleVisibility: AttributeReference, actions: ViewReference,message: ViewReference) } @@ -2134,14 +2134,14 @@ struct _containerRelativeFrameModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(iOS 17.0,tvOS 17.0,watchOS 10.0,visionOS 1.0,macOS 14.0, *) + @available(watchOS 10.0,tvOS 17.0,iOS 17.0,visionOS 1.0,macOS 14.0, *) init(_ axes: SwiftUICore.Axis.Set,alignment: AttributeReference = .init(storage: .constant(.center)) ) { self.value = ._0(axes: axes, alignment: alignment) } #endif #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(iOS 17.0,tvOS 17.0,watchOS 10.0,visionOS 1.0,macOS 14.0, *) + @available(macOS 14.0,tvOS 17.0,iOS 17.0,visionOS 1.0,watchOS 10.0, *) init(_ axes: SwiftUICore.Axis.Set,count: AttributeReference,span: AttributeReference = .init(storage: .constant(1)), spacing: AttributeReference,alignment: AttributeReference = .init(storage: .constant(.center)) ) { self.value = ._1(axes: axes, count: count, span: span, spacing: spacing, alignment: alignment) @@ -2154,7 +2154,7 @@ struct _containerRelativeFrameModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(axes, alignment): - if #available(iOS 17.0,tvOS 17.0,watchOS 10.0,visionOS 1.0,macOS 14.0, *) { + if #available(watchOS 10.0,tvOS 17.0,iOS 17.0,visionOS 1.0,macOS 14.0, *) { let axes = axes as! SwiftUICore.Axis.Set let alignment = alignment as! AttributeReference @@ -2166,7 +2166,7 @@ let alignment = alignment as! AttributeReference #endif #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._1(axes, count, span, spacing, alignment): - if #available(iOS 17.0,tvOS 17.0,watchOS 10.0,visionOS 1.0,macOS 14.0, *) { + if #available(macOS 14.0,tvOS 17.0,iOS 17.0,visionOS 1.0,watchOS 10.0, *) { let axes = axes as! SwiftUICore.Axis.Set let count = count as! AttributeReference let span = span as! AttributeReference @@ -2261,21 +2261,21 @@ struct _contentMarginsModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(iOS 17.0,watchOS 10.0,macOS 14.0,tvOS 17.0,visionOS 1.0, *) + @available(tvOS 17.0,iOS 17.0,macOS 14.0,watchOS 10.0,visionOS 1.0, *) init(_ edges: SwiftUICore.Edge.Set = .all, _ insets: SwiftUICore.EdgeInsets,for placement: SwiftUI.ContentMarginPlacement = .automatic ) { self.value = ._0(edges: edges, insets: insets, placement: placement) } #endif #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(iOS 17.0,watchOS 10.0,macOS 14.0,tvOS 17.0,visionOS 1.0, *) + @available(macOS 14.0,tvOS 17.0,iOS 17.0,visionOS 1.0,watchOS 10.0, *) init(_ edges: SwiftUICore.Edge.Set = .all, _ length: AttributeReference?,for placement: SwiftUI.ContentMarginPlacement = .automatic ) { self.value = ._1(edges: edges, length: length, placement: placement) } #endif #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(iOS 17.0,watchOS 10.0,macOS 14.0,tvOS 17.0,visionOS 1.0, *) + @available(macOS 14.0,tvOS 17.0,iOS 17.0,visionOS 1.0,watchOS 10.0, *) init(_ length: AttributeReference,for placement: SwiftUI.ContentMarginPlacement = .automatic ) { self.value = ._2(length: length, placement: placement) @@ -2288,7 +2288,7 @@ struct _contentMarginsModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(edges, insets, placement): - if #available(iOS 17.0,watchOS 10.0,macOS 14.0,tvOS 17.0,visionOS 1.0, *) { + if #available(tvOS 17.0,iOS 17.0,macOS 14.0,watchOS 10.0,visionOS 1.0, *) { let edges = edges as! SwiftUICore.Edge.Set let insets = insets as! SwiftUICore.EdgeInsets let placement = placement as! SwiftUI.ContentMarginPlacement @@ -2301,7 +2301,7 @@ let placement = placement as! SwiftUI.ContentMarginPlacement #endif #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._1(edges, length, placement): - if #available(iOS 17.0,watchOS 10.0,macOS 14.0,tvOS 17.0,visionOS 1.0, *) { + if #available(macOS 14.0,tvOS 17.0,iOS 17.0,visionOS 1.0,watchOS 10.0, *) { let edges = edges as! SwiftUICore.Edge.Set let length = length as? AttributeReference let placement = placement as! SwiftUI.ContentMarginPlacement @@ -2314,7 +2314,7 @@ let placement = placement as! SwiftUI.ContentMarginPlacement #endif #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._2(length, placement): - if #available(iOS 17.0,watchOS 10.0,macOS 14.0,tvOS 17.0,visionOS 1.0, *) { + if #available(macOS 14.0,tvOS 17.0,iOS 17.0,visionOS 1.0,watchOS 10.0, *) { let length = length as! AttributeReference let placement = placement as! SwiftUI.ContentMarginPlacement @@ -2335,10 +2335,10 @@ struct _contentShapeModifier: ViewModifier { enum Value { case _never - indirect case _0(kind: SwiftUICore.ContentShapeKinds,shape: AnyShape,eoFill: AttributeReference = .init(storage: .constant(false)) ) + indirect case _0(kind: SwiftUICore.ContentShapeKinds,shape: AnyShape,eoFill: AttributeReference) - indirect case _1(shape: AnyShape,eoFill: AttributeReference = .init(storage: .constant(false)) ) + indirect case _1(shape: AnyShape,eoFill: AttributeReference) } @@ -2452,7 +2452,7 @@ struct _contextMenuModifier: ViewModifier { enum Value { case _never - indirect case _0(menuItems: ViewReference=ViewReference(value: [])) + indirect case _0(menuItems: ViewReference) #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) indirect case _1(menuItems: Any,preview: Any) @@ -2478,7 +2478,7 @@ struct _contextMenuModifier: ViewModifier { } #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) - @available(iOS 16.0,macOS 13.0,tvOS 16.0,visionOS 1.0, *) + @available(iOS 16.0,macOS 13.0,visionOS 1.0,tvOS 16.0, *) init(menuItems: ViewReference=ViewReference(value: []),preview: ViewReference=ViewReference(value: [])) { self.value = ._1(menuItems: menuItems, preview: preview) @@ -2502,7 +2502,7 @@ struct _contextMenuModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) case let ._1(menuItems, preview): - if #available(iOS 16.0,macOS 13.0,tvOS 16.0,visionOS 1.0, *) { + if #available(iOS 16.0,macOS 13.0,visionOS 1.0,tvOS 16.0, *) { let menuItems = menuItems as! ViewReference let preview = preview as! ViewReference @@ -2584,7 +2584,7 @@ struct _controlGroupStyleModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) - @available(iOS 15.0,macOS 12.0,tvOS 17.0,visionOS 1.0, *) + @available(visionOS 1.0,iOS 15.0,tvOS 17.0,macOS 12.0, *) init(_ style: AnyControlGroupStyle) { self.value = ._0(style: style) @@ -2597,7 +2597,7 @@ struct _controlGroupStyleModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) case let ._0(style): - if #available(iOS 15.0,macOS 12.0,tvOS 17.0,visionOS 1.0, *) { + if #available(visionOS 1.0,iOS 15.0,tvOS 17.0,macOS 12.0, *) { let style = style as! AnyControlGroupStyle __content @@ -2631,7 +2631,7 @@ struct _controlSizeModifier: ViewModifier { #if os(iOS) || os(macOS) || os(visionOS) || os(watchOS) - @available(visionOS 1.0,watchOS 9.0,macOS 10.15,iOS 15.0, *) + @available(macOS 10.15,watchOS 9.0,iOS 15.0,visionOS 1.0, *) init(_ controlSize: SwiftUICore.ControlSize) { self.value = ._0(controlSize: controlSize) @@ -2644,7 +2644,7 @@ struct _controlSizeModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(visionOS) || os(watchOS) case let ._0(controlSize): - if #available(visionOS 1.0,watchOS 9.0,macOS 10.15,iOS 15.0, *) { + if #available(macOS 10.15,watchOS 9.0,iOS 15.0,visionOS 1.0, *) { let controlSize = controlSize as! SwiftUICore.ControlSize __content @@ -2690,7 +2690,7 @@ struct _coordinateSpaceModifier: ViewModifier { } #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(iOS 17.0,tvOS 17.0,watchOS 10.0,visionOS 1.0,macOS 14.0, *) + @available(macOS 14.0,tvOS 17.0,iOS 17.0,visionOS 1.0,watchOS 10.0, *) init(_ name: SwiftUICore.NamedCoordinateSpace) { self.value = ._1(name: name) @@ -2714,7 +2714,7 @@ struct _coordinateSpaceModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._1(name): - if #available(iOS 17.0,tvOS 17.0,watchOS 10.0,visionOS 1.0,macOS 14.0, *) { + if #available(macOS 14.0,tvOS 17.0,iOS 17.0,visionOS 1.0,watchOS 10.0, *) { let name = name as! SwiftUICore.NamedCoordinateSpace __content @@ -2734,7 +2734,7 @@ struct _cornerRadiusModifier: ViewModifier { enum Value { case _never - indirect case _0(radius: AttributeReference,antialiased: AttributeReference = .init(storage: .constant(true)) ) + indirect case _0(radius: AttributeReference,antialiased: AttributeReference) } @@ -2795,7 +2795,7 @@ struct _datePickerStyleModifier: ViewModifier { #if os(iOS) || os(macOS) || os(visionOS) || os(watchOS) - @available(visionOS 1.0,watchOS 10.0,iOS 13.0,macOS 10.15, *) + @available(visionOS 1.0,iOS 13.0,macOS 10.15,watchOS 10.0, *) init(_ style: AnyDatePickerStyle) { self.value = ._0(style: style) @@ -2808,7 +2808,7 @@ struct _datePickerStyleModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(visionOS) || os(watchOS) case let ._0(style): - if #available(visionOS 1.0,watchOS 10.0,iOS 13.0,macOS 10.15, *) { + if #available(visionOS 1.0,iOS 13.0,macOS 10.15,watchOS 10.0, *) { let style = style as! AnyDatePickerStyle __content @@ -2889,7 +2889,7 @@ struct _defaultHoverEffectModifier: ViewModifier { #if os(iOS) || os(tvOS) || os(visionOS) - @available(iOS 17.0,visionOS 1.0,tvOS 17.0, *) + @available(visionOS 1.0,iOS 17.0,tvOS 17.0, *) init(_ effect: SwiftUI.HoverEffect?) { self.value = ._0(effect: effect) @@ -2902,7 +2902,7 @@ struct _defaultHoverEffectModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(tvOS) || os(visionOS) case let ._0(effect): - if #available(iOS 17.0,visionOS 1.0,tvOS 17.0, *) { + if #available(visionOS 1.0,iOS 17.0,tvOS 17.0, *) { let effect = effect as? SwiftUI.HoverEffect __content @@ -2941,14 +2941,14 @@ struct _defaultScrollAnchorModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(tvOS 17.0,watchOS 10.0,iOS 17.0,visionOS 1.0,macOS 14.0, *) + @available(visionOS 1.0,iOS 17.0,tvOS 17.0,watchOS 10.0,macOS 14.0, *) init(_ anchor: AttributeReference?) { self.value = ._0(anchor: anchor) } #endif #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(tvOS 18.0,watchOS 11.0,iOS 18.0,visionOS 2.0,macOS 15.0, *) + @available(macOS 15.0,tvOS 18.0,iOS 18.0,watchOS 11.0,visionOS 2.0, *) init(_ anchor: AttributeReference?,for role: SwiftUI.ScrollAnchorRole) { self.value = ._1(anchor: anchor, role: role) @@ -2961,7 +2961,7 @@ struct _defaultScrollAnchorModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(anchor): - if #available(tvOS 17.0,watchOS 10.0,iOS 17.0,visionOS 1.0,macOS 14.0, *) { + if #available(visionOS 1.0,iOS 17.0,tvOS 17.0,watchOS 10.0,macOS 14.0, *) { let anchor = anchor as? AttributeReference __content @@ -2972,7 +2972,7 @@ struct _defaultScrollAnchorModifier: ViewModifier { #endif #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._1(anchor, role): - if #available(tvOS 18.0,watchOS 11.0,iOS 18.0,visionOS 2.0,macOS 15.0, *) { + if #available(macOS 15.0,tvOS 18.0,iOS 18.0,watchOS 11.0,visionOS 2.0, *) { let anchor = anchor as? AttributeReference let role = role as! SwiftUI.ScrollAnchorRole @@ -3007,7 +3007,7 @@ struct _defaultWheelPickerItemHeightModifier: ViewModifier { #if os(visionOS) || os(watchOS) - @available(visionOS 1.0,watchOS 6.0, *) + @available(watchOS 6.0,visionOS 1.0, *) init(_ height: AttributeReference) { self.value = ._0(height: height) @@ -3020,7 +3020,7 @@ struct _defaultWheelPickerItemHeightModifier: ViewModifier { fatalError("unreachable") #if os(visionOS) || os(watchOS) case let ._0(height): - if #available(visionOS 1.0,watchOS 6.0, *) { + if #available(watchOS 6.0,visionOS 1.0, *) { let height = height as! AttributeReference __content @@ -3163,28 +3163,28 @@ struct _dialogSuppressionToggleModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(iOS 17.0,macOS 14.0,tvOS 17.0,watchOS 10.0,visionOS 1.0, *) + @available(iOS 17.0,tvOS 17.0,macOS 14.0,visionOS 1.0,watchOS 10.0, *) init(_ titleKey: SwiftUICore.LocalizedStringKey,isSuppressed: ChangeTracked) { self.value = ._0(titleKey: titleKey) self.__0_isSuppressed = isSuppressed } #endif #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(iOS 17.0,macOS 14.0,tvOS 17.0,watchOS 10.0,visionOS 1.0, *) + @available(macOS 14.0,tvOS 17.0,iOS 17.0,visionOS 1.0,watchOS 10.0, *) init(_ title: AttributeReference,isSuppressed: ChangeTracked) { self.value = ._1(title: title) self.__1_isSuppressed = isSuppressed } #endif #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(iOS 17.0,macOS 14.0,tvOS 17.0,watchOS 10.0,visionOS 1.0, *) + @available(macOS 14.0,tvOS 17.0,iOS 17.0,visionOS 1.0,watchOS 10.0, *) init(_ label: TextReference,isSuppressed: ChangeTracked) { self.value = ._2(label: label) self.__2_isSuppressed = isSuppressed } #endif #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(iOS 17.0,macOS 14.0,tvOS 17.0,watchOS 10.0,visionOS 1.0, *) + @available(macOS 14.0,tvOS 17.0,iOS 17.0,visionOS 1.0,watchOS 10.0, *) init(isSuppressed: ChangeTracked) { self.value = ._3 self.__3_isSuppressed = isSuppressed @@ -3197,7 +3197,7 @@ struct _dialogSuppressionToggleModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(titleKey): - if #available(iOS 17.0,macOS 14.0,tvOS 17.0,watchOS 10.0,visionOS 1.0, *) { + if #available(iOS 17.0,tvOS 17.0,macOS 14.0,visionOS 1.0,watchOS 10.0, *) { let titleKey = titleKey as! SwiftUICore.LocalizedStringKey __content @@ -3208,7 +3208,7 @@ struct _dialogSuppressionToggleModifier: ViewModifier { #endif #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._1(title): - if #available(iOS 17.0,macOS 14.0,tvOS 17.0,watchOS 10.0,visionOS 1.0, *) { + if #available(macOS 14.0,tvOS 17.0,iOS 17.0,visionOS 1.0,watchOS 10.0, *) { let title = title as! AttributeReference __content @@ -3219,7 +3219,7 @@ struct _dialogSuppressionToggleModifier: ViewModifier { #endif #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._2(label): - if #available(iOS 17.0,macOS 14.0,tvOS 17.0,watchOS 10.0,visionOS 1.0, *) { + if #available(macOS 14.0,tvOS 17.0,iOS 17.0,visionOS 1.0,watchOS 10.0, *) { let label = label as! TextReference __content._observeTextReference(label, on: element, in: context) { __content in __content @@ -3230,7 +3230,7 @@ struct _dialogSuppressionToggleModifier: ViewModifier { #endif #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case ._3: - if #available(iOS 17.0,macOS 14.0,tvOS 17.0,watchOS 10.0,visionOS 1.0, *) { + if #available(macOS 14.0,tvOS 17.0,iOS 17.0,visionOS 1.0,watchOS 10.0, *) { __content @@ -3638,7 +3638,7 @@ struct _drawingGroupModifier: ViewModifier { enum Value { case _never - indirect case _0(opaque: AttributeReference = .init(storage: .constant(false)), colorMode: SwiftUICore.ColorRenderingMode = .nonLinear ) + indirect case _0(opaque: AttributeReference, colorMode: SwiftUICore.ColorRenderingMode ) } @@ -3816,7 +3816,7 @@ struct _fileDialogCustomizationIDModifier: ViewModifier { #if os(iOS) || os(macOS) || os(visionOS) - @available(iOS 17.0,visionOS 1.0,macOS 14.0, *) + @available(macOS 14.0,visionOS 1.0,iOS 17.0, *) init(_ id: AttributeReference) { self.value = ._0(id: id) @@ -3829,7 +3829,7 @@ struct _fileDialogCustomizationIDModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(visionOS) case let ._0(id): - if #available(iOS 17.0,visionOS 1.0,macOS 14.0, *) { + if #available(macOS 14.0,visionOS 1.0,iOS 17.0, *) { let id = id as! AttributeReference __content @@ -3863,7 +3863,7 @@ struct _fileDialogImportsUnresolvedAliasesModifier: ViewModifie #if os(iOS) || os(macOS) || os(visionOS) - @available(iOS 17.0,visionOS 1.0,macOS 14.0, *) + @available(iOS 17.0,macOS 14.0,visionOS 1.0, *) init(_ imports: AttributeReference) { self.value = ._0(imports: imports) @@ -3876,7 +3876,7 @@ struct _fileDialogImportsUnresolvedAliasesModifier: ViewModifie fatalError("unreachable") #if os(iOS) || os(macOS) || os(visionOS) case let ._0(imports): - if #available(iOS 17.0,visionOS 1.0,macOS 14.0, *) { + if #available(iOS 17.0,macOS 14.0,visionOS 1.0, *) { let imports = imports as! AttributeReference __content @@ -4121,7 +4121,7 @@ struct _focusEffectDisabledModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(iOS 17.0,macOS 14.0,watchOS 10.0,tvOS 17.0,visionOS 1.0, *) + @available(iOS 17.0,macOS 14.0,watchOS 10.0,visionOS 1.0,tvOS 17.0, *) init(_ disabled: AttributeReference = .init(storage: .constant(true)) ) { self.value = ._0(disabled: disabled) @@ -4134,7 +4134,7 @@ struct _focusEffectDisabledModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(disabled): - if #available(iOS 17.0,macOS 14.0,watchOS 10.0,tvOS 17.0,visionOS 1.0, *) { + if #available(iOS 17.0,macOS 14.0,watchOS 10.0,visionOS 1.0,tvOS 17.0, *) { let disabled = disabled as! AttributeReference __content @@ -4225,21 +4225,21 @@ struct _focusableModifier: ViewModifier { @Event private var _2_onFocusChange__1: Event.EventHandler #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(iOS 17.0,macOS 12.0,tvOS 15.0,watchOS 8.0,visionOS 1.0, *) + @available(iOS 17.0,visionOS 1.0,watchOS 8.0,macOS 12.0,tvOS 15.0, *) init(_ isFocusable: AttributeReference = .init(storage: .constant(true)) ) { self.value = ._0(isFocusable: isFocusable) } #endif #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(iOS 17.0,macOS 14.0,tvOS 17.0,watchOS 10.0,visionOS 1.0, *) + @available(iOS 17.0,visionOS 1.0,watchOS 10.0,macOS 14.0,tvOS 17.0, *) init(_ isFocusable: AttributeReference = .init(storage: .constant(true)), interactions: SwiftUI.FocusInteractions) { self.value = ._1(isFocusable: isFocusable, interactions: interactions) } #endif #if os(macOS) || os(tvOS) || os(watchOS) - @available(tvOS 16.0,macOS 13.0,watchOS 9.0, *) + @available(tvOS 16.0,watchOS 9.0,macOS 13.0, *) init(_ isFocusable: AttributeReference = .init(storage: .constant(true)), onFocusChange onFocusChange__1: Event ) { self.value = ._2(isFocusable: isFocusable) self.__2_onFocusChange__1 = onFocusChange__1 @@ -4252,7 +4252,7 @@ struct _focusableModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(isFocusable): - if #available(iOS 17.0,macOS 12.0,tvOS 15.0,watchOS 8.0,visionOS 1.0, *) { + if #available(iOS 17.0,visionOS 1.0,watchOS 8.0,macOS 12.0,tvOS 15.0, *) { let isFocusable = isFocusable as! AttributeReference __content @@ -4263,7 +4263,7 @@ struct _focusableModifier: ViewModifier { #endif #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._1(isFocusable, interactions): - if #available(iOS 17.0,macOS 14.0,tvOS 17.0,watchOS 10.0,visionOS 1.0, *) { + if #available(iOS 17.0,visionOS 1.0,watchOS 10.0,macOS 14.0,tvOS 17.0, *) { let isFocusable = isFocusable as! AttributeReference let interactions = interactions as! SwiftUI.FocusInteractions @@ -4275,7 +4275,7 @@ let interactions = interactions as! SwiftUI.FocusInteractions #endif #if os(macOS) || os(tvOS) || os(watchOS) case let ._2(isFocusable): - if #available(tvOS 16.0,macOS 13.0,watchOS 9.0, *) { + if #available(tvOS 16.0,watchOS 9.0,macOS 13.0, *) { let isFocusable = isFocusable as! AttributeReference __content @@ -4395,13 +4395,13 @@ struct _frameModifier: ViewModifier { indirect case _1(minDepth: Any?, idealDepth: Any?, maxDepth: Any?, alignment: Any) #endif - indirect case _2(width: AttributeReference? = .init(storage: .constant(nil)), height: AttributeReference? = .init(storage: .constant(nil)), alignment: AttributeReference = .init(storage: .constant(.center)) ) + indirect case _2(width: AttributeReference?, height: AttributeReference?, alignment: AttributeReference) case _3 - indirect case _4(minWidth: AttributeReference? = .init(storage: .constant(nil)), idealWidth: AttributeReference? = .init(storage: .constant(nil)), maxWidth: AttributeReference? = .init(storage: .constant(nil)), minHeight: AttributeReference? = .init(storage: .constant(nil)), idealHeight: AttributeReference? = .init(storage: .constant(nil)), maxHeight: AttributeReference? = .init(storage: .constant(nil)), alignment: AttributeReference = .init(storage: .constant(.center)) ) + indirect case _4(minWidth: AttributeReference?, idealWidth: AttributeReference?, maxWidth: AttributeReference?, minHeight: AttributeReference?, idealHeight: AttributeReference?, maxHeight: AttributeReference?, alignment: AttributeReference) } @@ -4546,7 +4546,7 @@ struct _fullScreenCoverModifier: ViewModifier { @Event private var _0_onDismiss__0: Event.EventHandler #if os(iOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(iOS 14.0,visionOS 1.0,watchOS 7.0,tvOS 14.0, *) + @available(watchOS 7.0,iOS 14.0,tvOS 14.0,visionOS 1.0, *) init(isPresented: ChangeTracked,onDismiss onDismiss__0: Event=Event(), content: ViewReference=ViewReference(value: [])) { self.value = ._0(content: content) self.__0_isPresented = isPresented @@ -4560,7 +4560,7 @@ self.__0_onDismiss__0 = onDismiss__0 fatalError("unreachable") #if os(iOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(content): - if #available(iOS 14.0,visionOS 1.0,watchOS 7.0,tvOS 14.0, *) { + if #available(watchOS 7.0,iOS 14.0,tvOS 14.0,visionOS 1.0, *) { let content = content as! ViewReference __content @@ -4594,7 +4594,7 @@ struct _gaugeStyleModifier: ViewModifier { #if os(iOS) || os(macOS) || os(visionOS) || os(watchOS) - @available(iOS 16.0,macOS 13.0,watchOS 7.0,visionOS 1.0, *) + @available(macOS 13.0,visionOS 1.0,iOS 16.0,watchOS 7.0, *) init(_ style: AnyGaugeStyle) { self.value = ._0(style: style) @@ -4607,7 +4607,7 @@ struct _gaugeStyleModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(visionOS) || os(watchOS) case let ._0(style): - if #available(iOS 16.0,macOS 13.0,watchOS 7.0,visionOS 1.0, *) { + if #available(macOS 13.0,visionOS 1.0,iOS 16.0,watchOS 7.0, *) { let style = style as! AnyGaugeStyle __content @@ -4641,7 +4641,7 @@ struct _geometryGroupModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(tvOS 17.0,watchOS 10.0,visionOS 1.0,macOS 14.0,iOS 17.0, *) + @available(macOS 14.0,tvOS 17.0,iOS 17.0,visionOS 1.0,watchOS 10.0, *) init() { self.value = ._0 @@ -4654,7 +4654,7 @@ struct _geometryGroupModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case ._0: - if #available(tvOS 17.0,watchOS 10.0,visionOS 1.0,macOS 14.0,iOS 17.0, *) { + if #available(macOS 14.0,tvOS 17.0,iOS 17.0,visionOS 1.0,watchOS 10.0, *) { __content @@ -4674,7 +4674,7 @@ struct _gestureModifier: ViewModifier { enum Value { case _never - indirect case _0(gesture: _AnyGesture,mask: SwiftUICore.GestureMask = .all ) + indirect case _0(gesture: _AnyGesture,mask: SwiftUICore.GestureMask ) indirect case _1(gesture: _AnyGesture,isEnabled: AttributeReference) @@ -4712,7 +4712,7 @@ struct _gestureModifier: ViewModifier { } #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(iOS 18.0,macOS 15.0,tvOS 18.0,watchOS 11.0,visionOS 2.0, *) + @available(watchOS 11.0,visionOS 2.0,tvOS 18.0,macOS 15.0,iOS 18.0, *) init(_ gesture: _AnyGesture,name: AttributeReference,isEnabled: AttributeReference = .init(storage: .constant(true)) ) { self.value = ._2(gesture: gesture, name: name, isEnabled: isEnabled) @@ -4747,7 +4747,7 @@ struct _gestureModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._2(gesture, name, isEnabled): - if #available(iOS 18.0,macOS 15.0,tvOS 18.0,watchOS 11.0,visionOS 2.0, *) { + if #available(watchOS 11.0,visionOS 2.0,tvOS 18.0,macOS 15.0,iOS 18.0, *) { let gesture = gesture as! _AnyGesture let name = name as! AttributeReference let isEnabled = isEnabled as! AttributeReference @@ -5089,7 +5089,7 @@ struct _groupBoxStyleModifier: ViewModifier { #if os(iOS) || os(macOS) || os(visionOS) - @available(iOS 14.0,visionOS 1.0,macOS 11.0, *) + @available(iOS 14.0,macOS 11.0,visionOS 1.0, *) init(_ style: AnyGroupBoxStyle) { self.value = ._0(style: style) @@ -5102,7 +5102,7 @@ struct _groupBoxStyleModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(visionOS) case let ._0(style): - if #available(iOS 14.0,visionOS 1.0,macOS 11.0, *) { + if #available(iOS 14.0,macOS 11.0,visionOS 1.0, *) { let style = style as! AnyGroupBoxStyle __content @@ -5136,7 +5136,7 @@ struct _handGestureShortcutModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(watchOS) - @available(tvOS 18.0,macOS 15.0,iOS 18.0,watchOS 11.0, *) + @available(watchOS 11.0,tvOS 18.0,iOS 18.0,macOS 15.0, *) init(_ shortcut: SwiftUI.HandGestureShortcut,isEnabled: AttributeReference = .init(storage: .constant(true)) ) { self.value = ._0(shortcut: shortcut, isEnabled: isEnabled) @@ -5149,7 +5149,7 @@ struct _handGestureShortcutModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(watchOS) case let ._0(shortcut, isEnabled): - if #available(tvOS 18.0,macOS 15.0,iOS 18.0,watchOS 11.0, *) { + if #available(watchOS 11.0,tvOS 18.0,iOS 18.0,macOS 15.0, *) { let shortcut = shortcut as! SwiftUI.HandGestureShortcut let isEnabled = isEnabled as! AttributeReference @@ -5404,7 +5404,7 @@ struct _highPriorityGestureModifier: ViewModifier { enum Value { case _never - indirect case _0(gesture: _AnyGesture,mask: SwiftUICore.GestureMask = .all ) + indirect case _0(gesture: _AnyGesture,mask: SwiftUICore.GestureMask ) indirect case _1(gesture: _AnyGesture,isEnabled: AttributeReference) @@ -5442,7 +5442,7 @@ struct _highPriorityGestureModifier: ViewModifier { } #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(iOS 18.0,macOS 15.0,tvOS 18.0,watchOS 11.0,visionOS 2.0, *) + @available(watchOS 11.0,visionOS 2.0,tvOS 18.0,macOS 15.0,iOS 18.0, *) init(_ gesture: _AnyGesture,name: AttributeReference,isEnabled: AttributeReference = .init(storage: .constant(true)) ) { self.value = ._2(gesture: gesture, name: name, isEnabled: isEnabled) @@ -5477,7 +5477,7 @@ struct _highPriorityGestureModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._2(gesture, name, isEnabled): - if #available(iOS 18.0,macOS 15.0,tvOS 18.0,watchOS 11.0,visionOS 2.0, *) { + if #available(watchOS 11.0,visionOS 2.0,tvOS 18.0,macOS 15.0,iOS 18.0, *) { let gesture = gesture as! _AnyGesture let name = name as! AttributeReference let isEnabled = isEnabled as! AttributeReference @@ -5565,14 +5565,14 @@ struct _hoverEffectModifier: ViewModifier { #if os(iOS) || os(tvOS) || os(visionOS) - @available(iOS 13.4,visionOS 1.0,tvOS 16.0, *) + @available(visionOS 1.0,tvOS 16.0,iOS 13.4, *) init(_ effect: SwiftUI.HoverEffect = .automatic ) { self.value = ._0(effect: effect) } #endif #if os(iOS) || os(tvOS) || os(visionOS) - @available(iOS 17.0,visionOS 1.0,tvOS 17.0, *) + @available(visionOS 1.0,iOS 17.0,tvOS 17.0, *) init(_ effect: SwiftUI.HoverEffect = .automatic, isEnabled: AttributeReference = .init(storage: .constant(true)) ) { self.value = ._1(effect: effect, isEnabled: isEnabled) @@ -5585,7 +5585,7 @@ struct _hoverEffectModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(tvOS) || os(visionOS) case let ._0(effect): - if #available(iOS 13.4,visionOS 1.0,tvOS 16.0, *) { + if #available(visionOS 1.0,tvOS 16.0,iOS 13.4, *) { let effect = effect as! SwiftUI.HoverEffect __content @@ -5596,7 +5596,7 @@ struct _hoverEffectModifier: ViewModifier { #endif #if os(iOS) || os(tvOS) || os(visionOS) case let ._1(effect, isEnabled): - if #available(iOS 17.0,visionOS 1.0,tvOS 17.0, *) { + if #available(visionOS 1.0,iOS 17.0,tvOS 17.0, *) { let effect = effect as! SwiftUI.HoverEffect let isEnabled = isEnabled as! AttributeReference @@ -5631,7 +5631,7 @@ struct _hoverEffectDisabledModifier: ViewModifier { #if os(iOS) || os(tvOS) || os(visionOS) - @available(iOS 17.0,visionOS 1.0,tvOS 17.0, *) + @available(visionOS 1.0,iOS 17.0,tvOS 17.0, *) init(_ disabled: AttributeReference = .init(storage: .constant(true)) ) { self.value = ._0(disabled: disabled) @@ -5644,7 +5644,7 @@ struct _hoverEffectDisabledModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(tvOS) || os(visionOS) case let ._0(disabled): - if #available(iOS 17.0,visionOS 1.0,tvOS 17.0, *) { + if #available(visionOS 1.0,iOS 17.0,tvOS 17.0, *) { let disabled = disabled as! AttributeReference __content @@ -5806,7 +5806,7 @@ struct _ignoresSafeAreaModifier: ViewModifier { enum Value { case _never - indirect case _0(regions: SwiftUICore.SafeAreaRegions = .all, edges: SwiftUICore.Edge.Set = .all ) + indirect case _0(regions: SwiftUICore.SafeAreaRegions , edges: SwiftUICore.Edge.Set ) } @@ -5961,7 +5961,7 @@ struct _indexViewStyleModifier: ViewModifier { #if os(iOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(iOS 14.0,watchOS 8.0,tvOS 14.0,visionOS 1.0, *) + @available(tvOS 14.0,iOS 14.0,visionOS 1.0,watchOS 8.0, *) init(_ style: AnyIndexViewStyle) { self.value = ._0(style: style) @@ -5974,7 +5974,7 @@ struct _indexViewStyleModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(style): - if #available(iOS 14.0,watchOS 8.0,tvOS 14.0,visionOS 1.0, *) { + if #available(tvOS 14.0,iOS 14.0,visionOS 1.0,watchOS 8.0, *) { let style = style as! AnyIndexViewStyle __content @@ -6160,7 +6160,7 @@ struct _interactiveDismissDisabledModifier: ViewModifier { enum Value { case _never - indirect case _0(isDisabled: AttributeReference = .init(storage: .constant(true)) ) + indirect case _0(isDisabled: AttributeReference) } @@ -6221,7 +6221,7 @@ struct _invalidatableContentModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(watchOS 10.0,macOS 14.0,tvOS 17.0,iOS 17.0,visionOS 1.0, *) + @available(macOS 14.0,iOS 17.0,tvOS 17.0,watchOS 10.0,visionOS 1.0, *) init(_ invalidatable: AttributeReference = .init(storage: .constant(true)) ) { self.value = ._0(invalidatable: invalidatable) @@ -6234,7 +6234,7 @@ struct _invalidatableContentModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(invalidatable): - if #available(watchOS 10.0,macOS 14.0,tvOS 17.0,iOS 17.0,visionOS 1.0, *) { + if #available(macOS 14.0,iOS 17.0,tvOS 17.0,watchOS 10.0,visionOS 1.0, *) { let invalidatable = invalidatable as! AttributeReference __content @@ -6283,28 +6283,28 @@ struct _keyboardShortcutModifier: ViewModifier { #if os(iOS) || os(macOS) || os(visionOS) - @available(iOS 14.0,visionOS 1.0,macOS 11.0, *) + @available(macOS 11.0,visionOS 1.0,iOS 14.0, *) init(_ key: SwiftUI.KeyEquivalent,modifiers: SwiftUICore.EventModifiers = .command ) { self.value = ._0(key: key, modifiers: modifiers) } #endif #if os(iOS) || os(macOS) || os(visionOS) - @available(iOS 14.0,visionOS 1.0,macOS 11.0, *) + @available(macOS 11.0,visionOS 1.0,iOS 14.0, *) init(_ shortcut: SwiftUI.KeyboardShortcut) { self.value = ._1(shortcut: shortcut) } #endif #if os(iOS) || os(macOS) || os(visionOS) - @available(iOS 15.4,visionOS 1.0,macOS 12.3, *) + @available(macOS 12.3,visionOS 1.0,iOS 15.4, *) init(_ shortcut: SwiftUI.KeyboardShortcut?) { self.value = ._2(shortcut: shortcut) } #endif #if os(iOS) || os(macOS) || os(visionOS) - @available(iOS 15.0,visionOS 1.0,macOS 12.0, *) + @available(iOS 15.0,macOS 12.0,visionOS 1.0, *) init(_ key: SwiftUI.KeyEquivalent,modifiers: SwiftUICore.EventModifiers = .command, localization: SwiftUI.KeyboardShortcut.Localization) { self.value = ._3(key: key, modifiers: modifiers, localization: localization) @@ -6317,7 +6317,7 @@ struct _keyboardShortcutModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(visionOS) case let ._0(key, modifiers): - if #available(iOS 14.0,visionOS 1.0,macOS 11.0, *) { + if #available(macOS 11.0,visionOS 1.0,iOS 14.0, *) { let key = key as! SwiftUI.KeyEquivalent let modifiers = modifiers as! SwiftUICore.EventModifiers @@ -6329,7 +6329,7 @@ let modifiers = modifiers as! SwiftUICore.EventModifiers #endif #if os(iOS) || os(macOS) || os(visionOS) case let ._1(shortcut): - if #available(iOS 14.0,visionOS 1.0,macOS 11.0, *) { + if #available(macOS 11.0,visionOS 1.0,iOS 14.0, *) { let shortcut = shortcut as! SwiftUI.KeyboardShortcut __content @@ -6340,7 +6340,7 @@ let modifiers = modifiers as! SwiftUICore.EventModifiers #endif #if os(iOS) || os(macOS) || os(visionOS) case let ._2(shortcut): - if #available(iOS 15.4,visionOS 1.0,macOS 12.3, *) { + if #available(macOS 12.3,visionOS 1.0,iOS 15.4, *) { let shortcut = shortcut as? SwiftUI.KeyboardShortcut __content @@ -6351,7 +6351,7 @@ let modifiers = modifiers as! SwiftUICore.EventModifiers #endif #if os(iOS) || os(macOS) || os(visionOS) case let ._3(key, modifiers, localization): - if #available(iOS 15.0,visionOS 1.0,macOS 12.0, *) { + if #available(iOS 15.0,macOS 12.0,visionOS 1.0, *) { let key = key as! SwiftUI.KeyEquivalent let modifiers = modifiers as! SwiftUICore.EventModifiers let localization = localization as! SwiftUI.KeyboardShortcut.Localization @@ -6575,7 +6575,7 @@ struct _labelsVisibilityModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(tvOS 18.0,watchOS 11.0,visionOS 2.0,macOS 15.0,iOS 18.0, *) + @available(visionOS 2.0,iOS 18.0,tvOS 18.0,watchOS 11.0,macOS 15.0, *) init(_ visibility: AttributeReference) { self.value = ._0(visibility: visibility) @@ -6588,7 +6588,7 @@ struct _labelsVisibilityModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(visibility): - if #available(tvOS 18.0,watchOS 11.0,visionOS 2.0,macOS 15.0,iOS 18.0, *) { + if #available(visionOS 2.0,iOS 18.0,tvOS 18.0,watchOS 11.0,macOS 15.0, *) { let visibility = visibility as! AttributeReference __content @@ -7160,7 +7160,7 @@ struct _listRowSeparatorModifier: ViewModifier { #if os(iOS) || os(macOS) || os(visionOS) - @available(iOS 15.0,visionOS 1.0,macOS 13.0, *) + @available(iOS 15.0,macOS 13.0,visionOS 1.0, *) init(_ visibility: AttributeReference,edges: SwiftUICore.VerticalEdge.Set = .all ) { self.value = ._0(visibility: visibility, edges: edges) @@ -7173,7 +7173,7 @@ struct _listRowSeparatorModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(visionOS) case let ._0(visibility, edges): - if #available(iOS 15.0,visionOS 1.0,macOS 13.0, *) { + if #available(iOS 15.0,macOS 13.0,visionOS 1.0, *) { let visibility = visibility as! AttributeReference let edges = edges as! SwiftUICore.VerticalEdge.Set @@ -7208,7 +7208,7 @@ struct _listRowSeparatorTintModifier: ViewModifier { #if os(iOS) || os(macOS) || os(visionOS) - @available(iOS 15.0,visionOS 1.0,macOS 13.0, *) + @available(iOS 15.0,macOS 13.0,visionOS 1.0, *) init(_ color: Color.Resolvable?,edges: SwiftUICore.VerticalEdge.Set = .all ) { self.value = ._0(color: color, edges: edges) @@ -7221,7 +7221,7 @@ struct _listRowSeparatorTintModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(visionOS) case let ._0(color, edges): - if #available(iOS 15.0,visionOS 1.0,macOS 13.0, *) { + if #available(iOS 15.0,macOS 13.0,visionOS 1.0, *) { let color = color as? Color.Resolvable let edges = edges as! SwiftUICore.VerticalEdge.Set @@ -7303,7 +7303,7 @@ struct _listSectionSeparatorModifier: ViewModifier { #if os(iOS) || os(macOS) || os(visionOS) - @available(iOS 15.0,visionOS 1.0,macOS 13.0, *) + @available(visionOS 1.0,macOS 13.0,iOS 15.0, *) init(_ visibility: AttributeReference,edges: SwiftUICore.VerticalEdge.Set = .all ) { self.value = ._0(visibility: visibility, edges: edges) @@ -7316,7 +7316,7 @@ struct _listSectionSeparatorModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(visionOS) case let ._0(visibility, edges): - if #available(iOS 15.0,visionOS 1.0,macOS 13.0, *) { + if #available(visionOS 1.0,macOS 13.0,iOS 15.0, *) { let visibility = visibility as! AttributeReference let edges = edges as! SwiftUICore.VerticalEdge.Set @@ -7351,7 +7351,7 @@ struct _listSectionSeparatorTintModifier: ViewModifier { #if os(iOS) || os(macOS) || os(visionOS) - @available(iOS 15.0,visionOS 1.0,macOS 13.0, *) + @available(visionOS 1.0,macOS 13.0,iOS 15.0, *) init(_ color: Color.Resolvable?,edges: SwiftUICore.VerticalEdge.Set = .all ) { self.value = ._0(color: color, edges: edges) @@ -7364,7 +7364,7 @@ struct _listSectionSeparatorTintModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(visionOS) case let ._0(color, edges): - if #available(iOS 15.0,visionOS 1.0,macOS 13.0, *) { + if #available(visionOS 1.0,macOS 13.0,iOS 15.0, *) { let color = color as? Color.Resolvable let edges = edges as! SwiftUICore.VerticalEdge.Set @@ -7563,7 +7563,7 @@ struct _materialActiveAppearanceModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(tvOS 18.0,watchOS 11.0,visionOS 2.0,macOS 15.0,iOS 18.0, *) + @available(visionOS 2.0,iOS 18.0,macOS 15.0,watchOS 11.0,tvOS 18.0, *) init(_ appearance: SwiftUICore.MaterialActiveAppearance) { self.value = ._0(appearance: appearance) @@ -7576,7 +7576,7 @@ struct _materialActiveAppearanceModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(appearance): - if #available(tvOS 18.0,watchOS 11.0,visionOS 2.0,macOS 15.0,iOS 18.0, *) { + if #available(visionOS 2.0,iOS 18.0,macOS 15.0,watchOS 11.0,tvOS 18.0, *) { let appearance = appearance as! SwiftUICore.MaterialActiveAppearance __content @@ -7610,7 +7610,7 @@ struct _menuIndicatorModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) - @available(iOS 15.0,macOS 12.0,tvOS 17.0,visionOS 1.0, *) + @available(macOS 12.0,iOS 15.0,tvOS 17.0,visionOS 1.0, *) init(_ visibility: AttributeReference) { self.value = ._0(visibility: visibility) @@ -7623,7 +7623,7 @@ struct _menuIndicatorModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) case let ._0(visibility): - if #available(iOS 15.0,macOS 12.0,tvOS 17.0,visionOS 1.0, *) { + if #available(macOS 12.0,iOS 15.0,tvOS 17.0,visionOS 1.0, *) { let visibility = visibility as! AttributeReference __content @@ -7704,7 +7704,7 @@ struct _menuStyleModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) - @available(tvOS 17.0,visionOS 1.0,macOS 11.0,iOS 14.0, *) + @available(macOS 11.0,iOS 14.0,tvOS 17.0,visionOS 1.0, *) init(_ style: AnyMenuStyle) { self.value = ._0(style: style) @@ -7717,7 +7717,7 @@ struct _menuStyleModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) case let ._0(style): - if #available(tvOS 17.0,visionOS 1.0,macOS 11.0,iOS 14.0, *) { + if #available(macOS 11.0,iOS 14.0,tvOS 17.0,visionOS 1.0, *) { let style = style as! AnyMenuStyle __content @@ -7798,7 +7798,7 @@ struct _modifierKeyAlternateModifier: ViewModifier { #if os(macOS) || os(visionOS) - @available(visionOS 1.0,macOS 15.0, *) + @available(macOS 15.0,visionOS 1.0, *) init(_ modifiers: SwiftUICore.EventModifiers,_ alternate: ViewReference=ViewReference(value: [])) { self.value = ._0(modifiers: modifiers, alternate: alternate) @@ -7811,7 +7811,7 @@ struct _modifierKeyAlternateModifier: ViewModifier { fatalError("unreachable") #if os(macOS) || os(visionOS) case let ._0(modifiers, alternate): - if #available(visionOS 1.0,macOS 15.0, *) { + if #available(macOS 15.0,visionOS 1.0, *) { let modifiers = modifiers as! SwiftUICore.EventModifiers let alternate = alternate as! ViewReference @@ -7926,7 +7926,7 @@ struct _navigationBarBackButtonHiddenModifier: ViewModifier { enum Value { case _never - indirect case _0(hidesBackButton: AttributeReference = .init(storage: .constant(true)) ) + indirect case _0(hidesBackButton: AttributeReference) } @@ -7987,7 +7987,7 @@ struct _navigationBarHiddenModifier: ViewModifier { #if os(iOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(iOS 13.0,macOS 13.0,tvOS 13.0,watchOS 6.0,visionOS 1.0, *) + @available(iOS 13.0,visionOS 1.0,macOS 13.0,tvOS 13.0,watchOS 6.0, *) init(_ hidden: AttributeReference) { self.value = ._0(hidden: hidden) @@ -8000,7 +8000,7 @@ struct _navigationBarHiddenModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(hidden): - if #available(iOS 13.0,macOS 13.0,tvOS 13.0,watchOS 6.0,visionOS 1.0, *) { + if #available(iOS 13.0,visionOS 1.0,macOS 13.0,tvOS 13.0,watchOS 6.0, *) { let hidden = hidden as! AttributeReference __content @@ -8044,21 +8044,21 @@ struct _navigationBarItemsModifier: ViewModifier { #if os(iOS) || os(tvOS) || os(visionOS) - @available(iOS 16.0,visionOS 1.0,tvOS 16.0, *) + @available(visionOS 1.0,iOS 16.0,tvOS 16.0, *) init(leading: InlineViewReference,trailing: InlineViewReference) { self.value = ._0(leading: leading, trailing: trailing) } #endif #if os(iOS) || os(tvOS) || os(visionOS) - @available(iOS 16.0,visionOS 1.0,tvOS 16.0, *) + @available(visionOS 1.0,iOS 16.0,tvOS 16.0, *) init(leading: InlineViewReference) { self.value = ._1(leading: leading) } #endif #if os(iOS) || os(tvOS) || os(visionOS) - @available(iOS 16.0,visionOS 1.0,tvOS 16.0, *) + @available(visionOS 1.0,iOS 16.0,tvOS 16.0, *) init(trailing: InlineViewReference) { self.value = ._2(trailing: trailing) @@ -8071,7 +8071,7 @@ struct _navigationBarItemsModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(tvOS) || os(visionOS) case let ._0(leading, trailing): - if #available(iOS 16.0,visionOS 1.0,tvOS 16.0, *) { + if #available(visionOS 1.0,iOS 16.0,tvOS 16.0, *) { let leading = leading as! InlineViewReference let trailing = trailing as! InlineViewReference @@ -8083,7 +8083,7 @@ let trailing = trailing as! InlineViewReference #endif #if os(iOS) || os(tvOS) || os(visionOS) case let ._1(leading): - if #available(iOS 16.0,visionOS 1.0,tvOS 16.0, *) { + if #available(visionOS 1.0,iOS 16.0,tvOS 16.0, *) { let leading = leading as! InlineViewReference __content @@ -8094,7 +8094,7 @@ let trailing = trailing as! InlineViewReference #endif #if os(iOS) || os(tvOS) || os(visionOS) case let ._2(trailing): - if #available(iOS 16.0,visionOS 1.0,tvOS 16.0, *) { + if #available(visionOS 1.0,iOS 16.0,tvOS 16.0, *) { let trailing = trailing as! InlineViewReference __content @@ -8153,42 +8153,42 @@ struct _navigationBarTitleModifier: ViewModifier { #if os(iOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(iOS 13.0,macOS 13.0,tvOS 13.0,watchOS 6.0,visionOS 1.0, *) + @available(iOS 13.0,visionOS 1.0,macOS 13.0,tvOS 13.0,watchOS 6.0, *) init(_ title: TextReference) { self.value = ._0(title: title) } #endif #if os(iOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(iOS 13.0,macOS 13.0,tvOS 13.0,watchOS 6.0,visionOS 1.0, *) + @available(macOS 13.0,tvOS 13.0,iOS 13.0,visionOS 1.0,watchOS 6.0, *) init(_ titleKey: SwiftUICore.LocalizedStringKey) { self.value = ._1(titleKey: titleKey) } #endif #if os(iOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(iOS 13.0,macOS 13.0,tvOS 13.0,watchOS 6.0,visionOS 1.0, *) + @available(macOS 13.0,tvOS 13.0,iOS 13.0,visionOS 1.0,watchOS 6.0, *) init(_ title: AttributeReference) { self.value = ._2(title: title) } #endif #if os(iOS) || os(visionOS) - @available(iOS 13.0,macOS 13.0,tvOS 13.0,watchOS 6.0,visionOS 1.0, *) + @available(macOS 13.0,tvOS 13.0,iOS 13.0,visionOS 1.0,watchOS 6.0, *) init(_ title: TextReference,displayMode: SwiftUI.NavigationBarItem.TitleDisplayMode) { self.value = ._3(title: title, displayMode: displayMode) } #endif #if os(iOS) || os(visionOS) - @available(iOS 13.0,macOS 13.0,tvOS 13.0,watchOS 6.0,visionOS 1.0, *) + @available(tvOS 13.0,iOS 13.0,macOS 13.0,watchOS 6.0,visionOS 1.0, *) init(_ titleKey: SwiftUICore.LocalizedStringKey,displayMode: SwiftUI.NavigationBarItem.TitleDisplayMode) { self.value = ._4(titleKey: titleKey, displayMode: displayMode) } #endif #if os(iOS) || os(visionOS) - @available(iOS 13.0,macOS 13.0,tvOS 13.0,watchOS 6.0,visionOS 1.0, *) + @available(iOS 13.0,visionOS 1.0,macOS 13.0,tvOS 13.0,watchOS 6.0, *) init(_ title: AttributeReference,displayMode: SwiftUI.NavigationBarItem.TitleDisplayMode) { self.value = ._5(title: title, displayMode: displayMode) @@ -8201,7 +8201,7 @@ struct _navigationBarTitleModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(title): - if #available(iOS 13.0,macOS 13.0,tvOS 13.0,watchOS 6.0,visionOS 1.0, *) { + if #available(iOS 13.0,visionOS 1.0,macOS 13.0,tvOS 13.0,watchOS 6.0, *) { let title = title as! TextReference __content._observeTextReference(title, on: element, in: context) { __content in __content @@ -8212,7 +8212,7 @@ struct _navigationBarTitleModifier: ViewModifier { #endif #if os(iOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._1(titleKey): - if #available(iOS 13.0,macOS 13.0,tvOS 13.0,watchOS 6.0,visionOS 1.0, *) { + if #available(macOS 13.0,tvOS 13.0,iOS 13.0,visionOS 1.0,watchOS 6.0, *) { let titleKey = titleKey as! SwiftUICore.LocalizedStringKey __content @@ -8223,7 +8223,7 @@ struct _navigationBarTitleModifier: ViewModifier { #endif #if os(iOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._2(title): - if #available(iOS 13.0,macOS 13.0,tvOS 13.0,watchOS 6.0,visionOS 1.0, *) { + if #available(macOS 13.0,tvOS 13.0,iOS 13.0,visionOS 1.0,watchOS 6.0, *) { let title = title as! AttributeReference __content @@ -8234,7 +8234,7 @@ struct _navigationBarTitleModifier: ViewModifier { #endif #if os(iOS) || os(visionOS) case let ._3(title, displayMode): - if #available(iOS 13.0,macOS 13.0,tvOS 13.0,watchOS 6.0,visionOS 1.0, *) { + if #available(macOS 13.0,tvOS 13.0,iOS 13.0,visionOS 1.0,watchOS 6.0, *) { let title = title as! TextReference let displayMode = displayMode as! SwiftUI.NavigationBarItem.TitleDisplayMode __content._observeTextReference(title, on: element, in: context) { __content in @@ -8246,7 +8246,7 @@ let displayMode = displayMode as! SwiftUI.NavigationBarItem.TitleDisplayMode #endif #if os(iOS) || os(visionOS) case let ._4(titleKey, displayMode): - if #available(iOS 13.0,macOS 13.0,tvOS 13.0,watchOS 6.0,visionOS 1.0, *) { + if #available(tvOS 13.0,iOS 13.0,macOS 13.0,watchOS 6.0,visionOS 1.0, *) { let titleKey = titleKey as! SwiftUICore.LocalizedStringKey let displayMode = displayMode as! SwiftUI.NavigationBarItem.TitleDisplayMode @@ -8258,7 +8258,7 @@ let displayMode = displayMode as! SwiftUI.NavigationBarItem.TitleDisplayMode #endif #if os(iOS) || os(visionOS) case let ._5(title, displayMode): - if #available(iOS 13.0,macOS 13.0,tvOS 13.0,watchOS 6.0,visionOS 1.0, *) { + if #available(iOS 13.0,visionOS 1.0,macOS 13.0,tvOS 13.0,watchOS 6.0, *) { let title = title as! AttributeReference let displayMode = displayMode as! SwiftUI.NavigationBarItem.TitleDisplayMode @@ -8293,7 +8293,7 @@ struct _navigationBarTitleDisplayModeModifier: ViewModifier { #if os(iOS) || os(visionOS) || os(watchOS) - @available(visionOS 1.0,iOS 14.0,watchOS 8.0, *) + @available(iOS 14.0,watchOS 8.0,visionOS 1.0, *) init(_ displayMode: SwiftUI.NavigationBarItem.TitleDisplayMode) { self.value = ._0(displayMode: displayMode) @@ -8306,7 +8306,7 @@ struct _navigationBarTitleDisplayModeModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(visionOS) || os(watchOS) case let ._0(displayMode): - if #available(visionOS 1.0,iOS 14.0,watchOS 8.0, *) { + if #available(iOS 14.0,watchOS 8.0,visionOS 1.0, *) { let displayMode = displayMode as! SwiftUI.NavigationBarItem.TitleDisplayMode __content @@ -8326,7 +8326,7 @@ struct _navigationDestinationModifier: ViewModifier { enum Value { case _never - indirect case _0(destination: ViewReference=ViewReference(value: [])) + indirect case _0(destination: ViewReference) } @@ -8376,7 +8376,7 @@ struct _navigationSplitViewColumnWidthModifier: ViewModifier { indirect case _0(width: AttributeReference) - indirect case _1(min: AttributeReference? = .init(storage: .constant(nil)), ideal: AttributeReference,max: AttributeReference? = .init(storage: .constant(nil)) ) + indirect case _1(min: AttributeReference?, ideal: AttributeReference,max: AttributeReference?) } @@ -8514,14 +8514,14 @@ struct _navigationSubtitleModifier: ViewModifier { #if os(macOS) || targetEnvironment(macCatalyst) - @available(macOS 11.0,macCatalyst 14.0, *) + @available(macCatalyst 14.0,macOS 11.0, *) init(_ subtitle: TextReference) { self.value = ._0(subtitle: subtitle) } #endif #if os(macOS) || targetEnvironment(macCatalyst) - @available(macOS 11.0,macCatalyst 14.0, *) + @available(macCatalyst 14.0,macOS 11.0, *) init(_ subtitleKey: SwiftUICore.LocalizedStringKey) { self.value = ._1(subtitleKey: subtitleKey) @@ -8541,7 +8541,7 @@ struct _navigationSubtitleModifier: ViewModifier { fatalError("unreachable") #if os(macOS) || targetEnvironment(macCatalyst) case let ._0(subtitle): - if #available(macOS 11.0,macCatalyst 14.0, *) { + if #available(macCatalyst 14.0,macOS 11.0, *) { let subtitle = subtitle as! TextReference __content._observeTextReference(subtitle, on: element, in: context) { __content in __content @@ -8552,7 +8552,7 @@ struct _navigationSubtitleModifier: ViewModifier { #endif #if os(macOS) || targetEnvironment(macCatalyst) case let ._1(subtitleKey): - if #available(macOS 11.0,macCatalyst 14.0, *) { + if #available(macCatalyst 14.0,macOS 11.0, *) { let subtitleKey = subtitleKey as! SwiftUICore.LocalizedStringKey __content @@ -8638,7 +8638,7 @@ struct _navigationTitleModifier: ViewModifier { } #if os(watchOS) - @available(tvOS 14.0,watchOS 7.0,macOS 11.0,iOS 14.0, *) + @available(iOS 14.0,macOS 11.0,tvOS 14.0,watchOS 7.0, *) init(_ title: ViewReference=ViewReference(value: [])) { self.value = ._3(title: title) @@ -8691,7 +8691,7 @@ struct _navigationTitleModifier: ViewModifier { #if os(watchOS) case let ._3(title): - if #available(tvOS 14.0,watchOS 7.0,macOS 11.0,iOS 14.0, *) { + if #available(iOS 14.0,macOS 11.0,tvOS 14.0,watchOS 7.0, *) { let title = title as! ViewReference __content @@ -8775,7 +8775,7 @@ struct _offsetModifier: ViewModifier { indirect case _1(offset: CoreFoundation.CGSize) - indirect case _2(x: AttributeReference = .init(storage: .constant(0)), y: AttributeReference = .init(storage: .constant(0)) ) + indirect case _2(x: AttributeReference, y: AttributeReference) } @@ -9017,7 +9017,7 @@ struct _onExitCommandModifier: ViewModifier { @Event private var _0_action__0: Event.EventHandler #if os(macOS) || os(tvOS) - @available(macOS 10.15,tvOS 13.0, *) + @available(tvOS 13.0,macOS 10.15, *) init(perform action__0: Event=Event()) { self.value = ._0 self.__0_action__0 = action__0 @@ -9030,7 +9030,7 @@ struct _onExitCommandModifier: ViewModifier { fatalError("unreachable") #if os(macOS) || os(tvOS) case ._0: - if #available(macOS 10.15,tvOS 13.0, *) { + if #available(tvOS 13.0,macOS 10.15, *) { __content @@ -9064,7 +9064,7 @@ struct _onHoverModifier: ViewModifier { @Event private var _0_action__1: Event.EventHandler #if os(iOS) || os(macOS) || os(visionOS) - @available(iOS 13.4,visionOS 1.0,macOS 10.15, *) + @available(iOS 13.4,macOS 10.15,visionOS 1.0, *) init(perform action__1: Event) { self.value = ._0 self.__0_action__1 = action__1 @@ -9077,7 +9077,7 @@ struct _onHoverModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(visionOS) case ._0: - if #available(iOS 13.4,visionOS 1.0,macOS 10.15, *) { + if #available(iOS 13.4,macOS 10.15,visionOS 1.0, *) { __content @@ -9177,7 +9177,7 @@ struct _onLongPressGestureModifier: ViewModifier { @Event private var _3_action__0: Event.EventHandler #if os(iOS) || os(macOS) || os(visionOS) || os(watchOS) - @available(tvOS 14.0,iOS 13.0,macOS 10.15,visionOS 1.0,watchOS 6.0, *) + @available(watchOS 6.0,tvOS 14.0,iOS 13.0,macOS 10.15,visionOS 1.0, *) init(minimumDuration: AttributeReference = .init(storage: .constant(0.5)), maximumDistance: AttributeReference = .init(storage: .constant(10)), perform action__0: Event,onPressingChanged onPressingChanged__1: Event=Event() ) { self.value = ._0(minimumDuration: minimumDuration, maximumDistance: maximumDistance) self.__0_action__0 = action__0 @@ -9185,7 +9185,7 @@ self.__0_onPressingChanged__1 = onPressingChanged__1 } #endif #if os(tvOS) - @available(tvOS 14.0,iOS 13.0,macOS 10.15,watchOS 6.0, *) + @available(macOS 10.15,tvOS 14.0,iOS 13.0,watchOS 6.0, *) init(minimumDuration: AttributeReference = .init(storage: .constant(0.5)), perform action__0: Event,onPressingChanged onPressingChanged__1: Event=Event() ) { self.value = ._1(minimumDuration: minimumDuration) self.__1_action__0 = action__0 @@ -9193,7 +9193,7 @@ self.__1_onPressingChanged__1 = onPressingChanged__1 } #endif #if os(iOS) || os(macOS) || os(visionOS) || os(watchOS) - @available(tvOS 14.0,iOS 13.0,macOS 10.15,visionOS 1.0,watchOS 6.0, *) + @available(macOS 10.15,tvOS 14.0,iOS 13.0,watchOS 6.0,visionOS 1.0, *) init(minimumDuration: AttributeReference = .init(storage: .constant(0.5)), maximumDistance: AttributeReference = .init(storage: .constant(10)), pressing pressing__1: Event=Event(), perform action__0: Event) { self.value = ._2(minimumDuration: minimumDuration, maximumDistance: maximumDistance) self.__2_pressing__1 = pressing__1 @@ -9201,7 +9201,7 @@ self.__2_action__0 = action__0 } #endif #if os(tvOS) - @available(tvOS 14.0,iOS 13.0,macOS 10.15,watchOS 6.0, *) + @available(macOS 10.15,tvOS 14.0,iOS 13.0,watchOS 6.0, *) init(minimumDuration: AttributeReference = .init(storage: .constant(0.5)), pressing pressing__1: Event=Event(), perform action__0: Event) { self.value = ._3(minimumDuration: minimumDuration) self.__3_pressing__1 = pressing__1 @@ -9215,7 +9215,7 @@ self.__3_action__0 = action__0 fatalError("unreachable") #if os(iOS) || os(macOS) || os(visionOS) || os(watchOS) case let ._0(minimumDuration, maximumDistance): - if #available(tvOS 14.0,iOS 13.0,macOS 10.15,visionOS 1.0,watchOS 6.0, *) { + if #available(watchOS 6.0,tvOS 14.0,iOS 13.0,macOS 10.15,visionOS 1.0, *) { let minimumDuration = minimumDuration as! AttributeReference let maximumDistance = maximumDistance as! AttributeReference @@ -9227,7 +9227,7 @@ let maximumDistance = maximumDistance as! AttributeReference __content @@ -9238,7 +9238,7 @@ let maximumDistance = maximumDistance as! AttributeReference let maximumDistance = maximumDistance as! AttributeReference @@ -9250,7 +9250,7 @@ let maximumDistance = maximumDistance as! AttributeReference __content @@ -9333,7 +9333,7 @@ struct _onModifierKeysChangedModifier: ViewModifier { @Event private var _0_action__2: Event.EventHandler #if os(macOS) || os(visionOS) - @available(visionOS 1.0,macOS 15.0, *) + @available(macOS 15.0,visionOS 1.0, *) init(mask: SwiftUICore.EventModifiers = .all, initial: AttributeReference = .init(storage: .constant(true)), action action__2: Event) { self.value = ._0(mask: mask, initial: initial) self.__0_action__2 = action__2 @@ -9346,7 +9346,7 @@ struct _onModifierKeysChangedModifier: ViewModifier { fatalError("unreachable") #if os(macOS) || os(visionOS) case let ._0(mask, initial): - if #available(visionOS 1.0,macOS 15.0, *) { + if #available(macOS 15.0,visionOS 1.0, *) { let mask = mask as! SwiftUICore.EventModifiers let initial = initial as! AttributeReference @@ -9381,7 +9381,7 @@ struct _onMoveCommandModifier: ViewModifier { @Event private var _0_action__1: Event.EventHandler #if os(macOS) || os(tvOS) - @available(macOS 10.15,tvOS 13.0, *) + @available(tvOS 13.0,macOS 10.15, *) init(perform action__1: Event=Event()) { self.value = ._0 self.__0_action__1 = action__1 @@ -9394,7 +9394,7 @@ struct _onMoveCommandModifier: ViewModifier { fatalError("unreachable") #if os(macOS) || os(tvOS) case ._0: - if #available(macOS 10.15,tvOS 13.0, *) { + if #available(tvOS 13.0,macOS 10.15, *) { __content @@ -9428,7 +9428,7 @@ struct _onPencilDoubleTapModifier: ViewModifier { @Event private var _0_action__1: Event.EventHandler #if os(iOS) || os(macOS) - @available(iOS 17.5,macOS 14.5, *) + @available(macOS 14.5,iOS 17.5, *) init(perform action__1: Event) { self.value = ._0 self.__0_action__1 = action__1 @@ -9441,7 +9441,7 @@ struct _onPencilDoubleTapModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) case ._0: - if #available(iOS 17.5,macOS 14.5, *) { + if #available(macOS 14.5,iOS 17.5, *) { __content @@ -9475,7 +9475,7 @@ struct _onPencilSqueezeModifier: ViewModifier { @Event private var _0_action__1: Event.EventHandler #if os(iOS) || os(macOS) - @available(iOS 17.5,macOS 14.5, *) + @available(macOS 14.5,iOS 17.5, *) init(perform action__1: Event) { self.value = ._0 self.__0_action__1 = action__1 @@ -9488,7 +9488,7 @@ struct _onPencilSqueezeModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) case ._0: - if #available(iOS 17.5,macOS 14.5, *) { + if #available(macOS 14.5,iOS 17.5, *) { __content @@ -9522,7 +9522,7 @@ struct _onPlayPauseCommandModifier: ViewModifier { @Event private var _0_action__0: Event.EventHandler #if os(tvOS) - @available(macOS 10.15,tvOS 13.0, *) + @available(tvOS 13.0,macOS 10.15, *) init(perform action__0: Event=Event()) { self.value = ._0 self.__0_action__0 = action__0 @@ -9535,7 +9535,7 @@ struct _onPlayPauseCommandModifier: ViewModifier { fatalError("unreachable") #if os(tvOS) case ._0: - if #available(macOS 10.15,tvOS 13.0, *) { + if #available(tvOS 13.0,macOS 10.15, *) { __content @@ -9569,7 +9569,7 @@ struct _onScrollPhaseChangeModifier: ViewModifier { @Event private var _0_action__2: Event.EventHandler #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(tvOS 18.0,visionOS 2.0,watchOS 11.0,macOS 15.0,iOS 18.0, *) + @available(visionOS 2.0,iOS 18.0,tvOS 18.0,watchOS 11.0,macOS 15.0, *) init(_ action__2: Event) { self.value = ._0 self.__0_action__2 = action__2 @@ -9582,7 +9582,7 @@ struct _onScrollPhaseChangeModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case ._0: - if #available(tvOS 18.0,visionOS 2.0,watchOS 11.0,macOS 15.0,iOS 18.0, *) { + if #available(visionOS 2.0,iOS 18.0,tvOS 18.0,watchOS 11.0,macOS 15.0, *) { __content @@ -9616,7 +9616,7 @@ struct _onScrollVisibilityChangeModifier: ViewModifier { @Event private var _0_action__1: Event.EventHandler #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(tvOS 18.0,watchOS 11.0,iOS 18.0,visionOS 2.0,macOS 15.0, *) + @available(iOS 18.0,visionOS 2.0,macOS 15.0,tvOS 18.0,watchOS 11.0, *) init(threshold: AttributeReference = .init(storage: .constant(0.5)), action action__1: Event) { self.value = ._0(threshold: threshold) self.__0_action__1 = action__1 @@ -9629,7 +9629,7 @@ struct _onScrollVisibilityChangeModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(threshold): - if #available(tvOS 18.0,watchOS 11.0,iOS 18.0,visionOS 2.0,macOS 15.0, *) { + if #available(iOS 18.0,visionOS 2.0,macOS 15.0,tvOS 18.0,watchOS 11.0, *) { let threshold = threshold as! AttributeReference __content @@ -9652,7 +9652,7 @@ struct _onTapGestureModifier: ViewModifier { indirect case _0(count: Any, coordinateSpace: Any) #endif - indirect case _1(count: AttributeReference = .init(storage: .constant(1))) + indirect case _1(count: AttributeReference) } @@ -9668,7 +9668,7 @@ struct _onTapGestureModifier: ViewModifier { @Event private var _1_action__0: Event.EventHandler #if os(iOS) || os(macOS) || os(visionOS) || os(watchOS) - @available(iOS 17.0,visionOS 1.0,watchOS 10.0,macOS 14.0, *) + @available(macOS 14.0,visionOS 1.0,iOS 17.0,watchOS 10.0, *) init(count: AttributeReference = .init(storage: .constant(1)), coordinateSpace: AnyCoordinateSpaceProtocol = .local, perform action__1: Event) { self.value = ._0(count: count, coordinateSpace: coordinateSpace) self.__0_action__1 = action__1 @@ -9688,7 +9688,7 @@ struct _onTapGestureModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(visionOS) || os(watchOS) case let ._0(count, coordinateSpace): - if #available(iOS 17.0,visionOS 1.0,watchOS 10.0,macOS 14.0, *) { + if #available(macOS 14.0,visionOS 1.0,iOS 17.0,watchOS 10.0, *) { let count = count as! AttributeReference let coordinateSpace = coordinateSpace as! AnyCoordinateSpaceProtocol @@ -9865,16 +9865,16 @@ struct _overlayModifier: ViewModifier { enum Value { case _never - indirect case _0(overlay: InlineViewReference,alignment: AttributeReference = .init(storage: .constant(.center)) ) + indirect case _0(overlay: InlineViewReference,alignment: AttributeReference) - indirect case _1(alignment: AttributeReference = .init(storage: .constant(.center)), content: ViewReference=ViewReference(value: [])) + indirect case _1(alignment: AttributeReference, content: ViewReference) - indirect case _2(style: AnyShapeStyle.Resolvable,edges: SwiftUICore.Edge.Set = .all ) + indirect case _2(style: AnyShapeStyle.Resolvable,edges: SwiftUICore.Edge.Set ) - indirect case _3(style: AnyShapeStyle.Resolvable,shape: AnyShape,fillStyle: SwiftUICore.FillStyle = FillStyle() ) + indirect case _3(style: AnyShapeStyle.Resolvable,shape: AnyShape,fillStyle: SwiftUICore.FillStyle ) } @@ -9984,7 +9984,7 @@ struct _paddingModifier: ViewModifier { indirect case _0(insets: SwiftUICore.EdgeInsets) - indirect case _1(edges: SwiftUICore.Edge.Set = .all, length: AttributeReference? = .init(storage: .constant(nil)) ) + indirect case _1(edges: SwiftUICore.Edge.Set , length: AttributeReference?) indirect case _2(length: AttributeReference) @@ -10276,7 +10276,7 @@ struct _pointerStyleModifier: ViewModifier { #if os(macOS) || os(visionOS) - @available(visionOS 2.0,macOS 15.0, *) + @available(macOS 15.0,visionOS 2.0, *) init(_ style: SwiftUI.PointerStyle?) { self.value = ._0(style: style) @@ -10289,7 +10289,7 @@ struct _pointerStyleModifier: ViewModifier { fatalError("unreachable") #if os(macOS) || os(visionOS) case let ._0(style): - if #available(visionOS 2.0,macOS 15.0, *) { + if #available(macOS 15.0,visionOS 2.0, *) { let style = style as? SwiftUI.PointerStyle __content @@ -10375,14 +10375,14 @@ struct _popoverModifier: ViewModifier { #if os(iOS) || os(macOS) || os(visionOS) - @available(macOS 10.15,visionOS 1.0,iOS 13.0, *) + @available(visionOS 1.0,macOS 10.15,iOS 13.0, *) init(isPresented: ChangeTracked,attachmentAnchor: SwiftUI.PopoverAttachmentAnchor = .rect(.bounds), arrowEdge: SwiftUICore.Edge = .top, content: ViewReference=ViewReference(value: [])) { self.value = ._0(attachmentAnchor: attachmentAnchor, arrowEdge: arrowEdge, content: content) self.__0_isPresented = isPresented } #endif #if os(iOS) || os(macOS) || os(visionOS) - @available(macOS 15.0,visionOS 2.0,iOS 18.0, *) + @available(visionOS 2.0,macOS 15.0,iOS 18.0, *) init(isPresented: ChangeTracked,attachmentAnchor: SwiftUI.PopoverAttachmentAnchor = .rect(.bounds), content: ViewReference=ViewReference(value: [])) { self.value = ._1(attachmentAnchor: attachmentAnchor, content: content) self.__1_isPresented = isPresented @@ -10395,7 +10395,7 @@ struct _popoverModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(visionOS) case let ._0(attachmentAnchor, arrowEdge, content): - if #available(macOS 10.15,visionOS 1.0,iOS 13.0, *) { + if #available(visionOS 1.0,macOS 10.15,iOS 13.0, *) { let attachmentAnchor = attachmentAnchor as! SwiftUI.PopoverAttachmentAnchor let arrowEdge = arrowEdge as! SwiftUICore.Edge let content = content as! ViewReference @@ -10408,7 +10408,7 @@ let content = content as! ViewReference #endif #if os(iOS) || os(macOS) || os(visionOS) case let ._1(attachmentAnchor, content): - if #available(macOS 15.0,visionOS 2.0,iOS 18.0, *) { + if #available(visionOS 2.0,macOS 15.0,iOS 18.0, *) { let attachmentAnchor = attachmentAnchor as! SwiftUI.PopoverAttachmentAnchor let content = content as! ViewReference @@ -10432,7 +10432,7 @@ struct _positionModifier: ViewModifier { indirect case _0(position: CoreFoundation.CGPoint) - indirect case _1(x: AttributeReference = .init(storage: .constant(0)), y: AttributeReference = .init(storage: .constant(0)) ) + indirect case _1(x: AttributeReference, y: AttributeReference) } @@ -10612,14 +10612,14 @@ struct _presentationBackgroundModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(tvOS 16.4,iOS 16.4,visionOS 1.0,macOS 13.3,watchOS 9.4, *) + @available(visionOS 1.0,iOS 16.4,tvOS 16.4,watchOS 9.4,macOS 13.3, *) init(_ style: AnyShapeStyle.Resolvable) { self.value = ._0(style: style) } #endif #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(tvOS 16.4,iOS 16.4,visionOS 1.0,macOS 13.3,watchOS 9.4, *) + @available(visionOS 1.0,iOS 16.4,tvOS 16.4,watchOS 9.4,macOS 13.3, *) init(alignment: AttributeReference = .init(storage: .constant(.center)), content: ViewReference=ViewReference(value: [])) { self.value = ._1(alignment: alignment, content: content) @@ -10632,7 +10632,7 @@ struct _presentationBackgroundModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(style): - if #available(tvOS 16.4,iOS 16.4,visionOS 1.0,macOS 13.3,watchOS 9.4, *) { + if #available(visionOS 1.0,iOS 16.4,tvOS 16.4,watchOS 9.4,macOS 13.3, *) { let style = style as! AnyShapeStyle.Resolvable __content @@ -10643,7 +10643,7 @@ struct _presentationBackgroundModifier: ViewModifier { #endif #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._1(alignment, content): - if #available(tvOS 16.4,iOS 16.4,visionOS 1.0,macOS 13.3,watchOS 9.4, *) { + if #available(visionOS 1.0,iOS 16.4,tvOS 16.4,watchOS 9.4,macOS 13.3, *) { let alignment = alignment as! AttributeReference let content = content as! ViewReference @@ -10678,7 +10678,7 @@ struct _presentationBackgroundInteractionModifier: ViewModifier #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(iOS 16.4,macOS 13.3,tvOS 16.4,watchOS 9.4,visionOS 1.0, *) + @available(macOS 13.3,tvOS 16.4,iOS 16.4,visionOS 1.0,watchOS 9.4, *) init(_ interaction: SwiftUI.PresentationBackgroundInteraction) { self.value = ._0(interaction: interaction) @@ -10691,7 +10691,7 @@ struct _presentationBackgroundInteractionModifier: ViewModifier fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(interaction): - if #available(iOS 16.4,macOS 13.3,tvOS 16.4,watchOS 9.4,visionOS 1.0, *) { + if #available(macOS 13.3,tvOS 16.4,iOS 16.4,visionOS 1.0,watchOS 9.4, *) { let interaction = interaction as! SwiftUI.PresentationBackgroundInteraction __content @@ -10730,14 +10730,14 @@ struct _presentationCompactAdaptationModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(iOS 16.4,macOS 13.3,tvOS 16.4,watchOS 9.4,visionOS 1.0, *) + @available(macOS 13.3,tvOS 16.4,iOS 16.4,visionOS 1.0,watchOS 9.4, *) init(_ adaptation: SwiftUI.PresentationAdaptation) { self.value = ._0(adaptation: adaptation) } #endif #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(iOS 16.4,macOS 13.3,tvOS 16.4,watchOS 9.4,visionOS 1.0, *) + @available(macOS 13.3,tvOS 16.4,iOS 16.4,visionOS 1.0,watchOS 9.4, *) init(horizontal horizontalAdaptation: SwiftUI.PresentationAdaptation,vertical verticalAdaptation: SwiftUI.PresentationAdaptation) { self.value = ._1(horizontalAdaptation: horizontalAdaptation, verticalAdaptation: verticalAdaptation) @@ -10750,7 +10750,7 @@ struct _presentationCompactAdaptationModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(adaptation): - if #available(iOS 16.4,macOS 13.3,tvOS 16.4,watchOS 9.4,visionOS 1.0, *) { + if #available(macOS 13.3,tvOS 16.4,iOS 16.4,visionOS 1.0,watchOS 9.4, *) { let adaptation = adaptation as! SwiftUI.PresentationAdaptation __content @@ -10761,7 +10761,7 @@ struct _presentationCompactAdaptationModifier: ViewModifier { #endif #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._1(horizontalAdaptation, verticalAdaptation): - if #available(iOS 16.4,macOS 13.3,tvOS 16.4,watchOS 9.4,visionOS 1.0, *) { + if #available(macOS 13.3,tvOS 16.4,iOS 16.4,visionOS 1.0,watchOS 9.4, *) { let horizontalAdaptation = horizontalAdaptation as! SwiftUI.PresentationAdaptation let verticalAdaptation = verticalAdaptation as! SwiftUI.PresentationAdaptation @@ -10796,7 +10796,7 @@ struct _presentationContentInteractionModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(iOS 16.4,macOS 13.3,tvOS 16.4,watchOS 9.4,visionOS 1.0, *) + @available(macOS 13.3,iOS 16.4,tvOS 16.4,watchOS 9.4,visionOS 1.0, *) init(_ behavior: SwiftUI.PresentationContentInteraction) { self.value = ._0(behavior: behavior) @@ -10809,7 +10809,7 @@ struct _presentationContentInteractionModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(behavior): - if #available(iOS 16.4,macOS 13.3,tvOS 16.4,watchOS 9.4,visionOS 1.0, *) { + if #available(macOS 13.3,iOS 16.4,tvOS 16.4,watchOS 9.4,visionOS 1.0, *) { let behavior = behavior as! SwiftUI.PresentationContentInteraction __content @@ -10843,7 +10843,7 @@ struct _presentationCornerRadiusModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(iOS 16.4,macOS 13.3,tvOS 16.4,watchOS 9.4,visionOS 1.0, *) + @available(macOS 13.3,iOS 16.4,tvOS 16.4,watchOS 9.4,visionOS 1.0, *) init(_ cornerRadius: AttributeReference?) { self.value = ._0(cornerRadius: cornerRadius) @@ -10856,7 +10856,7 @@ struct _presentationCornerRadiusModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(cornerRadius): - if #available(iOS 16.4,macOS 13.3,tvOS 16.4,watchOS 9.4,visionOS 1.0, *) { + if #available(macOS 13.3,iOS 16.4,tvOS 16.4,watchOS 9.4,visionOS 1.0, *) { let cornerRadius = cornerRadius as? AttributeReference __content @@ -10937,7 +10937,7 @@ struct _presentationSizingModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(tvOS 18.0,visionOS 2.0,watchOS 11.0,macOS 15.0,iOS 18.0, *) + @available(iOS 18.0,macOS 15.0,visionOS 2.0,watchOS 11.0,tvOS 18.0, *) init(_ sizing: AnyPresentationSizing) { self.value = ._0(sizing: sizing) @@ -10950,7 +10950,7 @@ struct _presentationSizingModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(sizing): - if #available(tvOS 18.0,visionOS 2.0,watchOS 11.0,macOS 15.0,iOS 18.0, *) { + if #available(iOS 18.0,macOS 15.0,visionOS 2.0,watchOS 11.0,tvOS 18.0, *) { let sizing = sizing as! AnyPresentationSizing __content @@ -11017,7 +11017,7 @@ struct _privacySensitiveModifier: ViewModifier { enum Value { case _never - indirect case _0(sensitive: AttributeReference = .init(storage: .constant(true)) ) + indirect case _0(sensitive: AttributeReference) } @@ -11346,7 +11346,7 @@ struct _rotationEffectModifier: ViewModifier { enum Value { case _never - indirect case _0(angle: AttributeReference,anchor: AttributeReference = .init(storage: .constant(.center)) ) + indirect case _0(angle: AttributeReference,anchor: AttributeReference) } @@ -11393,10 +11393,10 @@ struct _safeAreaInsetModifier: ViewModifier { enum Value { case _never - indirect case _0(edge: SwiftUICore.VerticalEdge,alignment: AttributeReference = .init(storage: .constant(.center)), spacing: AttributeReference? = .init(storage: .constant(nil)), content: ViewReference=ViewReference(value: [])) + indirect case _0(edge: SwiftUICore.VerticalEdge,alignment: AttributeReference, spacing: AttributeReference?, content: ViewReference) - indirect case _1(edge: SwiftUICore.HorizontalEdge,alignment: AttributeReference = .init(storage: .constant(.center)), spacing: AttributeReference? = .init(storage: .constant(nil)), content: ViewReference=ViewReference(value: [])) + indirect case _1(edge: SwiftUICore.HorizontalEdge,alignment: AttributeReference, spacing: AttributeReference?, content: ViewReference) } @@ -11487,21 +11487,21 @@ struct _safeAreaPaddingModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(iOS 17.0,macOS 14.0,tvOS 17.0,watchOS 10.0,visionOS 1.0, *) + @available(iOS 17.0,tvOS 17.0,macOS 14.0,visionOS 1.0,watchOS 10.0, *) init(_ insets: SwiftUICore.EdgeInsets) { self.value = ._0(insets: insets) } #endif #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(iOS 17.0,macOS 14.0,tvOS 17.0,watchOS 10.0,visionOS 1.0, *) + @available(macOS 14.0,iOS 17.0,tvOS 17.0,watchOS 10.0,visionOS 1.0, *) init(_ edges: SwiftUICore.Edge.Set = .all, _ length: AttributeReference? = .init(storage: .constant(nil)) ) { self.value = ._1(edges: edges, length: length) } #endif #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(iOS 17.0,macOS 14.0,tvOS 17.0,watchOS 10.0,visionOS 1.0, *) + @available(macOS 14.0,iOS 17.0,tvOS 17.0,watchOS 10.0,visionOS 1.0, *) init(_ length: AttributeReference) { self.value = ._2(length: length) @@ -11514,7 +11514,7 @@ struct _safeAreaPaddingModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(insets): - if #available(iOS 17.0,macOS 14.0,tvOS 17.0,watchOS 10.0,visionOS 1.0, *) { + if #available(iOS 17.0,tvOS 17.0,macOS 14.0,visionOS 1.0,watchOS 10.0, *) { let insets = insets as! SwiftUICore.EdgeInsets __content @@ -11525,7 +11525,7 @@ struct _safeAreaPaddingModifier: ViewModifier { #endif #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._1(edges, length): - if #available(iOS 17.0,macOS 14.0,tvOS 17.0,watchOS 10.0,visionOS 1.0, *) { + if #available(macOS 14.0,iOS 17.0,tvOS 17.0,watchOS 10.0,visionOS 1.0, *) { let edges = edges as! SwiftUICore.Edge.Set let length = length as? AttributeReference @@ -11537,7 +11537,7 @@ let length = length as? AttributeReference #endif #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._2(length): - if #available(iOS 17.0,macOS 14.0,tvOS 17.0,watchOS 10.0,visionOS 1.0, *) { + if #available(macOS 14.0,iOS 17.0,tvOS 17.0,watchOS 10.0,visionOS 1.0, *) { let length = length as! AttributeReference __content @@ -11613,13 +11613,13 @@ struct _scaleEffectModifier: ViewModifier { indirect case _2(x: Any, y: Any, z: Any, anchor: Any) #endif - indirect case _3(scale: CoreFoundation.CGSize,anchor: AttributeReference = .init(storage: .constant(.center)) ) + indirect case _3(scale: CoreFoundation.CGSize,anchor: AttributeReference) - indirect case _4(s: AttributeReference,anchor: AttributeReference = .init(storage: .constant(.center)) ) + indirect case _4(s: AttributeReference,anchor: AttributeReference) - indirect case _5(x: AttributeReference = .init(storage: .constant(1.0)), y: AttributeReference = .init(storage: .constant(1.0)), anchor: AttributeReference = .init(storage: .constant(.center)) ) + indirect case _5(x: AttributeReference, y: AttributeReference, anchor: AttributeReference) } @@ -11865,10 +11865,10 @@ struct _scenePaddingModifier: ViewModifier { enum Value { case _never - indirect case _0(edges: SwiftUICore.Edge.Set = .all ) + indirect case _0(edges: SwiftUICore.Edge.Set ) - indirect case _1(padding: SwiftUI.ScenePadding,edges: SwiftUICore.Edge.Set = .all ) + indirect case _1(padding: SwiftUI.ScenePadding,edges: SwiftUICore.Edge.Set ) } @@ -11949,7 +11949,7 @@ struct _scrollBounceBehaviorModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(tvOS 16.4,watchOS 9.4,iOS 16.4,visionOS 1.0,macOS 13.3, *) + @available(visionOS 1.0,iOS 16.4,tvOS 16.4,watchOS 9.4,macOS 13.3, *) init(_ behavior: SwiftUI.ScrollBounceBehavior,axes: SwiftUICore.Axis.Set = [.vertical] ) { self.value = ._0(behavior: behavior, axes: axes) @@ -11962,7 +11962,7 @@ struct _scrollBounceBehaviorModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(behavior, axes): - if #available(tvOS 16.4,watchOS 9.4,iOS 16.4,visionOS 1.0,macOS 13.3, *) { + if #available(visionOS 1.0,iOS 16.4,tvOS 16.4,watchOS 9.4,macOS 13.3, *) { let behavior = behavior as! SwiftUI.ScrollBounceBehavior let axes = axes as! SwiftUICore.Axis.Set @@ -11997,7 +11997,7 @@ struct _scrollClipDisabledModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(tvOS 17.0,watchOS 10.0,iOS 17.0,visionOS 1.0,macOS 14.0, *) + @available(macOS 14.0,tvOS 17.0,iOS 17.0,visionOS 1.0,watchOS 10.0, *) init(_ disabled: AttributeReference = .init(storage: .constant(true)) ) { self.value = ._0(disabled: disabled) @@ -12010,7 +12010,7 @@ struct _scrollClipDisabledModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(disabled): - if #available(tvOS 17.0,watchOS 10.0,iOS 17.0,visionOS 1.0,macOS 14.0, *) { + if #available(macOS 14.0,tvOS 17.0,iOS 17.0,visionOS 1.0,watchOS 10.0, *) { let disabled = disabled as! AttributeReference __content @@ -12044,7 +12044,7 @@ struct _scrollContentBackgroundModifier: ViewModifier { #if os(iOS) || os(macOS) || os(visionOS) || os(watchOS) - @available(visionOS 1.0,watchOS 9.0,macOS 13.0,iOS 16.0, *) + @available(watchOS 9.0,visionOS 1.0,macOS 13.0,iOS 16.0, *) init(_ visibility: AttributeReference) { self.value = ._0(visibility: visibility) @@ -12057,7 +12057,7 @@ struct _scrollContentBackgroundModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(visionOS) || os(watchOS) case let ._0(visibility): - if #available(visionOS 1.0,watchOS 9.0,macOS 13.0,iOS 16.0, *) { + if #available(watchOS 9.0,visionOS 1.0,macOS 13.0,iOS 16.0, *) { let visibility = visibility as! AttributeReference __content @@ -12138,7 +12138,7 @@ struct _scrollDismissesKeyboardModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(watchOS) - @available(tvOS 16.0,watchOS 9.0,iOS 16.0,macOS 13.0, *) + @available(macOS 13.0,tvOS 16.0,iOS 16.0,watchOS 9.0, *) init(_ mode: SwiftUI.ScrollDismissesKeyboardMode) { self.value = ._0(mode: mode) @@ -12151,7 +12151,7 @@ struct _scrollDismissesKeyboardModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(watchOS) case let ._0(mode): - if #available(tvOS 16.0,watchOS 9.0,iOS 16.0,macOS 13.0, *) { + if #available(macOS 13.0,tvOS 16.0,iOS 16.0,watchOS 9.0, *) { let mode = mode as! SwiftUI.ScrollDismissesKeyboardMode __content @@ -12171,7 +12171,7 @@ struct _scrollIndicatorsModifier: ViewModifier { enum Value { case _never - indirect case _0(visibility: SwiftUI.ScrollIndicatorVisibility,axes: SwiftUICore.Axis.Set = [.vertical, .horizontal] ) + indirect case _0(visibility: SwiftUI.ScrollIndicatorVisibility,axes: SwiftUICore.Axis.Set ) } @@ -12237,14 +12237,14 @@ struct _scrollIndicatorsFlashModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(tvOS 17.0,watchOS 10.0,iOS 17.0,visionOS 1.0,macOS 14.0, *) + @available(macOS 14.0,tvOS 17.0,iOS 17.0,visionOS 1.0,watchOS 10.0, *) init(trigger value: AttributeReference) { self.value = ._0(value: value) } #endif #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(tvOS 17.0,watchOS 10.0,iOS 17.0,visionOS 1.0,macOS 14.0, *) + @available(macOS 14.0,iOS 17.0,watchOS 10.0,visionOS 1.0,tvOS 17.0, *) init(onAppear: AttributeReference) { self.value = ._1(onAppear: onAppear) @@ -12257,7 +12257,7 @@ struct _scrollIndicatorsFlashModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(value): - if #available(tvOS 17.0,watchOS 10.0,iOS 17.0,visionOS 1.0,macOS 14.0, *) { + if #available(macOS 14.0,tvOS 17.0,iOS 17.0,visionOS 1.0,watchOS 10.0, *) { let value = value as! AttributeReference __content @@ -12268,7 +12268,7 @@ struct _scrollIndicatorsFlashModifier: ViewModifier { #endif #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._1(onAppear): - if #available(tvOS 17.0,watchOS 10.0,iOS 17.0,visionOS 1.0,macOS 14.0, *) { + if #available(macOS 14.0,iOS 17.0,watchOS 10.0,visionOS 1.0,tvOS 17.0, *) { let onAppear = onAppear as! AttributeReference __content @@ -12302,7 +12302,7 @@ struct _scrollPositionModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(iOS 17.0,macOS 14.0,tvOS 17.0,watchOS 10.0,visionOS 1.0, *) + @available(iOS 17.0,visionOS 1.0,watchOS 10.0,macOS 14.0,tvOS 17.0, *) init(id: ChangeTracked,anchor: AttributeReference? = .init(storage: .constant(nil)) ) { self.value = ._0(anchor: anchor) self.__0_id = id @@ -12315,7 +12315,7 @@ struct _scrollPositionModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(anchor): - if #available(iOS 17.0,macOS 14.0,tvOS 17.0,watchOS 10.0,visionOS 1.0, *) { + if #available(iOS 17.0,visionOS 1.0,watchOS 10.0,macOS 14.0,tvOS 17.0, *) { let anchor = anchor as? AttributeReference __content @@ -12349,7 +12349,7 @@ struct _scrollTargetBehaviorModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(iOS 17.0,tvOS 17.0,watchOS 10.0,visionOS 1.0,macOS 14.0, *) + @available(iOS 17.0,macOS 14.0,watchOS 10.0,visionOS 1.0,tvOS 17.0, *) init(_ behavior: AnyScrollTargetBehavior) { self.value = ._0(behavior: behavior) @@ -12362,7 +12362,7 @@ struct _scrollTargetBehaviorModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(behavior): - if #available(iOS 17.0,tvOS 17.0,watchOS 10.0,visionOS 1.0,macOS 14.0, *) { + if #available(iOS 17.0,macOS 14.0,watchOS 10.0,visionOS 1.0,tvOS 17.0, *) { let behavior = behavior as! AnyScrollTargetBehavior __content @@ -12396,7 +12396,7 @@ struct _scrollTargetLayoutModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(iOS 17.0,tvOS 17.0,watchOS 10.0,visionOS 1.0,macOS 14.0, *) + @available(watchOS 10.0,macOS 14.0,iOS 17.0,tvOS 17.0,visionOS 1.0, *) init(isEnabled: AttributeReference = .init(storage: .constant(true)) ) { self.value = ._0(isEnabled: isEnabled) @@ -12409,7 +12409,7 @@ struct _scrollTargetLayoutModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(isEnabled): - if #available(iOS 17.0,tvOS 17.0,watchOS 10.0,visionOS 1.0,macOS 14.0, *) { + if #available(watchOS 10.0,macOS 14.0,iOS 17.0,tvOS 17.0,visionOS 1.0, *) { let isEnabled = isEnabled as! AttributeReference __content @@ -12490,7 +12490,7 @@ struct _searchPresentationToolbarBehaviorModifier: ViewModifier #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(tvOS 17.1,watchOS 10.1,visionOS 1.0,macOS 14.1,iOS 17.1, *) + @available(macOS 14.1,watchOS 10.1,iOS 17.1,tvOS 17.1,visionOS 1.0, *) init(_ behavior: SwiftUI.SearchPresentationToolbarBehavior) { self.value = ._0(behavior: behavior) @@ -12503,7 +12503,7 @@ struct _searchPresentationToolbarBehaviorModifier: ViewModifier fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(behavior): - if #available(tvOS 17.1,watchOS 10.1,visionOS 1.0,macOS 14.1,iOS 17.1, *) { + if #available(macOS 14.1,watchOS 10.1,iOS 17.1,tvOS 17.1,visionOS 1.0, *) { let behavior = behavior as! SwiftUI.SearchPresentationToolbarBehavior __content @@ -12523,7 +12523,7 @@ struct _searchSuggestionsModifier: ViewModifier { enum Value { case _never - indirect case _0(suggestions: ViewReference=ViewReference(value: [])) + indirect case _0(suggestions: ViewReference) indirect case _1(visibility: AttributeReference,placements: SwiftUI.SearchSuggestionsPlacement.Set) @@ -12593,13 +12593,13 @@ struct _searchableModifier: ViewModifier { enum Value { case _never - indirect case _0(placement: SwiftUI.SearchFieldPlacement = .automatic, prompt: TextReference? = nil ) + indirect case _0(placement: SwiftUI.SearchFieldPlacement , prompt: TextReference? ) - indirect case _1(placement: SwiftUI.SearchFieldPlacement = .automatic, prompt: SwiftUICore.LocalizedStringKey) + indirect case _1(placement: SwiftUI.SearchFieldPlacement , prompt: SwiftUICore.LocalizedStringKey) - indirect case _2(placement: SwiftUI.SearchFieldPlacement = .automatic, prompt: AttributeReference) + indirect case _2(placement: SwiftUI.SearchFieldPlacement , prompt: AttributeReference) #if os(iOS) || os(macOS) || os(visionOS) indirect case _3(placement: Any, prompt: Any?) @@ -12611,13 +12611,13 @@ struct _searchableModifier: ViewModifier { indirect case _5(placement: Any, prompt: Any) #endif - indirect case _6(placement: SwiftUI.SearchFieldPlacement = .automatic, prompt: TextReference? = nil, suggestions: ViewReference=ViewReference(value: [])) + indirect case _6(placement: SwiftUI.SearchFieldPlacement , prompt: TextReference? , suggestions: ViewReference) - indirect case _7(placement: SwiftUI.SearchFieldPlacement = .automatic, prompt: SwiftUICore.LocalizedStringKey,suggestions: ViewReference=ViewReference(value: [])) + indirect case _7(placement: SwiftUI.SearchFieldPlacement , prompt: SwiftUICore.LocalizedStringKey,suggestions: ViewReference) - indirect case _8(placement: SwiftUI.SearchFieldPlacement = .automatic, prompt: AttributeReference,suggestions: ViewReference=ViewReference(value: [])) + indirect case _8(placement: SwiftUI.SearchFieldPlacement , prompt: AttributeReference,suggestions: ViewReference) } @@ -12671,7 +12671,7 @@ struct _searchableModifier: ViewModifier { } #if os(iOS) || os(macOS) || os(visionOS) - @available(visionOS 1.0,iOS 17.0,macOS 14.0, *) + @available(iOS 17.0,macOS 14.0,visionOS 1.0, *) init(text: ChangeTracked,isPresented: ChangeTracked,placement: SwiftUI.SearchFieldPlacement = .automatic, prompt: TextReference? = nil ) { self.value = ._3(placement: placement, prompt: prompt) self.__3_text = text @@ -12679,7 +12679,7 @@ self.__3_isPresented = isPresented } #endif #if os(iOS) || os(macOS) || os(visionOS) - @available(visionOS 1.0,iOS 17.0,macOS 14.0, *) + @available(iOS 17.0,macOS 14.0,visionOS 1.0, *) init(text: ChangeTracked,isPresented: ChangeTracked,placement: SwiftUI.SearchFieldPlacement = .automatic, prompt: SwiftUICore.LocalizedStringKey) { self.value = ._4(placement: placement, prompt: prompt) self.__4_text = text @@ -12687,7 +12687,7 @@ self.__4_isPresented = isPresented } #endif #if os(iOS) || os(macOS) || os(visionOS) - @available(visionOS 1.0,iOS 17.0,macOS 14.0, *) + @available(macOS 14.0,visionOS 1.0,iOS 17.0, *) init(text: ChangeTracked,isPresented: ChangeTracked,placement: SwiftUI.SearchFieldPlacement = .automatic, prompt: AttributeReference) { self.value = ._5(placement: placement, prompt: prompt) self.__5_text = text @@ -12755,7 +12755,7 @@ self.__5_isPresented = isPresented #if os(iOS) || os(macOS) || os(visionOS) case let ._3(placement, prompt): - if #available(visionOS 1.0,iOS 17.0,macOS 14.0, *) { + if #available(iOS 17.0,macOS 14.0,visionOS 1.0, *) { let placement = placement as! SwiftUI.SearchFieldPlacement let prompt = prompt as? TextReference __content._observeTextReference(prompt, on: element, in: context) { __content in @@ -12767,7 +12767,7 @@ let prompt = prompt as? TextReference #endif #if os(iOS) || os(macOS) || os(visionOS) case let ._4(placement, prompt): - if #available(visionOS 1.0,iOS 17.0,macOS 14.0, *) { + if #available(iOS 17.0,macOS 14.0,visionOS 1.0, *) { let placement = placement as! SwiftUI.SearchFieldPlacement let prompt = prompt as! SwiftUICore.LocalizedStringKey @@ -12779,7 +12779,7 @@ let prompt = prompt as! SwiftUICore.LocalizedStringKey #endif #if os(iOS) || os(macOS) || os(visionOS) case let ._5(placement, prompt): - if #available(visionOS 1.0,iOS 17.0,macOS 14.0, *) { + if #available(macOS 14.0,visionOS 1.0,iOS 17.0, *) { let placement = placement as! SwiftUI.SearchFieldPlacement let prompt = prompt as! AttributeReference @@ -12847,7 +12847,7 @@ struct _sectionActionsModifier: ViewModifier { #if os(iOS) || os(macOS) || os(visionOS) - @available(iOS 18.0,visionOS 2.0,macOS 15.0, *) + @available(visionOS 2.0,macOS 15.0,iOS 18.0, *) init(content: ViewReference=ViewReference(value: [])) { self.value = ._0(content: content) @@ -12860,7 +12860,7 @@ struct _sectionActionsModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(visionOS) case let ._0(content): - if #available(iOS 18.0,visionOS 2.0,macOS 15.0, *) { + if #available(visionOS 2.0,macOS 15.0,iOS 18.0, *) { let content = content as! ViewReference __content @@ -12894,7 +12894,7 @@ struct _selectionDisabledModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(iOS 17.0,tvOS 17.0,watchOS 10.0,visionOS 1.0,macOS 14.0, *) + @available(tvOS 17.0,iOS 17.0,macOS 14.0,watchOS 10.0,visionOS 1.0, *) init(_ isDisabled: AttributeReference = .init(storage: .constant(true)) ) { self.value = ._0(isDisabled: isDisabled) @@ -12907,7 +12907,7 @@ struct _selectionDisabledModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(isDisabled): - if #available(iOS 17.0,tvOS 17.0,watchOS 10.0,visionOS 1.0,macOS 14.0, *) { + if #available(tvOS 17.0,iOS 17.0,macOS 14.0,watchOS 10.0,visionOS 1.0, *) { let isDisabled = isDisabled as! AttributeReference __content @@ -12927,7 +12927,7 @@ struct _shadowModifier: ViewModifier { enum Value { case _never - indirect case _0(color: Color.Resolvable = .init(Color(.sRGBLinear, white: 0, opacity: 0.33)), radius: AttributeReference,x: AttributeReference = .init(storage: .constant(0)), y: AttributeReference = .init(storage: .constant(0)) ) + indirect case _0(color: Color.Resolvable , radius: AttributeReference,x: AttributeReference, y: AttributeReference) } @@ -12974,7 +12974,7 @@ struct _sheetModifier: ViewModifier { enum Value { case _never - indirect case _0(content: ViewReference=ViewReference(value: [])) + indirect case _0(content: ViewReference) } @@ -13022,7 +13022,7 @@ struct _simultaneousGestureModifier: ViewModifier { enum Value { case _never - indirect case _0(gesture: _AnyGesture,mask: SwiftUICore.GestureMask = .all ) + indirect case _0(gesture: _AnyGesture,mask: SwiftUICore.GestureMask ) indirect case _1(gesture: _AnyGesture,isEnabled: AttributeReference) @@ -13060,7 +13060,7 @@ struct _simultaneousGestureModifier: ViewModifier { } #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(iOS 18.0,macOS 15.0,tvOS 18.0,watchOS 11.0,visionOS 2.0, *) + @available(watchOS 11.0,visionOS 2.0,tvOS 18.0,macOS 15.0,iOS 18.0, *) init(_ gesture: _AnyGesture,name: AttributeReference,isEnabled: AttributeReference = .init(storage: .constant(true)) ) { self.value = ._2(gesture: gesture, name: name, isEnabled: isEnabled) @@ -13095,7 +13095,7 @@ struct _simultaneousGestureModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._2(gesture, name, isEnabled): - if #available(iOS 18.0,macOS 15.0,tvOS 18.0,watchOS 11.0,visionOS 2.0, *) { + if #available(watchOS 11.0,visionOS 2.0,tvOS 18.0,macOS 15.0,iOS 18.0, *) { let gesture = gesture as! _AnyGesture let name = name as! AttributeReference let isEnabled = isEnabled as! AttributeReference @@ -13164,7 +13164,7 @@ struct _speechAlwaysIncludesPunctuationModifier: ViewModifier { enum Value { case _never - indirect case _0(value: AttributeReference = .init(storage: .constant(true)) ) + indirect case _0(value: AttributeReference) } @@ -13211,7 +13211,7 @@ struct _speechAnnouncementsQueuedModifier: ViewModifier { enum Value { case _never - indirect case _0(value: AttributeReference = .init(storage: .constant(true)) ) + indirect case _0(value: AttributeReference) } @@ -13258,7 +13258,7 @@ struct _speechSpellsOutCharactersModifier: ViewModifier { enum Value { case _never - indirect case _0(value: AttributeReference = .init(storage: .constant(true)) ) + indirect case _0(value: AttributeReference) } @@ -13366,7 +13366,7 @@ struct _statusBarHiddenModifier: ViewModifier { #if os(iOS) || os(visionOS) - @available(iOS 13.0,visionOS 1.0, *) + @available(visionOS 1.0,iOS 13.0, *) init(_ hidden: AttributeReference = .init(storage: .constant(true)) ) { self.value = ._0(hidden: hidden) @@ -13379,7 +13379,7 @@ struct _statusBarHiddenModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(visionOS) case let ._0(hidden): - if #available(iOS 13.0,visionOS 1.0, *) { + if #available(visionOS 1.0,iOS 13.0, *) { let hidden = hidden as! AttributeReference __content @@ -13446,7 +13446,7 @@ struct _submitScopeModifier: ViewModifier { enum Value { case _never - indirect case _0(isBlocking: AttributeReference = .init(storage: .constant(true)) ) + indirect case _0(isBlocking: AttributeReference) } @@ -13554,7 +13554,7 @@ struct _swipeActionsModifier: ViewModifier { #if os(iOS) || os(macOS) || os(visionOS) || os(watchOS) - @available(iOS 15.0,watchOS 8.0,visionOS 1.0,macOS 12.0, *) + @available(macOS 12.0,visionOS 1.0,iOS 15.0,watchOS 8.0, *) init(edge: SwiftUICore.HorizontalEdge = .trailing, allowsFullSwipe: AttributeReference = .init(storage: .constant(true)), content: ViewReference=ViewReference(value: [])) { self.value = ._0(edge: edge, allowsFullSwipe: allowsFullSwipe, content: content) @@ -13567,7 +13567,7 @@ struct _swipeActionsModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(visionOS) || os(watchOS) case let ._0(edge, allowsFullSwipe, content): - if #available(iOS 15.0,watchOS 8.0,visionOS 1.0,macOS 12.0, *) { + if #available(macOS 12.0,visionOS 1.0,iOS 15.0,watchOS 8.0, *) { let edge = edge as! SwiftUICore.HorizontalEdge let allowsFullSwipe = allowsFullSwipe as! AttributeReference let content = content as! ViewReference @@ -13608,14 +13608,14 @@ struct _symbolEffectModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(iOS 17.0,watchOS 10.0,macOS 14.0,tvOS 17.0,visionOS 1.0, *) + @available(macOS 14.0,tvOS 17.0,watchOS 10.0,iOS 17.0,visionOS 1.0, *) init(_ effect: AnyIndefiniteSymbolEffect,options: Symbols.SymbolEffectOptions = .default, isActive: AttributeReference = .init(storage: .constant(true)) ) { self.value = ._0(effect: effect, options: options, isActive: isActive) } #endif #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(iOS 17.0,watchOS 10.0,macOS 14.0,tvOS 17.0,visionOS 1.0, *) + @available(watchOS 10.0,tvOS 17.0,iOS 17.0,visionOS 1.0,macOS 14.0, *) init(_ effect: AnyDiscreteSymbolEffect,options: Symbols.SymbolEffectOptions = .default, value: AttributeReference) { self.value = ._1(effect: effect, options: options, value: value) @@ -13628,7 +13628,7 @@ struct _symbolEffectModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(effect, options, isActive): - if #available(iOS 17.0,watchOS 10.0,macOS 14.0,tvOS 17.0,visionOS 1.0, *) { + if #available(macOS 14.0,tvOS 17.0,watchOS 10.0,iOS 17.0,visionOS 1.0, *) { let effect = effect as! AnyIndefiniteSymbolEffect let options = options as! Symbols.SymbolEffectOptions let isActive = isActive as! AttributeReference @@ -13641,7 +13641,7 @@ let isActive = isActive as! AttributeReference #endif #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._1(effect, options, value): - if #available(iOS 17.0,watchOS 10.0,macOS 14.0,tvOS 17.0,visionOS 1.0, *) { + if #available(watchOS 10.0,tvOS 17.0,iOS 17.0,visionOS 1.0,macOS 14.0, *) { let effect = effect as! AnyDiscreteSymbolEffect let options = options as! Symbols.SymbolEffectOptions let value = value as! AttributeReference @@ -13677,7 +13677,7 @@ struct _symbolEffectsRemovedModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(iOS 17.0,tvOS 17.0,watchOS 10.0,visionOS 1.0,macOS 14.0, *) + @available(iOS 17.0,visionOS 1.0,macOS 14.0,tvOS 17.0,watchOS 10.0, *) init(_ isEnabled: AttributeReference = .init(storage: .constant(true)) ) { self.value = ._0(isEnabled: isEnabled) @@ -13690,7 +13690,7 @@ struct _symbolEffectsRemovedModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(isEnabled): - if #available(iOS 17.0,tvOS 17.0,watchOS 10.0,visionOS 1.0,macOS 14.0, *) { + if #available(iOS 17.0,visionOS 1.0,macOS 14.0,tvOS 17.0,watchOS 10.0, *) { let isEnabled = isEnabled as! AttributeReference __content @@ -13804,7 +13804,7 @@ struct _tabItemModifier: ViewModifier { enum Value { case _never - indirect case _0(label: ViewReference=ViewReference(value: [])) + indirect case _0(label: ViewReference) } @@ -14053,7 +14053,7 @@ struct _tableStyleModifier: ViewModifier { #if os(iOS) || os(macOS) || os(visionOS) - @available(iOS 16.0,visionOS 1.0,macOS 12.0, *) + @available(iOS 16.0,macOS 12.0,visionOS 1.0, *) init(_ style: AnyTableStyle) { self.value = ._0(style: style) @@ -14066,7 +14066,7 @@ struct _tableStyleModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(visionOS) case let ._0(style): - if #available(iOS 16.0,visionOS 1.0,macOS 12.0, *) { + if #available(iOS 16.0,macOS 12.0,visionOS 1.0, *) { let style = style as! AnyTableStyle __content @@ -14147,7 +14147,7 @@ struct _textContentTypeModifier: ViewModifier { #if os(iOS) || os(tvOS) || os(visionOS) - @available(iOS 13.0,tvOS 13.0,visionOS 1.0, *) + @available(visionOS 1.0,iOS 13.0,tvOS 13.0, *) init(_ textContentType: UIKit.UITextContentType?) { self.value = ._0(textContentType: textContentType) @@ -14160,7 +14160,7 @@ struct _textContentTypeModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(tvOS) || os(visionOS) case let ._0(textContentType): - if #available(iOS 13.0,tvOS 13.0,visionOS 1.0, *) { + if #available(visionOS 1.0,iOS 13.0,tvOS 13.0, *) { let textContentType = textContentType as? UIKit.UITextContentType __content @@ -14194,7 +14194,7 @@ struct _textEditorStyleModifier: ViewModifier { #if os(iOS) || os(macOS) || os(visionOS) - @available(iOS 17.0,macOS 14.0,visionOS 1.0, *) + @available(visionOS 1.0,macOS 14.0,iOS 17.0, *) init(_ style: AnyTextEditorStyle) { self.value = ._0(style: style) @@ -14207,7 +14207,7 @@ struct _textEditorStyleModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(visionOS) case let ._0(style): - if #available(iOS 17.0,macOS 14.0,visionOS 1.0, *) { + if #available(visionOS 1.0,macOS 14.0,iOS 17.0, *) { let style = style as! AnyTextEditorStyle __content @@ -14288,7 +14288,7 @@ struct _textInputAutocapitalizationModifier: ViewModifier { #if os(iOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(iOS 15.0,watchOS 8.0,tvOS 15.0,visionOS 1.0, *) + @available(tvOS 15.0,iOS 15.0,visionOS 1.0,watchOS 8.0, *) init(_ autocapitalization: SwiftUI.TextInputAutocapitalization?) { self.value = ._0(autocapitalization: autocapitalization) @@ -14301,7 +14301,7 @@ struct _textInputAutocapitalizationModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(autocapitalization): - if #available(iOS 15.0,watchOS 8.0,tvOS 15.0,visionOS 1.0, *) { + if #available(tvOS 15.0,iOS 15.0,visionOS 1.0,watchOS 8.0, *) { let autocapitalization = autocapitalization as? SwiftUI.TextInputAutocapitalization __content @@ -14429,7 +14429,7 @@ struct _textSelectionModifier: ViewModifier { #if os(iOS) || os(macOS) || os(visionOS) - @available(macOS 12.0,visionOS 1.0,iOS 15.0, *) + @available(iOS 15.0,macOS 12.0,visionOS 1.0, *) init(_ selectability: AnyTextSelectability) { self.value = ._0(selectability: selectability) @@ -14442,7 +14442,7 @@ struct _textSelectionModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(visionOS) case let ._0(selectability): - if #available(macOS 12.0,visionOS 1.0,iOS 15.0, *) { + if #available(iOS 15.0,macOS 12.0,visionOS 1.0, *) { let selectability = selectability as! AnyTextSelectability __content @@ -14476,7 +14476,7 @@ struct _textSelectionAffinityModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(tvOS 18.0,watchOS 11.0,visionOS 2.0,macOS 15.0,iOS 18.0, *) + @available(iOS 18.0,visionOS 2.0,watchOS 11.0,macOS 15.0,tvOS 18.0, *) init(_ affinity: SwiftUI.TextSelectionAffinity) { self.value = ._0(affinity: affinity) @@ -14489,7 +14489,7 @@ struct _textSelectionAffinityModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(affinity): - if #available(tvOS 18.0,watchOS 11.0,visionOS 2.0,macOS 15.0,iOS 18.0, *) { + if #available(iOS 18.0,visionOS 2.0,watchOS 11.0,macOS 15.0,tvOS 18.0, *) { let affinity = affinity as! SwiftUI.TextSelectionAffinity __content @@ -14632,10 +14632,10 @@ struct _toolbarModifier: ViewModifier { indirect case _1(defaultItemKind: Any?) #endif - indirect case _3(content: ToolbarContentReference=ToolbarContentReference(value: [])) + indirect case _3(content: ToolbarContentReference) - indirect case _4(id: AttributeReference,content: CustomizableToolbarContentReference=CustomizableToolbarContentReference(value: [])) + indirect case _4(id: AttributeReference,content: CustomizableToolbarContentReference) } @@ -14662,7 +14662,7 @@ struct _toolbarModifier: ViewModifier { } #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(watchOS 10.0,iOS 17.0,macOS 14.0,visionOS 1.0,tvOS 17.0, *) + @available(macOS 14.0,tvOS 17.0,iOS 17.0,watchOS 10.0,visionOS 1.0, *) init(removing defaultItemKind: SwiftUI.ToolbarDefaultItemKind?) { self.value = ._1(defaultItemKind: defaultItemKind) @@ -14700,7 +14700,7 @@ struct _toolbarModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._1(defaultItemKind): - if #available(watchOS 10.0,iOS 17.0,macOS 14.0,visionOS 1.0,tvOS 17.0, *) { + if #available(macOS 14.0,tvOS 17.0,iOS 17.0,watchOS 10.0,visionOS 1.0, *) { let defaultItemKind = defaultItemKind as? SwiftUI.ToolbarDefaultItemKind __content @@ -14826,7 +14826,7 @@ struct _toolbarBackgroundVisibilityModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(iOS 18.0,macOS 15.0,tvOS 18.0,watchOS 11.0,visionOS 2.0, *) + @available(macOS 15.0,iOS 18.0,tvOS 18.0,watchOS 11.0,visionOS 2.0, *) init(_ visibility: AttributeReference,for bars: SwiftUI.ToolbarPlacement) { self.value = ._0(visibility: visibility, bars: bars) @@ -14839,7 +14839,7 @@ struct _toolbarBackgroundVisibilityModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(visibility, bars): - if #available(iOS 18.0,macOS 15.0,tvOS 18.0,watchOS 11.0,visionOS 2.0, *) { + if #available(macOS 15.0,iOS 18.0,tvOS 18.0,watchOS 11.0,visionOS 2.0, *) { let visibility = visibility as! AttributeReference let bars = bars as! SwiftUI.ToolbarPlacement @@ -15015,7 +15015,7 @@ struct _toolbarTitleDisplayModeModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(iOS 17.0,macOS 14.0,tvOS 17.0,watchOS 10.0,visionOS 1.0, *) + @available(macOS 14.0,tvOS 17.0,iOS 17.0,visionOS 1.0,watchOS 10.0, *) init(_ mode: SwiftUI.ToolbarTitleDisplayMode) { self.value = ._0(mode: mode) @@ -15028,7 +15028,7 @@ struct _toolbarTitleDisplayModeModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(mode): - if #available(iOS 17.0,macOS 14.0,tvOS 17.0,watchOS 10.0,visionOS 1.0, *) { + if #available(macOS 14.0,tvOS 17.0,iOS 17.0,visionOS 1.0,watchOS 10.0, *) { let mode = mode as! SwiftUI.ToolbarTitleDisplayMode __content @@ -15048,7 +15048,7 @@ struct _toolbarTitleMenuModifier: ViewModifier { enum Value { case _never - indirect case _0(content: ViewReference=ViewReference(value: [])) + indirect case _0(content: ViewReference) } @@ -15109,7 +15109,7 @@ struct _toolbarVisibilityModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(iOS 18.0,macOS 15.0,tvOS 18.0,watchOS 11.0,visionOS 2.0, *) + @available(macOS 15.0,iOS 18.0,tvOS 18.0,watchOS 11.0,visionOS 2.0, *) init(_ visibility: AttributeReference,for bars: SwiftUI.ToolbarPlacement) { self.value = ._0(visibility: visibility, bars: bars) @@ -15122,7 +15122,7 @@ struct _toolbarVisibilityModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(visibility, bars): - if #available(iOS 18.0,macOS 15.0,tvOS 18.0,watchOS 11.0,visionOS 2.0, *) { + if #available(macOS 15.0,iOS 18.0,tvOS 18.0,watchOS 11.0,visionOS 2.0, *) { let visibility = visibility as! AttributeReference let bars = bars as! SwiftUI.ToolbarPlacement @@ -15768,7 +15768,7 @@ struct _windowToolbarFullScreenVisibilityModifier: ViewModifier #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(iOS 18.0,macOS 15.0,tvOS 18.0,watchOS 11.0,visionOS 2.0, *) + @available(macOS 15.0,tvOS 18.0,iOS 18.0,visionOS 2.0,watchOS 11.0, *) init(_ visibility: SwiftUI.WindowToolbarFullScreenVisibility) { self.value = ._0(visibility: visibility) @@ -15781,7 +15781,7 @@ struct _windowToolbarFullScreenVisibilityModifier: ViewModifier fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(visibility): - if #available(iOS 18.0,macOS 15.0,tvOS 18.0,watchOS 11.0,visionOS 2.0, *) { + if #available(macOS 15.0,tvOS 18.0,iOS 18.0,visionOS 2.0,watchOS 11.0, *) { let visibility = visibility as! SwiftUI.WindowToolbarFullScreenVisibility __content @@ -15815,7 +15815,7 @@ struct _writingToolsBehaviorModifier: ViewModifier { #if os(iOS) || os(macOS) - @available(macOS 15.0,iOS 18.0, *) + @available(iOS 18.0,macOS 15.0, *) init(_ behavior: SwiftUI.WritingToolsBehavior) { self.value = ._0(behavior: behavior) @@ -15828,7 +15828,7 @@ struct _writingToolsBehaviorModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) case let ._0(behavior): - if #available(macOS 15.0,iOS 18.0, *) { + if #available(iOS 18.0,macOS 15.0, *) { let behavior = behavior as! SwiftUI.WritingToolsBehavior __content @@ -16909,18 +16909,18 @@ indirect case chunk16(_BuiltinModifierChunk16) indirect case chunk17(_BuiltinModifierChunk17) indirect case chunk18(_BuiltinModifierChunk18) indirect case chunk19(_BuiltinModifierChunk19) - indirect case _OnSubmitModifier(LiveViewNative._OnSubmitModifier) + indirect case _SearchCompletionModifier(LiveViewNative._SearchCompletionModifier) +indirect case _OnSubmitModifier(LiveViewNative._OnSubmitModifier) +indirect case _SearchScopesModifier(LiveViewNative._SearchScopesModifier) indirect case _PerspectiveRotationEffectModifier(LiveViewNative._PerspectiveRotationEffectModifier) +indirect case _PresentationDetentsModifier(LiveViewNative._PresentationDetentsModifier) indirect case _MaskModifier(LiveViewNative._MaskModifier) -indirect case _SearchScopesModifier(LiveViewNative._SearchScopesModifier) -indirect case _NavigationTransitionModifier(LiveViewNative._NavigationTransitionModifier) indirect case _MatchedGeometryEffectModifier(LiveViewNative._MatchedGeometryEffectModifier) -indirect case _PresentationDetentsModifier(LiveViewNative._PresentationDetentsModifier) -indirect case _Rotation3DEffectModifier(LiveViewNative._Rotation3DEffectModifier) indirect case _FocusScopeModifier(LiveViewNative._FocusScopeModifier) indirect case _PrefersDefaultFocusModifier(LiveViewNative._PrefersDefaultFocusModifier) +indirect case _NavigationTransitionModifier(LiveViewNative._NavigationTransitionModifier) indirect case _MatchedTransitionSourceModifier(LiveViewNative._MatchedTransitionSourceModifier) -indirect case _SearchCompletionModifier(LiveViewNative._SearchCompletionModifier) +indirect case _Rotation3DEffectModifier(LiveViewNative._Rotation3DEffectModifier) indirect case _customRegistryModifier(R.CustomModifier) indirect case _anyTextModifier(_AnyTextModifier) indirect case _anyImageModifier(_AnyImageModifier) @@ -16969,29 +16969,29 @@ case let .chunk18(chunk): content.modifier(chunk) case let .chunk19(chunk): content.modifier(chunk) - case let ._OnSubmitModifier(modifier): + case let ._SearchCompletionModifier(modifier): content.modifier(modifier) -case let ._PerspectiveRotationEffectModifier(modifier): - content.modifier(modifier) -case let ._MaskModifier(modifier): +case let ._OnSubmitModifier(modifier): content.modifier(modifier) case let ._SearchScopesModifier(modifier): content.modifier(modifier) -case let ._NavigationTransitionModifier(modifier): - content.modifier(modifier) -case let ._MatchedGeometryEffectModifier(modifier): +case let ._PerspectiveRotationEffectModifier(modifier): content.modifier(modifier) case let ._PresentationDetentsModifier(modifier): content.modifier(modifier) -case let ._Rotation3DEffectModifier(modifier): +case let ._MaskModifier(modifier): + content.modifier(modifier) +case let ._MatchedGeometryEffectModifier(modifier): content.modifier(modifier) case let ._FocusScopeModifier(modifier): content.modifier(modifier) case let ._PrefersDefaultFocusModifier(modifier): content.modifier(modifier) +case let ._NavigationTransitionModifier(modifier): + content.modifier(modifier) case let ._MatchedTransitionSourceModifier(modifier): content.modifier(modifier) -case let ._SearchCompletionModifier(modifier): +case let ._Rotation3DEffectModifier(modifier): content.modifier(modifier) case let ._customRegistryModifier(modifier): content.modifier(modifier) @@ -17010,7 +17010,8 @@ case let ._SearchCompletionModifier(modifier): .init(context: context) } - struct _ParserType: Parser { + @MainActor + struct _ParserType: @preconcurrency Parser { typealias Input = Substring.UTF8View typealias Output = BuiltinModifier @@ -17291,18 +17292,18 @@ _windowResizeBehaviorModifier.name: _windowResizeBehaviorModifier.parser(i _windowToolbarFullScreenVisibilityModifier.name: _windowToolbarFullScreenVisibilityModifier.parser(in: context).map({ Output.chunk19(.windowToolbarFullScreenVisibility($0)) }).eraseToAnyParser(), _writingToolsBehaviorModifier.name: _writingToolsBehaviorModifier.parser(in: context).map({ Output.chunk19(.writingToolsBehavior($0)) }).eraseToAnyParser(), _zIndexModifier.name: _zIndexModifier.parser(in: context).map({ Output.chunk19(.zIndex($0)) }).eraseToAnyParser(), - LiveViewNative._OnSubmitModifier.name: LiveViewNative._OnSubmitModifier.parser(in: context).map(Output._OnSubmitModifier).eraseToAnyParser(), + LiveViewNative._SearchCompletionModifier.name: LiveViewNative._SearchCompletionModifier.parser(in: context).map(Output._SearchCompletionModifier).eraseToAnyParser(), +LiveViewNative._OnSubmitModifier.name: LiveViewNative._OnSubmitModifier.parser(in: context).map(Output._OnSubmitModifier).eraseToAnyParser(), +LiveViewNative._SearchScopesModifier.name: LiveViewNative._SearchScopesModifier.parser(in: context).map(Output._SearchScopesModifier).eraseToAnyParser(), LiveViewNative._PerspectiveRotationEffectModifier.name: LiveViewNative._PerspectiveRotationEffectModifier.parser(in: context).map(Output._PerspectiveRotationEffectModifier).eraseToAnyParser(), +LiveViewNative._PresentationDetentsModifier.name: LiveViewNative._PresentationDetentsModifier.parser(in: context).map(Output._PresentationDetentsModifier).eraseToAnyParser(), LiveViewNative._MaskModifier.name: LiveViewNative._MaskModifier.parser(in: context).map(Output._MaskModifier).eraseToAnyParser(), -LiveViewNative._SearchScopesModifier.name: LiveViewNative._SearchScopesModifier.parser(in: context).map(Output._SearchScopesModifier).eraseToAnyParser(), -LiveViewNative._NavigationTransitionModifier.name: LiveViewNative._NavigationTransitionModifier.parser(in: context).map(Output._NavigationTransitionModifier).eraseToAnyParser(), LiveViewNative._MatchedGeometryEffectModifier.name: LiveViewNative._MatchedGeometryEffectModifier.parser(in: context).map(Output._MatchedGeometryEffectModifier).eraseToAnyParser(), -LiveViewNative._PresentationDetentsModifier.name: LiveViewNative._PresentationDetentsModifier.parser(in: context).map(Output._PresentationDetentsModifier).eraseToAnyParser(), -LiveViewNative._Rotation3DEffectModifier.name: LiveViewNative._Rotation3DEffectModifier.parser(in: context).map(Output._Rotation3DEffectModifier).eraseToAnyParser(), LiveViewNative._FocusScopeModifier.name: LiveViewNative._FocusScopeModifier.parser(in: context).map(Output._FocusScopeModifier).eraseToAnyParser(), LiveViewNative._PrefersDefaultFocusModifier.name: LiveViewNative._PrefersDefaultFocusModifier.parser(in: context).map(Output._PrefersDefaultFocusModifier).eraseToAnyParser(), +LiveViewNative._NavigationTransitionModifier.name: LiveViewNative._NavigationTransitionModifier.parser(in: context).map(Output._NavigationTransitionModifier).eraseToAnyParser(), LiveViewNative._MatchedTransitionSourceModifier.name: LiveViewNative._MatchedTransitionSourceModifier.parser(in: context).map(Output._MatchedTransitionSourceModifier).eraseToAnyParser(), -LiveViewNative._SearchCompletionModifier.name: LiveViewNative._SearchCompletionModifier.parser(in: context).map(Output._SearchCompletionModifier).eraseToAnyParser(), +LiveViewNative._Rotation3DEffectModifier.name: LiveViewNative._Rotation3DEffectModifier.parser(in: context).map(Output._Rotation3DEffectModifier).eraseToAnyParser(), ] let deprecations = [ @@ -17498,7 +17499,7 @@ ConstantAtomLiteral("content").map({ () -> Self in /// * `.tabBar` /// * `.sidebar` @_documentation(visibility: public) -@available(watchOS 11.0,iOS 18.0,macOS 15.0,visionOS 2.0,tvOS 18.0, *) +@available(watchOS 11.0,macOS 15.0,tvOS 18.0,visionOS 2.0,iOS 18.0, *) extension AdaptableTabBarPlacement: ParseableModifierValue { public static func parser(in context: ParseableModifierContext) -> some Parser { ImplicitStaticMember { @@ -17844,7 +17845,7 @@ ConstantAtomLiteral("plusLighter").map({ () -> Self in /// * `.enabled` /// * `.disabled` @_documentation(visibility: public) -@available(watchOS 10.0,iOS 17.0,macOS 14.0,visionOS 1.0,tvOS 17.0, *) +@available(watchOS 10.0,visionOS 1.0,iOS 17.0,tvOS 17.0,macOS 14.0, *) extension ButtonRepeatBehavior: ParseableModifierValue { public static func parser(in context: ParseableModifierContext) -> some Parser { ImplicitStaticMember { @@ -17963,35 +17964,35 @@ ConstantAtomLiteral("dark").map({ () -> Self in /// * `.navigationSplitView` /// * `.window` @_documentation(visibility: public) -@available(tvOS 17.0,iOS 17.0,watchOS 10.0,visionOS 1.0,macOS 14.0, *) +@available(iOS 17.0,macOS 14.0,watchOS 10.0,tvOS 17.0,visionOS 1.0, *) extension ContainerBackgroundPlacement: ParseableModifierValue { public static func parser(in context: ParseableModifierContext) -> some Parser { ImplicitStaticMember { OneOf { #if os(watchOS) ConstantAtomLiteral("tabView").map({ () -> Self in -if #available(tvOS 17.0,iOS 17.0,watchOS 10.0,macOS 14.0, *) { +if #available(iOS 17.0,macOS 14.0,watchOS 10.0,tvOS 17.0, *) { return Self.tabView } else { fatalError("'tabView' is not available in this OS version") } }) #endif #if os(iOS) || os(watchOS) ConstantAtomLiteral("navigation").map({ () -> Self in -if #available(tvOS 17.0,iOS 18.0,watchOS 10.0,macOS 14.0, *) { +if #available(iOS 18.0,macOS 14.0,watchOS 10.0,tvOS 17.0, *) { return Self.navigation } else { fatalError("'navigation' is not available in this OS version") } }) #endif #if os(iOS) || os(watchOS) ConstantAtomLiteral("navigationSplitView").map({ () -> Self in -if #available(tvOS 17.0,iOS 18.0,watchOS 11.0,macOS 14.0, *) { +if #available(iOS 18.0,macOS 14.0,watchOS 11.0,tvOS 17.0, *) { return Self.navigationSplitView } else { fatalError("'navigationSplitView' is not available in this OS version") } }) #endif #if os(macOS) ConstantAtomLiteral("window").map({ () -> Self in -if #available(tvOS 17.0,iOS 17.0,watchOS 10.0,macOS 15.0, *) { +if #available(iOS 17.0,macOS 15.0,watchOS 10.0,tvOS 17.0, *) { return Self.window } else { fatalError("'window' is not available in this OS version") } }) @@ -18012,7 +18013,7 @@ if #available(tvOS 17.0,iOS 17.0,watchOS 10.0,macOS 15.0, *) { /// * `.scrollContent` /// * `.scrollIndicators` @_documentation(visibility: public) -@available(tvOS 17.0,iOS 17.0,watchOS 10.0,visionOS 1.0,macOS 14.0, *) +@available(iOS 17.0,visionOS 1.0,macOS 14.0,tvOS 17.0,watchOS 10.0, *) extension ContentMarginPlacement: ParseableModifierValue { public static func parser(in context: ParseableModifierContext) -> some Parser { ImplicitStaticMember { @@ -18071,35 +18072,35 @@ ConstantAtomLiteral("interaction").map({ () -> Self in #if os(iOS) || os(macOS) || os(visionOS) ConstantAtomLiteral("dragPreview").map({ () -> Self in -if #available(macOS 12.0,visionOS 1.0,watchOS 8.0,tvOS 15.0,iOS 15.0, *) { +if #available(macOS 12.0,iOS 15.0,tvOS 15.0,watchOS 8.0,visionOS 1.0, *) { return Self.dragPreview } else { fatalError("'dragPreview' is not available in this OS version") } }) #endif #if os(iOS) || os(tvOS) || os(visionOS) ConstantAtomLiteral("contextMenuPreview").map({ () -> Self in -if #available(macOS 12.0,visionOS 1.0,watchOS 8.0,tvOS 17.0,iOS 15.0, *) { +if #available(macOS 12.0,iOS 15.0,tvOS 17.0,watchOS 8.0,visionOS 1.0, *) { return Self.contextMenuPreview } else { fatalError("'contextMenuPreview' is not available in this OS version") } }) #endif #if os(iOS) || os(tvOS) || os(visionOS) ConstantAtomLiteral("hoverEffect").map({ () -> Self in -if #available(macOS 12.0,visionOS 1.0,watchOS 8.0,tvOS 18.0,iOS 15.0, *) { +if #available(macOS 12.0,iOS 15.0,tvOS 18.0,watchOS 8.0,visionOS 1.0, *) { return Self.hoverEffect } else { fatalError("'hoverEffect' is not available in this OS version") } }) #endif #if os(macOS) || os(watchOS) ConstantAtomLiteral("focusEffect").map({ () -> Self in -if #available(macOS 12.0,watchOS 8.0,tvOS 15.0,iOS 15.0, *) { +if #available(macOS 12.0,iOS 15.0,tvOS 15.0,watchOS 8.0, *) { return Self.focusEffect } else { fatalError("'focusEffect' is not available in this OS version") } }) #endif #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) ConstantAtomLiteral("accessibility").map({ () -> Self in -if #available(watchOS 10.0,iOS 17.0,tvOS 17.0,macOS 14.0,visionOS 1.0, *) { +if #available(visionOS 1.0,tvOS 17.0,macOS 14.0,iOS 17.0,watchOS 10.0, *) { return Self.accessibility } else { fatalError("'accessibility' is not available in this OS version") } }) @@ -18122,7 +18123,7 @@ if #available(watchOS 10.0,iOS 17.0,tvOS 17.0,macOS 14.0,visionOS 1.0, *) { /// * `.large` /// * `.extraLarge` @_documentation(visibility: public) -@available(watchOS 9.0,iOS 15.0,macOS 10.15,visionOS 1.0, *) +@available(macOS 10.15,iOS 15.0,visionOS 1.0,watchOS 9.0, *) extension ControlSize: ParseableModifierValue { public static func parser(in context: ParseableModifierContext) -> some Parser { ImplicitStaticMember { @@ -18150,14 +18151,14 @@ ConstantAtomLiteral("regular").map({ () -> Self in #endif #if os(iOS) || os(macOS) || os(visionOS) || os(watchOS) ConstantAtomLiteral("large").map({ () -> Self in -if #available(watchOS 9.0,iOS 15.0,macOS 11.0,visionOS 1.0, *) { +if #available(macOS 11.0,iOS 15.0,visionOS 1.0,watchOS 9.0, *) { return Self.large } else { fatalError("'large' is not available in this OS version") } }) #endif #if os(iOS) || os(macOS) || os(visionOS) || os(watchOS) ConstantAtomLiteral("extraLarge").map({ () -> Self in -if #available(watchOS 10.0,iOS 17.0,macOS 14.0,visionOS 1.0, *) { +if #available(macOS 14.0,iOS 17.0,visionOS 1.0,watchOS 10.0, *) { return Self.extraLarge } else { fatalError("'extraLarge' is not available in this OS version") } }) @@ -18212,7 +18213,7 @@ ConstantAtomLiteral("userInitiated").map({ () -> Self in /// * `.critical` /// * `.standard` @_documentation(visibility: public) -@available(tvOS 17.0,iOS 17.0,watchOS 10.0,visionOS 1.0,macOS 13.0, *) +@available(iOS 17.0,macOS 13.0,watchOS 10.0,tvOS 17.0,visionOS 1.0, *) extension DialogSeverity: ParseableModifierValue { public static func parser(in context: ParseableModifierContext) -> some Parser { ImplicitStaticMember { @@ -18233,7 +18234,7 @@ ConstantAtomLiteral("critical").map({ () -> Self in #endif #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) ConstantAtomLiteral("standard").map({ () -> Self in -if #available(tvOS 17.0,iOS 17.0,watchOS 10.0,visionOS 1.0,macOS 14.0, *) { +if #available(iOS 17.0,macOS 14.0,watchOS 10.0,tvOS 17.0,visionOS 1.0, *) { return Self.standard } else { fatalError("'standard' is not available in this OS version") } }) @@ -18404,7 +18405,7 @@ ConstantAtomLiteral("all").map({ () -> Self in /// * `.includeHiddenFiles` /// * `.displayFileExtensions` @_documentation(visibility: public) -@available(iOS 17.0,macOS 14.0,visionOS 1.0, *) +@available(visionOS 1.0,macOS 14.0,iOS 17.0, *) extension FileDialogBrowserOptions: ParseableModifierValue { public static func parser(in context: ParseableModifierContext) -> some Parser { ImplicitStaticMember { @@ -18446,7 +18447,7 @@ ConstantAtomLiteral("displayFileExtensions").map({ () -> Self in /// * `.edit` /// * `.automatic` @_documentation(visibility: public) -@available(watchOS 10.0,iOS 17.0,macOS 14.0,visionOS 1.0,tvOS 17.0, *) +@available(watchOS 10.0,visionOS 1.0,iOS 17.0,tvOS 17.0,macOS 14.0, *) extension FocusInteractions: ParseableModifierValue { public static func parser(in context: ParseableModifierContext) -> some Parser { ImplicitStaticMember { @@ -18705,14 +18706,14 @@ extension HorizontalAlignment: ParseableModifierValue { OneOf { #if os(iOS) || os(macOS) || os(visionOS) ConstantAtomLiteral("listRowSeparatorLeading").map({ () -> Self in -if #available(iOS 16.0,macOS 13.0,visionOS 1.0, *) { +if #available(visionOS 1.0,macOS 13.0,iOS 16.0, *) { return Self.listRowSeparatorLeading } else { fatalError("'listRowSeparatorLeading' is not available in this OS version") } }) #endif #if os(iOS) || os(macOS) || os(visionOS) ConstantAtomLiteral("listRowSeparatorTrailing").map({ () -> Self in -if #available(iOS 16.0,macOS 13.0,visionOS 1.0, *) { +if #available(visionOS 1.0,macOS 13.0,iOS 16.0, *) { return Self.listRowSeparatorTrailing } else { fatalError("'listRowSeparatorTrailing' is not available in this OS version") } }) @@ -18753,7 +18754,7 @@ ConstantAtomLiteral("trailing").map({ () -> Self in /// * `.leading` /// * `.trailing` @_documentation(visibility: public) -@available(macOS 15.0,visionOS 2.0,watchOS 11.0,tvOS 18.0,iOS 18.0, *) +@available(macOS 15.0,iOS 18.0,tvOS 18.0,watchOS 11.0,visionOS 2.0, *) extension HorizontalDirection: ParseableModifierValue { public static func parser(in context: ParseableModifierContext) -> some Parser { ImplicitStaticMember { @@ -18822,7 +18823,7 @@ ConstantAtomLiteral("trailing").map({ () -> Self in /// * `.highlight` /// * `.lift` @_documentation(visibility: public) -@available(iOS 13.4,tvOS 16.0,visionOS 1.0, *) +@available(visionOS 1.0,iOS 13.4,tvOS 16.0, *) extension HoverEffect: ParseableModifierValue { public static func parser(in context: ParseableModifierContext) -> some Parser { ImplicitStaticMember { @@ -18836,7 +18837,7 @@ ConstantAtomLiteral("automatic").map({ () -> Self in #endif #if os(iOS) || os(tvOS) || os(visionOS) ConstantAtomLiteral("highlight").map({ () -> Self in -if #available(iOS 13.4,tvOS 17.0,visionOS 1.0, *) { +if #available(visionOS 1.0,iOS 13.4,tvOS 17.0, *) { return Self.highlight } else { fatalError("'highlight' is not available in this OS version") } }) @@ -18954,7 +18955,7 @@ ConstantAtomLiteral("automatic").map({ () -> Self in #if os(iOS) || os(visionOS) ConstantAtomLiteral("priority").map({ () -> Self in -if #available(tvOS 16.0,iOS 16.0,watchOS 9.0,visionOS 1.0,macOS 13.0, *) { +if #available(watchOS 9.0,iOS 16.0,visionOS 1.0,tvOS 16.0,macOS 13.0, *) { return Self.priority } else { fatalError("'priority' is not available in this OS version") } }) @@ -18984,7 +18985,7 @@ ConstantAtomLiteral("fixed").map({ () -> Self in /// * `.sheet` /// * `.fullScreenCover` @_documentation(visibility: public) -@available(tvOS 16.4,iOS 16.4,watchOS 9.4,visionOS 1.0,macOS 13.3, *) +@available(watchOS 9.4,tvOS 16.4,iOS 16.4,visionOS 1.0,macOS 13.3, *) extension PresentationAdaptation: ParseableModifierValue { public static func parser(in context: ParseableModifierContext) -> some Parser { ImplicitStaticMember { @@ -19040,7 +19041,7 @@ ConstantAtomLiteral("fullScreenCover").map({ () -> Self in /// * `.resizes` /// * `.scrolls` @_documentation(visibility: public) -@available(watchOS 9.4,iOS 16.4,macOS 13.3,visionOS 1.0,tvOS 16.4, *) +@available(watchOS 9.4,visionOS 1.0,iOS 16.4,tvOS 16.4,macOS 13.3, *) extension PresentationContentInteraction: ParseableModifierValue { public static func parser(in context: ParseableModifierContext) -> some Parser { ImplicitStaticMember { @@ -19137,7 +19138,7 @@ ConstantAtomLiteral("privacy").map({ () -> Self in #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) ConstantAtomLiteral("invalidated").map({ () -> Self in -if #available(watchOS 10.0,iOS 17.0,tvOS 17.0,macOS 14.0,visionOS 1.0, *) { +if #available(macOS 14.0,iOS 17.0,tvOS 17.0,watchOS 10.0,visionOS 1.0, *) { return Self.invalidated } else { fatalError("'invalidated' is not available in this OS version") } }) @@ -19247,7 +19248,7 @@ ConstantAtomLiteral("minimum").map({ () -> Self in #if os(watchOS) ConstantAtomLiteral("navigationBar").map({ () -> Self in -if #available(macOS 13.0,watchOS 9.0,iOS 16.0,tvOS 16.0, *) { +if #available(macOS 13.0,tvOS 16.0,watchOS 9.0,iOS 16.0, *) { return Self.navigationBar } else { fatalError("'navigationBar' is not available in this OS version") } }) @@ -19268,7 +19269,7 @@ if #available(macOS 13.0,watchOS 9.0,iOS 16.0,tvOS 16.0, *) { /// * `.sizeChanges` /// * `.alignment` @_documentation(visibility: public) -@available(tvOS 18.0,iOS 18.0,watchOS 11.0,visionOS 2.0,macOS 15.0, *) +@available(iOS 18.0,macOS 15.0,watchOS 11.0,tvOS 18.0,visionOS 2.0, *) extension ScrollAnchorRole: ParseableModifierValue { public static func parser(in context: ParseableModifierContext) -> some Parser { ImplicitStaticMember { @@ -19310,7 +19311,7 @@ ConstantAtomLiteral("alignment").map({ () -> Self in /// * `.always` /// * `.basedOnSize` @_documentation(visibility: public) -@available(tvOS 16.4,iOS 16.4,watchOS 9.4,visionOS 1.0,macOS 13.3, *) +@available(iOS 16.4,macOS 13.3,watchOS 9.4,tvOS 16.4,visionOS 1.0, *) extension ScrollBounceBehavior: ParseableModifierValue { public static func parser(in context: ParseableModifierContext) -> some Parser { ImplicitStaticMember { @@ -19353,7 +19354,7 @@ ConstantAtomLiteral("basedOnSize").map({ () -> Self in /// * `.interactively` /// * `.never` @_documentation(visibility: public) -@available(tvOS 16.0,iOS 16.0,watchOS 9.0,macOS 13.0, *) +@available(iOS 16.0,macOS 13.0,watchOS 9.0,tvOS 16.0, *) extension ScrollDismissesKeyboardMode: ParseableModifierValue { public static func parser(in context: ParseableModifierContext) -> some Parser { ImplicitStaticMember { @@ -19452,7 +19453,7 @@ ConstantAtomLiteral("never").map({ () -> Self in /// * `.enabled` /// * `.disabled` @_documentation(visibility: public) -@available(tvOS 18.0,iOS 18.0,watchOS 11.0,visionOS 2.0,macOS 15.0, *) +@available(iOS 18.0,macOS 15.0,watchOS 11.0,tvOS 18.0,visionOS 2.0, *) extension ScrollInputBehavior: ParseableModifierValue { public static func parser(in context: ParseableModifierContext) -> some Parser { ImplicitStaticMember { @@ -19494,7 +19495,7 @@ ConstantAtomLiteral("disabled").map({ () -> Self in /// * `.onTextEntry` /// * `.onSearchPresentation` @_documentation(visibility: public) -@available(tvOS 16.4,iOS 16.4,watchOS 9.4,visionOS 1.0,macOS 13.3, *) +@available(watchOS 9.4,iOS 16.4,visionOS 1.0,tvOS 16.4,macOS 13.3, *) extension SearchScopeActivation: ParseableModifierValue { public static func parser(in context: ParseableModifierContext) -> some Parser { ImplicitStaticMember { @@ -19578,7 +19579,7 @@ ConstantAtomLiteral("content").map({ () -> Self in /// * `.enabled` /// * `.disabled` @_documentation(visibility: public) -@available(visionOS 1.0,macOS 14.0,watchOS 10.0,iOS 17.0,tvOS 17.0, *) +@available(macOS 14.0,watchOS 10.0,iOS 17.0,visionOS 1.0,tvOS 17.0, *) extension SpringLoadingBehavior: ParseableModifierValue { public static func parser(in context: ParseableModifierContext) -> some Parser { ImplicitStaticMember { @@ -19744,7 +19745,7 @@ ConstantAtomLiteral("search").map({ () -> Self in /// * `.upstream` /// * `.downstream` @_documentation(visibility: public) -@available(tvOS 18.0,iOS 18.0,watchOS 11.0,visionOS 2.0,macOS 15.0, *) +@available(watchOS 11.0,tvOS 18.0,iOS 18.0,visionOS 2.0,macOS 15.0, *) extension TextSelectionAffinity: ParseableModifierValue { public static func parser(in context: ParseableModifierContext) -> some Parser { ImplicitStaticMember { @@ -19785,7 +19786,7 @@ ConstantAtomLiteral("downstream").map({ () -> Self in /// * `.sidebarToggle` /// * `.title` @_documentation(visibility: public) -@available(tvOS 17.0,iOS 17.0,watchOS 10.0,visionOS 1.0,macOS 14.0, *) +@available(iOS 17.0,macOS 14.0,watchOS 10.0,tvOS 17.0,visionOS 1.0, *) extension ToolbarDefaultItemKind: ParseableModifierValue { public static func parser(in context: ParseableModifierContext) -> some Parser { ImplicitStaticMember { @@ -19799,7 +19800,7 @@ ConstantAtomLiteral("sidebarToggle").map({ () -> Self in #endif #if os(iOS) || os(macOS) || os(visionOS) ConstantAtomLiteral("title").map({ () -> Self in -if #available(tvOS 17.0,iOS 18.0,watchOS 10.0,visionOS 2.0,macOS 15.0, *) { +if #available(iOS 18.0,macOS 15.0,watchOS 10.0,tvOS 17.0,visionOS 2.0, *) { return Self.title } else { fatalError("'title' is not available in this OS version") } }) @@ -19835,21 +19836,21 @@ ConstantAtomLiteral("automatic").map({ () -> Self in #if os(iOS) || os(tvOS) || os(visionOS) || os(watchOS) ConstantAtomLiteral("navigationStack").map({ () -> Self in -if #available(watchOS 9.0,iOS 16.0,macOS 13.0,visionOS 1.0,tvOS 16.0, *) { +if #available(watchOS 9.0,visionOS 1.0,iOS 16.0,tvOS 16.0,macOS 13.0, *) { return Self.navigationStack } else { fatalError("'navigationStack' is not available in this OS version") } }) #endif #if os(iOS) || os(visionOS) ConstantAtomLiteral("browser").map({ () -> Self in -if #available(watchOS 9.0,iOS 16.0,macOS 13.0,visionOS 1.0,tvOS 16.0, *) { +if #available(watchOS 9.0,visionOS 1.0,iOS 16.0,tvOS 16.0,macOS 13.0, *) { return Self.browser } else { fatalError("'browser' is not available in this OS version") } }) #endif #if os(iOS) || os(macOS) || os(visionOS) ConstantAtomLiteral("editor").map({ () -> Self in -if #available(watchOS 9.0,iOS 16.0,macOS 13.0,visionOS 1.0,tvOS 16.0, *) { +if #available(watchOS 9.0,visionOS 1.0,iOS 16.0,tvOS 16.0,macOS 13.0, *) { return Self.editor } else { fatalError("'editor' is not available in this OS version") } }) @@ -19871,7 +19872,7 @@ if #available(watchOS 9.0,iOS 16.0,macOS 13.0,visionOS 1.0,tvOS 16.0, *) { /// * `.inlineLarge` /// * `.inline` @_documentation(visibility: public) -@available(tvOS 17.0,iOS 17.0,watchOS 10.0,visionOS 1.0,macOS 14.0, *) +@available(watchOS 10.0,tvOS 17.0,iOS 17.0,visionOS 1.0,macOS 14.0, *) extension ToolbarTitleDisplayMode: ParseableModifierValue { public static func parser(in context: ParseableModifierContext) -> some Parser { ImplicitStaticMember { @@ -19977,7 +19978,7 @@ ConstantAtomLiteral("lastTextBaseline").map({ () -> Self in /// * `.up` /// * `.down` @_documentation(visibility: public) -@available(macOS 15.0,visionOS 2.0,watchOS 11.0,tvOS 18.0,iOS 18.0, *) +@available(macOS 15.0,iOS 18.0,tvOS 18.0,watchOS 11.0,visionOS 2.0, *) extension VerticalDirection: ParseableModifierValue { public static func parser(in context: ParseableModifierContext) -> some Parser { ImplicitStaticMember { @@ -20130,7 +20131,7 @@ ConstantAtomLiteral("disabled").map({ () -> Self in /// * `.visible` /// * `.onHover` @_documentation(visibility: public) -@available(tvOS 18.0,iOS 18.0,watchOS 11.0,visionOS 2.0,macOS 15.0, *) +@available(iOS 18.0,macOS 15.0,watchOS 11.0,tvOS 18.0,visionOS 2.0, *) extension WindowToolbarFullScreenVisibility: ParseableModifierValue { public static func parser(in context: ParseableModifierContext) -> some Parser { ImplicitStaticMember { @@ -20173,7 +20174,7 @@ ConstantAtomLiteral("onHover").map({ () -> Self in /// * `.limited` /// * `.disabled` @_documentation(visibility: public) -@available(iOS 18.0,macOS 15.0, *) +@available(macOS 15.0,iOS 18.0, *) extension WritingToolsBehavior: ParseableModifierValue { public static func parser(in context: ParseableModifierContext) -> some Parser { ImplicitStaticMember { diff --git a/Sources/LiveViewNativeStylesheet/ModifierParseError.swift b/Sources/LiveViewNativeStylesheet/ModifierParseError.swift index 0e8c5b12f..e31becf24 100644 --- a/Sources/LiveViewNativeStylesheet/ModifierParseError.swift +++ b/Sources/LiveViewNativeStylesheet/ModifierParseError.swift @@ -7,7 +7,8 @@ import Foundation -public struct ModifierParseError: Error, CustomDebugStringConvertible { +@MainActor +public struct ModifierParseError: Error, @preconcurrency CustomDebugStringConvertible { public let error: ErrorType public let metadata: Metadata @@ -107,10 +108,12 @@ public struct ModifierParseError: Error, CustomDebugStringConvertible { } } + @MainActor public var debugDescription: String { localizedDescription } + @MainActor public var localizedDescription: String { let indentation = String(repeating: " ", count: String(metadata.line).count) return """ diff --git a/Sources/LiveViewNativeStylesheet/Parsing/External/AnyNodeParser.swift b/Sources/LiveViewNativeStylesheet/Parsing/External/AnyNodeParser.swift index 7763db4d2..733968751 100644 --- a/Sources/LiveViewNativeStylesheet/Parsing/External/AnyNodeParser.swift +++ b/Sources/LiveViewNativeStylesheet/Parsing/External/AnyNodeParser.swift @@ -7,7 +7,8 @@ import Parsing -public struct _AnyNodeParser: Parser { +@MainActor +public struct _AnyNodeParser: @preconcurrency Parser { let context: ParseableModifierContext public init(context: ParseableModifierContext) { @@ -33,7 +34,8 @@ public struct _AnyNodeParser: Parser { "}".utf8 } - public struct AnyArgument: Parser { + @MainActor + public struct AnyArgument: @preconcurrency Parser { let context: ParseableModifierContext public init(context: ParseableModifierContext) { diff --git a/Sources/LiveViewNativeStylesheet/Parsing/External/Metadata.swift b/Sources/LiveViewNativeStylesheet/Parsing/External/Metadata.swift index 74c4af14b..b5cf857d4 100644 --- a/Sources/LiveViewNativeStylesheet/Parsing/External/Metadata.swift +++ b/Sources/LiveViewNativeStylesheet/Parsing/External/Metadata.swift @@ -1,6 +1,6 @@ import Parsing -public struct Metadata: Equatable { +public struct Metadata: Equatable, Sendable { public let file: String public let line: Int public let module: String diff --git a/Sources/LiveViewNativeStylesheet/Parsing/External/ParseableModifier.swift b/Sources/LiveViewNativeStylesheet/Parsing/External/ParseableModifier.swift index 3196b5d43..4dea7b843 100644 --- a/Sources/LiveViewNativeStylesheet/Parsing/External/ParseableModifier.swift +++ b/Sources/LiveViewNativeStylesheet/Parsing/External/ParseableModifier.swift @@ -56,7 +56,8 @@ public enum ArgumentParseError: LocalizedError { } } -public struct StandardExpressionParser: Parser { +@MainActor +public struct StandardExpressionParser: @preconcurrency Parser { let context: ParseableModifierContext public var body: some Parser { @@ -73,6 +74,7 @@ public class ParseableModifierContext { public init() {} } +@MainActor public protocol ParseableModifierValue { associatedtype _ParserType: Parser static func parser(in context: ParseableModifierContext) -> _ParserType diff --git a/Sources/LiveViewNativeStylesheetMacros/ParseableExpressionMacro.swift b/Sources/LiveViewNativeStylesheetMacros/ParseableExpressionMacro.swift index 874383aa5..42bee1564 100644 --- a/Sources/LiveViewNativeStylesheetMacros/ParseableExpressionMacro.swift +++ b/Sources/LiveViewNativeStylesheetMacros/ParseableExpressionMacro.swift @@ -19,7 +19,7 @@ public enum ParseableExpressionMacro: ExtensionMacro { }).flatMap({ [$0] }) ?? [] let signatures = declaration.memberBlock.members .compactMap({ member -> (FunctionParameterListSyntax, availability: AvailabilityArgumentListSyntax?, ifConfig: ExprSyntax?)? in - let ifConfig: IfConfigClauseSyntax? = member.decl.as(IfConfigDeclSyntax.self)?.clauses.first?.as(IfConfigClauseSyntax.self) + let ifConfig: IfConfigClauseSyntax? = member.decl.as(IfConfigDeclSyntax.self)?.clauses.first guard let decl: InitializerDeclSyntax = member.decl.as(InitializerDeclSyntax.self) ?? ifConfig?.elements?.as(MemberBlockItemListSyntax.self)?.first?.decl.as(InitializerDeclSyntax.self), diagnoseParameters(decl.signature.parameterClause.parameters, in: context) @@ -33,7 +33,7 @@ public enum ParseableExpressionMacro: ExtensionMacro { return [ try ExtensionDeclSyntax.init("extension \(type.trimmed): ParseableExpressionProtocol") { try TypeAliasDeclSyntax("\(accessLevel) typealias _ParserType = StandardExpressionParser") - try StructDeclSyntax("\(accessLevel) struct ExpressionArgumentsBody: Parser") { + try StructDeclSyntax("@MainActor \(accessLevel) struct ExpressionArgumentsBody: @preconcurrency Parser") { VariableDeclSyntax(.let, name: "context", type: TypeAnnotationSyntax(type: TypeSyntax("ParseableModifierContext"))) try FunctionDeclSyntax("func parse(_ input: inout Substring.UTF8View) throws -> \(type.trimmed)") { #"try "[".utf8.parse(&input)"# diff --git a/Sources/ModifierGenerator/ModifierGenerator.swift b/Sources/ModifierGenerator/ModifierGenerator.swift index 8f902bba4..5af7e88e6 100644 --- a/Sources/ModifierGenerator/ModifierGenerator.swift +++ b/Sources/ModifierGenerator/ModifierGenerator.swift @@ -330,32 +330,34 @@ struct ModifierGenerator: ParsableCommand { else { return true } return !$0.parameters.contains(where: { $0.type.as(IdentifierTypeSyntax.self)?.name.text == "ViewReference" }) }) - let requiresContext = signatures.contains(where: { - $0.parameters.contains(where: { - ["ViewReference", "TextReference", "AttributeReference", "InlineViewReference", "AnyShapeStyle", "Color", "ListItemTint", "_AnyGesture"].contains( - $0.type.as(IdentifierTypeSyntax.self)?.name.text - ?? $0.type.as(OptionalTypeSyntax.self)?.wrappedType.as(IdentifierTypeSyntax.self)?.name.text - ?? $0.type.as(MemberTypeSyntax.self)?.baseType.as(IdentifierTypeSyntax.self)?.name.text - ?? $0.type.as(OptionalTypeSyntax.self)?.wrappedType - .as(MemberTypeSyntax.self)?.baseType.as(IdentifierTypeSyntax.self)?.name.text - ) + let contextRequiredTypes: Set = ["ViewReference", "TextReference", "AttributeReference", "InlineViewReference", "AnyShapeStyle", "Color", "ListItemTint", "_AnyGesture"] + let typeNames: [String] = signatures.flatMap({ + $0.parameters.compactMap({ + $0.type.identifierType?.name.text }) }) + let requiresContext = typeNames.contains(where: { contextRequiredTypes.contains($0) }) - let requiresGestureState = signatures.contains(where: { - $0.parameters.contains(where: { - ["_AnyGesture"].contains( - $0.type.as(IdentifierTypeSyntax.self)?.name.text - ?? $0.type.as(OptionalTypeSyntax.self)?.wrappedType.as(IdentifierTypeSyntax.self)?.name.text - ?? $0.type.as(MemberTypeSyntax.self)?.baseType.as(IdentifierTypeSyntax.self)?.name.text - ?? $0.type.as(OptionalTypeSyntax.self)?.wrappedType - .as(MemberTypeSyntax.self)?.baseType.as(IdentifierTypeSyntax.self)?.name.text - ) - }) - }) + let gestureStateRequiredTypes: [String?] = ["_AnyGesture"] + let requiresGestureState = typeNames.contains(where: { gestureStateRequiredTypes.contains($0) }) modifierList[modifier] = (signatures, requiresContext: requiresContext, requiresGestureState: requiresGestureState) } return (modifiers: modifierList, deprecations: visitor.deprecations) } } + +fileprivate extension TypeSyntaxProtocol { + var identifierType: IdentifierTypeSyntax? { + if let identifierType = self.as(IdentifierTypeSyntax.self) { + return identifierType + } + if let memberIdentifierType = self.as(MemberTypeSyntax.self)?.baseType.as(IdentifierTypeSyntax.self) { + return memberIdentifierType + } + if let optionalIdentifierType = self.as(OptionalTypeSyntax.self)?.wrappedType.identifierType { + return optionalIdentifierType + } + return nil + } +} diff --git a/Sources/ModifierGenerator/Signature.swift b/Sources/ModifierGenerator/Signature.swift index 1a3c54a44..f059e3388 100644 --- a/Sources/ModifierGenerator/Signature.swift +++ b/Sources/ModifierGenerator/Signature.swift @@ -86,7 +86,7 @@ struct Signature { \#(platformAvailability) \#(boundParameters.isEmpty ? "" : "indirect") case _\#(offset)\#(boundParameters.isEmpty ? "" : "(")\#(FunctionParameterListSyntax(boundParameters.map({ if availability.isEmpty { - return $0 + return $0.with(\.defaultValue, nil) } else { return $0 .with(\.type, $0.type.is(OptionalTypeSyntax.self) ? TypeSyntax("Any?") : TypeSyntax("Any")) @@ -323,10 +323,11 @@ extension FunctionParameterSyntax { } // Types that support `attr` should be wrapped in an `AttributeReference`. - if let typeName = (self.type.as(MemberTypeSyntax.self)?.name + let typeName = self.type.as(MemberTypeSyntax.self)?.name ?? self.type.as(OptionalTypeSyntax.self)?.wrappedType.as(IdentifierTypeSyntax.self)?.name ?? self.type.as(OptionalTypeSyntax.self)?.wrappedType.as(MemberTypeSyntax.self)?.name - ?? self.type.as(IdentifierTypeSyntax.self)?.name)?.text, + ?? self.type.as(IdentifierTypeSyntax.self)?.name + if let typeName = typeName?.text, [ // Primitives "String", @@ -348,7 +349,7 @@ extension FunctionParameterSyntax { { self = self .with(\.type, TypeSyntax("AttributeReference<\(self.type.trimmed)>\(raw: self.type.is(OptionalTypeSyntax.self) ? "?" : "")")) - .with(\.defaultValue, self.defaultValue?.as(InitializerClauseSyntax.self).flatMap({ InitializerClauseSyntax.init(equal: .equalToken(leadingTrivia: .space, trailingTrivia: .space), value: ExprSyntax(".init(storage: .constant(\($0.value)))")) })) + .with(\.defaultValue, self.defaultValue.flatMap({ InitializerClauseSyntax.init(equal: .equalToken(leadingTrivia: .space, trailingTrivia: .space), value: ExprSyntax(".init(storage: .constant(\($0.value)))")) })) } self = self diff --git a/Sources/ModifierGenerator/Subcommands/DocumentationExtensions.swift b/Sources/ModifierGenerator/Subcommands/DocumentationExtensions.swift index 2471a78f2..6c2073b80 100644 --- a/Sources/ModifierGenerator/Subcommands/DocumentationExtensions.swift +++ b/Sources/ModifierGenerator/Subcommands/DocumentationExtensions.swift @@ -11,6 +11,20 @@ import SwiftSyntax import SwiftSyntaxBuilder import SwiftParser +@propertyWrapper +struct DecodableIgnored: Decodable { + var storage: Value! + + init() {} + + init(from decoder: Decoder) throws {} + + var wrappedValue: Value { + get { storage } + set { storage = newValue } + } +} + extension ModifierGenerator { struct DocumentationExtensions: ParsableCommand { static let configuration = CommandConfiguration(abstract: "Output a list of the names of all available modifiers.") @@ -27,15 +41,18 @@ extension ModifierGenerator { ) private var output: URL - private static let typeVisitor = EnumTypeVisitor(typeNames: ModifierGenerator.requiredTypes) + @DecodableIgnored + private var typeVisitor: EnumTypeVisitor - func run() throws { + mutating func run() async throws { + typeVisitor = EnumTypeVisitor(typeNames: ModifierGenerator.requiredTypes) + let source = try String(contentsOf: interface, encoding: .utf8) let sourceFile = Parser.parse(source: source) let (modifiers, _) = ModifierGenerator.modifiers(from: sourceFile) - Self.typeVisitor.walk(sourceFile) + typeVisitor.walk(sourceFile) for (name, (signatures, _, _)) in modifiers { let firstSignatureDescription = signatureDescription(for: signatures.first!, on: name) @@ -145,7 +162,7 @@ extension ModifierGenerator { } else if parameter.type.isTextReference { value = #":\#(displayName)"# templates.append(#"..."#) - } else if let enumType = Self.typeVisitor.types[parameter.type.nestedTypeName]?.first { + } else if let enumType = typeVisitor.types[parameter.type.nestedTypeName]?.first { value = ".\(enumType.0)" } else { value = parameter.type.exampleValue diff --git a/Sources/ModifierGenerator/Subcommands/Source.swift b/Sources/ModifierGenerator/Subcommands/Source.swift index 869716994..338e79db1 100644 --- a/Sources/ModifierGenerator/Subcommands/Source.swift +++ b/Sources/ModifierGenerator/Subcommands/Source.swift @@ -142,7 +142,8 @@ extension ModifierGenerator { .init(context: context) } - struct _ParserType: Parser { + @MainActor + struct _ParserType: @preconcurrency Parser { typealias Input = Substring.UTF8View typealias Output = BuiltinModifier diff --git a/Sources/ModifierGenerator/Visitors/ParseableModifierVisitor.swift b/Sources/ModifierGenerator/Visitors/ParseableModifierVisitor.swift index c4cdc8a04..8c3ff2f47 100644 --- a/Sources/ModifierGenerator/Visitors/ParseableModifierVisitor.swift +++ b/Sources/ModifierGenerator/Visitors/ParseableModifierVisitor.swift @@ -11,7 +11,7 @@ final class ParseableModifierVisitor: SyntaxVisitor { guard node.attributes.contains(where: { $0.as(AttributeSyntax.self)?.attributeName.as(IdentifierTypeSyntax.self)?.name.text == "ParseableExpression" }), let name: String = node.memberBlock.members.lazy.compactMap({ guard let decl: VariableDeclSyntax = $0.decl.as(VariableDeclSyntax.self), - let binding: PatternBindingSyntax = decl.bindings.first?.as(PatternBindingSyntax.self), + let binding: PatternBindingSyntax = decl.bindings.first, binding.pattern.as(IdentifierPatternSyntax.self)?.identifier.text == "name", let name = ( binding.initializer?.value.as(StringLiteralExprSyntax.self) From 1ef01568b5f0f3b66c2985c24509016162b589b8 Mon Sep 17 00:00:00 2001 From: Carson Katri Date: Thu, 17 Oct 2024 12:03:30 -0400 Subject: [PATCH 2/4] Exclude navigationViewStyle and disclosureGroupStyle --- .../Presentation Containers/TabView.swift | 3 + .../LiveViewNative/_GeneratedModifiers.swift | 1018 ++++++++--------- .../ModifierGenerator/ModifierGenerator.swift | 4 + 3 files changed, 465 insertions(+), 560 deletions(-) diff --git a/Sources/LiveViewNative/Views/Layout Containers/Presentation Containers/TabView.swift b/Sources/LiveViewNative/Views/Layout Containers/Presentation Containers/TabView.swift index 05d60dea3..d73884d6b 100644 --- a/Sources/LiveViewNative/Views/Layout Containers/Presentation Containers/TabView.swift +++ b/Sources/LiveViewNative/Views/Layout Containers/Presentation Containers/TabView.swift @@ -28,6 +28,7 @@ private let logger = Logger(subsystem: "LiveViewNative", category: "TabView") /// ## Bindings /// * ``selection`` @_documentation(visibility: public) +@MainActor @LiveElement struct TabView: View { /// Synchronizes the selected tab with the server. @@ -67,6 +68,7 @@ struct TabView: View { /// A builder for `TabContent`. @available(iOS 18.0, macOS 15.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, *) +@MainActor struct TabTreeBuilder { func fromNodes(_ nodes: Nodes, context: LiveContextStorage) -> some TabContent where Nodes: RandomAccessCollection, Nodes.Index == Int, Nodes.Element == Node @@ -95,6 +97,7 @@ struct TabTreeBuilder { } @available(iOS 18.0, macOS 15.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, *) +@MainActor struct Tab: TabContent { @ObservedElement private var element: ElementNode @LiveContext private var context diff --git a/Sources/LiveViewNative/_GeneratedModifiers.swift b/Sources/LiveViewNative/_GeneratedModifiers.swift index cfe08f904..401111f90 100644 --- a/Sources/LiveViewNative/_GeneratedModifiers.swift +++ b/Sources/LiveViewNative/_GeneratedModifiers.swift @@ -125,7 +125,7 @@ struct _accessibilityActionsModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(tvOS 18.0,watchOS 11.0,visionOS 2.0,iOS 18.0,macOS 15.0, *) + @available(macOS 15.0,visionOS 2.0,iOS 18.0,tvOS 18.0,watchOS 11.0, *) init(category: SwiftUI.AccessibilityActionCategory,content content: ViewReference=ViewReference(value: [])) { self.value = ._0(category: category, content: content) @@ -145,7 +145,7 @@ struct _accessibilityActionsModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(category, content): - if #available(tvOS 18.0,watchOS 11.0,visionOS 2.0,iOS 18.0,macOS 15.0, *) { + if #available(macOS 15.0,visionOS 2.0,iOS 18.0,tvOS 18.0,watchOS 11.0, *) { let category = category as! SwiftUI.AccessibilityActionCategory let content = content as! ViewReference @@ -681,7 +681,7 @@ struct _allowsWindowActivationEventsModifier: ViewModifier { #if os(iOS) || os(macOS) || os(visionOS) - @available(macOS 15.0,visionOS 2.0,iOS 18.0, *) + @available(iOS 18.0,macOS 15.0,visionOS 2.0, *) init(_ value: AttributeReference? = .init(storage: .constant(true)) ) { self.value = ._0(value: value) @@ -694,7 +694,7 @@ struct _allowsWindowActivationEventsModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(visionOS) case let ._0(value): - if #available(macOS 15.0,visionOS 2.0,iOS 18.0, *) { + if #available(iOS 18.0,macOS 15.0,visionOS 2.0, *) { let value = value as? AttributeReference __content @@ -868,7 +868,7 @@ struct _autocapitalizationModifier: ViewModifier { #if os(iOS) || os(tvOS) || os(visionOS) - @available(iOS 16.0,tvOS 16.0,visionOS 1.0, *) + @available(visionOS 1.0,iOS 16.0,tvOS 16.0, *) init(_ style: UIKit.UITextAutocapitalizationType) { self.value = ._0(style: style) @@ -881,7 +881,7 @@ struct _autocapitalizationModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(tvOS) || os(visionOS) case let ._0(style): - if #available(iOS 16.0,tvOS 16.0,visionOS 1.0, *) { + if #available(visionOS 1.0,iOS 16.0,tvOS 16.0, *) { let style = style as! UIKit.UITextAutocapitalizationType __content @@ -1232,28 +1232,28 @@ struct _badgeModifier: ViewModifier { #if os(iOS) || os(macOS) || os(visionOS) - @available(visionOS 1.0,macOS 12.0,iOS 15.0, *) + @available(iOS 15.0,visionOS 1.0,macOS 12.0, *) init(_ count: AttributeReference) { self.value = ._0(count: count) } #endif #if os(iOS) || os(macOS) || os(visionOS) - @available(visionOS 1.0,macOS 12.0,iOS 15.0, *) + @available(iOS 15.0,visionOS 1.0,macOS 12.0, *) init(_ label: TextReference?) { self.value = ._1(label: label) } #endif #if os(iOS) || os(macOS) || os(visionOS) - @available(iOS 15.0,macOS 12.0,visionOS 1.0, *) + @available(iOS 15.0,visionOS 1.0,macOS 12.0, *) init(_ key: SwiftUICore.LocalizedStringKey?) { self.value = ._2(key: key) } #endif #if os(iOS) || os(macOS) || os(visionOS) - @available(iOS 15.0,macOS 12.0,visionOS 1.0, *) + @available(iOS 15.0,visionOS 1.0,macOS 12.0, *) init(_ label: AttributeReference) { self.value = ._3(label: label) @@ -1266,7 +1266,7 @@ struct _badgeModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(visionOS) case let ._0(count): - if #available(visionOS 1.0,macOS 12.0,iOS 15.0, *) { + if #available(iOS 15.0,visionOS 1.0,macOS 12.0, *) { let count = count as! AttributeReference __content @@ -1277,7 +1277,7 @@ struct _badgeModifier: ViewModifier { #endif #if os(iOS) || os(macOS) || os(visionOS) case let ._1(label): - if #available(visionOS 1.0,macOS 12.0,iOS 15.0, *) { + if #available(iOS 15.0,visionOS 1.0,macOS 12.0, *) { let label = label as? TextReference __content._observeTextReference(label, on: element, in: context) { __content in __content @@ -1288,7 +1288,7 @@ struct _badgeModifier: ViewModifier { #endif #if os(iOS) || os(macOS) || os(visionOS) case let ._2(key): - if #available(iOS 15.0,macOS 12.0,visionOS 1.0, *) { + if #available(iOS 15.0,visionOS 1.0,macOS 12.0, *) { let key = key as? SwiftUICore.LocalizedStringKey __content @@ -1299,7 +1299,7 @@ struct _badgeModifier: ViewModifier { #endif #if os(iOS) || os(macOS) || os(visionOS) case let ._3(label): - if #available(iOS 15.0,macOS 12.0,visionOS 1.0, *) { + if #available(iOS 15.0,visionOS 1.0,macOS 12.0, *) { let label = label as! AttributeReference __content @@ -1333,7 +1333,7 @@ struct _badgeProminenceModifier: ViewModifier { #if os(iOS) || os(macOS) || os(visionOS) - @available(iOS 17.0,macOS 14.0,visionOS 1.0, *) + @available(iOS 17.0,visionOS 1.0,macOS 14.0, *) init(_ prominence: SwiftUI.BadgeProminence) { self.value = ._0(prominence: prominence) @@ -1346,7 +1346,7 @@ struct _badgeProminenceModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(visionOS) case let ._0(prominence): - if #available(iOS 17.0,macOS 14.0,visionOS 1.0, *) { + if #available(iOS 17.0,visionOS 1.0,macOS 14.0, *) { let prominence = prominence as! SwiftUI.BadgeProminence __content @@ -2134,14 +2134,14 @@ struct _containerRelativeFrameModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(watchOS 10.0,tvOS 17.0,iOS 17.0,visionOS 1.0,macOS 14.0, *) + @available(watchOS 10.0,iOS 17.0,tvOS 17.0,visionOS 1.0,macOS 14.0, *) init(_ axes: SwiftUICore.Axis.Set,alignment: AttributeReference = .init(storage: .constant(.center)) ) { self.value = ._0(axes: axes, alignment: alignment) } #endif #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(macOS 14.0,tvOS 17.0,iOS 17.0,visionOS 1.0,watchOS 10.0, *) + @available(watchOS 10.0,iOS 17.0,tvOS 17.0,visionOS 1.0,macOS 14.0, *) init(_ axes: SwiftUICore.Axis.Set,count: AttributeReference,span: AttributeReference = .init(storage: .constant(1)), spacing: AttributeReference,alignment: AttributeReference = .init(storage: .constant(.center)) ) { self.value = ._1(axes: axes, count: count, span: span, spacing: spacing, alignment: alignment) @@ -2154,7 +2154,7 @@ struct _containerRelativeFrameModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(axes, alignment): - if #available(watchOS 10.0,tvOS 17.0,iOS 17.0,visionOS 1.0,macOS 14.0, *) { + if #available(watchOS 10.0,iOS 17.0,tvOS 17.0,visionOS 1.0,macOS 14.0, *) { let axes = axes as! SwiftUICore.Axis.Set let alignment = alignment as! AttributeReference @@ -2166,7 +2166,7 @@ let alignment = alignment as! AttributeReference #endif #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._1(axes, count, span, spacing, alignment): - if #available(macOS 14.0,tvOS 17.0,iOS 17.0,visionOS 1.0,watchOS 10.0, *) { + if #available(watchOS 10.0,iOS 17.0,tvOS 17.0,visionOS 1.0,macOS 14.0, *) { let axes = axes as! SwiftUICore.Axis.Set let count = count as! AttributeReference let span = span as! AttributeReference @@ -2261,21 +2261,21 @@ struct _contentMarginsModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(tvOS 17.0,iOS 17.0,macOS 14.0,watchOS 10.0,visionOS 1.0, *) + @available(macOS 14.0,watchOS 10.0,iOS 17.0,tvOS 17.0,visionOS 1.0, *) init(_ edges: SwiftUICore.Edge.Set = .all, _ insets: SwiftUICore.EdgeInsets,for placement: SwiftUI.ContentMarginPlacement = .automatic ) { self.value = ._0(edges: edges, insets: insets, placement: placement) } #endif #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(macOS 14.0,tvOS 17.0,iOS 17.0,visionOS 1.0,watchOS 10.0, *) + @available(macOS 14.0,watchOS 10.0,iOS 17.0,tvOS 17.0,visionOS 1.0, *) init(_ edges: SwiftUICore.Edge.Set = .all, _ length: AttributeReference?,for placement: SwiftUI.ContentMarginPlacement = .automatic ) { self.value = ._1(edges: edges, length: length, placement: placement) } #endif #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(macOS 14.0,tvOS 17.0,iOS 17.0,visionOS 1.0,watchOS 10.0, *) + @available(macOS 14.0,watchOS 10.0,iOS 17.0,tvOS 17.0,visionOS 1.0, *) init(_ length: AttributeReference,for placement: SwiftUI.ContentMarginPlacement = .automatic ) { self.value = ._2(length: length, placement: placement) @@ -2288,7 +2288,7 @@ struct _contentMarginsModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(edges, insets, placement): - if #available(tvOS 17.0,iOS 17.0,macOS 14.0,watchOS 10.0,visionOS 1.0, *) { + if #available(macOS 14.0,watchOS 10.0,iOS 17.0,tvOS 17.0,visionOS 1.0, *) { let edges = edges as! SwiftUICore.Edge.Set let insets = insets as! SwiftUICore.EdgeInsets let placement = placement as! SwiftUI.ContentMarginPlacement @@ -2301,7 +2301,7 @@ let placement = placement as! SwiftUI.ContentMarginPlacement #endif #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._1(edges, length, placement): - if #available(macOS 14.0,tvOS 17.0,iOS 17.0,visionOS 1.0,watchOS 10.0, *) { + if #available(macOS 14.0,watchOS 10.0,iOS 17.0,tvOS 17.0,visionOS 1.0, *) { let edges = edges as! SwiftUICore.Edge.Set let length = length as? AttributeReference let placement = placement as! SwiftUI.ContentMarginPlacement @@ -2314,7 +2314,7 @@ let placement = placement as! SwiftUI.ContentMarginPlacement #endif #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._2(length, placement): - if #available(macOS 14.0,tvOS 17.0,iOS 17.0,visionOS 1.0,watchOS 10.0, *) { + if #available(macOS 14.0,watchOS 10.0,iOS 17.0,tvOS 17.0,visionOS 1.0, *) { let length = length as! AttributeReference let placement = placement as! SwiftUI.ContentMarginPlacement @@ -2478,7 +2478,7 @@ struct _contextMenuModifier: ViewModifier { } #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) - @available(iOS 16.0,macOS 13.0,visionOS 1.0,tvOS 16.0, *) + @available(iOS 16.0,tvOS 16.0,macOS 13.0,visionOS 1.0, *) init(menuItems: ViewReference=ViewReference(value: []),preview: ViewReference=ViewReference(value: [])) { self.value = ._1(menuItems: menuItems, preview: preview) @@ -2502,7 +2502,7 @@ struct _contextMenuModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) case let ._1(menuItems, preview): - if #available(iOS 16.0,macOS 13.0,visionOS 1.0,tvOS 16.0, *) { + if #available(iOS 16.0,tvOS 16.0,macOS 13.0,visionOS 1.0, *) { let menuItems = menuItems as! ViewReference let preview = preview as! ViewReference @@ -2631,7 +2631,7 @@ struct _controlSizeModifier: ViewModifier { #if os(iOS) || os(macOS) || os(visionOS) || os(watchOS) - @available(macOS 10.15,watchOS 9.0,iOS 15.0,visionOS 1.0, *) + @available(macOS 10.15,iOS 15.0,visionOS 1.0,watchOS 9.0, *) init(_ controlSize: SwiftUICore.ControlSize) { self.value = ._0(controlSize: controlSize) @@ -2644,7 +2644,7 @@ struct _controlSizeModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(visionOS) || os(watchOS) case let ._0(controlSize): - if #available(macOS 10.15,watchOS 9.0,iOS 15.0,visionOS 1.0, *) { + if #available(macOS 10.15,iOS 15.0,visionOS 1.0,watchOS 9.0, *) { let controlSize = controlSize as! SwiftUICore.ControlSize __content @@ -2690,7 +2690,7 @@ struct _coordinateSpaceModifier: ViewModifier { } #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(macOS 14.0,tvOS 17.0,iOS 17.0,visionOS 1.0,watchOS 10.0, *) + @available(macOS 14.0,iOS 17.0,visionOS 1.0,watchOS 10.0,tvOS 17.0, *) init(_ name: SwiftUICore.NamedCoordinateSpace) { self.value = ._1(name: name) @@ -2714,7 +2714,7 @@ struct _coordinateSpaceModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._1(name): - if #available(macOS 14.0,tvOS 17.0,iOS 17.0,visionOS 1.0,watchOS 10.0, *) { + if #available(macOS 14.0,iOS 17.0,visionOS 1.0,watchOS 10.0,tvOS 17.0, *) { let name = name as! SwiftUICore.NamedCoordinateSpace __content @@ -2795,7 +2795,7 @@ struct _datePickerStyleModifier: ViewModifier { #if os(iOS) || os(macOS) || os(visionOS) || os(watchOS) - @available(visionOS 1.0,iOS 13.0,macOS 10.15,watchOS 10.0, *) + @available(watchOS 10.0,iOS 13.0,visionOS 1.0,macOS 10.15, *) init(_ style: AnyDatePickerStyle) { self.value = ._0(style: style) @@ -2808,7 +2808,7 @@ struct _datePickerStyleModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(visionOS) || os(watchOS) case let ._0(style): - if #available(visionOS 1.0,iOS 13.0,macOS 10.15,watchOS 10.0, *) { + if #available(watchOS 10.0,iOS 13.0,visionOS 1.0,macOS 10.15, *) { let style = style as! AnyDatePickerStyle __content @@ -2889,7 +2889,7 @@ struct _defaultHoverEffectModifier: ViewModifier { #if os(iOS) || os(tvOS) || os(visionOS) - @available(visionOS 1.0,iOS 17.0,tvOS 17.0, *) + @available(iOS 17.0,visionOS 1.0,tvOS 17.0, *) init(_ effect: SwiftUI.HoverEffect?) { self.value = ._0(effect: effect) @@ -2902,7 +2902,7 @@ struct _defaultHoverEffectModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(tvOS) || os(visionOS) case let ._0(effect): - if #available(visionOS 1.0,iOS 17.0,tvOS 17.0, *) { + if #available(iOS 17.0,visionOS 1.0,tvOS 17.0, *) { let effect = effect as? SwiftUI.HoverEffect __content @@ -2941,14 +2941,14 @@ struct _defaultScrollAnchorModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(visionOS 1.0,iOS 17.0,tvOS 17.0,watchOS 10.0,macOS 14.0, *) + @available(macOS 14.0,visionOS 1.0,iOS 17.0,tvOS 17.0,watchOS 10.0, *) init(_ anchor: AttributeReference?) { self.value = ._0(anchor: anchor) } #endif #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(macOS 15.0,tvOS 18.0,iOS 18.0,watchOS 11.0,visionOS 2.0, *) + @available(macOS 15.0,visionOS 2.0,iOS 18.0,tvOS 18.0,watchOS 11.0, *) init(_ anchor: AttributeReference?,for role: SwiftUI.ScrollAnchorRole) { self.value = ._1(anchor: anchor, role: role) @@ -2961,7 +2961,7 @@ struct _defaultScrollAnchorModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(anchor): - if #available(visionOS 1.0,iOS 17.0,tvOS 17.0,watchOS 10.0,macOS 14.0, *) { + if #available(macOS 14.0,visionOS 1.0,iOS 17.0,tvOS 17.0,watchOS 10.0, *) { let anchor = anchor as? AttributeReference __content @@ -2972,7 +2972,7 @@ struct _defaultScrollAnchorModifier: ViewModifier { #endif #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._1(anchor, role): - if #available(macOS 15.0,tvOS 18.0,iOS 18.0,watchOS 11.0,visionOS 2.0, *) { + if #available(macOS 15.0,visionOS 2.0,iOS 18.0,tvOS 18.0,watchOS 11.0, *) { let anchor = anchor as? AttributeReference let role = role as! SwiftUI.ScrollAnchorRole @@ -3163,28 +3163,28 @@ struct _dialogSuppressionToggleModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(iOS 17.0,tvOS 17.0,macOS 14.0,visionOS 1.0,watchOS 10.0, *) + @available(macOS 14.0,iOS 17.0,visionOS 1.0,watchOS 10.0,tvOS 17.0, *) init(_ titleKey: SwiftUICore.LocalizedStringKey,isSuppressed: ChangeTracked) { self.value = ._0(titleKey: titleKey) self.__0_isSuppressed = isSuppressed } #endif #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(macOS 14.0,tvOS 17.0,iOS 17.0,visionOS 1.0,watchOS 10.0, *) + @available(macOS 14.0,iOS 17.0,visionOS 1.0,watchOS 10.0,tvOS 17.0, *) init(_ title: AttributeReference,isSuppressed: ChangeTracked) { self.value = ._1(title: title) self.__1_isSuppressed = isSuppressed } #endif #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(macOS 14.0,tvOS 17.0,iOS 17.0,visionOS 1.0,watchOS 10.0, *) + @available(iOS 17.0,watchOS 10.0,tvOS 17.0,visionOS 1.0,macOS 14.0, *) init(_ label: TextReference,isSuppressed: ChangeTracked) { self.value = ._2(label: label) self.__2_isSuppressed = isSuppressed } #endif #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(macOS 14.0,tvOS 17.0,iOS 17.0,visionOS 1.0,watchOS 10.0, *) + @available(iOS 17.0,watchOS 10.0,tvOS 17.0,visionOS 1.0,macOS 14.0, *) init(isSuppressed: ChangeTracked) { self.value = ._3 self.__3_isSuppressed = isSuppressed @@ -3197,7 +3197,7 @@ struct _dialogSuppressionToggleModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(titleKey): - if #available(iOS 17.0,tvOS 17.0,macOS 14.0,visionOS 1.0,watchOS 10.0, *) { + if #available(macOS 14.0,iOS 17.0,visionOS 1.0,watchOS 10.0,tvOS 17.0, *) { let titleKey = titleKey as! SwiftUICore.LocalizedStringKey __content @@ -3208,7 +3208,7 @@ struct _dialogSuppressionToggleModifier: ViewModifier { #endif #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._1(title): - if #available(macOS 14.0,tvOS 17.0,iOS 17.0,visionOS 1.0,watchOS 10.0, *) { + if #available(macOS 14.0,iOS 17.0,visionOS 1.0,watchOS 10.0,tvOS 17.0, *) { let title = title as! AttributeReference __content @@ -3219,7 +3219,7 @@ struct _dialogSuppressionToggleModifier: ViewModifier { #endif #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._2(label): - if #available(macOS 14.0,tvOS 17.0,iOS 17.0,visionOS 1.0,watchOS 10.0, *) { + if #available(iOS 17.0,watchOS 10.0,tvOS 17.0,visionOS 1.0,macOS 14.0, *) { let label = label as! TextReference __content._observeTextReference(label, on: element, in: context) { __content in __content @@ -3230,7 +3230,7 @@ struct _dialogSuppressionToggleModifier: ViewModifier { #endif #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case ._3: - if #available(macOS 14.0,tvOS 17.0,iOS 17.0,visionOS 1.0,watchOS 10.0, *) { + if #available(iOS 17.0,watchOS 10.0,tvOS 17.0,visionOS 1.0,macOS 14.0, *) { __content @@ -3403,53 +3403,6 @@ struct _disabledModifier: ViewModifier { - } - } -} -@_documentation(visibility: public) -@ParseableExpression -struct _disclosureGroupStyleModifier: ViewModifier { - static var name: String { "disclosureGroupStyle" } - - enum Value { - case _never - #if os(iOS) || os(macOS) || os(visionOS) - indirect case _0(style: Any) - #endif - } - - let value: Value - - - - - - - - - #if os(iOS) || os(macOS) || os(visionOS) - @available(iOS 16.0,macOS 13.0,visionOS 1.0, *) - init(_ style: AnyDisclosureGroupStyle) { - self.value = ._0(style: style) - - } - #endif - - func body(content __content: Content) -> some View { - switch value { - case ._never: - fatalError("unreachable") - #if os(iOS) || os(macOS) || os(visionOS) - case let ._0(style): - if #available(iOS 16.0,macOS 13.0,visionOS 1.0, *) { - let style = style as! AnyDisclosureGroupStyle - - __content - .disclosureGroupStyle(style) - - - } else { __content } - #endif } } } @@ -3816,7 +3769,7 @@ struct _fileDialogCustomizationIDModifier: ViewModifier { #if os(iOS) || os(macOS) || os(visionOS) - @available(macOS 14.0,visionOS 1.0,iOS 17.0, *) + @available(visionOS 1.0,iOS 17.0,macOS 14.0, *) init(_ id: AttributeReference) { self.value = ._0(id: id) @@ -3829,7 +3782,7 @@ struct _fileDialogCustomizationIDModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(visionOS) case let ._0(id): - if #available(macOS 14.0,visionOS 1.0,iOS 17.0, *) { + if #available(visionOS 1.0,iOS 17.0,macOS 14.0, *) { let id = id as! AttributeReference __content @@ -3863,7 +3816,7 @@ struct _fileDialogImportsUnresolvedAliasesModifier: ViewModifie #if os(iOS) || os(macOS) || os(visionOS) - @available(iOS 17.0,macOS 14.0,visionOS 1.0, *) + @available(iOS 17.0,visionOS 1.0,macOS 14.0, *) init(_ imports: AttributeReference) { self.value = ._0(imports: imports) @@ -3876,7 +3829,7 @@ struct _fileDialogImportsUnresolvedAliasesModifier: ViewModifie fatalError("unreachable") #if os(iOS) || os(macOS) || os(visionOS) case let ._0(imports): - if #available(iOS 17.0,macOS 14.0,visionOS 1.0, *) { + if #available(iOS 17.0,visionOS 1.0,macOS 14.0, *) { let imports = imports as! AttributeReference __content @@ -3910,7 +3863,7 @@ struct _findDisabledModifier: ViewModifier { #if os(iOS) || os(visionOS) - @available(visionOS 1.0,iOS 16.0, *) + @available(iOS 16.0,visionOS 1.0, *) init(_ isDisabled: AttributeReference = .init(storage: .constant(true)) ) { self.value = ._0(isDisabled: isDisabled) @@ -3923,7 +3876,7 @@ struct _findDisabledModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(visionOS) case let ._0(isDisabled): - if #available(visionOS 1.0,iOS 16.0, *) { + if #available(iOS 16.0,visionOS 1.0, *) { let isDisabled = isDisabled as! AttributeReference __content @@ -3957,7 +3910,7 @@ struct _findNavigatorModifier: ViewModifier { #if os(iOS) || os(visionOS) - @available(visionOS 1.0,iOS 16.0, *) + @available(iOS 16.0,visionOS 1.0, *) init(isPresented: ChangeTracked) { self.value = ._0 self.__0_isPresented = isPresented @@ -3970,7 +3923,7 @@ struct _findNavigatorModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(visionOS) case ._0: - if #available(visionOS 1.0,iOS 16.0, *) { + if #available(iOS 16.0,visionOS 1.0, *) { __content @@ -4121,7 +4074,7 @@ struct _focusEffectDisabledModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(iOS 17.0,macOS 14.0,watchOS 10.0,visionOS 1.0,tvOS 17.0, *) + @available(visionOS 1.0,watchOS 10.0,iOS 17.0,tvOS 17.0,macOS 14.0, *) init(_ disabled: AttributeReference = .init(storage: .constant(true)) ) { self.value = ._0(disabled: disabled) @@ -4134,7 +4087,7 @@ struct _focusEffectDisabledModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(disabled): - if #available(iOS 17.0,macOS 14.0,watchOS 10.0,visionOS 1.0,tvOS 17.0, *) { + if #available(visionOS 1.0,watchOS 10.0,iOS 17.0,tvOS 17.0,macOS 14.0, *) { let disabled = disabled as! AttributeReference __content @@ -4225,21 +4178,21 @@ struct _focusableModifier: ViewModifier { @Event private var _2_onFocusChange__1: Event.EventHandler #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(iOS 17.0,visionOS 1.0,watchOS 8.0,macOS 12.0,tvOS 15.0, *) + @available(visionOS 1.0,watchOS 8.0,iOS 17.0,tvOS 15.0,macOS 12.0, *) init(_ isFocusable: AttributeReference = .init(storage: .constant(true)) ) { self.value = ._0(isFocusable: isFocusable) } #endif #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(iOS 17.0,visionOS 1.0,watchOS 10.0,macOS 14.0,tvOS 17.0, *) + @available(visionOS 1.0,watchOS 10.0,iOS 17.0,tvOS 17.0,macOS 14.0, *) init(_ isFocusable: AttributeReference = .init(storage: .constant(true)), interactions: SwiftUI.FocusInteractions) { self.value = ._1(isFocusable: isFocusable, interactions: interactions) } #endif #if os(macOS) || os(tvOS) || os(watchOS) - @available(tvOS 16.0,watchOS 9.0,macOS 13.0, *) + @available(watchOS 9.0,macOS 13.0,tvOS 16.0, *) init(_ isFocusable: AttributeReference = .init(storage: .constant(true)), onFocusChange onFocusChange__1: Event ) { self.value = ._2(isFocusable: isFocusable) self.__2_onFocusChange__1 = onFocusChange__1 @@ -4252,7 +4205,7 @@ struct _focusableModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(isFocusable): - if #available(iOS 17.0,visionOS 1.0,watchOS 8.0,macOS 12.0,tvOS 15.0, *) { + if #available(visionOS 1.0,watchOS 8.0,iOS 17.0,tvOS 15.0,macOS 12.0, *) { let isFocusable = isFocusable as! AttributeReference __content @@ -4263,7 +4216,7 @@ struct _focusableModifier: ViewModifier { #endif #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._1(isFocusable, interactions): - if #available(iOS 17.0,visionOS 1.0,watchOS 10.0,macOS 14.0,tvOS 17.0, *) { + if #available(visionOS 1.0,watchOS 10.0,iOS 17.0,tvOS 17.0,macOS 14.0, *) { let isFocusable = isFocusable as! AttributeReference let interactions = interactions as! SwiftUI.FocusInteractions @@ -4275,7 +4228,7 @@ let interactions = interactions as! SwiftUI.FocusInteractions #endif #if os(macOS) || os(tvOS) || os(watchOS) case let ._2(isFocusable): - if #available(tvOS 16.0,watchOS 9.0,macOS 13.0, *) { + if #available(watchOS 9.0,macOS 13.0,tvOS 16.0, *) { let isFocusable = isFocusable as! AttributeReference __content @@ -4546,7 +4499,7 @@ struct _fullScreenCoverModifier: ViewModifier { @Event private var _0_onDismiss__0: Event.EventHandler #if os(iOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(watchOS 7.0,iOS 14.0,tvOS 14.0,visionOS 1.0, *) + @available(visionOS 1.0,iOS 14.0,watchOS 7.0,tvOS 14.0, *) init(isPresented: ChangeTracked,onDismiss onDismiss__0: Event=Event(), content: ViewReference=ViewReference(value: [])) { self.value = ._0(content: content) self.__0_isPresented = isPresented @@ -4560,7 +4513,7 @@ self.__0_onDismiss__0 = onDismiss__0 fatalError("unreachable") #if os(iOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(content): - if #available(watchOS 7.0,iOS 14.0,tvOS 14.0,visionOS 1.0, *) { + if #available(visionOS 1.0,iOS 14.0,watchOS 7.0,tvOS 14.0, *) { let content = content as! ViewReference __content @@ -4594,7 +4547,7 @@ struct _gaugeStyleModifier: ViewModifier { #if os(iOS) || os(macOS) || os(visionOS) || os(watchOS) - @available(macOS 13.0,visionOS 1.0,iOS 16.0,watchOS 7.0, *) + @available(iOS 16.0,macOS 13.0,visionOS 1.0,watchOS 7.0, *) init(_ style: AnyGaugeStyle) { self.value = ._0(style: style) @@ -4607,7 +4560,7 @@ struct _gaugeStyleModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(visionOS) || os(watchOS) case let ._0(style): - if #available(macOS 13.0,visionOS 1.0,iOS 16.0,watchOS 7.0, *) { + if #available(iOS 16.0,macOS 13.0,visionOS 1.0,watchOS 7.0, *) { let style = style as! AnyGaugeStyle __content @@ -4641,7 +4594,7 @@ struct _geometryGroupModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(macOS 14.0,tvOS 17.0,iOS 17.0,visionOS 1.0,watchOS 10.0, *) + @available(macOS 14.0,watchOS 10.0,iOS 17.0,tvOS 17.0,visionOS 1.0, *) init() { self.value = ._0 @@ -4654,7 +4607,7 @@ struct _geometryGroupModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case ._0: - if #available(macOS 14.0,tvOS 17.0,iOS 17.0,visionOS 1.0,watchOS 10.0, *) { + if #available(macOS 14.0,watchOS 10.0,iOS 17.0,tvOS 17.0,visionOS 1.0, *) { __content @@ -4712,7 +4665,7 @@ struct _gestureModifier: ViewModifier { } #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(watchOS 11.0,visionOS 2.0,tvOS 18.0,macOS 15.0,iOS 18.0, *) + @available(macOS 15.0,watchOS 11.0,iOS 18.0,tvOS 18.0,visionOS 2.0, *) init(_ gesture: _AnyGesture,name: AttributeReference,isEnabled: AttributeReference = .init(storage: .constant(true)) ) { self.value = ._2(gesture: gesture, name: name, isEnabled: isEnabled) @@ -4747,7 +4700,7 @@ struct _gestureModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._2(gesture, name, isEnabled): - if #available(watchOS 11.0,visionOS 2.0,tvOS 18.0,macOS 15.0,iOS 18.0, *) { + if #available(macOS 15.0,watchOS 11.0,iOS 18.0,tvOS 18.0,visionOS 2.0, *) { let gesture = gesture as! _AnyGesture let name = name as! AttributeReference let isEnabled = isEnabled as! AttributeReference @@ -5089,7 +5042,7 @@ struct _groupBoxStyleModifier: ViewModifier { #if os(iOS) || os(macOS) || os(visionOS) - @available(iOS 14.0,macOS 11.0,visionOS 1.0, *) + @available(iOS 14.0,visionOS 1.0,macOS 11.0, *) init(_ style: AnyGroupBoxStyle) { self.value = ._0(style: style) @@ -5102,7 +5055,7 @@ struct _groupBoxStyleModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(visionOS) case let ._0(style): - if #available(iOS 14.0,macOS 11.0,visionOS 1.0, *) { + if #available(iOS 14.0,visionOS 1.0,macOS 11.0, *) { let style = style as! AnyGroupBoxStyle __content @@ -5136,7 +5089,7 @@ struct _handGestureShortcutModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(watchOS) - @available(watchOS 11.0,tvOS 18.0,iOS 18.0,macOS 15.0, *) + @available(macOS 15.0,iOS 18.0,watchOS 11.0,tvOS 18.0, *) init(_ shortcut: SwiftUI.HandGestureShortcut,isEnabled: AttributeReference = .init(storage: .constant(true)) ) { self.value = ._0(shortcut: shortcut, isEnabled: isEnabled) @@ -5149,7 +5102,7 @@ struct _handGestureShortcutModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(watchOS) case let ._0(shortcut, isEnabled): - if #available(watchOS 11.0,tvOS 18.0,iOS 18.0,macOS 15.0, *) { + if #available(macOS 15.0,iOS 18.0,watchOS 11.0,tvOS 18.0, *) { let shortcut = shortcut as! SwiftUI.HandGestureShortcut let isEnabled = isEnabled as! AttributeReference @@ -5442,7 +5395,7 @@ struct _highPriorityGestureModifier: ViewModifier { } #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(watchOS 11.0,visionOS 2.0,tvOS 18.0,macOS 15.0,iOS 18.0, *) + @available(macOS 15.0,watchOS 11.0,iOS 18.0,tvOS 18.0,visionOS 2.0, *) init(_ gesture: _AnyGesture,name: AttributeReference,isEnabled: AttributeReference = .init(storage: .constant(true)) ) { self.value = ._2(gesture: gesture, name: name, isEnabled: isEnabled) @@ -5477,7 +5430,7 @@ struct _highPriorityGestureModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._2(gesture, name, isEnabled): - if #available(watchOS 11.0,visionOS 2.0,tvOS 18.0,macOS 15.0,iOS 18.0, *) { + if #available(macOS 15.0,watchOS 11.0,iOS 18.0,tvOS 18.0,visionOS 2.0, *) { let gesture = gesture as! _AnyGesture let name = name as! AttributeReference let isEnabled = isEnabled as! AttributeReference @@ -5565,14 +5518,14 @@ struct _hoverEffectModifier: ViewModifier { #if os(iOS) || os(tvOS) || os(visionOS) - @available(visionOS 1.0,tvOS 16.0,iOS 13.4, *) + @available(iOS 13.4,visionOS 1.0,tvOS 16.0, *) init(_ effect: SwiftUI.HoverEffect = .automatic ) { self.value = ._0(effect: effect) } #endif #if os(iOS) || os(tvOS) || os(visionOS) - @available(visionOS 1.0,iOS 17.0,tvOS 17.0, *) + @available(iOS 17.0,visionOS 1.0,tvOS 17.0, *) init(_ effect: SwiftUI.HoverEffect = .automatic, isEnabled: AttributeReference = .init(storage: .constant(true)) ) { self.value = ._1(effect: effect, isEnabled: isEnabled) @@ -5585,7 +5538,7 @@ struct _hoverEffectModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(tvOS) || os(visionOS) case let ._0(effect): - if #available(visionOS 1.0,tvOS 16.0,iOS 13.4, *) { + if #available(iOS 13.4,visionOS 1.0,tvOS 16.0, *) { let effect = effect as! SwiftUI.HoverEffect __content @@ -5596,7 +5549,7 @@ struct _hoverEffectModifier: ViewModifier { #endif #if os(iOS) || os(tvOS) || os(visionOS) case let ._1(effect, isEnabled): - if #available(visionOS 1.0,iOS 17.0,tvOS 17.0, *) { + if #available(iOS 17.0,visionOS 1.0,tvOS 17.0, *) { let effect = effect as! SwiftUI.HoverEffect let isEnabled = isEnabled as! AttributeReference @@ -5631,7 +5584,7 @@ struct _hoverEffectDisabledModifier: ViewModifier { #if os(iOS) || os(tvOS) || os(visionOS) - @available(visionOS 1.0,iOS 17.0,tvOS 17.0, *) + @available(iOS 17.0,visionOS 1.0,tvOS 17.0, *) init(_ disabled: AttributeReference = .init(storage: .constant(true)) ) { self.value = ._0(disabled: disabled) @@ -5644,7 +5597,7 @@ struct _hoverEffectDisabledModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(tvOS) || os(visionOS) case let ._0(disabled): - if #available(visionOS 1.0,iOS 17.0,tvOS 17.0, *) { + if #available(iOS 17.0,visionOS 1.0,tvOS 17.0, *) { let disabled = disabled as! AttributeReference __content @@ -5961,7 +5914,7 @@ struct _indexViewStyleModifier: ViewModifier { #if os(iOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(tvOS 14.0,iOS 14.0,visionOS 1.0,watchOS 8.0, *) + @available(watchOS 8.0,iOS 14.0,tvOS 14.0,visionOS 1.0, *) init(_ style: AnyIndexViewStyle) { self.value = ._0(style: style) @@ -5974,7 +5927,7 @@ struct _indexViewStyleModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(style): - if #available(tvOS 14.0,iOS 14.0,visionOS 1.0,watchOS 8.0, *) { + if #available(watchOS 8.0,iOS 14.0,tvOS 14.0,visionOS 1.0, *) { let style = style as! AnyIndexViewStyle __content @@ -6221,7 +6174,7 @@ struct _invalidatableContentModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(macOS 14.0,iOS 17.0,tvOS 17.0,watchOS 10.0,visionOS 1.0, *) + @available(macOS 14.0,watchOS 10.0,visionOS 1.0,iOS 17.0,tvOS 17.0, *) init(_ invalidatable: AttributeReference = .init(storage: .constant(true)) ) { self.value = ._0(invalidatable: invalidatable) @@ -6234,7 +6187,7 @@ struct _invalidatableContentModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(invalidatable): - if #available(macOS 14.0,iOS 17.0,tvOS 17.0,watchOS 10.0,visionOS 1.0, *) { + if #available(macOS 14.0,watchOS 10.0,visionOS 1.0,iOS 17.0,tvOS 17.0, *) { let invalidatable = invalidatable as! AttributeReference __content @@ -6283,28 +6236,28 @@ struct _keyboardShortcutModifier: ViewModifier { #if os(iOS) || os(macOS) || os(visionOS) - @available(macOS 11.0,visionOS 1.0,iOS 14.0, *) + @available(iOS 14.0,macOS 11.0,visionOS 1.0, *) init(_ key: SwiftUI.KeyEquivalent,modifiers: SwiftUICore.EventModifiers = .command ) { self.value = ._0(key: key, modifiers: modifiers) } #endif #if os(iOS) || os(macOS) || os(visionOS) - @available(macOS 11.0,visionOS 1.0,iOS 14.0, *) + @available(iOS 14.0,macOS 11.0,visionOS 1.0, *) init(_ shortcut: SwiftUI.KeyboardShortcut) { self.value = ._1(shortcut: shortcut) } #endif #if os(iOS) || os(macOS) || os(visionOS) - @available(macOS 12.3,visionOS 1.0,iOS 15.4, *) + @available(visionOS 1.0,iOS 15.4,macOS 12.3, *) init(_ shortcut: SwiftUI.KeyboardShortcut?) { self.value = ._2(shortcut: shortcut) } #endif #if os(iOS) || os(macOS) || os(visionOS) - @available(iOS 15.0,macOS 12.0,visionOS 1.0, *) + @available(visionOS 1.0,iOS 15.0,macOS 12.0, *) init(_ key: SwiftUI.KeyEquivalent,modifiers: SwiftUICore.EventModifiers = .command, localization: SwiftUI.KeyboardShortcut.Localization) { self.value = ._3(key: key, modifiers: modifiers, localization: localization) @@ -6317,7 +6270,7 @@ struct _keyboardShortcutModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(visionOS) case let ._0(key, modifiers): - if #available(macOS 11.0,visionOS 1.0,iOS 14.0, *) { + if #available(iOS 14.0,macOS 11.0,visionOS 1.0, *) { let key = key as! SwiftUI.KeyEquivalent let modifiers = modifiers as! SwiftUICore.EventModifiers @@ -6329,7 +6282,7 @@ let modifiers = modifiers as! SwiftUICore.EventModifiers #endif #if os(iOS) || os(macOS) || os(visionOS) case let ._1(shortcut): - if #available(macOS 11.0,visionOS 1.0,iOS 14.0, *) { + if #available(iOS 14.0,macOS 11.0,visionOS 1.0, *) { let shortcut = shortcut as! SwiftUI.KeyboardShortcut __content @@ -6340,7 +6293,7 @@ let modifiers = modifiers as! SwiftUICore.EventModifiers #endif #if os(iOS) || os(macOS) || os(visionOS) case let ._2(shortcut): - if #available(macOS 12.3,visionOS 1.0,iOS 15.4, *) { + if #available(visionOS 1.0,iOS 15.4,macOS 12.3, *) { let shortcut = shortcut as? SwiftUI.KeyboardShortcut __content @@ -6351,7 +6304,7 @@ let modifiers = modifiers as! SwiftUICore.EventModifiers #endif #if os(iOS) || os(macOS) || os(visionOS) case let ._3(key, modifiers, localization): - if #available(iOS 15.0,macOS 12.0,visionOS 1.0, *) { + if #available(visionOS 1.0,iOS 15.0,macOS 12.0, *) { let key = key as! SwiftUI.KeyEquivalent let modifiers = modifiers as! SwiftUICore.EventModifiers let localization = localization as! SwiftUI.KeyboardShortcut.Localization @@ -6387,7 +6340,7 @@ struct _keyboardTypeModifier: ViewModifier { #if os(iOS) || os(tvOS) || os(visionOS) - @available(iOS 13.0,tvOS 13.0,visionOS 1.0, *) + @available(iOS 13.0,visionOS 1.0,tvOS 13.0, *) init(_ type: UIKit.UIKeyboardType) { self.value = ._0(type: type) @@ -6400,7 +6353,7 @@ struct _keyboardTypeModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(tvOS) || os(visionOS) case let ._0(type): - if #available(iOS 13.0,tvOS 13.0,visionOS 1.0, *) { + if #available(iOS 13.0,visionOS 1.0,tvOS 13.0, *) { let type = type as! UIKit.UIKeyboardType __content @@ -6575,7 +6528,7 @@ struct _labelsVisibilityModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(visionOS 2.0,iOS 18.0,tvOS 18.0,watchOS 11.0,macOS 15.0, *) + @available(macOS 15.0,iOS 18.0,visionOS 2.0,watchOS 11.0,tvOS 18.0, *) init(_ visibility: AttributeReference) { self.value = ._0(visibility: visibility) @@ -6588,7 +6541,7 @@ struct _labelsVisibilityModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(visibility): - if #available(visionOS 2.0,iOS 18.0,tvOS 18.0,watchOS 11.0,macOS 15.0, *) { + if #available(macOS 15.0,iOS 18.0,visionOS 2.0,watchOS 11.0,tvOS 18.0, *) { let visibility = visibility as! AttributeReference __content @@ -7160,7 +7113,7 @@ struct _listRowSeparatorModifier: ViewModifier { #if os(iOS) || os(macOS) || os(visionOS) - @available(iOS 15.0,macOS 13.0,visionOS 1.0, *) + @available(visionOS 1.0,iOS 15.0,macOS 13.0, *) init(_ visibility: AttributeReference,edges: SwiftUICore.VerticalEdge.Set = .all ) { self.value = ._0(visibility: visibility, edges: edges) @@ -7173,7 +7126,7 @@ struct _listRowSeparatorModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(visionOS) case let ._0(visibility, edges): - if #available(iOS 15.0,macOS 13.0,visionOS 1.0, *) { + if #available(visionOS 1.0,iOS 15.0,macOS 13.0, *) { let visibility = visibility as! AttributeReference let edges = edges as! SwiftUICore.VerticalEdge.Set @@ -7208,7 +7161,7 @@ struct _listRowSeparatorTintModifier: ViewModifier { #if os(iOS) || os(macOS) || os(visionOS) - @available(iOS 15.0,macOS 13.0,visionOS 1.0, *) + @available(visionOS 1.0,iOS 15.0,macOS 13.0, *) init(_ color: Color.Resolvable?,edges: SwiftUICore.VerticalEdge.Set = .all ) { self.value = ._0(color: color, edges: edges) @@ -7221,7 +7174,7 @@ struct _listRowSeparatorTintModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(visionOS) case let ._0(color, edges): - if #available(iOS 15.0,macOS 13.0,visionOS 1.0, *) { + if #available(visionOS 1.0,iOS 15.0,macOS 13.0, *) { let color = color as? Color.Resolvable let edges = edges as! SwiftUICore.VerticalEdge.Set @@ -7303,7 +7256,7 @@ struct _listSectionSeparatorModifier: ViewModifier { #if os(iOS) || os(macOS) || os(visionOS) - @available(visionOS 1.0,macOS 13.0,iOS 15.0, *) + @available(visionOS 1.0,iOS 15.0,macOS 13.0, *) init(_ visibility: AttributeReference,edges: SwiftUICore.VerticalEdge.Set = .all ) { self.value = ._0(visibility: visibility, edges: edges) @@ -7316,7 +7269,7 @@ struct _listSectionSeparatorModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(visionOS) case let ._0(visibility, edges): - if #available(visionOS 1.0,macOS 13.0,iOS 15.0, *) { + if #available(visionOS 1.0,iOS 15.0,macOS 13.0, *) { let visibility = visibility as! AttributeReference let edges = edges as! SwiftUICore.VerticalEdge.Set @@ -7351,7 +7304,7 @@ struct _listSectionSeparatorTintModifier: ViewModifier { #if os(iOS) || os(macOS) || os(visionOS) - @available(visionOS 1.0,macOS 13.0,iOS 15.0, *) + @available(visionOS 1.0,iOS 15.0,macOS 13.0, *) init(_ color: Color.Resolvable?,edges: SwiftUICore.VerticalEdge.Set = .all ) { self.value = ._0(color: color, edges: edges) @@ -7364,7 +7317,7 @@ struct _listSectionSeparatorTintModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(visionOS) case let ._0(color, edges): - if #available(visionOS 1.0,macOS 13.0,iOS 15.0, *) { + if #available(visionOS 1.0,iOS 15.0,macOS 13.0, *) { let color = color as? Color.Resolvable let edges = edges as! SwiftUICore.VerticalEdge.Set @@ -7563,7 +7516,7 @@ struct _materialActiveAppearanceModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(visionOS 2.0,iOS 18.0,macOS 15.0,watchOS 11.0,tvOS 18.0, *) + @available(visionOS 2.0,watchOS 11.0,iOS 18.0,tvOS 18.0,macOS 15.0, *) init(_ appearance: SwiftUICore.MaterialActiveAppearance) { self.value = ._0(appearance: appearance) @@ -7576,7 +7529,7 @@ struct _materialActiveAppearanceModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(appearance): - if #available(visionOS 2.0,iOS 18.0,macOS 15.0,watchOS 11.0,tvOS 18.0, *) { + if #available(visionOS 2.0,watchOS 11.0,iOS 18.0,tvOS 18.0,macOS 15.0, *) { let appearance = appearance as! SwiftUICore.MaterialActiveAppearance __content @@ -7610,7 +7563,7 @@ struct _menuIndicatorModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) - @available(macOS 12.0,iOS 15.0,tvOS 17.0,visionOS 1.0, *) + @available(tvOS 17.0,iOS 15.0,macOS 12.0,visionOS 1.0, *) init(_ visibility: AttributeReference) { self.value = ._0(visibility: visibility) @@ -7623,7 +7576,7 @@ struct _menuIndicatorModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) case let ._0(visibility): - if #available(macOS 12.0,iOS 15.0,tvOS 17.0,visionOS 1.0, *) { + if #available(tvOS 17.0,iOS 15.0,macOS 12.0,visionOS 1.0, *) { let visibility = visibility as! AttributeReference __content @@ -7704,7 +7657,7 @@ struct _menuStyleModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) - @available(macOS 11.0,iOS 14.0,tvOS 17.0,visionOS 1.0, *) + @available(iOS 14.0,tvOS 17.0,visionOS 1.0,macOS 11.0, *) init(_ style: AnyMenuStyle) { self.value = ._0(style: style) @@ -7717,7 +7670,7 @@ struct _menuStyleModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) case let ._0(style): - if #available(macOS 11.0,iOS 14.0,tvOS 17.0,visionOS 1.0, *) { + if #available(iOS 14.0,tvOS 17.0,visionOS 1.0,macOS 11.0, *) { let style = style as! AnyMenuStyle __content @@ -7798,7 +7751,7 @@ struct _modifierKeyAlternateModifier: ViewModifier { #if os(macOS) || os(visionOS) - @available(macOS 15.0,visionOS 1.0, *) + @available(visionOS 1.0,macOS 15.0, *) init(_ modifiers: SwiftUICore.EventModifiers,_ alternate: ViewReference=ViewReference(value: [])) { self.value = ._0(modifiers: modifiers, alternate: alternate) @@ -7811,7 +7764,7 @@ struct _modifierKeyAlternateModifier: ViewModifier { fatalError("unreachable") #if os(macOS) || os(visionOS) case let ._0(modifiers, alternate): - if #available(macOS 15.0,visionOS 1.0, *) { + if #available(visionOS 1.0,macOS 15.0, *) { let modifiers = modifiers as! SwiftUICore.EventModifiers let alternate = alternate as! ViewReference @@ -7987,7 +7940,7 @@ struct _navigationBarHiddenModifier: ViewModifier { #if os(iOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(iOS 13.0,visionOS 1.0,macOS 13.0,tvOS 13.0,watchOS 6.0, *) + @available(macOS 13.0,iOS 13.0,visionOS 1.0,watchOS 6.0,tvOS 13.0, *) init(_ hidden: AttributeReference) { self.value = ._0(hidden: hidden) @@ -8000,7 +7953,7 @@ struct _navigationBarHiddenModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(hidden): - if #available(iOS 13.0,visionOS 1.0,macOS 13.0,tvOS 13.0,watchOS 6.0, *) { + if #available(macOS 13.0,iOS 13.0,visionOS 1.0,watchOS 6.0,tvOS 13.0, *) { let hidden = hidden as! AttributeReference __content @@ -8044,14 +7997,14 @@ struct _navigationBarItemsModifier: ViewModifier { #if os(iOS) || os(tvOS) || os(visionOS) - @available(visionOS 1.0,iOS 16.0,tvOS 16.0, *) + @available(iOS 16.0,tvOS 16.0,visionOS 1.0, *) init(leading: InlineViewReference,trailing: InlineViewReference) { self.value = ._0(leading: leading, trailing: trailing) } #endif #if os(iOS) || os(tvOS) || os(visionOS) - @available(visionOS 1.0,iOS 16.0,tvOS 16.0, *) + @available(iOS 16.0,tvOS 16.0,visionOS 1.0, *) init(leading: InlineViewReference) { self.value = ._1(leading: leading) @@ -8071,7 +8024,7 @@ struct _navigationBarItemsModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(tvOS) || os(visionOS) case let ._0(leading, trailing): - if #available(visionOS 1.0,iOS 16.0,tvOS 16.0, *) { + if #available(iOS 16.0,tvOS 16.0,visionOS 1.0, *) { let leading = leading as! InlineViewReference let trailing = trailing as! InlineViewReference @@ -8083,7 +8036,7 @@ let trailing = trailing as! InlineViewReference #endif #if os(iOS) || os(tvOS) || os(visionOS) case let ._1(leading): - if #available(visionOS 1.0,iOS 16.0,tvOS 16.0, *) { + if #available(iOS 16.0,tvOS 16.0,visionOS 1.0, *) { let leading = leading as! InlineViewReference __content @@ -8153,42 +8106,42 @@ struct _navigationBarTitleModifier: ViewModifier { #if os(iOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(iOS 13.0,visionOS 1.0,macOS 13.0,tvOS 13.0,watchOS 6.0, *) + @available(macOS 13.0,iOS 13.0,visionOS 1.0,watchOS 6.0,tvOS 13.0, *) init(_ title: TextReference) { self.value = ._0(title: title) } #endif #if os(iOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(macOS 13.0,tvOS 13.0,iOS 13.0,visionOS 1.0,watchOS 6.0, *) + @available(macOS 13.0,iOS 13.0,visionOS 1.0,watchOS 6.0,tvOS 13.0, *) init(_ titleKey: SwiftUICore.LocalizedStringKey) { self.value = ._1(titleKey: titleKey) } #endif #if os(iOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(macOS 13.0,tvOS 13.0,iOS 13.0,visionOS 1.0,watchOS 6.0, *) + @available(macOS 13.0,iOS 13.0,visionOS 1.0,watchOS 6.0,tvOS 13.0, *) init(_ title: AttributeReference) { self.value = ._2(title: title) } #endif #if os(iOS) || os(visionOS) - @available(macOS 13.0,tvOS 13.0,iOS 13.0,visionOS 1.0,watchOS 6.0, *) + @available(macOS 13.0,iOS 13.0,visionOS 1.0,watchOS 6.0,tvOS 13.0, *) init(_ title: TextReference,displayMode: SwiftUI.NavigationBarItem.TitleDisplayMode) { self.value = ._3(title: title, displayMode: displayMode) } #endif #if os(iOS) || os(visionOS) - @available(tvOS 13.0,iOS 13.0,macOS 13.0,watchOS 6.0,visionOS 1.0, *) + @available(macOS 13.0,iOS 13.0,visionOS 1.0,watchOS 6.0,tvOS 13.0, *) init(_ titleKey: SwiftUICore.LocalizedStringKey,displayMode: SwiftUI.NavigationBarItem.TitleDisplayMode) { self.value = ._4(titleKey: titleKey, displayMode: displayMode) } #endif #if os(iOS) || os(visionOS) - @available(iOS 13.0,visionOS 1.0,macOS 13.0,tvOS 13.0,watchOS 6.0, *) + @available(macOS 13.0,iOS 13.0,visionOS 1.0,watchOS 6.0,tvOS 13.0, *) init(_ title: AttributeReference,displayMode: SwiftUI.NavigationBarItem.TitleDisplayMode) { self.value = ._5(title: title, displayMode: displayMode) @@ -8201,7 +8154,7 @@ struct _navigationBarTitleModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(title): - if #available(iOS 13.0,visionOS 1.0,macOS 13.0,tvOS 13.0,watchOS 6.0, *) { + if #available(macOS 13.0,iOS 13.0,visionOS 1.0,watchOS 6.0,tvOS 13.0, *) { let title = title as! TextReference __content._observeTextReference(title, on: element, in: context) { __content in __content @@ -8212,7 +8165,7 @@ struct _navigationBarTitleModifier: ViewModifier { #endif #if os(iOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._1(titleKey): - if #available(macOS 13.0,tvOS 13.0,iOS 13.0,visionOS 1.0,watchOS 6.0, *) { + if #available(macOS 13.0,iOS 13.0,visionOS 1.0,watchOS 6.0,tvOS 13.0, *) { let titleKey = titleKey as! SwiftUICore.LocalizedStringKey __content @@ -8223,7 +8176,7 @@ struct _navigationBarTitleModifier: ViewModifier { #endif #if os(iOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._2(title): - if #available(macOS 13.0,tvOS 13.0,iOS 13.0,visionOS 1.0,watchOS 6.0, *) { + if #available(macOS 13.0,iOS 13.0,visionOS 1.0,watchOS 6.0,tvOS 13.0, *) { let title = title as! AttributeReference __content @@ -8234,7 +8187,7 @@ struct _navigationBarTitleModifier: ViewModifier { #endif #if os(iOS) || os(visionOS) case let ._3(title, displayMode): - if #available(macOS 13.0,tvOS 13.0,iOS 13.0,visionOS 1.0,watchOS 6.0, *) { + if #available(macOS 13.0,iOS 13.0,visionOS 1.0,watchOS 6.0,tvOS 13.0, *) { let title = title as! TextReference let displayMode = displayMode as! SwiftUI.NavigationBarItem.TitleDisplayMode __content._observeTextReference(title, on: element, in: context) { __content in @@ -8246,7 +8199,7 @@ let displayMode = displayMode as! SwiftUI.NavigationBarItem.TitleDisplayMode #endif #if os(iOS) || os(visionOS) case let ._4(titleKey, displayMode): - if #available(tvOS 13.0,iOS 13.0,macOS 13.0,watchOS 6.0,visionOS 1.0, *) { + if #available(macOS 13.0,iOS 13.0,visionOS 1.0,watchOS 6.0,tvOS 13.0, *) { let titleKey = titleKey as! SwiftUICore.LocalizedStringKey let displayMode = displayMode as! SwiftUI.NavigationBarItem.TitleDisplayMode @@ -8258,7 +8211,7 @@ let displayMode = displayMode as! SwiftUI.NavigationBarItem.TitleDisplayMode #endif #if os(iOS) || os(visionOS) case let ._5(title, displayMode): - if #available(iOS 13.0,visionOS 1.0,macOS 13.0,tvOS 13.0,watchOS 6.0, *) { + if #available(macOS 13.0,iOS 13.0,visionOS 1.0,watchOS 6.0,tvOS 13.0, *) { let title = title as! AttributeReference let displayMode = displayMode as! SwiftUI.NavigationBarItem.TitleDisplayMode @@ -8528,7 +8481,7 @@ struct _navigationSubtitleModifier: ViewModifier { } #endif #if os(macOS) || targetEnvironment(macCatalyst) - @available(macOS 11.0,macCatalyst 14.0, *) + @available(macCatalyst 14.0,macOS 11.0, *) init(_ subtitle: AttributeReference) { self.value = ._2(subtitle: subtitle) @@ -8563,7 +8516,7 @@ struct _navigationSubtitleModifier: ViewModifier { #endif #if os(macOS) || targetEnvironment(macCatalyst) case let ._2(subtitle): - if #available(macOS 11.0,macCatalyst 14.0, *) { + if #available(macCatalyst 14.0,macOS 11.0, *) { let subtitle = subtitle as! AttributeReference __content @@ -8638,7 +8591,7 @@ struct _navigationTitleModifier: ViewModifier { } #if os(watchOS) - @available(iOS 14.0,macOS 11.0,tvOS 14.0,watchOS 7.0, *) + @available(tvOS 14.0,watchOS 7.0,macOS 11.0,iOS 14.0, *) init(_ title: ViewReference=ViewReference(value: [])) { self.value = ._3(title: title) @@ -8691,7 +8644,7 @@ struct _navigationTitleModifier: ViewModifier { #if os(watchOS) case let ._3(title): - if #available(iOS 14.0,macOS 11.0,tvOS 14.0,watchOS 7.0, *) { + if #available(tvOS 14.0,watchOS 7.0,macOS 11.0,iOS 14.0, *) { let title = title as! ViewReference __content @@ -8711,53 +8664,6 @@ struct _navigationTitleModifier: ViewModifier { - } - } -} -@_documentation(visibility: public) -@ParseableExpression -struct _navigationViewStyleModifier: ViewModifier { - static var name: String { "navigationViewStyle" } - - enum Value { - case _never - - indirect case _0(style: AnyNavigationViewStyle) - - } - - let value: Value - - - - - - - - - - - init(_ style: AnyNavigationViewStyle) { - self.value = ._0(style: style) - - } - - - func body(content __content: Content) -> some View { - switch value { - case ._never: - fatalError("unreachable") - - case let ._0(style): - - - - __content - .navigationViewStyle(style) - - - - } } } @@ -9017,7 +8923,7 @@ struct _onExitCommandModifier: ViewModifier { @Event private var _0_action__0: Event.EventHandler #if os(macOS) || os(tvOS) - @available(tvOS 13.0,macOS 10.15, *) + @available(macOS 10.15,tvOS 13.0, *) init(perform action__0: Event=Event()) { self.value = ._0 self.__0_action__0 = action__0 @@ -9030,7 +8936,7 @@ struct _onExitCommandModifier: ViewModifier { fatalError("unreachable") #if os(macOS) || os(tvOS) case ._0: - if #available(tvOS 13.0,macOS 10.15, *) { + if #available(macOS 10.15,tvOS 13.0, *) { __content @@ -9064,7 +8970,7 @@ struct _onHoverModifier: ViewModifier { @Event private var _0_action__1: Event.EventHandler #if os(iOS) || os(macOS) || os(visionOS) - @available(iOS 13.4,macOS 10.15,visionOS 1.0, *) + @available(visionOS 1.0,iOS 13.4,macOS 10.15, *) init(perform action__1: Event) { self.value = ._0 self.__0_action__1 = action__1 @@ -9077,7 +8983,7 @@ struct _onHoverModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(visionOS) case ._0: - if #available(iOS 13.4,macOS 10.15,visionOS 1.0, *) { + if #available(visionOS 1.0,iOS 13.4,macOS 10.15, *) { __content @@ -9177,7 +9083,7 @@ struct _onLongPressGestureModifier: ViewModifier { @Event private var _3_action__0: Event.EventHandler #if os(iOS) || os(macOS) || os(visionOS) || os(watchOS) - @available(watchOS 6.0,tvOS 14.0,iOS 13.0,macOS 10.15,visionOS 1.0, *) + @available(watchOS 6.0,macOS 10.15,iOS 13.0,tvOS 14.0,visionOS 1.0, *) init(minimumDuration: AttributeReference = .init(storage: .constant(0.5)), maximumDistance: AttributeReference = .init(storage: .constant(10)), perform action__0: Event,onPressingChanged onPressingChanged__1: Event=Event() ) { self.value = ._0(minimumDuration: minimumDuration, maximumDistance: maximumDistance) self.__0_action__0 = action__0 @@ -9185,7 +9091,7 @@ self.__0_onPressingChanged__1 = onPressingChanged__1 } #endif #if os(tvOS) - @available(macOS 10.15,tvOS 14.0,iOS 13.0,watchOS 6.0, *) + @available(watchOS 6.0,macOS 10.15,iOS 13.0,tvOS 14.0, *) init(minimumDuration: AttributeReference = .init(storage: .constant(0.5)), perform action__0: Event,onPressingChanged onPressingChanged__1: Event=Event() ) { self.value = ._1(minimumDuration: minimumDuration) self.__1_action__0 = action__0 @@ -9193,7 +9099,7 @@ self.__1_onPressingChanged__1 = onPressingChanged__1 } #endif #if os(iOS) || os(macOS) || os(visionOS) || os(watchOS) - @available(macOS 10.15,tvOS 14.0,iOS 13.0,watchOS 6.0,visionOS 1.0, *) + @available(macOS 10.15,iOS 13.0,tvOS 14.0,visionOS 1.0,watchOS 6.0, *) init(minimumDuration: AttributeReference = .init(storage: .constant(0.5)), maximumDistance: AttributeReference = .init(storage: .constant(10)), pressing pressing__1: Event=Event(), perform action__0: Event) { self.value = ._2(minimumDuration: minimumDuration, maximumDistance: maximumDistance) self.__2_pressing__1 = pressing__1 @@ -9201,7 +9107,7 @@ self.__2_action__0 = action__0 } #endif #if os(tvOS) - @available(macOS 10.15,tvOS 14.0,iOS 13.0,watchOS 6.0, *) + @available(macOS 10.15,iOS 13.0,tvOS 14.0,watchOS 6.0, *) init(minimumDuration: AttributeReference = .init(storage: .constant(0.5)), pressing pressing__1: Event=Event(), perform action__0: Event) { self.value = ._3(minimumDuration: minimumDuration) self.__3_pressing__1 = pressing__1 @@ -9215,7 +9121,7 @@ self.__3_action__0 = action__0 fatalError("unreachable") #if os(iOS) || os(macOS) || os(visionOS) || os(watchOS) case let ._0(minimumDuration, maximumDistance): - if #available(watchOS 6.0,tvOS 14.0,iOS 13.0,macOS 10.15,visionOS 1.0, *) { + if #available(watchOS 6.0,macOS 10.15,iOS 13.0,tvOS 14.0,visionOS 1.0, *) { let minimumDuration = minimumDuration as! AttributeReference let maximumDistance = maximumDistance as! AttributeReference @@ -9227,7 +9133,7 @@ let maximumDistance = maximumDistance as! AttributeReference __content @@ -9238,7 +9144,7 @@ let maximumDistance = maximumDistance as! AttributeReference let maximumDistance = maximumDistance as! AttributeReference @@ -9250,7 +9156,7 @@ let maximumDistance = maximumDistance as! AttributeReference __content @@ -9381,7 +9287,7 @@ struct _onMoveCommandModifier: ViewModifier { @Event private var _0_action__1: Event.EventHandler #if os(macOS) || os(tvOS) - @available(tvOS 13.0,macOS 10.15, *) + @available(macOS 10.15,tvOS 13.0, *) init(perform action__1: Event=Event()) { self.value = ._0 self.__0_action__1 = action__1 @@ -9394,7 +9300,7 @@ struct _onMoveCommandModifier: ViewModifier { fatalError("unreachable") #if os(macOS) || os(tvOS) case ._0: - if #available(tvOS 13.0,macOS 10.15, *) { + if #available(macOS 10.15,tvOS 13.0, *) { __content @@ -9428,7 +9334,7 @@ struct _onPencilDoubleTapModifier: ViewModifier { @Event private var _0_action__1: Event.EventHandler #if os(iOS) || os(macOS) - @available(macOS 14.5,iOS 17.5, *) + @available(iOS 17.5,macOS 14.5, *) init(perform action__1: Event) { self.value = ._0 self.__0_action__1 = action__1 @@ -9441,7 +9347,7 @@ struct _onPencilDoubleTapModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) case ._0: - if #available(macOS 14.5,iOS 17.5, *) { + if #available(iOS 17.5,macOS 14.5, *) { __content @@ -9475,7 +9381,7 @@ struct _onPencilSqueezeModifier: ViewModifier { @Event private var _0_action__1: Event.EventHandler #if os(iOS) || os(macOS) - @available(macOS 14.5,iOS 17.5, *) + @available(iOS 17.5,macOS 14.5, *) init(perform action__1: Event) { self.value = ._0 self.__0_action__1 = action__1 @@ -9488,7 +9394,7 @@ struct _onPencilSqueezeModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) case ._0: - if #available(macOS 14.5,iOS 17.5, *) { + if #available(iOS 17.5,macOS 14.5, *) { __content @@ -9522,7 +9428,7 @@ struct _onPlayPauseCommandModifier: ViewModifier { @Event private var _0_action__0: Event.EventHandler #if os(tvOS) - @available(tvOS 13.0,macOS 10.15, *) + @available(macOS 10.15,tvOS 13.0, *) init(perform action__0: Event=Event()) { self.value = ._0 self.__0_action__0 = action__0 @@ -9535,7 +9441,7 @@ struct _onPlayPauseCommandModifier: ViewModifier { fatalError("unreachable") #if os(tvOS) case ._0: - if #available(tvOS 13.0,macOS 10.15, *) { + if #available(macOS 10.15,tvOS 13.0, *) { __content @@ -9569,7 +9475,7 @@ struct _onScrollPhaseChangeModifier: ViewModifier { @Event private var _0_action__2: Event.EventHandler #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(visionOS 2.0,iOS 18.0,tvOS 18.0,watchOS 11.0,macOS 15.0, *) + @available(macOS 15.0,iOS 18.0,visionOS 2.0,watchOS 11.0,tvOS 18.0, *) init(_ action__2: Event) { self.value = ._0 self.__0_action__2 = action__2 @@ -9582,7 +9488,7 @@ struct _onScrollPhaseChangeModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case ._0: - if #available(visionOS 2.0,iOS 18.0,tvOS 18.0,watchOS 11.0,macOS 15.0, *) { + if #available(macOS 15.0,iOS 18.0,visionOS 2.0,watchOS 11.0,tvOS 18.0, *) { __content @@ -9616,7 +9522,7 @@ struct _onScrollVisibilityChangeModifier: ViewModifier { @Event private var _0_action__1: Event.EventHandler #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(iOS 18.0,visionOS 2.0,macOS 15.0,tvOS 18.0,watchOS 11.0, *) + @available(macOS 15.0,visionOS 2.0,iOS 18.0,tvOS 18.0,watchOS 11.0, *) init(threshold: AttributeReference = .init(storage: .constant(0.5)), action action__1: Event) { self.value = ._0(threshold: threshold) self.__0_action__1 = action__1 @@ -9629,7 +9535,7 @@ struct _onScrollVisibilityChangeModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(threshold): - if #available(iOS 18.0,visionOS 2.0,macOS 15.0,tvOS 18.0,watchOS 11.0, *) { + if #available(macOS 15.0,visionOS 2.0,iOS 18.0,tvOS 18.0,watchOS 11.0, *) { let threshold = threshold as! AttributeReference __content @@ -9668,7 +9574,7 @@ struct _onTapGestureModifier: ViewModifier { @Event private var _1_action__0: Event.EventHandler #if os(iOS) || os(macOS) || os(visionOS) || os(watchOS) - @available(macOS 14.0,visionOS 1.0,iOS 17.0,watchOS 10.0, *) + @available(iOS 17.0,macOS 14.0,visionOS 1.0,watchOS 10.0, *) init(count: AttributeReference = .init(storage: .constant(1)), coordinateSpace: AnyCoordinateSpaceProtocol = .local, perform action__1: Event) { self.value = ._0(count: count, coordinateSpace: coordinateSpace) self.__0_action__1 = action__1 @@ -9688,7 +9594,7 @@ struct _onTapGestureModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(visionOS) || os(watchOS) case let ._0(count, coordinateSpace): - if #available(macOS 14.0,visionOS 1.0,iOS 17.0,watchOS 10.0, *) { + if #available(iOS 17.0,macOS 14.0,visionOS 1.0,watchOS 10.0, *) { let count = count as! AttributeReference let coordinateSpace = coordinateSpace as! AnyCoordinateSpaceProtocol @@ -10276,7 +10182,7 @@ struct _pointerStyleModifier: ViewModifier { #if os(macOS) || os(visionOS) - @available(macOS 15.0,visionOS 2.0, *) + @available(visionOS 2.0,macOS 15.0, *) init(_ style: SwiftUI.PointerStyle?) { self.value = ._0(style: style) @@ -10289,7 +10195,7 @@ struct _pointerStyleModifier: ViewModifier { fatalError("unreachable") #if os(macOS) || os(visionOS) case let ._0(style): - if #available(macOS 15.0,visionOS 2.0, *) { + if #available(visionOS 2.0,macOS 15.0, *) { let style = style as? SwiftUI.PointerStyle __content @@ -10375,14 +10281,14 @@ struct _popoverModifier: ViewModifier { #if os(iOS) || os(macOS) || os(visionOS) - @available(visionOS 1.0,macOS 10.15,iOS 13.0, *) + @available(visionOS 1.0,iOS 13.0,macOS 10.15, *) init(isPresented: ChangeTracked,attachmentAnchor: SwiftUI.PopoverAttachmentAnchor = .rect(.bounds), arrowEdge: SwiftUICore.Edge = .top, content: ViewReference=ViewReference(value: [])) { self.value = ._0(attachmentAnchor: attachmentAnchor, arrowEdge: arrowEdge, content: content) self.__0_isPresented = isPresented } #endif #if os(iOS) || os(macOS) || os(visionOS) - @available(visionOS 2.0,macOS 15.0,iOS 18.0, *) + @available(visionOS 2.0,iOS 18.0,macOS 15.0, *) init(isPresented: ChangeTracked,attachmentAnchor: SwiftUI.PopoverAttachmentAnchor = .rect(.bounds), content: ViewReference=ViewReference(value: [])) { self.value = ._1(attachmentAnchor: attachmentAnchor, content: content) self.__1_isPresented = isPresented @@ -10395,7 +10301,7 @@ struct _popoverModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(visionOS) case let ._0(attachmentAnchor, arrowEdge, content): - if #available(visionOS 1.0,macOS 10.15,iOS 13.0, *) { + if #available(visionOS 1.0,iOS 13.0,macOS 10.15, *) { let attachmentAnchor = attachmentAnchor as! SwiftUI.PopoverAttachmentAnchor let arrowEdge = arrowEdge as! SwiftUICore.Edge let content = content as! ViewReference @@ -10408,7 +10314,7 @@ let content = content as! ViewReference #endif #if os(iOS) || os(macOS) || os(visionOS) case let ._1(attachmentAnchor, content): - if #available(visionOS 2.0,macOS 15.0,iOS 18.0, *) { + if #available(visionOS 2.0,iOS 18.0,macOS 15.0, *) { let attachmentAnchor = attachmentAnchor as! SwiftUI.PopoverAttachmentAnchor let content = content as! ViewReference @@ -10612,14 +10518,14 @@ struct _presentationBackgroundModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(visionOS 1.0,iOS 16.4,tvOS 16.4,watchOS 9.4,macOS 13.3, *) + @available(visionOS 1.0,watchOS 9.4,iOS 16.4,tvOS 16.4,macOS 13.3, *) init(_ style: AnyShapeStyle.Resolvable) { self.value = ._0(style: style) } #endif #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(visionOS 1.0,iOS 16.4,tvOS 16.4,watchOS 9.4,macOS 13.3, *) + @available(macOS 13.3,watchOS 9.4,iOS 16.4,tvOS 16.4,visionOS 1.0, *) init(alignment: AttributeReference = .init(storage: .constant(.center)), content: ViewReference=ViewReference(value: [])) { self.value = ._1(alignment: alignment, content: content) @@ -10632,7 +10538,7 @@ struct _presentationBackgroundModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(style): - if #available(visionOS 1.0,iOS 16.4,tvOS 16.4,watchOS 9.4,macOS 13.3, *) { + if #available(visionOS 1.0,watchOS 9.4,iOS 16.4,tvOS 16.4,macOS 13.3, *) { let style = style as! AnyShapeStyle.Resolvable __content @@ -10643,7 +10549,7 @@ struct _presentationBackgroundModifier: ViewModifier { #endif #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._1(alignment, content): - if #available(visionOS 1.0,iOS 16.4,tvOS 16.4,watchOS 9.4,macOS 13.3, *) { + if #available(macOS 13.3,watchOS 9.4,iOS 16.4,tvOS 16.4,visionOS 1.0, *) { let alignment = alignment as! AttributeReference let content = content as! ViewReference @@ -10678,7 +10584,7 @@ struct _presentationBackgroundInteractionModifier: ViewModifier #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(macOS 13.3,tvOS 16.4,iOS 16.4,visionOS 1.0,watchOS 9.4, *) + @available(iOS 16.4,tvOS 16.4,macOS 13.3,watchOS 9.4,visionOS 1.0, *) init(_ interaction: SwiftUI.PresentationBackgroundInteraction) { self.value = ._0(interaction: interaction) @@ -10691,7 +10597,7 @@ struct _presentationBackgroundInteractionModifier: ViewModifier fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(interaction): - if #available(macOS 13.3,tvOS 16.4,iOS 16.4,visionOS 1.0,watchOS 9.4, *) { + if #available(iOS 16.4,tvOS 16.4,macOS 13.3,watchOS 9.4,visionOS 1.0, *) { let interaction = interaction as! SwiftUI.PresentationBackgroundInteraction __content @@ -10730,14 +10636,14 @@ struct _presentationCompactAdaptationModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(macOS 13.3,tvOS 16.4,iOS 16.4,visionOS 1.0,watchOS 9.4, *) + @available(tvOS 16.4,iOS 16.4,macOS 13.3,visionOS 1.0,watchOS 9.4, *) init(_ adaptation: SwiftUI.PresentationAdaptation) { self.value = ._0(adaptation: adaptation) } #endif #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(macOS 13.3,tvOS 16.4,iOS 16.4,visionOS 1.0,watchOS 9.4, *) + @available(iOS 16.4,macOS 13.3,watchOS 9.4,visionOS 1.0,tvOS 16.4, *) init(horizontal horizontalAdaptation: SwiftUI.PresentationAdaptation,vertical verticalAdaptation: SwiftUI.PresentationAdaptation) { self.value = ._1(horizontalAdaptation: horizontalAdaptation, verticalAdaptation: verticalAdaptation) @@ -10750,7 +10656,7 @@ struct _presentationCompactAdaptationModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(adaptation): - if #available(macOS 13.3,tvOS 16.4,iOS 16.4,visionOS 1.0,watchOS 9.4, *) { + if #available(tvOS 16.4,iOS 16.4,macOS 13.3,visionOS 1.0,watchOS 9.4, *) { let adaptation = adaptation as! SwiftUI.PresentationAdaptation __content @@ -10761,7 +10667,7 @@ struct _presentationCompactAdaptationModifier: ViewModifier { #endif #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._1(horizontalAdaptation, verticalAdaptation): - if #available(macOS 13.3,tvOS 16.4,iOS 16.4,visionOS 1.0,watchOS 9.4, *) { + if #available(iOS 16.4,macOS 13.3,watchOS 9.4,visionOS 1.0,tvOS 16.4, *) { let horizontalAdaptation = horizontalAdaptation as! SwiftUI.PresentationAdaptation let verticalAdaptation = verticalAdaptation as! SwiftUI.PresentationAdaptation @@ -10796,7 +10702,7 @@ struct _presentationContentInteractionModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(macOS 13.3,iOS 16.4,tvOS 16.4,watchOS 9.4,visionOS 1.0, *) + @available(iOS 16.4,macOS 13.3,watchOS 9.4,visionOS 1.0,tvOS 16.4, *) init(_ behavior: SwiftUI.PresentationContentInteraction) { self.value = ._0(behavior: behavior) @@ -10809,7 +10715,7 @@ struct _presentationContentInteractionModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(behavior): - if #available(macOS 13.3,iOS 16.4,tvOS 16.4,watchOS 9.4,visionOS 1.0, *) { + if #available(iOS 16.4,macOS 13.3,watchOS 9.4,visionOS 1.0,tvOS 16.4, *) { let behavior = behavior as! SwiftUI.PresentationContentInteraction __content @@ -10843,7 +10749,7 @@ struct _presentationCornerRadiusModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(macOS 13.3,iOS 16.4,tvOS 16.4,watchOS 9.4,visionOS 1.0, *) + @available(iOS 16.4,macOS 13.3,watchOS 9.4,visionOS 1.0,tvOS 16.4, *) init(_ cornerRadius: AttributeReference?) { self.value = ._0(cornerRadius: cornerRadius) @@ -10856,7 +10762,7 @@ struct _presentationCornerRadiusModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(cornerRadius): - if #available(macOS 13.3,iOS 16.4,tvOS 16.4,watchOS 9.4,visionOS 1.0, *) { + if #available(iOS 16.4,macOS 13.3,watchOS 9.4,visionOS 1.0,tvOS 16.4, *) { let cornerRadius = cornerRadius as? AttributeReference __content @@ -10937,7 +10843,7 @@ struct _presentationSizingModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(iOS 18.0,macOS 15.0,visionOS 2.0,watchOS 11.0,tvOS 18.0, *) + @available(watchOS 11.0,iOS 18.0,tvOS 18.0,visionOS 2.0,macOS 15.0, *) init(_ sizing: AnyPresentationSizing) { self.value = ._0(sizing: sizing) @@ -10950,7 +10856,7 @@ struct _presentationSizingModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(sizing): - if #available(iOS 18.0,macOS 15.0,visionOS 2.0,watchOS 11.0,tvOS 18.0, *) { + if #available(watchOS 11.0,iOS 18.0,tvOS 18.0,visionOS 2.0,macOS 15.0, *) { let sizing = sizing as! AnyPresentationSizing __content @@ -11313,7 +11219,7 @@ struct _replaceDisabledModifier: ViewModifier { #if os(iOS) || os(visionOS) - @available(visionOS 1.0,iOS 16.0, *) + @available(iOS 16.0,visionOS 1.0, *) init(_ isDisabled: AttributeReference = .init(storage: .constant(true)) ) { self.value = ._0(isDisabled: isDisabled) @@ -11326,7 +11232,7 @@ struct _replaceDisabledModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(visionOS) case let ._0(isDisabled): - if #available(visionOS 1.0,iOS 16.0, *) { + if #available(iOS 16.0,visionOS 1.0, *) { let isDisabled = isDisabled as! AttributeReference __content @@ -11487,21 +11393,21 @@ struct _safeAreaPaddingModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(iOS 17.0,tvOS 17.0,macOS 14.0,visionOS 1.0,watchOS 10.0, *) + @available(iOS 17.0,watchOS 10.0,tvOS 17.0,visionOS 1.0,macOS 14.0, *) init(_ insets: SwiftUICore.EdgeInsets) { self.value = ._0(insets: insets) } #endif #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(macOS 14.0,iOS 17.0,tvOS 17.0,watchOS 10.0,visionOS 1.0, *) + @available(iOS 17.0,watchOS 10.0,tvOS 17.0,visionOS 1.0,macOS 14.0, *) init(_ edges: SwiftUICore.Edge.Set = .all, _ length: AttributeReference? = .init(storage: .constant(nil)) ) { self.value = ._1(edges: edges, length: length) } #endif #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(macOS 14.0,iOS 17.0,tvOS 17.0,watchOS 10.0,visionOS 1.0, *) + @available(iOS 17.0,watchOS 10.0,tvOS 17.0,visionOS 1.0,macOS 14.0, *) init(_ length: AttributeReference) { self.value = ._2(length: length) @@ -11514,7 +11420,7 @@ struct _safeAreaPaddingModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(insets): - if #available(iOS 17.0,tvOS 17.0,macOS 14.0,visionOS 1.0,watchOS 10.0, *) { + if #available(iOS 17.0,watchOS 10.0,tvOS 17.0,visionOS 1.0,macOS 14.0, *) { let insets = insets as! SwiftUICore.EdgeInsets __content @@ -11525,7 +11431,7 @@ struct _safeAreaPaddingModifier: ViewModifier { #endif #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._1(edges, length): - if #available(macOS 14.0,iOS 17.0,tvOS 17.0,watchOS 10.0,visionOS 1.0, *) { + if #available(iOS 17.0,watchOS 10.0,tvOS 17.0,visionOS 1.0,macOS 14.0, *) { let edges = edges as! SwiftUICore.Edge.Set let length = length as? AttributeReference @@ -11537,7 +11443,7 @@ let length = length as? AttributeReference #endif #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._2(length): - if #available(macOS 14.0,iOS 17.0,tvOS 17.0,watchOS 10.0,visionOS 1.0, *) { + if #available(iOS 17.0,watchOS 10.0,tvOS 17.0,visionOS 1.0,macOS 14.0, *) { let length = length as! AttributeReference __content @@ -11949,7 +11855,7 @@ struct _scrollBounceBehaviorModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(visionOS 1.0,iOS 16.4,tvOS 16.4,watchOS 9.4,macOS 13.3, *) + @available(tvOS 16.4,iOS 16.4,macOS 13.3,visionOS 1.0,watchOS 9.4, *) init(_ behavior: SwiftUI.ScrollBounceBehavior,axes: SwiftUICore.Axis.Set = [.vertical] ) { self.value = ._0(behavior: behavior, axes: axes) @@ -11962,7 +11868,7 @@ struct _scrollBounceBehaviorModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(behavior, axes): - if #available(visionOS 1.0,iOS 16.4,tvOS 16.4,watchOS 9.4,macOS 13.3, *) { + if #available(tvOS 16.4,iOS 16.4,macOS 13.3,visionOS 1.0,watchOS 9.4, *) { let behavior = behavior as! SwiftUI.ScrollBounceBehavior let axes = axes as! SwiftUICore.Axis.Set @@ -11997,7 +11903,7 @@ struct _scrollClipDisabledModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(macOS 14.0,tvOS 17.0,iOS 17.0,visionOS 1.0,watchOS 10.0, *) + @available(macOS 14.0,iOS 17.0,visionOS 1.0,watchOS 10.0,tvOS 17.0, *) init(_ disabled: AttributeReference = .init(storage: .constant(true)) ) { self.value = ._0(disabled: disabled) @@ -12010,7 +11916,7 @@ struct _scrollClipDisabledModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(disabled): - if #available(macOS 14.0,tvOS 17.0,iOS 17.0,visionOS 1.0,watchOS 10.0, *) { + if #available(macOS 14.0,iOS 17.0,visionOS 1.0,watchOS 10.0,tvOS 17.0, *) { let disabled = disabled as! AttributeReference __content @@ -12044,7 +11950,7 @@ struct _scrollContentBackgroundModifier: ViewModifier { #if os(iOS) || os(macOS) || os(visionOS) || os(watchOS) - @available(watchOS 9.0,visionOS 1.0,macOS 13.0,iOS 16.0, *) + @available(macOS 13.0,iOS 16.0,visionOS 1.0,watchOS 9.0, *) init(_ visibility: AttributeReference) { self.value = ._0(visibility: visibility) @@ -12057,7 +11963,7 @@ struct _scrollContentBackgroundModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(visionOS) || os(watchOS) case let ._0(visibility): - if #available(watchOS 9.0,visionOS 1.0,macOS 13.0,iOS 16.0, *) { + if #available(macOS 13.0,iOS 16.0,visionOS 1.0,watchOS 9.0, *) { let visibility = visibility as! AttributeReference __content @@ -12138,7 +12044,7 @@ struct _scrollDismissesKeyboardModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(watchOS) - @available(macOS 13.0,tvOS 16.0,iOS 16.0,watchOS 9.0, *) + @available(macOS 13.0,iOS 16.0,watchOS 9.0,tvOS 16.0, *) init(_ mode: SwiftUI.ScrollDismissesKeyboardMode) { self.value = ._0(mode: mode) @@ -12151,7 +12057,7 @@ struct _scrollDismissesKeyboardModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(watchOS) case let ._0(mode): - if #available(macOS 13.0,tvOS 16.0,iOS 16.0,watchOS 9.0, *) { + if #available(macOS 13.0,iOS 16.0,watchOS 9.0,tvOS 16.0, *) { let mode = mode as! SwiftUI.ScrollDismissesKeyboardMode __content @@ -12237,14 +12143,14 @@ struct _scrollIndicatorsFlashModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(macOS 14.0,tvOS 17.0,iOS 17.0,visionOS 1.0,watchOS 10.0, *) + @available(macOS 14.0,watchOS 10.0,iOS 17.0,tvOS 17.0,visionOS 1.0, *) init(trigger value: AttributeReference) { self.value = ._0(value: value) } #endif #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(macOS 14.0,iOS 17.0,watchOS 10.0,visionOS 1.0,tvOS 17.0, *) + @available(macOS 14.0,watchOS 10.0,iOS 17.0,tvOS 17.0,visionOS 1.0, *) init(onAppear: AttributeReference) { self.value = ._1(onAppear: onAppear) @@ -12257,7 +12163,7 @@ struct _scrollIndicatorsFlashModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(value): - if #available(macOS 14.0,tvOS 17.0,iOS 17.0,visionOS 1.0,watchOS 10.0, *) { + if #available(macOS 14.0,watchOS 10.0,iOS 17.0,tvOS 17.0,visionOS 1.0, *) { let value = value as! AttributeReference __content @@ -12268,7 +12174,7 @@ struct _scrollIndicatorsFlashModifier: ViewModifier { #endif #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._1(onAppear): - if #available(macOS 14.0,iOS 17.0,watchOS 10.0,visionOS 1.0,tvOS 17.0, *) { + if #available(macOS 14.0,watchOS 10.0,iOS 17.0,tvOS 17.0,visionOS 1.0, *) { let onAppear = onAppear as! AttributeReference __content @@ -12302,7 +12208,7 @@ struct _scrollPositionModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(iOS 17.0,visionOS 1.0,watchOS 10.0,macOS 14.0,tvOS 17.0, *) + @available(visionOS 1.0,watchOS 10.0,iOS 17.0,tvOS 17.0,macOS 14.0, *) init(id: ChangeTracked,anchor: AttributeReference? = .init(storage: .constant(nil)) ) { self.value = ._0(anchor: anchor) self.__0_id = id @@ -12315,7 +12221,7 @@ struct _scrollPositionModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(anchor): - if #available(iOS 17.0,visionOS 1.0,watchOS 10.0,macOS 14.0,tvOS 17.0, *) { + if #available(visionOS 1.0,watchOS 10.0,iOS 17.0,tvOS 17.0,macOS 14.0, *) { let anchor = anchor as? AttributeReference __content @@ -12349,7 +12255,7 @@ struct _scrollTargetBehaviorModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(iOS 17.0,macOS 14.0,watchOS 10.0,visionOS 1.0,tvOS 17.0, *) + @available(watchOS 10.0,iOS 17.0,tvOS 17.0,visionOS 1.0,macOS 14.0, *) init(_ behavior: AnyScrollTargetBehavior) { self.value = ._0(behavior: behavior) @@ -12362,7 +12268,7 @@ struct _scrollTargetBehaviorModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(behavior): - if #available(iOS 17.0,macOS 14.0,watchOS 10.0,visionOS 1.0,tvOS 17.0, *) { + if #available(watchOS 10.0,iOS 17.0,tvOS 17.0,visionOS 1.0,macOS 14.0, *) { let behavior = behavior as! AnyScrollTargetBehavior __content @@ -12396,7 +12302,7 @@ struct _scrollTargetLayoutModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(watchOS 10.0,macOS 14.0,iOS 17.0,tvOS 17.0,visionOS 1.0, *) + @available(watchOS 10.0,iOS 17.0,tvOS 17.0,visionOS 1.0,macOS 14.0, *) init(isEnabled: AttributeReference = .init(storage: .constant(true)) ) { self.value = ._0(isEnabled: isEnabled) @@ -12409,7 +12315,7 @@ struct _scrollTargetLayoutModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(isEnabled): - if #available(watchOS 10.0,macOS 14.0,iOS 17.0,tvOS 17.0,visionOS 1.0, *) { + if #available(watchOS 10.0,iOS 17.0,tvOS 17.0,visionOS 1.0,macOS 14.0, *) { let isEnabled = isEnabled as! AttributeReference __content @@ -12490,7 +12396,7 @@ struct _searchPresentationToolbarBehaviorModifier: ViewModifier #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(macOS 14.1,watchOS 10.1,iOS 17.1,tvOS 17.1,visionOS 1.0, *) + @available(iOS 17.1,macOS 14.1,watchOS 10.1,visionOS 1.0,tvOS 17.1, *) init(_ behavior: SwiftUI.SearchPresentationToolbarBehavior) { self.value = ._0(behavior: behavior) @@ -12503,7 +12409,7 @@ struct _searchPresentationToolbarBehaviorModifier: ViewModifier fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(behavior): - if #available(macOS 14.1,watchOS 10.1,iOS 17.1,tvOS 17.1,visionOS 1.0, *) { + if #available(iOS 17.1,macOS 14.1,watchOS 10.1,visionOS 1.0,tvOS 17.1, *) { let behavior = behavior as! SwiftUI.SearchPresentationToolbarBehavior __content @@ -12671,7 +12577,7 @@ struct _searchableModifier: ViewModifier { } #if os(iOS) || os(macOS) || os(visionOS) - @available(iOS 17.0,macOS 14.0,visionOS 1.0, *) + @available(iOS 17.0,visionOS 1.0,macOS 14.0, *) init(text: ChangeTracked,isPresented: ChangeTracked,placement: SwiftUI.SearchFieldPlacement = .automatic, prompt: TextReference? = nil ) { self.value = ._3(placement: placement, prompt: prompt) self.__3_text = text @@ -12679,7 +12585,7 @@ self.__3_isPresented = isPresented } #endif #if os(iOS) || os(macOS) || os(visionOS) - @available(iOS 17.0,macOS 14.0,visionOS 1.0, *) + @available(iOS 17.0,visionOS 1.0,macOS 14.0, *) init(text: ChangeTracked,isPresented: ChangeTracked,placement: SwiftUI.SearchFieldPlacement = .automatic, prompt: SwiftUICore.LocalizedStringKey) { self.value = ._4(placement: placement, prompt: prompt) self.__4_text = text @@ -12687,7 +12593,7 @@ self.__4_isPresented = isPresented } #endif #if os(iOS) || os(macOS) || os(visionOS) - @available(macOS 14.0,visionOS 1.0,iOS 17.0, *) + @available(iOS 17.0,visionOS 1.0,macOS 14.0, *) init(text: ChangeTracked,isPresented: ChangeTracked,placement: SwiftUI.SearchFieldPlacement = .automatic, prompt: AttributeReference) { self.value = ._5(placement: placement, prompt: prompt) self.__5_text = text @@ -12755,7 +12661,7 @@ self.__5_isPresented = isPresented #if os(iOS) || os(macOS) || os(visionOS) case let ._3(placement, prompt): - if #available(iOS 17.0,macOS 14.0,visionOS 1.0, *) { + if #available(iOS 17.0,visionOS 1.0,macOS 14.0, *) { let placement = placement as! SwiftUI.SearchFieldPlacement let prompt = prompt as? TextReference __content._observeTextReference(prompt, on: element, in: context) { __content in @@ -12767,7 +12673,7 @@ let prompt = prompt as? TextReference #endif #if os(iOS) || os(macOS) || os(visionOS) case let ._4(placement, prompt): - if #available(iOS 17.0,macOS 14.0,visionOS 1.0, *) { + if #available(iOS 17.0,visionOS 1.0,macOS 14.0, *) { let placement = placement as! SwiftUI.SearchFieldPlacement let prompt = prompt as! SwiftUICore.LocalizedStringKey @@ -12779,7 +12685,7 @@ let prompt = prompt as! SwiftUICore.LocalizedStringKey #endif #if os(iOS) || os(macOS) || os(visionOS) case let ._5(placement, prompt): - if #available(macOS 14.0,visionOS 1.0,iOS 17.0, *) { + if #available(iOS 17.0,visionOS 1.0,macOS 14.0, *) { let placement = placement as! SwiftUI.SearchFieldPlacement let prompt = prompt as! AttributeReference @@ -12847,7 +12753,7 @@ struct _sectionActionsModifier: ViewModifier { #if os(iOS) || os(macOS) || os(visionOS) - @available(visionOS 2.0,macOS 15.0,iOS 18.0, *) + @available(iOS 18.0,visionOS 2.0,macOS 15.0, *) init(content: ViewReference=ViewReference(value: [])) { self.value = ._0(content: content) @@ -12860,7 +12766,7 @@ struct _sectionActionsModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(visionOS) case let ._0(content): - if #available(visionOS 2.0,macOS 15.0,iOS 18.0, *) { + if #available(iOS 18.0,visionOS 2.0,macOS 15.0, *) { let content = content as! ViewReference __content @@ -12894,7 +12800,7 @@ struct _selectionDisabledModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(tvOS 17.0,iOS 17.0,macOS 14.0,watchOS 10.0,visionOS 1.0, *) + @available(macOS 14.0,iOS 17.0,visionOS 1.0,watchOS 10.0,tvOS 17.0, *) init(_ isDisabled: AttributeReference = .init(storage: .constant(true)) ) { self.value = ._0(isDisabled: isDisabled) @@ -12907,7 +12813,7 @@ struct _selectionDisabledModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(isDisabled): - if #available(tvOS 17.0,iOS 17.0,macOS 14.0,watchOS 10.0,visionOS 1.0, *) { + if #available(macOS 14.0,iOS 17.0,visionOS 1.0,watchOS 10.0,tvOS 17.0, *) { let isDisabled = isDisabled as! AttributeReference __content @@ -13060,7 +12966,7 @@ struct _simultaneousGestureModifier: ViewModifier { } #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(watchOS 11.0,visionOS 2.0,tvOS 18.0,macOS 15.0,iOS 18.0, *) + @available(macOS 15.0,watchOS 11.0,iOS 18.0,tvOS 18.0,visionOS 2.0, *) init(_ gesture: _AnyGesture,name: AttributeReference,isEnabled: AttributeReference = .init(storage: .constant(true)) ) { self.value = ._2(gesture: gesture, name: name, isEnabled: isEnabled) @@ -13095,7 +13001,7 @@ struct _simultaneousGestureModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._2(gesture, name, isEnabled): - if #available(watchOS 11.0,visionOS 2.0,tvOS 18.0,macOS 15.0,iOS 18.0, *) { + if #available(macOS 15.0,watchOS 11.0,iOS 18.0,tvOS 18.0,visionOS 2.0, *) { let gesture = gesture as! _AnyGesture let name = name as! AttributeReference let isEnabled = isEnabled as! AttributeReference @@ -13366,7 +13272,7 @@ struct _statusBarHiddenModifier: ViewModifier { #if os(iOS) || os(visionOS) - @available(visionOS 1.0,iOS 13.0, *) + @available(iOS 13.0,visionOS 1.0, *) init(_ hidden: AttributeReference = .init(storage: .constant(true)) ) { self.value = ._0(hidden: hidden) @@ -13379,7 +13285,7 @@ struct _statusBarHiddenModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(visionOS) case let ._0(hidden): - if #available(visionOS 1.0,iOS 13.0, *) { + if #available(iOS 13.0,visionOS 1.0, *) { let hidden = hidden as! AttributeReference __content @@ -13554,7 +13460,7 @@ struct _swipeActionsModifier: ViewModifier { #if os(iOS) || os(macOS) || os(visionOS) || os(watchOS) - @available(macOS 12.0,visionOS 1.0,iOS 15.0,watchOS 8.0, *) + @available(macOS 12.0,iOS 15.0,visionOS 1.0,watchOS 8.0, *) init(edge: SwiftUICore.HorizontalEdge = .trailing, allowsFullSwipe: AttributeReference = .init(storage: .constant(true)), content: ViewReference=ViewReference(value: [])) { self.value = ._0(edge: edge, allowsFullSwipe: allowsFullSwipe, content: content) @@ -13567,7 +13473,7 @@ struct _swipeActionsModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(visionOS) || os(watchOS) case let ._0(edge, allowsFullSwipe, content): - if #available(macOS 12.0,visionOS 1.0,iOS 15.0,watchOS 8.0, *) { + if #available(macOS 12.0,iOS 15.0,visionOS 1.0,watchOS 8.0, *) { let edge = edge as! SwiftUICore.HorizontalEdge let allowsFullSwipe = allowsFullSwipe as! AttributeReference let content = content as! ViewReference @@ -13608,14 +13514,14 @@ struct _symbolEffectModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(macOS 14.0,tvOS 17.0,watchOS 10.0,iOS 17.0,visionOS 1.0, *) + @available(tvOS 17.0,iOS 17.0,macOS 14.0,visionOS 1.0,watchOS 10.0, *) init(_ effect: AnyIndefiniteSymbolEffect,options: Symbols.SymbolEffectOptions = .default, isActive: AttributeReference = .init(storage: .constant(true)) ) { self.value = ._0(effect: effect, options: options, isActive: isActive) } #endif #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(watchOS 10.0,tvOS 17.0,iOS 17.0,visionOS 1.0,macOS 14.0, *) + @available(tvOS 17.0,iOS 17.0,macOS 14.0,visionOS 1.0,watchOS 10.0, *) init(_ effect: AnyDiscreteSymbolEffect,options: Symbols.SymbolEffectOptions = .default, value: AttributeReference) { self.value = ._1(effect: effect, options: options, value: value) @@ -13628,7 +13534,7 @@ struct _symbolEffectModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(effect, options, isActive): - if #available(macOS 14.0,tvOS 17.0,watchOS 10.0,iOS 17.0,visionOS 1.0, *) { + if #available(tvOS 17.0,iOS 17.0,macOS 14.0,visionOS 1.0,watchOS 10.0, *) { let effect = effect as! AnyIndefiniteSymbolEffect let options = options as! Symbols.SymbolEffectOptions let isActive = isActive as! AttributeReference @@ -13641,7 +13547,7 @@ let isActive = isActive as! AttributeReference #endif #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._1(effect, options, value): - if #available(watchOS 10.0,tvOS 17.0,iOS 17.0,visionOS 1.0,macOS 14.0, *) { + if #available(tvOS 17.0,iOS 17.0,macOS 14.0,visionOS 1.0,watchOS 10.0, *) { let effect = effect as! AnyDiscreteSymbolEffect let options = options as! Symbols.SymbolEffectOptions let value = value as! AttributeReference @@ -13677,7 +13583,7 @@ struct _symbolEffectsRemovedModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(iOS 17.0,visionOS 1.0,macOS 14.0,tvOS 17.0,watchOS 10.0, *) + @available(macOS 14.0,iOS 17.0,visionOS 1.0,watchOS 10.0,tvOS 17.0, *) init(_ isEnabled: AttributeReference = .init(storage: .constant(true)) ) { self.value = ._0(isEnabled: isEnabled) @@ -13690,7 +13596,7 @@ struct _symbolEffectsRemovedModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(isEnabled): - if #available(iOS 17.0,visionOS 1.0,macOS 14.0,tvOS 17.0,watchOS 10.0, *) { + if #available(macOS 14.0,iOS 17.0,visionOS 1.0,watchOS 10.0,tvOS 17.0, *) { let isEnabled = isEnabled as! AttributeReference __content @@ -14053,7 +13959,7 @@ struct _tableStyleModifier: ViewModifier { #if os(iOS) || os(macOS) || os(visionOS) - @available(iOS 16.0,macOS 12.0,visionOS 1.0, *) + @available(iOS 16.0,visionOS 1.0,macOS 12.0, *) init(_ style: AnyTableStyle) { self.value = ._0(style: style) @@ -14066,7 +13972,7 @@ struct _tableStyleModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(visionOS) case let ._0(style): - if #available(iOS 16.0,macOS 12.0,visionOS 1.0, *) { + if #available(iOS 16.0,visionOS 1.0,macOS 12.0, *) { let style = style as! AnyTableStyle __content @@ -14147,7 +14053,7 @@ struct _textContentTypeModifier: ViewModifier { #if os(iOS) || os(tvOS) || os(visionOS) - @available(visionOS 1.0,iOS 13.0,tvOS 13.0, *) + @available(iOS 13.0,visionOS 1.0,tvOS 13.0, *) init(_ textContentType: UIKit.UITextContentType?) { self.value = ._0(textContentType: textContentType) @@ -14160,7 +14066,7 @@ struct _textContentTypeModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(tvOS) || os(visionOS) case let ._0(textContentType): - if #available(visionOS 1.0,iOS 13.0,tvOS 13.0, *) { + if #available(iOS 13.0,visionOS 1.0,tvOS 13.0, *) { let textContentType = textContentType as? UIKit.UITextContentType __content @@ -14194,7 +14100,7 @@ struct _textEditorStyleModifier: ViewModifier { #if os(iOS) || os(macOS) || os(visionOS) - @available(visionOS 1.0,macOS 14.0,iOS 17.0, *) + @available(iOS 17.0,visionOS 1.0,macOS 14.0, *) init(_ style: AnyTextEditorStyle) { self.value = ._0(style: style) @@ -14207,7 +14113,7 @@ struct _textEditorStyleModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(visionOS) case let ._0(style): - if #available(visionOS 1.0,macOS 14.0,iOS 17.0, *) { + if #available(iOS 17.0,visionOS 1.0,macOS 14.0, *) { let style = style as! AnyTextEditorStyle __content @@ -14288,7 +14194,7 @@ struct _textInputAutocapitalizationModifier: ViewModifier { #if os(iOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(tvOS 15.0,iOS 15.0,visionOS 1.0,watchOS 8.0, *) + @available(iOS 15.0,tvOS 15.0,visionOS 1.0,watchOS 8.0, *) init(_ autocapitalization: SwiftUI.TextInputAutocapitalization?) { self.value = ._0(autocapitalization: autocapitalization) @@ -14301,7 +14207,7 @@ struct _textInputAutocapitalizationModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(autocapitalization): - if #available(tvOS 15.0,iOS 15.0,visionOS 1.0,watchOS 8.0, *) { + if #available(iOS 15.0,tvOS 15.0,visionOS 1.0,watchOS 8.0, *) { let autocapitalization = autocapitalization as? SwiftUI.TextInputAutocapitalization __content @@ -14476,7 +14382,7 @@ struct _textSelectionAffinityModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(iOS 18.0,visionOS 2.0,watchOS 11.0,macOS 15.0,tvOS 18.0, *) + @available(tvOS 18.0,iOS 18.0,macOS 15.0,visionOS 2.0,watchOS 11.0, *) init(_ affinity: SwiftUI.TextSelectionAffinity) { self.value = ._0(affinity: affinity) @@ -14489,7 +14395,7 @@ struct _textSelectionAffinityModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(affinity): - if #available(iOS 18.0,visionOS 2.0,watchOS 11.0,macOS 15.0,tvOS 18.0, *) { + if #available(tvOS 18.0,iOS 18.0,macOS 15.0,visionOS 2.0,watchOS 11.0, *) { let affinity = affinity as! SwiftUI.TextSelectionAffinity __content @@ -14662,7 +14568,7 @@ struct _toolbarModifier: ViewModifier { } #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(macOS 14.0,tvOS 17.0,iOS 17.0,watchOS 10.0,visionOS 1.0, *) + @available(macOS 14.0,watchOS 10.0,iOS 17.0,tvOS 17.0,visionOS 1.0, *) init(removing defaultItemKind: SwiftUI.ToolbarDefaultItemKind?) { self.value = ._1(defaultItemKind: defaultItemKind) @@ -14700,7 +14606,7 @@ struct _toolbarModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._1(defaultItemKind): - if #available(macOS 14.0,tvOS 17.0,iOS 17.0,watchOS 10.0,visionOS 1.0, *) { + if #available(macOS 14.0,watchOS 10.0,iOS 17.0,tvOS 17.0,visionOS 1.0, *) { let defaultItemKind = defaultItemKind as? SwiftUI.ToolbarDefaultItemKind __content @@ -14826,7 +14732,7 @@ struct _toolbarBackgroundVisibilityModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(macOS 15.0,iOS 18.0,tvOS 18.0,watchOS 11.0,visionOS 2.0, *) + @available(tvOS 18.0,iOS 18.0,macOS 15.0,visionOS 2.0,watchOS 11.0, *) init(_ visibility: AttributeReference,for bars: SwiftUI.ToolbarPlacement) { self.value = ._0(visibility: visibility, bars: bars) @@ -14839,7 +14745,7 @@ struct _toolbarBackgroundVisibilityModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(visibility, bars): - if #available(macOS 15.0,iOS 18.0,tvOS 18.0,watchOS 11.0,visionOS 2.0, *) { + if #available(tvOS 18.0,iOS 18.0,macOS 15.0,visionOS 2.0,watchOS 11.0, *) { let visibility = visibility as! AttributeReference let bars = bars as! SwiftUI.ToolbarPlacement @@ -15015,7 +14921,7 @@ struct _toolbarTitleDisplayModeModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(macOS 14.0,tvOS 17.0,iOS 17.0,visionOS 1.0,watchOS 10.0, *) + @available(macOS 14.0,iOS 17.0,visionOS 1.0,watchOS 10.0,tvOS 17.0, *) init(_ mode: SwiftUI.ToolbarTitleDisplayMode) { self.value = ._0(mode: mode) @@ -15028,7 +14934,7 @@ struct _toolbarTitleDisplayModeModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(mode): - if #available(macOS 14.0,tvOS 17.0,iOS 17.0,visionOS 1.0,watchOS 10.0, *) { + if #available(macOS 14.0,iOS 17.0,visionOS 1.0,watchOS 10.0,tvOS 17.0, *) { let mode = mode as! SwiftUI.ToolbarTitleDisplayMode __content @@ -15109,7 +15015,7 @@ struct _toolbarVisibilityModifier: ViewModifier { #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(macOS 15.0,iOS 18.0,tvOS 18.0,watchOS 11.0,visionOS 2.0, *) + @available(macOS 15.0,watchOS 11.0,iOS 18.0,tvOS 18.0,visionOS 2.0, *) init(_ visibility: AttributeReference,for bars: SwiftUI.ToolbarPlacement) { self.value = ._0(visibility: visibility, bars: bars) @@ -15122,7 +15028,7 @@ struct _toolbarVisibilityModifier: ViewModifier { fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(visibility, bars): - if #available(macOS 15.0,iOS 18.0,tvOS 18.0,watchOS 11.0,visionOS 2.0, *) { + if #available(macOS 15.0,watchOS 11.0,iOS 18.0,tvOS 18.0,visionOS 2.0, *) { let visibility = visibility as! AttributeReference let bars = bars as! SwiftUI.ToolbarPlacement @@ -15768,7 +15674,7 @@ struct _windowToolbarFullScreenVisibilityModifier: ViewModifier #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) - @available(macOS 15.0,tvOS 18.0,iOS 18.0,visionOS 2.0,watchOS 11.0, *) + @available(watchOS 11.0,iOS 18.0,tvOS 18.0,visionOS 2.0,macOS 15.0, *) init(_ visibility: SwiftUI.WindowToolbarFullScreenVisibility) { self.value = ._0(visibility: visibility) @@ -15781,7 +15687,7 @@ struct _windowToolbarFullScreenVisibilityModifier: ViewModifier fatalError("unreachable") #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) case let ._0(visibility): - if #available(macOS 15.0,tvOS 18.0,iOS 18.0,visionOS 2.0,watchOS 11.0, *) { + if #available(watchOS 11.0,iOS 18.0,tvOS 18.0,visionOS 2.0,macOS 15.0, *) { let visibility = visibility as! SwiftUI.WindowToolbarFullScreenVisibility __content @@ -16055,8 +15961,8 @@ indirect case dialogSuppressionToggle(_dialogSuppressionToggleModifier) indirect case digitalCrownAccessory(_digitalCrownAccessoryModifier) indirect case disableAutocorrection(_disableAutocorrectionModifier) indirect case disabled(_disabledModifier) -indirect case disclosureGroupStyle(_disclosureGroupStyleModifier) indirect case dismissalConfirmationDialog(_dismissalConfirmationDialogModifier) +indirect case drawingGroup(_drawingGroupModifier) func body(content: Content) -> some View { switch self { @@ -16084,9 +15990,9 @@ case let .disableAutocorrection(modifier): content.modifier(modifier) case let .disabled(modifier): content.modifier(modifier) -case let .disclosureGroupStyle(modifier): - content.modifier(modifier) case let .dismissalConfirmationDialog(modifier): + content.modifier(modifier) +case let .drawingGroup(modifier): content.modifier(modifier) } } @@ -16094,8 +16000,7 @@ case let .dismissalConfirmationDialog(modifier): } extension BuiltinRegistry { enum _BuiltinModifierChunk4: ViewModifier { - indirect case drawingGroup(_drawingGroupModifier) -indirect case dynamicTypeSize(_dynamicTypeSizeModifier) + indirect case dynamicTypeSize(_dynamicTypeSizeModifier) indirect case edgesIgnoringSafeArea(_edgesIgnoringSafeAreaModifier) indirect case fileDialogCustomizationID(_fileDialogCustomizationIDModifier) indirect case fileDialogImportsUnresolvedAliases(_fileDialogImportsUnresolvedAliasesModifier) @@ -16108,12 +16013,11 @@ indirect case focusSection(_focusSectionModifier) indirect case focusable(_focusableModifier) indirect case foregroundColor(_foregroundColorModifier) indirect case formStyle(_formStyleModifier) +indirect case frame(_frameModifier) func body(content: Content) -> some View { switch self { - case let .drawingGroup(modifier): - content.modifier(modifier) -case let .dynamicTypeSize(modifier): + case let .dynamicTypeSize(modifier): content.modifier(modifier) case let .edgesIgnoringSafeArea(modifier): content.modifier(modifier) @@ -16138,6 +16042,8 @@ case let .focusable(modifier): case let .foregroundColor(modifier): content.modifier(modifier) case let .formStyle(modifier): + content.modifier(modifier) +case let .frame(modifier): content.modifier(modifier) } } @@ -16145,8 +16051,7 @@ case let .formStyle(modifier): } extension BuiltinRegistry { enum _BuiltinModifierChunk5: ViewModifier { - indirect case frame(_frameModifier) -indirect case fullScreenCover(_fullScreenCoverModifier) + indirect case fullScreenCover(_fullScreenCoverModifier) indirect case gaugeStyle(_gaugeStyleModifier) indirect case geometryGroup(_geometryGroupModifier) indirect case gesture(_gestureModifier) @@ -16159,12 +16064,11 @@ indirect case gridColumnAlignment(_gridColumnAlignmentModifier) indirect case groupBoxStyle(_groupBoxStyleModifier) indirect case handGestureShortcut(_handGestureShortcutModifier) indirect case handPointerBehavior(_handPointerBehaviorModifier) +indirect case headerProminence(_headerProminenceModifier) func body(content: Content) -> some View { switch self { - case let .frame(modifier): - content.modifier(modifier) -case let .fullScreenCover(modifier): + case let .fullScreenCover(modifier): content.modifier(modifier) case let .gaugeStyle(modifier): content.modifier(modifier) @@ -16189,6 +16093,8 @@ case let .groupBoxStyle(modifier): case let .handGestureShortcut(modifier): content.modifier(modifier) case let .handPointerBehavior(modifier): + content.modifier(modifier) +case let .headerProminence(modifier): content.modifier(modifier) } } @@ -16196,8 +16102,7 @@ case let .handPointerBehavior(modifier): } extension BuiltinRegistry { enum _BuiltinModifierChunk6: ViewModifier { - indirect case headerProminence(_headerProminenceModifier) -indirect case help(_helpModifier) + indirect case help(_helpModifier) indirect case hidden(_hiddenModifier) indirect case highPriorityGesture(_highPriorityGestureModifier) indirect case horizontalRadioGroupLayout(_horizontalRadioGroupLayoutModifier) @@ -16210,12 +16115,11 @@ indirect case imageScale(_imageScaleModifier) indirect case immersiveEnvironmentPicker(_immersiveEnvironmentPickerModifier) indirect case indexViewStyle(_indexViewStyleModifier) indirect case inspector(_inspectorModifier) +indirect case inspectorColumnWidth(_inspectorColumnWidthModifier) func body(content: Content) -> some View { switch self { - case let .headerProminence(modifier): - content.modifier(modifier) -case let .help(modifier): + case let .help(modifier): content.modifier(modifier) case let .hidden(modifier): content.modifier(modifier) @@ -16240,6 +16144,8 @@ case let .immersiveEnvironmentPicker(modifier): case let .indexViewStyle(modifier): content.modifier(modifier) case let .inspector(modifier): + content.modifier(modifier) +case let .inspectorColumnWidth(modifier): content.modifier(modifier) } } @@ -16247,8 +16153,7 @@ case let .inspector(modifier): } extension BuiltinRegistry { enum _BuiltinModifierChunk7: ViewModifier { - indirect case inspectorColumnWidth(_inspectorColumnWidthModifier) -indirect case interactionActivityTrackingTag(_interactionActivityTrackingTagModifier) + indirect case interactionActivityTrackingTag(_interactionActivityTrackingTagModifier) indirect case interactiveDismissDisabled(_interactiveDismissDisabledModifier) indirect case invalidatableContent(_invalidatableContentModifier) indirect case keyboardShortcut(_keyboardShortcutModifier) @@ -16261,12 +16166,11 @@ indirect case layoutPriority(_layoutPriorityModifier) indirect case lineLimit(_lineLimitModifier) indirect case lineSpacing(_lineSpacingModifier) indirect case listItemTint(_listItemTintModifier) +indirect case listRowBackground(_listRowBackgroundModifier) func body(content: Content) -> some View { switch self { - case let .inspectorColumnWidth(modifier): - content.modifier(modifier) -case let .interactionActivityTrackingTag(modifier): + case let .interactionActivityTrackingTag(modifier): content.modifier(modifier) case let .interactiveDismissDisabled(modifier): content.modifier(modifier) @@ -16291,6 +16195,8 @@ case let .lineLimit(modifier): case let .lineSpacing(modifier): content.modifier(modifier) case let .listItemTint(modifier): + content.modifier(modifier) +case let .listRowBackground(modifier): content.modifier(modifier) } } @@ -16298,8 +16204,7 @@ case let .listItemTint(modifier): } extension BuiltinRegistry { enum _BuiltinModifierChunk8: ViewModifier { - indirect case listRowBackground(_listRowBackgroundModifier) -indirect case listRowHoverEffect(_listRowHoverEffectModifier) + indirect case listRowHoverEffect(_listRowHoverEffectModifier) indirect case listRowHoverEffectDisabled(_listRowHoverEffectDisabledModifier) indirect case listRowInsets(_listRowInsetsModifier) indirect case listRowPlatterColor(_listRowPlatterColorModifier) @@ -16312,12 +16217,11 @@ indirect case listSectionSpacing(_listSectionSpacingModifier) indirect case listStyle(_listStyleModifier) indirect case luminanceToAlpha(_luminanceToAlphaModifier) indirect case materialActiveAppearance(_materialActiveAppearanceModifier) +indirect case menuIndicator(_menuIndicatorModifier) func body(content: Content) -> some View { switch self { - case let .listRowBackground(modifier): - content.modifier(modifier) -case let .listRowHoverEffect(modifier): + case let .listRowHoverEffect(modifier): content.modifier(modifier) case let .listRowHoverEffectDisabled(modifier): content.modifier(modifier) @@ -16342,6 +16246,8 @@ case let .listStyle(modifier): case let .luminanceToAlpha(modifier): content.modifier(modifier) case let .materialActiveAppearance(modifier): + content.modifier(modifier) +case let .menuIndicator(modifier): content.modifier(modifier) } } @@ -16349,8 +16255,7 @@ case let .materialActiveAppearance(modifier): } extension BuiltinRegistry { enum _BuiltinModifierChunk9: ViewModifier { - indirect case menuIndicator(_menuIndicatorModifier) -indirect case menuOrder(_menuOrderModifier) + indirect case menuOrder(_menuOrderModifier) indirect case menuStyle(_menuStyleModifier) indirect case minimumScaleFactor(_minimumScaleFactorModifier) indirect case modifierKeyAlternate(_modifierKeyAlternateModifier) @@ -16363,12 +16268,11 @@ indirect case navigationBarTitle(_navigationBarTitleModifier) indirect case navigationBarTitleDisplayMode(_navigationBarTitleDisplayModeModifier) indirect case navigationDestination(_navigationDestinationModifier) indirect case navigationSplitViewColumnWidth(_navigationSplitViewColumnWidthModifier) +indirect case navigationSplitViewStyle(_navigationSplitViewStyleModifier) func body(content: Content) -> some View { switch self { - case let .menuIndicator(modifier): - content.modifier(modifier) -case let .menuOrder(modifier): + case let .menuOrder(modifier): content.modifier(modifier) case let .menuStyle(modifier): content.modifier(modifier) @@ -16393,6 +16297,8 @@ case let .navigationBarTitleDisplayMode(modifier): case let .navigationDestination(modifier): content.modifier(modifier) case let .navigationSplitViewColumnWidth(modifier): + content.modifier(modifier) +case let .navigationSplitViewStyle(modifier): content.modifier(modifier) } } @@ -16400,10 +16306,8 @@ case let .navigationSplitViewColumnWidth(modifier): } extension BuiltinRegistry { enum _BuiltinModifierChunk10: ViewModifier { - indirect case navigationSplitViewStyle(_navigationSplitViewStyleModifier) -indirect case navigationSubtitle(_navigationSubtitleModifier) + indirect case navigationSubtitle(_navigationSubtitleModifier) indirect case navigationTitle(_navigationTitleModifier) -indirect case navigationViewStyle(_navigationViewStyleModifier) indirect case offset(_offsetModifier) indirect case onAppear(_onAppearModifier) indirect case onDeleteCommand(_onDeleteCommandModifier) @@ -16414,17 +16318,15 @@ indirect case onImmersionChange(_onImmersionChangeModifier) indirect case onLongPressGesture(_onLongPressGestureModifier) indirect case onLongTouchGesture(_onLongTouchGestureModifier) indirect case onModifierKeysChanged(_onModifierKeysChangedModifier) +indirect case onMoveCommand(_onMoveCommandModifier) +indirect case onPencilDoubleTap(_onPencilDoubleTapModifier) func body(content: Content) -> some View { switch self { - case let .navigationSplitViewStyle(modifier): - content.modifier(modifier) -case let .navigationSubtitle(modifier): + case let .navigationSubtitle(modifier): content.modifier(modifier) case let .navigationTitle(modifier): content.modifier(modifier) -case let .navigationViewStyle(modifier): - content.modifier(modifier) case let .offset(modifier): content.modifier(modifier) case let .onAppear(modifier): @@ -16444,6 +16346,10 @@ case let .onLongPressGesture(modifier): case let .onLongTouchGesture(modifier): content.modifier(modifier) case let .onModifierKeysChanged(modifier): + content.modifier(modifier) +case let .onMoveCommand(modifier): + content.modifier(modifier) +case let .onPencilDoubleTap(modifier): content.modifier(modifier) } } @@ -16451,9 +16357,7 @@ case let .onModifierKeysChanged(modifier): } extension BuiltinRegistry { enum _BuiltinModifierChunk11: ViewModifier { - indirect case onMoveCommand(_onMoveCommandModifier) -indirect case onPencilDoubleTap(_onPencilDoubleTapModifier) -indirect case onPencilSqueeze(_onPencilSqueezeModifier) + indirect case onPencilSqueeze(_onPencilSqueezeModifier) indirect case onPlayPauseCommand(_onPlayPauseCommandModifier) indirect case onScrollPhaseChange(_onScrollPhaseChangeModifier) indirect case onScrollVisibilityChange(_onScrollVisibilityChangeModifier) @@ -16465,14 +16369,12 @@ indirect case overlay(_overlayModifier) indirect case padding(_paddingModifier) indirect case padding3D(_padding3DModifier) indirect case persistentSystemOverlays(_persistentSystemOverlaysModifier) +indirect case pickerStyle(_pickerStyleModifier) +indirect case pointerStyle(_pointerStyleModifier) func body(content: Content) -> some View { switch self { - case let .onMoveCommand(modifier): - content.modifier(modifier) -case let .onPencilDoubleTap(modifier): - content.modifier(modifier) -case let .onPencilSqueeze(modifier): + case let .onPencilSqueeze(modifier): content.modifier(modifier) case let .onPlayPauseCommand(modifier): content.modifier(modifier) @@ -16495,6 +16397,10 @@ case let .padding(modifier): case let .padding3D(modifier): content.modifier(modifier) case let .persistentSystemOverlays(modifier): + content.modifier(modifier) +case let .pickerStyle(modifier): + content.modifier(modifier) +case let .pointerStyle(modifier): content.modifier(modifier) } } @@ -16502,9 +16408,7 @@ case let .persistentSystemOverlays(modifier): } extension BuiltinRegistry { enum _BuiltinModifierChunk12: ViewModifier { - indirect case pickerStyle(_pickerStyleModifier) -indirect case pointerStyle(_pointerStyleModifier) -indirect case pointerVisibility(_pointerVisibilityModifier) + indirect case pointerVisibility(_pointerVisibilityModifier) indirect case popover(_popoverModifier) indirect case position(_positionModifier) indirect case preferredColorScheme(_preferredColorSchemeModifier) @@ -16516,14 +16420,12 @@ indirect case presentationContentInteraction(_presentationContentInteractionModi indirect case presentationCornerRadius(_presentationCornerRadiusModifier) indirect case presentationDragIndicator(_presentationDragIndicatorModifier) indirect case presentationSizing(_presentationSizingModifier) +indirect case previewDisplayName(_previewDisplayNameModifier) +indirect case privacySensitive(_privacySensitiveModifier) func body(content: Content) -> some View { switch self { - case let .pickerStyle(modifier): - content.modifier(modifier) -case let .pointerStyle(modifier): - content.modifier(modifier) -case let .pointerVisibility(modifier): + case let .pointerVisibility(modifier): content.modifier(modifier) case let .popover(modifier): content.modifier(modifier) @@ -16546,6 +16448,10 @@ case let .presentationCornerRadius(modifier): case let .presentationDragIndicator(modifier): content.modifier(modifier) case let .presentationSizing(modifier): + content.modifier(modifier) +case let .previewDisplayName(modifier): + content.modifier(modifier) +case let .privacySensitive(modifier): content.modifier(modifier) } } @@ -16553,9 +16459,7 @@ case let .presentationSizing(modifier): } extension BuiltinRegistry { enum _BuiltinModifierChunk13: ViewModifier { - indirect case previewDisplayName(_previewDisplayNameModifier) -indirect case privacySensitive(_privacySensitiveModifier) -indirect case progressViewStyle(_progressViewStyleModifier) + indirect case progressViewStyle(_progressViewStyleModifier) indirect case projectionEffect(_projectionEffectModifier) indirect case redacted(_redactedModifier) indirect case refreshable(_refreshableModifier) @@ -16567,14 +16471,12 @@ indirect case safeAreaPadding(_safeAreaPaddingModifier) indirect case saturation(_saturationModifier) indirect case scaleEffect(_scaleEffectModifier) indirect case scaledToFill(_scaledToFillModifier) +indirect case scaledToFit(_scaledToFitModifier) +indirect case scenePadding(_scenePaddingModifier) func body(content: Content) -> some View { switch self { - case let .previewDisplayName(modifier): - content.modifier(modifier) -case let .privacySensitive(modifier): - content.modifier(modifier) -case let .progressViewStyle(modifier): + case let .progressViewStyle(modifier): content.modifier(modifier) case let .projectionEffect(modifier): content.modifier(modifier) @@ -16597,6 +16499,10 @@ case let .saturation(modifier): case let .scaleEffect(modifier): content.modifier(modifier) case let .scaledToFill(modifier): + content.modifier(modifier) +case let .scaledToFit(modifier): + content.modifier(modifier) +case let .scenePadding(modifier): content.modifier(modifier) } } @@ -16604,9 +16510,7 @@ case let .scaledToFill(modifier): } extension BuiltinRegistry { enum _BuiltinModifierChunk14: ViewModifier { - indirect case scaledToFit(_scaledToFitModifier) -indirect case scenePadding(_scenePaddingModifier) -indirect case scrollBounceBehavior(_scrollBounceBehaviorModifier) + indirect case scrollBounceBehavior(_scrollBounceBehaviorModifier) indirect case scrollClipDisabled(_scrollClipDisabledModifier) indirect case scrollContentBackground(_scrollContentBackgroundModifier) indirect case scrollDisabled(_scrollDisabledModifier) @@ -16618,14 +16522,12 @@ indirect case scrollTargetBehavior(_scrollTargetBehaviorModifier) indirect case scrollTargetLayout(_scrollTargetLayoutModifier) indirect case searchDictationBehavior(_searchDictationBehaviorModifier) indirect case searchPresentationToolbarBehavior(_searchPresentationToolbarBehaviorModifier) +indirect case searchSuggestions(_searchSuggestionsModifier) +indirect case searchable(_searchableModifier) func body(content: Content) -> some View { switch self { - case let .scaledToFit(modifier): - content.modifier(modifier) -case let .scenePadding(modifier): - content.modifier(modifier) -case let .scrollBounceBehavior(modifier): + case let .scrollBounceBehavior(modifier): content.modifier(modifier) case let .scrollClipDisabled(modifier): content.modifier(modifier) @@ -16648,6 +16550,10 @@ case let .scrollTargetLayout(modifier): case let .searchDictationBehavior(modifier): content.modifier(modifier) case let .searchPresentationToolbarBehavior(modifier): + content.modifier(modifier) +case let .searchSuggestions(modifier): + content.modifier(modifier) +case let .searchable(modifier): content.modifier(modifier) } } @@ -16655,9 +16561,7 @@ case let .searchPresentationToolbarBehavior(modifier): } extension BuiltinRegistry { enum _BuiltinModifierChunk15: ViewModifier { - indirect case searchSuggestions(_searchSuggestionsModifier) -indirect case searchable(_searchableModifier) -indirect case sectionActions(_sectionActionsModifier) + indirect case sectionActions(_sectionActionsModifier) indirect case selectionDisabled(_selectionDisabledModifier) indirect case shadow(_shadowModifier) indirect case sheet(_sheetModifier) @@ -16669,14 +16573,12 @@ indirect case speechSpellsOutCharacters(_speechSpellsOutCharactersModifier) indirect case statusBar(_statusBarModifier) indirect case statusBarHidden(_statusBarHiddenModifier) indirect case submitLabel(_submitLabelModifier) +indirect case submitScope(_submitScopeModifier) +indirect case supportedVolumeViewpoints(_supportedVolumeViewpointsModifier) func body(content: Content) -> some View { switch self { - case let .searchSuggestions(modifier): - content.modifier(modifier) -case let .searchable(modifier): - content.modifier(modifier) -case let .sectionActions(modifier): + case let .sectionActions(modifier): content.modifier(modifier) case let .selectionDisabled(modifier): content.modifier(modifier) @@ -16699,6 +16601,10 @@ case let .statusBar(modifier): case let .statusBarHidden(modifier): content.modifier(modifier) case let .submitLabel(modifier): + content.modifier(modifier) +case let .submitScope(modifier): + content.modifier(modifier) +case let .supportedVolumeViewpoints(modifier): content.modifier(modifier) } } @@ -16706,9 +16612,7 @@ case let .submitLabel(modifier): } extension BuiltinRegistry { enum _BuiltinModifierChunk16: ViewModifier { - indirect case submitScope(_submitScopeModifier) -indirect case supportedVolumeViewpoints(_supportedVolumeViewpointsModifier) -indirect case swipeActions(_swipeActionsModifier) + indirect case swipeActions(_swipeActionsModifier) indirect case symbolEffect(_symbolEffectModifier) indirect case symbolEffectsRemoved(_symbolEffectsRemovedModifier) indirect case symbolRenderingMode(_symbolRenderingModeModifier) @@ -16720,14 +16624,12 @@ indirect case tabViewSidebarHeader(_tabViewSidebarHeaderModifier) indirect case tabViewStyle(_tabViewStyleModifier) indirect case tableStyle(_tableStyleModifier) indirect case textCase(_textCaseModifier) +indirect case textContentType(_textContentTypeModifier) +indirect case textEditorStyle(_textEditorStyleModifier) func body(content: Content) -> some View { switch self { - case let .submitScope(modifier): - content.modifier(modifier) -case let .supportedVolumeViewpoints(modifier): - content.modifier(modifier) -case let .swipeActions(modifier): + case let .swipeActions(modifier): content.modifier(modifier) case let .symbolEffect(modifier): content.modifier(modifier) @@ -16750,6 +16652,10 @@ case let .tabViewStyle(modifier): case let .tableStyle(modifier): content.modifier(modifier) case let .textCase(modifier): + content.modifier(modifier) +case let .textContentType(modifier): + content.modifier(modifier) +case let .textEditorStyle(modifier): content.modifier(modifier) } } @@ -16757,9 +16663,7 @@ case let .textCase(modifier): } extension BuiltinRegistry { enum _BuiltinModifierChunk17: ViewModifier { - indirect case textContentType(_textContentTypeModifier) -indirect case textEditorStyle(_textEditorStyleModifier) -indirect case textFieldStyle(_textFieldStyleModifier) + indirect case textFieldStyle(_textFieldStyleModifier) indirect case textInputAutocapitalization(_textInputAutocapitalizationModifier) indirect case textInputCompletion(_textInputCompletionModifier) indirect case textInputSuggestions(_textInputSuggestionsModifier) @@ -16771,14 +16675,12 @@ indirect case toolbar(_toolbarModifier) indirect case toolbarBackground(_toolbarBackgroundModifier) indirect case toolbarBackgroundVisibility(_toolbarBackgroundVisibilityModifier) indirect case toolbarColorScheme(_toolbarColorSchemeModifier) +indirect case toolbarItemHidden(_toolbarItemHiddenModifier) +indirect case toolbarRole(_toolbarRoleModifier) func body(content: Content) -> some View { switch self { - case let .textContentType(modifier): - content.modifier(modifier) -case let .textEditorStyle(modifier): - content.modifier(modifier) -case let .textFieldStyle(modifier): + case let .textFieldStyle(modifier): content.modifier(modifier) case let .textInputAutocapitalization(modifier): content.modifier(modifier) @@ -16801,6 +16703,10 @@ case let .toolbarBackground(modifier): case let .toolbarBackgroundVisibility(modifier): content.modifier(modifier) case let .toolbarColorScheme(modifier): + content.modifier(modifier) +case let .toolbarItemHidden(modifier): + content.modifier(modifier) +case let .toolbarRole(modifier): content.modifier(modifier) } } @@ -16808,9 +16714,7 @@ case let .toolbarColorScheme(modifier): } extension BuiltinRegistry { enum _BuiltinModifierChunk18: ViewModifier { - indirect case toolbarItemHidden(_toolbarItemHiddenModifier) -indirect case toolbarRole(_toolbarRoleModifier) -indirect case toolbarTitleDisplayMode(_toolbarTitleDisplayModeModifier) + indirect case toolbarTitleDisplayMode(_toolbarTitleDisplayModeModifier) indirect case toolbarTitleMenu(_toolbarTitleMenuModifier) indirect case toolbarVisibility(_toolbarVisibilityModifier) indirect case touchBarCustomizationLabel(_touchBarCustomizationLabelModifier) @@ -16822,14 +16726,12 @@ indirect case truncationMode(_truncationModeModifier) indirect case unredacted(_unredactedModifier) indirect case upperLimbVisibility(_upperLimbVisibilityModifier) indirect case volumeBaseplateVisibility(_volumeBaseplateVisibilityModifier) +indirect case windowDismissBehavior(_windowDismissBehaviorModifier) +indirect case windowFullScreenBehavior(_windowFullScreenBehaviorModifier) func body(content: Content) -> some View { switch self { - case let .toolbarItemHidden(modifier): - content.modifier(modifier) -case let .toolbarRole(modifier): - content.modifier(modifier) -case let .toolbarTitleDisplayMode(modifier): + case let .toolbarTitleDisplayMode(modifier): content.modifier(modifier) case let .toolbarTitleMenu(modifier): content.modifier(modifier) @@ -16852,6 +16754,10 @@ case let .unredacted(modifier): case let .upperLimbVisibility(modifier): content.modifier(modifier) case let .volumeBaseplateVisibility(modifier): + content.modifier(modifier) +case let .windowDismissBehavior(modifier): + content.modifier(modifier) +case let .windowFullScreenBehavior(modifier): content.modifier(modifier) } } @@ -16859,9 +16765,7 @@ case let .volumeBaseplateVisibility(modifier): } extension BuiltinRegistry { enum _BuiltinModifierChunk19: ViewModifier { - indirect case windowDismissBehavior(_windowDismissBehaviorModifier) -indirect case windowFullScreenBehavior(_windowFullScreenBehaviorModifier) -indirect case windowMinimizeBehavior(_windowMinimizeBehaviorModifier) + indirect case windowMinimizeBehavior(_windowMinimizeBehaviorModifier) indirect case windowResizeBehavior(_windowResizeBehaviorModifier) indirect case windowToolbarFullScreenVisibility(_windowToolbarFullScreenVisibilityModifier) indirect case writingToolsBehavior(_writingToolsBehaviorModifier) @@ -16869,11 +16773,7 @@ indirect case zIndex(_zIndexModifier) func body(content: Content) -> some View { switch self { - case let .windowDismissBehavior(modifier): - content.modifier(modifier) -case let .windowFullScreenBehavior(modifier): - content.modifier(modifier) -case let .windowMinimizeBehavior(modifier): + case let .windowMinimizeBehavior(modifier): content.modifier(modifier) case let .windowResizeBehavior(modifier): content.modifier(modifier) @@ -16909,18 +16809,18 @@ indirect case chunk16(_BuiltinModifierChunk16) indirect case chunk17(_BuiltinModifierChunk17) indirect case chunk18(_BuiltinModifierChunk18) indirect case chunk19(_BuiltinModifierChunk19) - indirect case _SearchCompletionModifier(LiveViewNative._SearchCompletionModifier) -indirect case _OnSubmitModifier(LiveViewNative._OnSubmitModifier) + indirect case _MaskModifier(LiveViewNative._MaskModifier) indirect case _SearchScopesModifier(LiveViewNative._SearchScopesModifier) -indirect case _PerspectiveRotationEffectModifier(LiveViewNative._PerspectiveRotationEffectModifier) -indirect case _PresentationDetentsModifier(LiveViewNative._PresentationDetentsModifier) -indirect case _MaskModifier(LiveViewNative._MaskModifier) indirect case _MatchedGeometryEffectModifier(LiveViewNative._MatchedGeometryEffectModifier) +indirect case _Rotation3DEffectModifier(LiveViewNative._Rotation3DEffectModifier) +indirect case _NavigationTransitionModifier(LiveViewNative._NavigationTransitionModifier) +indirect case _PresentationDetentsModifier(LiveViewNative._PresentationDetentsModifier) +indirect case _PerspectiveRotationEffectModifier(LiveViewNative._PerspectiveRotationEffectModifier) indirect case _FocusScopeModifier(LiveViewNative._FocusScopeModifier) indirect case _PrefersDefaultFocusModifier(LiveViewNative._PrefersDefaultFocusModifier) -indirect case _NavigationTransitionModifier(LiveViewNative._NavigationTransitionModifier) +indirect case _SearchCompletionModifier(LiveViewNative._SearchCompletionModifier) +indirect case _OnSubmitModifier(LiveViewNative._OnSubmitModifier) indirect case _MatchedTransitionSourceModifier(LiveViewNative._MatchedTransitionSourceModifier) -indirect case _Rotation3DEffectModifier(LiveViewNative._Rotation3DEffectModifier) indirect case _customRegistryModifier(R.CustomModifier) indirect case _anyTextModifier(_AnyTextModifier) indirect case _anyImageModifier(_AnyImageModifier) @@ -16969,29 +16869,29 @@ case let .chunk18(chunk): content.modifier(chunk) case let .chunk19(chunk): content.modifier(chunk) - case let ._SearchCompletionModifier(modifier): - content.modifier(modifier) -case let ._OnSubmitModifier(modifier): + case let ._MaskModifier(modifier): content.modifier(modifier) case let ._SearchScopesModifier(modifier): content.modifier(modifier) -case let ._PerspectiveRotationEffectModifier(modifier): +case let ._MatchedGeometryEffectModifier(modifier): content.modifier(modifier) -case let ._PresentationDetentsModifier(modifier): +case let ._Rotation3DEffectModifier(modifier): + content.modifier(modifier) +case let ._NavigationTransitionModifier(modifier): content.modifier(modifier) -case let ._MaskModifier(modifier): +case let ._PresentationDetentsModifier(modifier): content.modifier(modifier) -case let ._MatchedGeometryEffectModifier(modifier): +case let ._PerspectiveRotationEffectModifier(modifier): content.modifier(modifier) case let ._FocusScopeModifier(modifier): content.modifier(modifier) case let ._PrefersDefaultFocusModifier(modifier): content.modifier(modifier) -case let ._NavigationTransitionModifier(modifier): +case let ._SearchCompletionModifier(modifier): content.modifier(modifier) -case let ._MatchedTransitionSourceModifier(modifier): +case let ._OnSubmitModifier(modifier): content.modifier(modifier) -case let ._Rotation3DEffectModifier(modifier): +case let ._MatchedTransitionSourceModifier(modifier): content.modifier(modifier) case let ._customRegistryModifier(modifier): content.modifier(modifier) @@ -17073,9 +16973,8 @@ _dialogSuppressionToggleModifier.name: _dialogSuppressionToggleModifier.pa _digitalCrownAccessoryModifier.name: _digitalCrownAccessoryModifier.parser(in: context).map({ Output.chunk3(.digitalCrownAccessory($0)) }).eraseToAnyParser(), _disableAutocorrectionModifier.name: _disableAutocorrectionModifier.parser(in: context).map({ Output.chunk3(.disableAutocorrection($0)) }).eraseToAnyParser(), _disabledModifier.name: _disabledModifier.parser(in: context).map({ Output.chunk3(.disabled($0)) }).eraseToAnyParser(), -_disclosureGroupStyleModifier.name: _disclosureGroupStyleModifier.parser(in: context).map({ Output.chunk3(.disclosureGroupStyle($0)) }).eraseToAnyParser(), _dismissalConfirmationDialogModifier.name: _dismissalConfirmationDialogModifier.parser(in: context).map({ Output.chunk3(.dismissalConfirmationDialog($0)) }).eraseToAnyParser(), -_drawingGroupModifier.name: _drawingGroupModifier.parser(in: context).map({ Output.chunk4(.drawingGroup($0)) }).eraseToAnyParser(), +_drawingGroupModifier.name: _drawingGroupModifier.parser(in: context).map({ Output.chunk3(.drawingGroup($0)) }).eraseToAnyParser(), _dynamicTypeSizeModifier.name: _dynamicTypeSizeModifier.parser(in: context).map({ Output.chunk4(.dynamicTypeSize($0)) }).eraseToAnyParser(), _edgesIgnoringSafeAreaModifier.name: _edgesIgnoringSafeAreaModifier.parser(in: context).map({ Output.chunk4(.edgesIgnoringSafeArea($0)) }).eraseToAnyParser(), _fileDialogCustomizationIDModifier.name: _fileDialogCustomizationIDModifier.parser(in: context).map({ Output.chunk4(.fileDialogCustomizationID($0)) }).eraseToAnyParser(), @@ -17089,7 +16988,7 @@ _focusSectionModifier.name: _focusSectionModifier.parser(in: context).map( _focusableModifier.name: _focusableModifier.parser(in: context).map({ Output.chunk4(.focusable($0)) }).eraseToAnyParser(), _foregroundColorModifier.name: _foregroundColorModifier.parser(in: context).map({ Output.chunk4(.foregroundColor($0)) }).eraseToAnyParser(), _formStyleModifier.name: _formStyleModifier.parser(in: context).map({ Output.chunk4(.formStyle($0)) }).eraseToAnyParser(), -_frameModifier.name: _frameModifier.parser(in: context).map({ Output.chunk5(.frame($0)) }).eraseToAnyParser(), +_frameModifier.name: _frameModifier.parser(in: context).map({ Output.chunk4(.frame($0)) }).eraseToAnyParser(), _fullScreenCoverModifier.name: _fullScreenCoverModifier.parser(in: context).map({ Output.chunk5(.fullScreenCover($0)) }).eraseToAnyParser(), _gaugeStyleModifier.name: _gaugeStyleModifier.parser(in: context).map({ Output.chunk5(.gaugeStyle($0)) }).eraseToAnyParser(), _geometryGroupModifier.name: _geometryGroupModifier.parser(in: context).map({ Output.chunk5(.geometryGroup($0)) }).eraseToAnyParser(), @@ -17103,7 +17002,7 @@ _gridColumnAlignmentModifier.name: _gridColumnAlignmentModifier.parser(in: _groupBoxStyleModifier.name: _groupBoxStyleModifier.parser(in: context).map({ Output.chunk5(.groupBoxStyle($0)) }).eraseToAnyParser(), _handGestureShortcutModifier.name: _handGestureShortcutModifier.parser(in: context).map({ Output.chunk5(.handGestureShortcut($0)) }).eraseToAnyParser(), _handPointerBehaviorModifier.name: _handPointerBehaviorModifier.parser(in: context).map({ Output.chunk5(.handPointerBehavior($0)) }).eraseToAnyParser(), -_headerProminenceModifier.name: _headerProminenceModifier.parser(in: context).map({ Output.chunk6(.headerProminence($0)) }).eraseToAnyParser(), +_headerProminenceModifier.name: _headerProminenceModifier.parser(in: context).map({ Output.chunk5(.headerProminence($0)) }).eraseToAnyParser(), _helpModifier.name: _helpModifier.parser(in: context).map({ Output.chunk6(.help($0)) }).eraseToAnyParser(), _hiddenModifier.name: _hiddenModifier.parser(in: context).map({ Output.chunk6(.hidden($0)) }).eraseToAnyParser(), _highPriorityGestureModifier.name: _highPriorityGestureModifier.parser(in: context).map({ Output.chunk6(.highPriorityGesture($0)) }).eraseToAnyParser(), @@ -17117,7 +17016,7 @@ _imageScaleModifier.name: _imageScaleModifier.parser(in: context).map({ Ou _immersiveEnvironmentPickerModifier.name: _immersiveEnvironmentPickerModifier.parser(in: context).map({ Output.chunk6(.immersiveEnvironmentPicker($0)) }).eraseToAnyParser(), _indexViewStyleModifier.name: _indexViewStyleModifier.parser(in: context).map({ Output.chunk6(.indexViewStyle($0)) }).eraseToAnyParser(), _inspectorModifier.name: _inspectorModifier.parser(in: context).map({ Output.chunk6(.inspector($0)) }).eraseToAnyParser(), -_inspectorColumnWidthModifier.name: _inspectorColumnWidthModifier.parser(in: context).map({ Output.chunk7(.inspectorColumnWidth($0)) }).eraseToAnyParser(), +_inspectorColumnWidthModifier.name: _inspectorColumnWidthModifier.parser(in: context).map({ Output.chunk6(.inspectorColumnWidth($0)) }).eraseToAnyParser(), _interactionActivityTrackingTagModifier.name: _interactionActivityTrackingTagModifier.parser(in: context).map({ Output.chunk7(.interactionActivityTrackingTag($0)) }).eraseToAnyParser(), _interactiveDismissDisabledModifier.name: _interactiveDismissDisabledModifier.parser(in: context).map({ Output.chunk7(.interactiveDismissDisabled($0)) }).eraseToAnyParser(), _invalidatableContentModifier.name: _invalidatableContentModifier.parser(in: context).map({ Output.chunk7(.invalidatableContent($0)) }).eraseToAnyParser(), @@ -17131,7 +17030,7 @@ _layoutPriorityModifier.name: _layoutPriorityModifier.parser(in: context). _lineLimitModifier.name: _lineLimitModifier.parser(in: context).map({ Output.chunk7(.lineLimit($0)) }).eraseToAnyParser(), _lineSpacingModifier.name: _lineSpacingModifier.parser(in: context).map({ Output.chunk7(.lineSpacing($0)) }).eraseToAnyParser(), _listItemTintModifier.name: _listItemTintModifier.parser(in: context).map({ Output.chunk7(.listItemTint($0)) }).eraseToAnyParser(), -_listRowBackgroundModifier.name: _listRowBackgroundModifier.parser(in: context).map({ Output.chunk8(.listRowBackground($0)) }).eraseToAnyParser(), +_listRowBackgroundModifier.name: _listRowBackgroundModifier.parser(in: context).map({ Output.chunk7(.listRowBackground($0)) }).eraseToAnyParser(), _listRowHoverEffectModifier.name: _listRowHoverEffectModifier.parser(in: context).map({ Output.chunk8(.listRowHoverEffect($0)) }).eraseToAnyParser(), _listRowHoverEffectDisabledModifier.name: _listRowHoverEffectDisabledModifier.parser(in: context).map({ Output.chunk8(.listRowHoverEffectDisabled($0)) }).eraseToAnyParser(), _listRowInsetsModifier.name: _listRowInsetsModifier.parser(in: context).map({ Output.chunk8(.listRowInsets($0)) }).eraseToAnyParser(), @@ -17145,7 +17044,7 @@ _listSectionSpacingModifier.name: _listSectionSpacingModifier.parser(in: c _listStyleModifier.name: _listStyleModifier.parser(in: context).map({ Output.chunk8(.listStyle($0)) }).eraseToAnyParser(), _luminanceToAlphaModifier.name: _luminanceToAlphaModifier.parser(in: context).map({ Output.chunk8(.luminanceToAlpha($0)) }).eraseToAnyParser(), _materialActiveAppearanceModifier.name: _materialActiveAppearanceModifier.parser(in: context).map({ Output.chunk8(.materialActiveAppearance($0)) }).eraseToAnyParser(), -_menuIndicatorModifier.name: _menuIndicatorModifier.parser(in: context).map({ Output.chunk9(.menuIndicator($0)) }).eraseToAnyParser(), +_menuIndicatorModifier.name: _menuIndicatorModifier.parser(in: context).map({ Output.chunk8(.menuIndicator($0)) }).eraseToAnyParser(), _menuOrderModifier.name: _menuOrderModifier.parser(in: context).map({ Output.chunk9(.menuOrder($0)) }).eraseToAnyParser(), _menuStyleModifier.name: _menuStyleModifier.parser(in: context).map({ Output.chunk9(.menuStyle($0)) }).eraseToAnyParser(), _minimumScaleFactorModifier.name: _minimumScaleFactorModifier.parser(in: context).map({ Output.chunk9(.minimumScaleFactor($0)) }).eraseToAnyParser(), @@ -17159,10 +17058,9 @@ _navigationBarTitleModifier.name: _navigationBarTitleModifier.parser(in: c _navigationBarTitleDisplayModeModifier.name: _navigationBarTitleDisplayModeModifier.parser(in: context).map({ Output.chunk9(.navigationBarTitleDisplayMode($0)) }).eraseToAnyParser(), _navigationDestinationModifier.name: _navigationDestinationModifier.parser(in: context).map({ Output.chunk9(.navigationDestination($0)) }).eraseToAnyParser(), _navigationSplitViewColumnWidthModifier.name: _navigationSplitViewColumnWidthModifier.parser(in: context).map({ Output.chunk9(.navigationSplitViewColumnWidth($0)) }).eraseToAnyParser(), -_navigationSplitViewStyleModifier.name: _navigationSplitViewStyleModifier.parser(in: context).map({ Output.chunk10(.navigationSplitViewStyle($0)) }).eraseToAnyParser(), +_navigationSplitViewStyleModifier.name: _navigationSplitViewStyleModifier.parser(in: context).map({ Output.chunk9(.navigationSplitViewStyle($0)) }).eraseToAnyParser(), _navigationSubtitleModifier.name: _navigationSubtitleModifier.parser(in: context).map({ Output.chunk10(.navigationSubtitle($0)) }).eraseToAnyParser(), _navigationTitleModifier.name: _navigationTitleModifier.parser(in: context).map({ Output.chunk10(.navigationTitle($0)) }).eraseToAnyParser(), -_navigationViewStyleModifier.name: _navigationViewStyleModifier.parser(in: context).map({ Output.chunk10(.navigationViewStyle($0)) }).eraseToAnyParser(), _offsetModifier.name: _offsetModifier.parser(in: context).map({ Output.chunk10(.offset($0)) }).eraseToAnyParser(), _onAppearModifier.name: _onAppearModifier.parser(in: context).map({ Output.chunk10(.onAppear($0)) }).eraseToAnyParser(), _onDeleteCommandModifier.name: _onDeleteCommandModifier.parser(in: context).map({ Output.chunk10(.onDeleteCommand($0)) }).eraseToAnyParser(), @@ -17173,8 +17071,8 @@ _onImmersionChangeModifier.name: _onImmersionChangeModifier.parser(in: con _onLongPressGestureModifier.name: _onLongPressGestureModifier.parser(in: context).map({ Output.chunk10(.onLongPressGesture($0)) }).eraseToAnyParser(), _onLongTouchGestureModifier.name: _onLongTouchGestureModifier.parser(in: context).map({ Output.chunk10(.onLongTouchGesture($0)) }).eraseToAnyParser(), _onModifierKeysChangedModifier.name: _onModifierKeysChangedModifier.parser(in: context).map({ Output.chunk10(.onModifierKeysChanged($0)) }).eraseToAnyParser(), -_onMoveCommandModifier.name: _onMoveCommandModifier.parser(in: context).map({ Output.chunk11(.onMoveCommand($0)) }).eraseToAnyParser(), -_onPencilDoubleTapModifier.name: _onPencilDoubleTapModifier.parser(in: context).map({ Output.chunk11(.onPencilDoubleTap($0)) }).eraseToAnyParser(), +_onMoveCommandModifier.name: _onMoveCommandModifier.parser(in: context).map({ Output.chunk10(.onMoveCommand($0)) }).eraseToAnyParser(), +_onPencilDoubleTapModifier.name: _onPencilDoubleTapModifier.parser(in: context).map({ Output.chunk10(.onPencilDoubleTap($0)) }).eraseToAnyParser(), _onPencilSqueezeModifier.name: _onPencilSqueezeModifier.parser(in: context).map({ Output.chunk11(.onPencilSqueeze($0)) }).eraseToAnyParser(), _onPlayPauseCommandModifier.name: _onPlayPauseCommandModifier.parser(in: context).map({ Output.chunk11(.onPlayPauseCommand($0)) }).eraseToAnyParser(), _onScrollPhaseChangeModifier.name: _onScrollPhaseChangeModifier.parser(in: context).map({ Output.chunk11(.onScrollPhaseChange($0)) }).eraseToAnyParser(), @@ -17187,8 +17085,8 @@ _overlayModifier.name: _overlayModifier.parser(in: context).map({ Output.c _paddingModifier.name: _paddingModifier.parser(in: context).map({ Output.chunk11(.padding($0)) }).eraseToAnyParser(), _padding3DModifier.name: _padding3DModifier.parser(in: context).map({ Output.chunk11(.padding3D($0)) }).eraseToAnyParser(), _persistentSystemOverlaysModifier.name: _persistentSystemOverlaysModifier.parser(in: context).map({ Output.chunk11(.persistentSystemOverlays($0)) }).eraseToAnyParser(), -_pickerStyleModifier.name: _pickerStyleModifier.parser(in: context).map({ Output.chunk12(.pickerStyle($0)) }).eraseToAnyParser(), -_pointerStyleModifier.name: _pointerStyleModifier.parser(in: context).map({ Output.chunk12(.pointerStyle($0)) }).eraseToAnyParser(), +_pickerStyleModifier.name: _pickerStyleModifier.parser(in: context).map({ Output.chunk11(.pickerStyle($0)) }).eraseToAnyParser(), +_pointerStyleModifier.name: _pointerStyleModifier.parser(in: context).map({ Output.chunk11(.pointerStyle($0)) }).eraseToAnyParser(), _pointerVisibilityModifier.name: _pointerVisibilityModifier.parser(in: context).map({ Output.chunk12(.pointerVisibility($0)) }).eraseToAnyParser(), _popoverModifier.name: _popoverModifier.parser(in: context).map({ Output.chunk12(.popover($0)) }).eraseToAnyParser(), _positionModifier.name: _positionModifier.parser(in: context).map({ Output.chunk12(.position($0)) }).eraseToAnyParser(), @@ -17201,8 +17099,8 @@ _presentationContentInteractionModifier.name: _presentationContentInteraction _presentationCornerRadiusModifier.name: _presentationCornerRadiusModifier.parser(in: context).map({ Output.chunk12(.presentationCornerRadius($0)) }).eraseToAnyParser(), _presentationDragIndicatorModifier.name: _presentationDragIndicatorModifier.parser(in: context).map({ Output.chunk12(.presentationDragIndicator($0)) }).eraseToAnyParser(), _presentationSizingModifier.name: _presentationSizingModifier.parser(in: context).map({ Output.chunk12(.presentationSizing($0)) }).eraseToAnyParser(), -_previewDisplayNameModifier.name: _previewDisplayNameModifier.parser(in: context).map({ Output.chunk13(.previewDisplayName($0)) }).eraseToAnyParser(), -_privacySensitiveModifier.name: _privacySensitiveModifier.parser(in: context).map({ Output.chunk13(.privacySensitive($0)) }).eraseToAnyParser(), +_previewDisplayNameModifier.name: _previewDisplayNameModifier.parser(in: context).map({ Output.chunk12(.previewDisplayName($0)) }).eraseToAnyParser(), +_privacySensitiveModifier.name: _privacySensitiveModifier.parser(in: context).map({ Output.chunk12(.privacySensitive($0)) }).eraseToAnyParser(), _progressViewStyleModifier.name: _progressViewStyleModifier.parser(in: context).map({ Output.chunk13(.progressViewStyle($0)) }).eraseToAnyParser(), _projectionEffectModifier.name: _projectionEffectModifier.parser(in: context).map({ Output.chunk13(.projectionEffect($0)) }).eraseToAnyParser(), _redactedModifier.name: _redactedModifier.parser(in: context).map({ Output.chunk13(.redacted($0)) }).eraseToAnyParser(), @@ -17215,8 +17113,8 @@ _safeAreaPaddingModifier.name: _safeAreaPaddingModifier.parser(in: context _saturationModifier.name: _saturationModifier.parser(in: context).map({ Output.chunk13(.saturation($0)) }).eraseToAnyParser(), _scaleEffectModifier.name: _scaleEffectModifier.parser(in: context).map({ Output.chunk13(.scaleEffect($0)) }).eraseToAnyParser(), _scaledToFillModifier.name: _scaledToFillModifier.parser(in: context).map({ Output.chunk13(.scaledToFill($0)) }).eraseToAnyParser(), -_scaledToFitModifier.name: _scaledToFitModifier.parser(in: context).map({ Output.chunk14(.scaledToFit($0)) }).eraseToAnyParser(), -_scenePaddingModifier.name: _scenePaddingModifier.parser(in: context).map({ Output.chunk14(.scenePadding($0)) }).eraseToAnyParser(), +_scaledToFitModifier.name: _scaledToFitModifier.parser(in: context).map({ Output.chunk13(.scaledToFit($0)) }).eraseToAnyParser(), +_scenePaddingModifier.name: _scenePaddingModifier.parser(in: context).map({ Output.chunk13(.scenePadding($0)) }).eraseToAnyParser(), _scrollBounceBehaviorModifier.name: _scrollBounceBehaviorModifier.parser(in: context).map({ Output.chunk14(.scrollBounceBehavior($0)) }).eraseToAnyParser(), _scrollClipDisabledModifier.name: _scrollClipDisabledModifier.parser(in: context).map({ Output.chunk14(.scrollClipDisabled($0)) }).eraseToAnyParser(), _scrollContentBackgroundModifier.name: _scrollContentBackgroundModifier.parser(in: context).map({ Output.chunk14(.scrollContentBackground($0)) }).eraseToAnyParser(), @@ -17229,8 +17127,8 @@ _scrollTargetBehaviorModifier.name: _scrollTargetBehaviorModifier.parser(i _scrollTargetLayoutModifier.name: _scrollTargetLayoutModifier.parser(in: context).map({ Output.chunk14(.scrollTargetLayout($0)) }).eraseToAnyParser(), _searchDictationBehaviorModifier.name: _searchDictationBehaviorModifier.parser(in: context).map({ Output.chunk14(.searchDictationBehavior($0)) }).eraseToAnyParser(), _searchPresentationToolbarBehaviorModifier.name: _searchPresentationToolbarBehaviorModifier.parser(in: context).map({ Output.chunk14(.searchPresentationToolbarBehavior($0)) }).eraseToAnyParser(), -_searchSuggestionsModifier.name: _searchSuggestionsModifier.parser(in: context).map({ Output.chunk15(.searchSuggestions($0)) }).eraseToAnyParser(), -_searchableModifier.name: _searchableModifier.parser(in: context).map({ Output.chunk15(.searchable($0)) }).eraseToAnyParser(), +_searchSuggestionsModifier.name: _searchSuggestionsModifier.parser(in: context).map({ Output.chunk14(.searchSuggestions($0)) }).eraseToAnyParser(), +_searchableModifier.name: _searchableModifier.parser(in: context).map({ Output.chunk14(.searchable($0)) }).eraseToAnyParser(), _sectionActionsModifier.name: _sectionActionsModifier.parser(in: context).map({ Output.chunk15(.sectionActions($0)) }).eraseToAnyParser(), _selectionDisabledModifier.name: _selectionDisabledModifier.parser(in: context).map({ Output.chunk15(.selectionDisabled($0)) }).eraseToAnyParser(), _shadowModifier.name: _shadowModifier.parser(in: context).map({ Output.chunk15(.shadow($0)) }).eraseToAnyParser(), @@ -17243,8 +17141,8 @@ _speechSpellsOutCharactersModifier.name: _speechSpellsOutCharactersModifier.name: _statusBarModifier.parser(in: context).map({ Output.chunk15(.statusBar($0)) }).eraseToAnyParser(), _statusBarHiddenModifier.name: _statusBarHiddenModifier.parser(in: context).map({ Output.chunk15(.statusBarHidden($0)) }).eraseToAnyParser(), _submitLabelModifier.name: _submitLabelModifier.parser(in: context).map({ Output.chunk15(.submitLabel($0)) }).eraseToAnyParser(), -_submitScopeModifier.name: _submitScopeModifier.parser(in: context).map({ Output.chunk16(.submitScope($0)) }).eraseToAnyParser(), -_supportedVolumeViewpointsModifier.name: _supportedVolumeViewpointsModifier.parser(in: context).map({ Output.chunk16(.supportedVolumeViewpoints($0)) }).eraseToAnyParser(), +_submitScopeModifier.name: _submitScopeModifier.parser(in: context).map({ Output.chunk15(.submitScope($0)) }).eraseToAnyParser(), +_supportedVolumeViewpointsModifier.name: _supportedVolumeViewpointsModifier.parser(in: context).map({ Output.chunk15(.supportedVolumeViewpoints($0)) }).eraseToAnyParser(), _swipeActionsModifier.name: _swipeActionsModifier.parser(in: context).map({ Output.chunk16(.swipeActions($0)) }).eraseToAnyParser(), _symbolEffectModifier.name: _symbolEffectModifier.parser(in: context).map({ Output.chunk16(.symbolEffect($0)) }).eraseToAnyParser(), _symbolEffectsRemovedModifier.name: _symbolEffectsRemovedModifier.parser(in: context).map({ Output.chunk16(.symbolEffectsRemoved($0)) }).eraseToAnyParser(), @@ -17257,8 +17155,8 @@ _tabViewSidebarHeaderModifier.name: _tabViewSidebarHeaderModifier.parser(i _tabViewStyleModifier.name: _tabViewStyleModifier.parser(in: context).map({ Output.chunk16(.tabViewStyle($0)) }).eraseToAnyParser(), _tableStyleModifier.name: _tableStyleModifier.parser(in: context).map({ Output.chunk16(.tableStyle($0)) }).eraseToAnyParser(), _textCaseModifier.name: _textCaseModifier.parser(in: context).map({ Output.chunk16(.textCase($0)) }).eraseToAnyParser(), -_textContentTypeModifier.name: _textContentTypeModifier.parser(in: context).map({ Output.chunk17(.textContentType($0)) }).eraseToAnyParser(), -_textEditorStyleModifier.name: _textEditorStyleModifier.parser(in: context).map({ Output.chunk17(.textEditorStyle($0)) }).eraseToAnyParser(), +_textContentTypeModifier.name: _textContentTypeModifier.parser(in: context).map({ Output.chunk16(.textContentType($0)) }).eraseToAnyParser(), +_textEditorStyleModifier.name: _textEditorStyleModifier.parser(in: context).map({ Output.chunk16(.textEditorStyle($0)) }).eraseToAnyParser(), _textFieldStyleModifier.name: _textFieldStyleModifier.parser(in: context).map({ Output.chunk17(.textFieldStyle($0)) }).eraseToAnyParser(), _textInputAutocapitalizationModifier.name: _textInputAutocapitalizationModifier.parser(in: context).map({ Output.chunk17(.textInputAutocapitalization($0)) }).eraseToAnyParser(), _textInputCompletionModifier.name: _textInputCompletionModifier.parser(in: context).map({ Output.chunk17(.textInputCompletion($0)) }).eraseToAnyParser(), @@ -17271,8 +17169,8 @@ _toolbarModifier.name: _toolbarModifier.parser(in: context).map({ Output.c _toolbarBackgroundModifier.name: _toolbarBackgroundModifier.parser(in: context).map({ Output.chunk17(.toolbarBackground($0)) }).eraseToAnyParser(), _toolbarBackgroundVisibilityModifier.name: _toolbarBackgroundVisibilityModifier.parser(in: context).map({ Output.chunk17(.toolbarBackgroundVisibility($0)) }).eraseToAnyParser(), _toolbarColorSchemeModifier.name: _toolbarColorSchemeModifier.parser(in: context).map({ Output.chunk17(.toolbarColorScheme($0)) }).eraseToAnyParser(), -_toolbarItemHiddenModifier.name: _toolbarItemHiddenModifier.parser(in: context).map({ Output.chunk18(.toolbarItemHidden($0)) }).eraseToAnyParser(), -_toolbarRoleModifier.name: _toolbarRoleModifier.parser(in: context).map({ Output.chunk18(.toolbarRole($0)) }).eraseToAnyParser(), +_toolbarItemHiddenModifier.name: _toolbarItemHiddenModifier.parser(in: context).map({ Output.chunk17(.toolbarItemHidden($0)) }).eraseToAnyParser(), +_toolbarRoleModifier.name: _toolbarRoleModifier.parser(in: context).map({ Output.chunk17(.toolbarRole($0)) }).eraseToAnyParser(), _toolbarTitleDisplayModeModifier.name: _toolbarTitleDisplayModeModifier.parser(in: context).map({ Output.chunk18(.toolbarTitleDisplayMode($0)) }).eraseToAnyParser(), _toolbarTitleMenuModifier.name: _toolbarTitleMenuModifier.parser(in: context).map({ Output.chunk18(.toolbarTitleMenu($0)) }).eraseToAnyParser(), _toolbarVisibilityModifier.name: _toolbarVisibilityModifier.parser(in: context).map({ Output.chunk18(.toolbarVisibility($0)) }).eraseToAnyParser(), @@ -17285,25 +17183,25 @@ _truncationModeModifier.name: _truncationModeModifier.parser(in: context). _unredactedModifier.name: _unredactedModifier.parser(in: context).map({ Output.chunk18(.unredacted($0)) }).eraseToAnyParser(), _upperLimbVisibilityModifier.name: _upperLimbVisibilityModifier.parser(in: context).map({ Output.chunk18(.upperLimbVisibility($0)) }).eraseToAnyParser(), _volumeBaseplateVisibilityModifier.name: _volumeBaseplateVisibilityModifier.parser(in: context).map({ Output.chunk18(.volumeBaseplateVisibility($0)) }).eraseToAnyParser(), -_windowDismissBehaviorModifier.name: _windowDismissBehaviorModifier.parser(in: context).map({ Output.chunk19(.windowDismissBehavior($0)) }).eraseToAnyParser(), -_windowFullScreenBehaviorModifier.name: _windowFullScreenBehaviorModifier.parser(in: context).map({ Output.chunk19(.windowFullScreenBehavior($0)) }).eraseToAnyParser(), +_windowDismissBehaviorModifier.name: _windowDismissBehaviorModifier.parser(in: context).map({ Output.chunk18(.windowDismissBehavior($0)) }).eraseToAnyParser(), +_windowFullScreenBehaviorModifier.name: _windowFullScreenBehaviorModifier.parser(in: context).map({ Output.chunk18(.windowFullScreenBehavior($0)) }).eraseToAnyParser(), _windowMinimizeBehaviorModifier.name: _windowMinimizeBehaviorModifier.parser(in: context).map({ Output.chunk19(.windowMinimizeBehavior($0)) }).eraseToAnyParser(), _windowResizeBehaviorModifier.name: _windowResizeBehaviorModifier.parser(in: context).map({ Output.chunk19(.windowResizeBehavior($0)) }).eraseToAnyParser(), _windowToolbarFullScreenVisibilityModifier.name: _windowToolbarFullScreenVisibilityModifier.parser(in: context).map({ Output.chunk19(.windowToolbarFullScreenVisibility($0)) }).eraseToAnyParser(), _writingToolsBehaviorModifier.name: _writingToolsBehaviorModifier.parser(in: context).map({ Output.chunk19(.writingToolsBehavior($0)) }).eraseToAnyParser(), _zIndexModifier.name: _zIndexModifier.parser(in: context).map({ Output.chunk19(.zIndex($0)) }).eraseToAnyParser(), - LiveViewNative._SearchCompletionModifier.name: LiveViewNative._SearchCompletionModifier.parser(in: context).map(Output._SearchCompletionModifier).eraseToAnyParser(), -LiveViewNative._OnSubmitModifier.name: LiveViewNative._OnSubmitModifier.parser(in: context).map(Output._OnSubmitModifier).eraseToAnyParser(), + LiveViewNative._MaskModifier.name: LiveViewNative._MaskModifier.parser(in: context).map(Output._MaskModifier).eraseToAnyParser(), LiveViewNative._SearchScopesModifier.name: LiveViewNative._SearchScopesModifier.parser(in: context).map(Output._SearchScopesModifier).eraseToAnyParser(), -LiveViewNative._PerspectiveRotationEffectModifier.name: LiveViewNative._PerspectiveRotationEffectModifier.parser(in: context).map(Output._PerspectiveRotationEffectModifier).eraseToAnyParser(), -LiveViewNative._PresentationDetentsModifier.name: LiveViewNative._PresentationDetentsModifier.parser(in: context).map(Output._PresentationDetentsModifier).eraseToAnyParser(), -LiveViewNative._MaskModifier.name: LiveViewNative._MaskModifier.parser(in: context).map(Output._MaskModifier).eraseToAnyParser(), LiveViewNative._MatchedGeometryEffectModifier.name: LiveViewNative._MatchedGeometryEffectModifier.parser(in: context).map(Output._MatchedGeometryEffectModifier).eraseToAnyParser(), +LiveViewNative._Rotation3DEffectModifier.name: LiveViewNative._Rotation3DEffectModifier.parser(in: context).map(Output._Rotation3DEffectModifier).eraseToAnyParser(), +LiveViewNative._NavigationTransitionModifier.name: LiveViewNative._NavigationTransitionModifier.parser(in: context).map(Output._NavigationTransitionModifier).eraseToAnyParser(), +LiveViewNative._PresentationDetentsModifier.name: LiveViewNative._PresentationDetentsModifier.parser(in: context).map(Output._PresentationDetentsModifier).eraseToAnyParser(), +LiveViewNative._PerspectiveRotationEffectModifier.name: LiveViewNative._PerspectiveRotationEffectModifier.parser(in: context).map(Output._PerspectiveRotationEffectModifier).eraseToAnyParser(), LiveViewNative._FocusScopeModifier.name: LiveViewNative._FocusScopeModifier.parser(in: context).map(Output._FocusScopeModifier).eraseToAnyParser(), LiveViewNative._PrefersDefaultFocusModifier.name: LiveViewNative._PrefersDefaultFocusModifier.parser(in: context).map(Output._PrefersDefaultFocusModifier).eraseToAnyParser(), -LiveViewNative._NavigationTransitionModifier.name: LiveViewNative._NavigationTransitionModifier.parser(in: context).map(Output._NavigationTransitionModifier).eraseToAnyParser(), +LiveViewNative._SearchCompletionModifier.name: LiveViewNative._SearchCompletionModifier.parser(in: context).map(Output._SearchCompletionModifier).eraseToAnyParser(), +LiveViewNative._OnSubmitModifier.name: LiveViewNative._OnSubmitModifier.parser(in: context).map(Output._OnSubmitModifier).eraseToAnyParser(), LiveViewNative._MatchedTransitionSourceModifier.name: LiveViewNative._MatchedTransitionSourceModifier.parser(in: context).map(Output._MatchedTransitionSourceModifier).eraseToAnyParser(), -LiveViewNative._Rotation3DEffectModifier.name: LiveViewNative._Rotation3DEffectModifier.parser(in: context).map(Output._Rotation3DEffectModifier).eraseToAnyParser(), ] let deprecations = [ @@ -17499,7 +17397,7 @@ ConstantAtomLiteral("content").map({ () -> Self in /// * `.tabBar` /// * `.sidebar` @_documentation(visibility: public) -@available(watchOS 11.0,macOS 15.0,tvOS 18.0,visionOS 2.0,iOS 18.0, *) +@available(iOS 18.0,visionOS 2.0,macOS 15.0,watchOS 11.0,tvOS 18.0, *) extension AdaptableTabBarPlacement: ParseableModifierValue { public static func parser(in context: ParseableModifierContext) -> some Parser { ImplicitStaticMember { @@ -17845,7 +17743,7 @@ ConstantAtomLiteral("plusLighter").map({ () -> Self in /// * `.enabled` /// * `.disabled` @_documentation(visibility: public) -@available(watchOS 10.0,visionOS 1.0,iOS 17.0,tvOS 17.0,macOS 14.0, *) +@available(iOS 17.0,visionOS 1.0,macOS 14.0,watchOS 10.0,tvOS 17.0, *) extension ButtonRepeatBehavior: ParseableModifierValue { public static func parser(in context: ParseableModifierContext) -> some Parser { ImplicitStaticMember { @@ -17964,35 +17862,35 @@ ConstantAtomLiteral("dark").map({ () -> Self in /// * `.navigationSplitView` /// * `.window` @_documentation(visibility: public) -@available(iOS 17.0,macOS 14.0,watchOS 10.0,tvOS 17.0,visionOS 1.0, *) +@available(tvOS 17.0,iOS 17.0,macOS 14.0,visionOS 1.0,watchOS 10.0, *) extension ContainerBackgroundPlacement: ParseableModifierValue { public static func parser(in context: ParseableModifierContext) -> some Parser { ImplicitStaticMember { OneOf { #if os(watchOS) ConstantAtomLiteral("tabView").map({ () -> Self in -if #available(iOS 17.0,macOS 14.0,watchOS 10.0,tvOS 17.0, *) { +if #available(tvOS 17.0,iOS 17.0,macOS 14.0,watchOS 10.0, *) { return Self.tabView } else { fatalError("'tabView' is not available in this OS version") } }) #endif #if os(iOS) || os(watchOS) ConstantAtomLiteral("navigation").map({ () -> Self in -if #available(iOS 18.0,macOS 14.0,watchOS 10.0,tvOS 17.0, *) { +if #available(tvOS 17.0,iOS 18.0,macOS 14.0,watchOS 10.0, *) { return Self.navigation } else { fatalError("'navigation' is not available in this OS version") } }) #endif #if os(iOS) || os(watchOS) ConstantAtomLiteral("navigationSplitView").map({ () -> Self in -if #available(iOS 18.0,macOS 14.0,watchOS 11.0,tvOS 17.0, *) { +if #available(tvOS 17.0,iOS 18.0,macOS 14.0,watchOS 11.0, *) { return Self.navigationSplitView } else { fatalError("'navigationSplitView' is not available in this OS version") } }) #endif #if os(macOS) ConstantAtomLiteral("window").map({ () -> Self in -if #available(iOS 17.0,macOS 15.0,watchOS 10.0,tvOS 17.0, *) { +if #available(tvOS 17.0,iOS 17.0,macOS 15.0,watchOS 10.0, *) { return Self.window } else { fatalError("'window' is not available in this OS version") } }) @@ -18013,7 +17911,7 @@ if #available(iOS 17.0,macOS 15.0,watchOS 10.0,tvOS 17.0, *) { /// * `.scrollContent` /// * `.scrollIndicators` @_documentation(visibility: public) -@available(iOS 17.0,visionOS 1.0,macOS 14.0,tvOS 17.0,watchOS 10.0, *) +@available(macOS 14.0,iOS 17.0,tvOS 17.0,visionOS 1.0,watchOS 10.0, *) extension ContentMarginPlacement: ParseableModifierValue { public static func parser(in context: ParseableModifierContext) -> some Parser { ImplicitStaticMember { @@ -18072,35 +17970,35 @@ ConstantAtomLiteral("interaction").map({ () -> Self in #if os(iOS) || os(macOS) || os(visionOS) ConstantAtomLiteral("dragPreview").map({ () -> Self in -if #available(macOS 12.0,iOS 15.0,tvOS 15.0,watchOS 8.0,visionOS 1.0, *) { +if #available(macOS 12.0,watchOS 8.0,iOS 15.0,tvOS 15.0,visionOS 1.0, *) { return Self.dragPreview } else { fatalError("'dragPreview' is not available in this OS version") } }) #endif #if os(iOS) || os(tvOS) || os(visionOS) ConstantAtomLiteral("contextMenuPreview").map({ () -> Self in -if #available(macOS 12.0,iOS 15.0,tvOS 17.0,watchOS 8.0,visionOS 1.0, *) { +if #available(macOS 12.0,watchOS 8.0,iOS 15.0,tvOS 17.0,visionOS 1.0, *) { return Self.contextMenuPreview } else { fatalError("'contextMenuPreview' is not available in this OS version") } }) #endif #if os(iOS) || os(tvOS) || os(visionOS) ConstantAtomLiteral("hoverEffect").map({ () -> Self in -if #available(macOS 12.0,iOS 15.0,tvOS 18.0,watchOS 8.0,visionOS 1.0, *) { +if #available(macOS 12.0,watchOS 8.0,iOS 15.0,tvOS 18.0,visionOS 1.0, *) { return Self.hoverEffect } else { fatalError("'hoverEffect' is not available in this OS version") } }) #endif #if os(macOS) || os(watchOS) ConstantAtomLiteral("focusEffect").map({ () -> Self in -if #available(macOS 12.0,iOS 15.0,tvOS 15.0,watchOS 8.0, *) { +if #available(macOS 12.0,watchOS 8.0,iOS 15.0,tvOS 15.0, *) { return Self.focusEffect } else { fatalError("'focusEffect' is not available in this OS version") } }) #endif #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) ConstantAtomLiteral("accessibility").map({ () -> Self in -if #available(visionOS 1.0,tvOS 17.0,macOS 14.0,iOS 17.0,watchOS 10.0, *) { +if #available(macOS 14.0,watchOS 10.0,visionOS 1.0,tvOS 17.0,iOS 17.0, *) { return Self.accessibility } else { fatalError("'accessibility' is not available in this OS version") } }) @@ -18123,7 +18021,7 @@ if #available(visionOS 1.0,tvOS 17.0,macOS 14.0,iOS 17.0,watchOS 10.0, *) { /// * `.large` /// * `.extraLarge` @_documentation(visibility: public) -@available(macOS 10.15,iOS 15.0,visionOS 1.0,watchOS 9.0, *) +@available(macOS 10.15,watchOS 9.0,visionOS 1.0,iOS 15.0, *) extension ControlSize: ParseableModifierValue { public static func parser(in context: ParseableModifierContext) -> some Parser { ImplicitStaticMember { @@ -18151,14 +18049,14 @@ ConstantAtomLiteral("regular").map({ () -> Self in #endif #if os(iOS) || os(macOS) || os(visionOS) || os(watchOS) ConstantAtomLiteral("large").map({ () -> Self in -if #available(macOS 11.0,iOS 15.0,visionOS 1.0,watchOS 9.0, *) { +if #available(macOS 11.0,watchOS 9.0,visionOS 1.0,iOS 15.0, *) { return Self.large } else { fatalError("'large' is not available in this OS version") } }) #endif #if os(iOS) || os(macOS) || os(visionOS) || os(watchOS) ConstantAtomLiteral("extraLarge").map({ () -> Self in -if #available(macOS 14.0,iOS 17.0,visionOS 1.0,watchOS 10.0, *) { +if #available(macOS 14.0,watchOS 10.0,visionOS 1.0,iOS 17.0, *) { return Self.extraLarge } else { fatalError("'extraLarge' is not available in this OS version") } }) @@ -18213,7 +18111,7 @@ ConstantAtomLiteral("userInitiated").map({ () -> Self in /// * `.critical` /// * `.standard` @_documentation(visibility: public) -@available(iOS 17.0,macOS 13.0,watchOS 10.0,tvOS 17.0,visionOS 1.0, *) +@available(macOS 13.0,iOS 17.0,tvOS 17.0,visionOS 1.0,watchOS 10.0, *) extension DialogSeverity: ParseableModifierValue { public static func parser(in context: ParseableModifierContext) -> some Parser { ImplicitStaticMember { @@ -18234,7 +18132,7 @@ ConstantAtomLiteral("critical").map({ () -> Self in #endif #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) ConstantAtomLiteral("standard").map({ () -> Self in -if #available(iOS 17.0,macOS 14.0,watchOS 10.0,tvOS 17.0,visionOS 1.0, *) { +if #available(macOS 14.0,iOS 17.0,tvOS 17.0,visionOS 1.0,watchOS 10.0, *) { return Self.standard } else { fatalError("'standard' is not available in this OS version") } }) @@ -18405,7 +18303,7 @@ ConstantAtomLiteral("all").map({ () -> Self in /// * `.includeHiddenFiles` /// * `.displayFileExtensions` @_documentation(visibility: public) -@available(visionOS 1.0,macOS 14.0,iOS 17.0, *) +@available(visionOS 1.0,iOS 17.0,macOS 14.0, *) extension FileDialogBrowserOptions: ParseableModifierValue { public static func parser(in context: ParseableModifierContext) -> some Parser { ImplicitStaticMember { @@ -18447,7 +18345,7 @@ ConstantAtomLiteral("displayFileExtensions").map({ () -> Self in /// * `.edit` /// * `.automatic` @_documentation(visibility: public) -@available(watchOS 10.0,visionOS 1.0,iOS 17.0,tvOS 17.0,macOS 14.0, *) +@available(iOS 17.0,visionOS 1.0,macOS 14.0,watchOS 10.0,tvOS 17.0, *) extension FocusInteractions: ParseableModifierValue { public static func parser(in context: ParseableModifierContext) -> some Parser { ImplicitStaticMember { @@ -18706,14 +18604,14 @@ extension HorizontalAlignment: ParseableModifierValue { OneOf { #if os(iOS) || os(macOS) || os(visionOS) ConstantAtomLiteral("listRowSeparatorLeading").map({ () -> Self in -if #available(visionOS 1.0,macOS 13.0,iOS 16.0, *) { +if #available(visionOS 1.0,iOS 16.0,macOS 13.0, *) { return Self.listRowSeparatorLeading } else { fatalError("'listRowSeparatorLeading' is not available in this OS version") } }) #endif #if os(iOS) || os(macOS) || os(visionOS) ConstantAtomLiteral("listRowSeparatorTrailing").map({ () -> Self in -if #available(visionOS 1.0,macOS 13.0,iOS 16.0, *) { +if #available(visionOS 1.0,iOS 16.0,macOS 13.0, *) { return Self.listRowSeparatorTrailing } else { fatalError("'listRowSeparatorTrailing' is not available in this OS version") } }) @@ -18754,7 +18652,7 @@ ConstantAtomLiteral("trailing").map({ () -> Self in /// * `.leading` /// * `.trailing` @_documentation(visibility: public) -@available(macOS 15.0,iOS 18.0,tvOS 18.0,watchOS 11.0,visionOS 2.0, *) +@available(macOS 15.0,watchOS 11.0,iOS 18.0,tvOS 18.0,visionOS 2.0, *) extension HorizontalDirection: ParseableModifierValue { public static func parser(in context: ParseableModifierContext) -> some Parser { ImplicitStaticMember { @@ -18823,7 +18721,7 @@ ConstantAtomLiteral("trailing").map({ () -> Self in /// * `.highlight` /// * `.lift` @_documentation(visibility: public) -@available(visionOS 1.0,iOS 13.4,tvOS 16.0, *) +@available(tvOS 16.0,iOS 13.4,visionOS 1.0, *) extension HoverEffect: ParseableModifierValue { public static func parser(in context: ParseableModifierContext) -> some Parser { ImplicitStaticMember { @@ -18837,7 +18735,7 @@ ConstantAtomLiteral("automatic").map({ () -> Self in #endif #if os(iOS) || os(tvOS) || os(visionOS) ConstantAtomLiteral("highlight").map({ () -> Self in -if #available(visionOS 1.0,iOS 13.4,tvOS 17.0, *) { +if #available(tvOS 17.0,iOS 13.4,visionOS 1.0, *) { return Self.highlight } else { fatalError("'highlight' is not available in this OS version") } }) @@ -18955,7 +18853,7 @@ ConstantAtomLiteral("automatic").map({ () -> Self in #if os(iOS) || os(visionOS) ConstantAtomLiteral("priority").map({ () -> Self in -if #available(watchOS 9.0,iOS 16.0,visionOS 1.0,tvOS 16.0,macOS 13.0, *) { +if #available(iOS 16.0,visionOS 1.0,macOS 13.0,tvOS 16.0,watchOS 9.0, *) { return Self.priority } else { fatalError("'priority' is not available in this OS version") } }) @@ -18985,7 +18883,7 @@ ConstantAtomLiteral("fixed").map({ () -> Self in /// * `.sheet` /// * `.fullScreenCover` @_documentation(visibility: public) -@available(watchOS 9.4,tvOS 16.4,iOS 16.4,visionOS 1.0,macOS 13.3, *) +@available(macOS 13.3,iOS 16.4,tvOS 16.4,visionOS 1.0,watchOS 9.4, *) extension PresentationAdaptation: ParseableModifierValue { public static func parser(in context: ParseableModifierContext) -> some Parser { ImplicitStaticMember { @@ -19041,7 +18939,7 @@ ConstantAtomLiteral("fullScreenCover").map({ () -> Self in /// * `.resizes` /// * `.scrolls` @_documentation(visibility: public) -@available(watchOS 9.4,visionOS 1.0,iOS 16.4,tvOS 16.4,macOS 13.3, *) +@available(iOS 16.4,visionOS 1.0,macOS 13.3,watchOS 9.4,tvOS 16.4, *) extension PresentationContentInteraction: ParseableModifierValue { public static func parser(in context: ParseableModifierContext) -> some Parser { ImplicitStaticMember { @@ -19138,7 +19036,7 @@ ConstantAtomLiteral("privacy").map({ () -> Self in #if os(iOS) || os(macOS) || os(tvOS) || os(visionOS) || os(watchOS) ConstantAtomLiteral("invalidated").map({ () -> Self in -if #available(macOS 14.0,iOS 17.0,tvOS 17.0,watchOS 10.0,visionOS 1.0, *) { +if #available(macOS 14.0,watchOS 10.0,visionOS 1.0,tvOS 17.0,iOS 17.0, *) { return Self.invalidated } else { fatalError("'invalidated' is not available in this OS version") } }) @@ -19248,7 +19146,7 @@ ConstantAtomLiteral("minimum").map({ () -> Self in #if os(watchOS) ConstantAtomLiteral("navigationBar").map({ () -> Self in -if #available(macOS 13.0,tvOS 16.0,watchOS 9.0,iOS 16.0, *) { +if #available(tvOS 16.0,macOS 13.0,iOS 16.0,watchOS 9.0, *) { return Self.navigationBar } else { fatalError("'navigationBar' is not available in this OS version") } }) @@ -19269,7 +19167,7 @@ if #available(macOS 13.0,tvOS 16.0,watchOS 9.0,iOS 16.0, *) { /// * `.sizeChanges` /// * `.alignment` @_documentation(visibility: public) -@available(iOS 18.0,macOS 15.0,watchOS 11.0,tvOS 18.0,visionOS 2.0, *) +@available(macOS 15.0,iOS 18.0,tvOS 18.0,visionOS 2.0,watchOS 11.0, *) extension ScrollAnchorRole: ParseableModifierValue { public static func parser(in context: ParseableModifierContext) -> some Parser { ImplicitStaticMember { @@ -19311,7 +19209,7 @@ ConstantAtomLiteral("alignment").map({ () -> Self in /// * `.always` /// * `.basedOnSize` @_documentation(visibility: public) -@available(iOS 16.4,macOS 13.3,watchOS 9.4,tvOS 16.4,visionOS 1.0, *) +@available(macOS 13.3,iOS 16.4,tvOS 16.4,visionOS 1.0,watchOS 9.4, *) extension ScrollBounceBehavior: ParseableModifierValue { public static func parser(in context: ParseableModifierContext) -> some Parser { ImplicitStaticMember { @@ -19354,7 +19252,7 @@ ConstantAtomLiteral("basedOnSize").map({ () -> Self in /// * `.interactively` /// * `.never` @_documentation(visibility: public) -@available(iOS 16.0,macOS 13.0,watchOS 9.0,tvOS 16.0, *) +@available(macOS 13.0,iOS 16.0,tvOS 16.0,watchOS 9.0, *) extension ScrollDismissesKeyboardMode: ParseableModifierValue { public static func parser(in context: ParseableModifierContext) -> some Parser { ImplicitStaticMember { @@ -19453,7 +19351,7 @@ ConstantAtomLiteral("never").map({ () -> Self in /// * `.enabled` /// * `.disabled` @_documentation(visibility: public) -@available(iOS 18.0,macOS 15.0,watchOS 11.0,tvOS 18.0,visionOS 2.0, *) +@available(macOS 15.0,iOS 18.0,tvOS 18.0,visionOS 2.0,watchOS 11.0, *) extension ScrollInputBehavior: ParseableModifierValue { public static func parser(in context: ParseableModifierContext) -> some Parser { ImplicitStaticMember { @@ -19495,7 +19393,7 @@ ConstantAtomLiteral("disabled").map({ () -> Self in /// * `.onTextEntry` /// * `.onSearchPresentation` @_documentation(visibility: public) -@available(watchOS 9.4,iOS 16.4,visionOS 1.0,tvOS 16.4,macOS 13.3, *) +@available(macOS 13.3,tvOS 16.4,watchOS 9.4,iOS 16.4,visionOS 1.0, *) extension SearchScopeActivation: ParseableModifierValue { public static func parser(in context: ParseableModifierContext) -> some Parser { ImplicitStaticMember { @@ -19579,7 +19477,7 @@ ConstantAtomLiteral("content").map({ () -> Self in /// * `.enabled` /// * `.disabled` @_documentation(visibility: public) -@available(macOS 14.0,watchOS 10.0,iOS 17.0,visionOS 1.0,tvOS 17.0, *) +@available(tvOS 17.0,macOS 14.0,visionOS 1.0,iOS 17.0,watchOS 10.0, *) extension SpringLoadingBehavior: ParseableModifierValue { public static func parser(in context: ParseableModifierContext) -> some Parser { ImplicitStaticMember { @@ -19745,7 +19643,7 @@ ConstantAtomLiteral("search").map({ () -> Self in /// * `.upstream` /// * `.downstream` @_documentation(visibility: public) -@available(watchOS 11.0,tvOS 18.0,iOS 18.0,visionOS 2.0,macOS 15.0, *) +@available(macOS 15.0,iOS 18.0,tvOS 18.0,visionOS 2.0,watchOS 11.0, *) extension TextSelectionAffinity: ParseableModifierValue { public static func parser(in context: ParseableModifierContext) -> some Parser { ImplicitStaticMember { @@ -19786,7 +19684,7 @@ ConstantAtomLiteral("downstream").map({ () -> Self in /// * `.sidebarToggle` /// * `.title` @_documentation(visibility: public) -@available(iOS 17.0,macOS 14.0,watchOS 10.0,tvOS 17.0,visionOS 1.0, *) +@available(macOS 14.0,iOS 17.0,tvOS 17.0,visionOS 1.0,watchOS 10.0, *) extension ToolbarDefaultItemKind: ParseableModifierValue { public static func parser(in context: ParseableModifierContext) -> some Parser { ImplicitStaticMember { @@ -19800,7 +19698,7 @@ ConstantAtomLiteral("sidebarToggle").map({ () -> Self in #endif #if os(iOS) || os(macOS) || os(visionOS) ConstantAtomLiteral("title").map({ () -> Self in -if #available(iOS 18.0,macOS 15.0,watchOS 10.0,tvOS 17.0,visionOS 2.0, *) { +if #available(macOS 15.0,iOS 18.0,tvOS 17.0,visionOS 2.0,watchOS 10.0, *) { return Self.title } else { fatalError("'title' is not available in this OS version") } }) @@ -19836,21 +19734,21 @@ ConstantAtomLiteral("automatic").map({ () -> Self in #if os(iOS) || os(tvOS) || os(visionOS) || os(watchOS) ConstantAtomLiteral("navigationStack").map({ () -> Self in -if #available(watchOS 9.0,visionOS 1.0,iOS 16.0,tvOS 16.0,macOS 13.0, *) { +if #available(iOS 16.0,visionOS 1.0,macOS 13.0,watchOS 9.0,tvOS 16.0, *) { return Self.navigationStack } else { fatalError("'navigationStack' is not available in this OS version") } }) #endif #if os(iOS) || os(visionOS) ConstantAtomLiteral("browser").map({ () -> Self in -if #available(watchOS 9.0,visionOS 1.0,iOS 16.0,tvOS 16.0,macOS 13.0, *) { +if #available(iOS 16.0,visionOS 1.0,macOS 13.0,watchOS 9.0,tvOS 16.0, *) { return Self.browser } else { fatalError("'browser' is not available in this OS version") } }) #endif #if os(iOS) || os(macOS) || os(visionOS) ConstantAtomLiteral("editor").map({ () -> Self in -if #available(watchOS 9.0,visionOS 1.0,iOS 16.0,tvOS 16.0,macOS 13.0, *) { +if #available(iOS 16.0,visionOS 1.0,macOS 13.0,watchOS 9.0,tvOS 16.0, *) { return Self.editor } else { fatalError("'editor' is not available in this OS version") } }) @@ -19872,7 +19770,7 @@ if #available(watchOS 9.0,visionOS 1.0,iOS 16.0,tvOS 16.0,macOS 13.0, *) { /// * `.inlineLarge` /// * `.inline` @_documentation(visibility: public) -@available(watchOS 10.0,tvOS 17.0,iOS 17.0,visionOS 1.0,macOS 14.0, *) +@available(macOS 14.0,iOS 17.0,tvOS 17.0,visionOS 1.0,watchOS 10.0, *) extension ToolbarTitleDisplayMode: ParseableModifierValue { public static func parser(in context: ParseableModifierContext) -> some Parser { ImplicitStaticMember { @@ -19978,7 +19876,7 @@ ConstantAtomLiteral("lastTextBaseline").map({ () -> Self in /// * `.up` /// * `.down` @_documentation(visibility: public) -@available(macOS 15.0,iOS 18.0,tvOS 18.0,watchOS 11.0,visionOS 2.0, *) +@available(macOS 15.0,watchOS 11.0,iOS 18.0,tvOS 18.0,visionOS 2.0, *) extension VerticalDirection: ParseableModifierValue { public static func parser(in context: ParseableModifierContext) -> some Parser { ImplicitStaticMember { @@ -20131,7 +20029,7 @@ ConstantAtomLiteral("disabled").map({ () -> Self in /// * `.visible` /// * `.onHover` @_documentation(visibility: public) -@available(iOS 18.0,macOS 15.0,watchOS 11.0,tvOS 18.0,visionOS 2.0, *) +@available(watchOS 11.0,visionOS 2.0,iOS 18.0,macOS 15.0,tvOS 18.0, *) extension WindowToolbarFullScreenVisibility: ParseableModifierValue { public static func parser(in context: ParseableModifierContext) -> some Parser { ImplicitStaticMember { @@ -20174,7 +20072,7 @@ ConstantAtomLiteral("onHover").map({ () -> Self in /// * `.limited` /// * `.disabled` @_documentation(visibility: public) -@available(macOS 15.0,iOS 18.0, *) +@available(iOS 18.0,macOS 15.0, *) extension WritingToolsBehavior: ParseableModifierValue { public static func parser(in context: ParseableModifierContext) -> some Parser { ImplicitStaticMember { diff --git a/Sources/ModifierGenerator/ModifierGenerator.swift b/Sources/ModifierGenerator/ModifierGenerator.swift index 5af7e88e6..b73307cdf 100644 --- a/Sources/ModifierGenerator/ModifierGenerator.swift +++ b/Sources/ModifierGenerator/ModifierGenerator.swift @@ -139,6 +139,10 @@ struct ModifierGenerator: ParsableCommand { "tabViewCustomization", "menuButtonStyle", + + "navigationViewStyle", + + "disclosureGroupStyle", // manually implemented due to argument order edge cases "searchScopes", From 29f922f25f7dc1d9f7e33caa6445d50d9d38fa3e Mon Sep 17 00:00:00 2001 From: Carson Katri Date: Thu, 17 Oct 2024 12:18:48 -0400 Subject: [PATCH 3/4] Remove AnyNavigationViewStyle --- ...tionViewStyle+ParseableModifierValue.swift | 24 ------------------- 1 file changed, 24 deletions(-) delete mode 100644 Sources/LiveViewNative/Stylesheets/ParseableTypes/Styles/AnyNavigationViewStyle+ParseableModifierValue.swift diff --git a/Sources/LiveViewNative/Stylesheets/ParseableTypes/Styles/AnyNavigationViewStyle+ParseableModifierValue.swift b/Sources/LiveViewNative/Stylesheets/ParseableTypes/Styles/AnyNavigationViewStyle+ParseableModifierValue.swift deleted file mode 100644 index 3b2837129..000000000 --- a/Sources/LiveViewNative/Stylesheets/ParseableTypes/Styles/AnyNavigationViewStyle+ParseableModifierValue.swift +++ /dev/null @@ -1,24 +0,0 @@ -// -// AnyNavigationViewStyle+ParseableModifierValue.swift -// -// -// Created by Carson Katri on 6/20/24. -// - -import SwiftUI -import LiveViewNativeStylesheet - -/// See [`SwiftUI.NavigationViewStyle`](https://developer.apple.com/documentation/swiftui/NavigationViewStyle) for more details. -/// -/// - Note: This type is deprecated and should no longer be used. -@_documentation(visibility: public) -enum AnyNavigationViewStyle: String, CaseIterable, ParseableModifierValue, NavigationViewStyle { - typealias _ParserType = ImplicitStaticMember> - - case __never - - @ViewBuilder - func _body(configuration: _NavigationViewStyleConfiguration) -> some View { - fatalError("This type is deprecated and should no longer be used.") - } -} From 6a853f846d6a3688bef8e1f18bf63f56eff1b6e8 Mon Sep 17 00:00:00 2001 From: Carson Katri Date: Wed, 13 Nov 2024 13:51:15 -0500 Subject: [PATCH 4/4] Add `ContentUnavailableView` (#1484) * Add ContentUnavailableView * Add test * Fix tests for macOS * Fix tvOS build * Fix actor-isolation issue on tvOS --- Package.swift | 10 - .../AnyGesture+ParseableModifierValue.swift | 1 + .../PointerStyle+ParseableModifierValue.swift | 4 +- .../Indicators/ContentUnavailableView.swift | 104 ++++++++++ .../TutorialRepoGenerator/Executable.swift | 120 ----------- Sources/TutorialRepoGenerator/Project.swift | 20 -- .../TutorialRepoGenerator.swift | 196 ------------------ .../LiveViewNativeMacrosTests.swift | 6 +- .../MacroTests.swift | 49 +++-- .../LiveViewNativeStylesheetTests.swift | 1 + .../ShapeStyleTests.swift | 8 +- .../LiveViewNativeTests/FormModelTests.swift | 3 + Tests/RenderingTests/IndicatorTests.swift | 71 +++++++ 13 files changed, 218 insertions(+), 375 deletions(-) create mode 100644 Sources/LiveViewNative/Views/Controls and Indicators/Indicators/ContentUnavailableView.swift delete mode 100644 Sources/TutorialRepoGenerator/Executable.swift delete mode 100644 Sources/TutorialRepoGenerator/Project.swift delete mode 100644 Sources/TutorialRepoGenerator/TutorialRepoGenerator.swift diff --git a/Package.swift b/Package.swift index 57e30bff5..b43ea1dc8 100644 --- a/Package.swift +++ b/Package.swift @@ -109,16 +109,6 @@ let package = Package( ), dependencies: [] ), - - // Unfortunately, this tool cannot be a plugin due to limitations on network access. - // Once SwiftPM supports plugins with network access, this can become a plugin again. - .executableTarget( - name: "TutorialRepoGenerator", - dependencies: [ - .product(name: "ArgumentParser", package: "swift-argument-parser"), - .product(name: "Markdown", package: "swift-markdown"), - ] - ), .macro( name: "LiveViewNativeMacros", diff --git a/Sources/LiveViewNative/Stylesheets/ParseableTypes/AnyGesture+ParseableModifierValue.swift b/Sources/LiveViewNative/Stylesheets/ParseableTypes/AnyGesture+ParseableModifierValue.swift index c460c4279..5abd37db3 100644 --- a/Sources/LiveViewNative/Stylesheets/ParseableTypes/AnyGesture+ParseableModifierValue.swift +++ b/Sources/LiveViewNative/Stylesheets/ParseableTypes/AnyGesture+ParseableModifierValue.swift @@ -324,6 +324,7 @@ struct _AnyGesture: ParseableModifierValue { } #endif + @MainActor @ParseableExpression struct LongPress { static let name = "LongPressGesture" diff --git a/Sources/LiveViewNative/Stylesheets/ParseableTypes/PointerStyle+ParseableModifierValue.swift b/Sources/LiveViewNative/Stylesheets/ParseableTypes/PointerStyle+ParseableModifierValue.swift index 398eed80d..e1b2f87d4 100644 --- a/Sources/LiveViewNative/Stylesheets/ParseableTypes/PointerStyle+ParseableModifierValue.swift +++ b/Sources/LiveViewNative/Stylesheets/ParseableTypes/PointerStyle+ParseableModifierValue.swift @@ -10,7 +10,7 @@ import LiveViewNativeStylesheet #if os(macOS) || os(visionOS) @available(macOS 15, visionOS 2, *) -extension PointerStyle: @retroactive ParseableModifierValue { +extension PointerStyle: ParseableModifierValue { public static func parser(in context: ParseableModifierContext) -> some Parser { ImplicitStaticMember { OneOf { @@ -144,7 +144,7 @@ extension VerticalDirection.Set: ParseableModifierValue { #if os(macOS) @available(macOS 15.0, *) -extension FrameResizeDirection.Set: @retroactive ParseableModifierValue { +extension FrameResizeDirection.Set: ParseableModifierValue { public static func parser(in context: ParseableModifierContext) -> some Parser { OneOf { Array.parser(in: context).map({ Self.init($0) }) diff --git a/Sources/LiveViewNative/Views/Controls and Indicators/Indicators/ContentUnavailableView.swift b/Sources/LiveViewNative/Views/Controls and Indicators/Indicators/ContentUnavailableView.swift new file mode 100644 index 000000000..47ffd71f6 --- /dev/null +++ b/Sources/LiveViewNative/Views/Controls and Indicators/Indicators/ContentUnavailableView.swift @@ -0,0 +1,104 @@ +// +// ContentUnavailableView.swift +// LiveViewNative +// +// Created by Carson Katri on 11/12/24. +// + +import SwiftUI + +/// An interface that indicates content is missing or unavailable. +/// +/// ```html +/// +/// +/// +/// +/// New mails you receive will appear here. +/// +/// +/// +/// +/// +/// +/// ``` +/// +/// You can also create a default `search` view: +/// +/// ```html +/// +/// ``` +/// +/// Optionally `search` to the search query string: +/// +/// ```html +/// +/// ``` +/// +/// ## Attributes +/// * ``search`` +/// * ``image`` +/// * ``systemImage`` +/// * ``description`` +/// +/// ## Children +/// * `label` - Describes the current value. +/// * `description` - Describes the current value. +/// * `actions` - Describes the current value. +@_documentation(visibility: public) +@LiveElement +struct ContentUnavailableView: View { + /// The search query string. + @_documentation(visibility: public) + private var search: String? + + /// An image to use for the label. + @_documentation(visibility: public) + private var image: String? + + /// A system image to use for the label. + @_documentation(visibility: public) + private var systemImage: String? + + /// A description of the unavailable content. + @_documentation(visibility: public) + private var description: String? + + public var body: some View { + if #available(iOS 17.0, macOS 14.0, tvOS 17.0, watchOS 10.0, *) { + if let search { + if search.isEmpty { + SwiftUI.ContentUnavailableView.search + } else { + SwiftUI.ContentUnavailableView.search(text: search) + } + } else { + SwiftUI.ContentUnavailableView { + if let image { + SwiftUI.Label { + $liveElement.children(in: "label", default: true) + } icon: { + SwiftUI.Image(image) + } + } else if let systemImage { + SwiftUI.Label { + $liveElement.children(in: "label", default: true) + } icon: { + SwiftUI.Image(systemName: systemImage) + } + } else { + $liveElement.children(in: "label", default: true) + } + } description: { + if let description { + SwiftUI.Text(description) + } else { + $liveElement.children(in: "description") + } + } actions: { + $liveElement.children(in: "actions") + } + } + } + } +} diff --git a/Sources/TutorialRepoGenerator/Executable.swift b/Sources/TutorialRepoGenerator/Executable.swift deleted file mode 100644 index 66bcc705b..000000000 --- a/Sources/TutorialRepoGenerator/Executable.swift +++ /dev/null @@ -1,120 +0,0 @@ -// -// Executable.swift -// -// -// Created by Carson Katri on 3/21/23. -// - -import Foundation - -#if os(macOS) -private var currentProcess: Process? { - willSet { - if currentProcess != nil && newValue != nil { - fatalError("Executable cannot be used concurrently") - } - } -} -private var hasSetupSignalHandlers = false -private func setupSignalHandlers() { - guard !hasSetupSignalHandlers else { return } - hasSetupSignalHandlers = true - signal(SIGINT, handleSignal) - signal(SIGTERM, handleSignal) - signal(SIGKILL, handleSignal) -} -private func handleSignal(_ signal: Int32) { - if let currentProcess { - kill(currentProcess.processIdentifier, SIGKILL) - } - exit(1) -} -#endif - -/// A type that represents a command that can be called with arguments. -@dynamicMemberLookup -@dynamicCallable -struct Executable { - let executableURL: URL - let currentDirectoryURL: URL - let isXcodeBuildStyle: Bool - - init(_ name: String, currentDirectoryURL: URL, isXcodeBuildStyle: Bool = false) { - let bin = URL(filePath: "/usr/bin/\(name)") - let brew = URL(filePath: "/opt/homebrew/bin/\(name)") - self.executableURL = FileManager.default.fileExists(atPath: bin.path(percentEncoded: false)) ? bin : brew - self.currentDirectoryURL = currentDirectoryURL - self.isXcodeBuildStyle = isXcodeBuildStyle - } - - subscript(dynamicMember subCommand: String) -> ArgumentSet { - .init(parent: self, arguments: [subCommand]) - } - - func execute(_ argumentSet: ArgumentSet) throws { - #if os(macOS) - let process = Process() - process.executableURL = executableURL - process.currentDirectoryURL = currentDirectoryURL - process.arguments = argumentSet.arguments - process.qualityOfService = .userInitiated - - currentProcess = process - setupSignalHandlers() - - try process.run() - process.waitUntilExit() - - currentProcess = nil - - guard process.terminationReason == .exit && process.terminationStatus == 0 else { - throw ExecutableError("\(process.terminationReason):\(process.terminationStatus)") - } - #endif - } - - struct ExecutableError: LocalizedError { - let errorDescription: String? - - init(_ message: String) { - self.errorDescription = message - } - } - - func dynamicallyCall(withArguments args: [String]) throws { - try ArgumentSet(parent: self, arguments: []).dynamicallyCall(withArguments: args) - } - - func dynamicallyCall(withKeywordArguments args: KeyValuePairs) throws { - try ArgumentSet(parent: self, arguments: []).dynamicallyCall(withKeywordArguments: args) - } - - @dynamicCallable - @dynamicMemberLookup - struct ArgumentSet { - let parent: Executable - let arguments: [String] - - func dynamicallyCall(withArguments args: [String]) throws { - try parent.execute(.init(parent: parent, arguments: arguments + args)) - } - - func dynamicallyCall(withKeywordArguments args: KeyValuePairs) throws { - try parent.execute(.init(parent: parent, arguments: arguments + args.flatMap({ - if parent.isXcodeBuildStyle { - if $0.key == $0.key.uppercased() { - return ["\($0.key)=\($0.value == "" ? "\"\"" : $0.value)"] - } else { - return ["-\($0.key)", $0.value] - } - } else { - return ["--\($0.key)", $0.value] - } - }))) - } - - subscript(dynamicMember subCommand: String) -> Self { - .init(parent: parent, arguments: arguments + [subCommand]) - } - } -} diff --git a/Sources/TutorialRepoGenerator/Project.swift b/Sources/TutorialRepoGenerator/Project.swift deleted file mode 100644 index 246b0b169..000000000 --- a/Sources/TutorialRepoGenerator/Project.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// Project.swift -// -// -// Created by Carson Katri on 3/21/23. -// - -enum Project: String { - case backend - case app - - var path: String { - switch self { - case .backend: - return "lvn_tutorial_backend" - case .app: - return "LVNTutorialApp" - } - } -} diff --git a/Sources/TutorialRepoGenerator/TutorialRepoGenerator.swift b/Sources/TutorialRepoGenerator/TutorialRepoGenerator.swift deleted file mode 100644 index 8161418c5..000000000 --- a/Sources/TutorialRepoGenerator/TutorialRepoGenerator.swift +++ /dev/null @@ -1,196 +0,0 @@ -// -// TutorialRepoGenerator.swift -// -// -// Created by Carson Katri on 3/21/23. -// - -import Markdown -import Foundation -import RegexBuilder -import ArgumentParser - -@main -struct TutorialRepoGenerator: ParsableCommand { - @Option(help: "Path that contains the tutorial frontend and backend.", transform: { URL(filePath: $0) }) - private var repoPath: URL - - @Option(help: "Path that contains `.tutorial` files.", transform: { URL(filePath: $0) }) - private var tutorialsPath = URL(filePath: "Sources/LiveViewNative/LiveViewNative.docc/Tutorials") - - @Option(help: "Path that contains `@Code` files.", transform: { URL(filePath: $0) }) - private var resourcesPath = URL(filePath: "Sources/LiveViewNative/LiveViewNative.docc/Resources") - - @Option(help: "Path that contains the base repo to build on top of.", transform: { URL(filePath: $0) }) - private var tutorialRepoBasePath = URL(filePath: "util/tutorial_repo_base") - - @Option(help: "Argument passed to `git remote add origin`.") - private var remoteOrigin: String = "git@github.com:liveview-native/ios-tutorial.git" - - @Flag(help: "Disable build checks performed after each section.") - private var noCompile = false - - mutating func run() throws { - // Setup executables with correct working directories. - let git = Executable("git", currentDirectoryURL: repoPath) - let xcodebuild = Executable("xcodebuild", currentDirectoryURL: repoPath.appending(component: Project.app.path), isXcodeBuildStyle: true) - let mix = Executable("mix", currentDirectoryURL: repoPath.appending(component: Project.backend.path)) - - // Create a fresh tutorial repo starting point. - try? FileManager.default.removeItem(at: repoPath) - try FileManager.default.copyItem(at: tutorialRepoBasePath, to: repoPath) - - // Create the git repository and initial commit. - try git[dynamicMember: "init"]() - try git.remote.add.origin(remoteOrigin) - try git.add(".") - try git.commit(message: "Initial commit") - - // Commit each `.tutorial` file's changes to the repo. - for (offset, tutorial) in try FileManager.default.contentsOfDirectory( - at: tutorialsPath, - includingPropertiesForKeys: nil - ) - .sorted(by: { $0.absoluteString.localizedStandardCompare($1.absoluteString) == .orderedAscending }) - .enumerated() - where tutorial.pathExtension == "tutorial" { - // Parse like DocC to handle directives. - let document = try Document(parsing: tutorial, options: [.parseBlockDirectives, .parseSymbolLinks]) - - // Find the steps and code paths. - var visitor = TutorialWalker(resourcesURL: resourcesPath) - visitor.visit(document) - - guard let title = visitor.tutorialTitle - else { fatalError("Expected tutorial to have an @Intro(title:) directive.") } - - var changedProjects = Set() - for step in visitor.steps { - guard step.0["skip"] != "true", - let project = step.0["project"].flatMap(Project.init) - else { continue } - - let destination = repoPath.appending(components: project.path, step.0["path"] ?? step.2) - - // Copy the changed files into the repo. - try FileManager.default.createDirectory(at: destination.deletingLastPathComponent(), withIntermediateDirectories: true) - try Data(contentsOf: step.1).write(to: destination, options: []) - - changedProjects.insert(project) - } - - // Ensure the backend builds. - if changedProjects.contains(.backend) && !noCompile { - try mix("deps.get") - try mix.compile() - } - - // Ensure the app builds. - if changedProjects.contains(.app) && !noCompile { - try xcodebuild( - scheme: Project.app.path, - target: Project.app.path, - destination: "generic/platform=iOS", - derivedDataPath: "DerivedData", - CODE_SIGN_IDENTITY: "", - CODE_SIGNING_REQUIRED: "NO" - ) - } - - // Commit the section. - if !changedProjects.isEmpty { - try git.add(".") - try git.commit(message: "Section \(offset + 1): \(title)") - } - } - } - - private struct TutorialWalker: MarkupWalker { - let resourcesURL: URL - init(resourcesURL: URL) { - self.resourcesURL = resourcesURL - } - - var tutorialTitle: String? - var steps = [([String:String], URL, String)]() - - mutating func defaultVisit(_ markup: Markup) { - descendInto(markup) - } - - mutating func visitBlockDirective(_ blockDirective: BlockDirective) { - switch blockDirective.name { - case "Intro": - if let title = blockDirective.argumentText.parseNameValueArguments().first(where: { $0.name == "title" })?.value { - self.tutorialTitle = title - } - case "Step": - var stepWalker = StepWalker(resourcesURL: resourcesURL) - stepWalker.visit(blockDirective) - if let code = stepWalker.code, - let name = stepWalker.name - { - self.steps.append((stepWalker.settings, code, name)) - } - default: - break - } - descendInto(blockDirective) - } - } - - private struct StepWalker: MarkupWalker { - let resourcesURL: URL - init(resourcesURL: URL) { - self.resourcesURL = resourcesURL - } - - var settings = [String:String]() - var code: URL? - var name: String? - - mutating func defaultVisit(_ markup: Markup) { - descendInto(markup) - } - - mutating func visitBlockDirective(_ blockDirective: BlockDirective) -> () { - switch blockDirective.name { - case "Comment": - // Settings are formatted as: - // @Comment { - // key = "value" - // key2 = "value2" - // } - let stepSetting = Regex { - Anchor.startOfLine - ZeroOrMore(.whitespace) - Capture { - OneOrMore("a"..."z") - } - ZeroOrMore(.whitespace) - "=" - ZeroOrMore(.whitespace) - Optionally("\"") - Capture { - ZeroOrMore(CharacterClass.anyOf("\"\n").inverted) - } - Optionally("\"") - Anchor.endOfLine - } - self.settings = Dictionary(uniqueKeysWithValues: blockDirective.child(at: 0)!.format().replacing(try! Regex("“|”"), with: "\"").matches(of: stepSetting).map { - return (String($0.output.1), String($0.output.2)) - }) - case "Code": - if let file = blockDirective.argumentText.parseNameValueArguments().first(where: { $0.name == "file" })?.value { - self.code = resourcesURL.appending(path: file) - } - if let name = blockDirective.argumentText.parseNameValueArguments().first(where: { $0.name == "name" })?.value { - self.name = name - } - default: - break - } - descendInto(blockDirective) - } - } -} diff --git a/Tests/LiveViewNativeMacrosTests/LiveViewNativeMacrosTests.swift b/Tests/LiveViewNativeMacrosTests/LiveViewNativeMacrosTests.swift index 8963aaa50..c9e2ebd3a 100644 --- a/Tests/LiveViewNativeMacrosTests/LiveViewNativeMacrosTests.swift +++ b/Tests/LiveViewNativeMacrosTests/LiveViewNativeMacrosTests.swift @@ -51,7 +51,7 @@ final class LiveViewNativeMacrosTests: XCTestCase { typealias Registries = AVKitRegistry } - return AnyView(LiveView<__macro_local_8RegistryfMu_>(.localhost, configuration: .init())) + return AnyView(LiveView(registry: __macro_local_8RegistryfMu_.self, .localhost, configuration: .init())) }() """, macros: testMacros @@ -74,7 +74,7 @@ final class LiveViewNativeMacrosTests: XCTestCase { ChartsRegistry> } - return AnyView(LiveView<__macro_local_8RegistryfMu_>( + return AnyView(LiveView(registry: __macro_local_8RegistryfMu_.self, .automatic(development: .localhost(port: 5000), production: .custom(URL(string: "example.com")!)))) }() """, @@ -90,7 +90,7 @@ final class LiveViewNativeMacrosTests: XCTestCase { typealias Registries = _MultiRegistry, _MultiRegistry, PhotoKitRegistry>> } - return AnyView(LiveView<__macro_local_8RegistryfMu_>(.localhost, configuration: .init())) + return AnyView(LiveView(registry: __macro_local_8RegistryfMu_.self, .localhost, configuration: .init())) }() """, macros: testMacros diff --git a/Tests/LiveViewNativeStylesheetMacrosTests/MacroTests.swift b/Tests/LiveViewNativeStylesheetMacrosTests/MacroTests.swift index e9e80b02e..484b4c130 100644 --- a/Tests/LiveViewNativeStylesheetMacrosTests/MacroTests.swift +++ b/Tests/LiveViewNativeStylesheetMacrosTests/MacroTests.swift @@ -31,9 +31,9 @@ final class MacroTests: XCTestCase { struct TestModifier { let width: Double? let height: Double? - + static let name = "test" - + #if os(iOS) || os(macOS) init(_ width: Double?, height: Double?) { self.width = width @@ -44,13 +44,13 @@ final class MacroTests: XCTestCase { extension TestModifier: ParseableExpressionProtocol { typealias _ParserType = StandardExpressionParser - struct ExpressionArgumentsBody: Parser { + @MainActor struct ExpressionArgumentsBody: @preconcurrency Parser { let context: ParseableModifierContext func parse(_ input: inout Substring.UTF8View) throws -> TestModifier { - try "[" .utf8.parse(&input) + try "[".utf8.parse(&input) try Whitespace().parse(&input) let copy = input - var clauseFailures = [([String], ModifierParseError.ErrorType)] () + var clauseFailures = [([String], ModifierParseError.ErrorType)]() #if os(iOS) || os(macOS) do { let width: Double? = try Parse(input: Substring.UTF8View.self) { @@ -61,18 +61,21 @@ final class MacroTests: XCTestCase { Whitespace() } .parse(&input) + var failures = [ModifierParseError.ErrorType]() + var height: Double? try Whitespace().parse(&input) - try "," .utf8.parse(&input) + if input.first == ",".utf8.first || input.first == "[".utf8.first { + if input.first == ",".utf8.first { + try ",".utf8.parse(&input) + } try Whitespace().parse(&input) - try "[" .utf8.parse(&input) - var failures = [ModifierParseError.ErrorType] () - var height: Double? + try "[".utf8.parse(&input) while !input.isEmpty { try Whitespace().parse(&input) - let name = try Identifier().parse(&input) - try ":" .utf8.parse(&input) + let __name = try Identifier().parse(&input) + try ":".utf8.parse(&input) try Whitespace().parse(&input) - switch name { + switch __name { case "height": let labelledArgumentCopy = input do { @@ -86,20 +89,20 @@ final class MacroTests: XCTestCase { } default: _ = try _AnyNodeParser.AnyArgument(context: context).parse(&input) - failures.append(.unknownArgument(name)) + failures.append(.unknownArgument(__name)) } try Whitespace().parse(&input) - guard input.first == "," .utf8.first else { + guard input.first == ",".utf8.first else { break } - try "," .utf8.parse(&input) + try ",".utf8.parse(&input) } - try "]" .utf8.parse(&input) + try "]".utf8.parse(&input) guard failures.isEmpty else { throw ModifierParseError(error: .multipleErrors(failures), metadata: context.metadata) - } + }} try Whitespace().parse(&input) - try "]" .utf8.parse(&input) + try "]".utf8.parse(&input) return Output(width, height: height)} catch let error as ModifierParseError { clauseFailures.append(( ["_", "height"], @@ -143,13 +146,13 @@ final class MacroTests: XCTestCase { extension Padding: ParseableExpressionProtocol { typealias _ParserType = StandardExpressionParser - struct ExpressionArgumentsBody: Parser { + @MainActor struct ExpressionArgumentsBody: @preconcurrency Parser { let context: ParseableModifierContext func parse(_ input: inout Substring.UTF8View) throws -> Padding { - try "[" .utf8.parse(&input) + try "[".utf8.parse(&input) try Whitespace().parse(&input) let copy = input - var clauseFailures = [([String], ModifierParseError.ErrorType)] () + var clauseFailures = [([String], ModifierParseError.ErrorType)]() do { let edges: Edge.Set = try OneOf(input: Substring.UTF8View.self, output: Edge.Set.self) { Parse { @@ -164,7 +167,7 @@ final class MacroTests: XCTestCase { let length: AttributeReference? = try OneOf(input: Substring.UTF8View.self, output: AttributeReference?.self) { Parse { Whitespace() - "," .utf8 + ",".utf8 Whitespace() AttributeReference? .parser(in: context) Whitespace() @@ -172,7 +175,7 @@ final class MacroTests: XCTestCase { Always(.init(storage: .constant(nil))) } .parse(&input) try Whitespace().parse(&input) - try "]" .utf8.parse(&input) + try "]".utf8.parse(&input) return Output(edges, length)} catch let error as ModifierParseError { clauseFailures.append(( ["_", "_"], diff --git a/Tests/LiveViewNativeStylesheetTests/LiveViewNativeStylesheetTests.swift b/Tests/LiveViewNativeStylesheetTests/LiveViewNativeStylesheetTests.swift index 8128d416c..8aba094aa 100644 --- a/Tests/LiveViewNativeStylesheetTests/LiveViewNativeStylesheetTests.swift +++ b/Tests/LiveViewNativeStylesheetTests/LiveViewNativeStylesheetTests.swift @@ -3,6 +3,7 @@ import SwiftUI @testable import LiveViewNativeStylesheet @testable import LiveViewNative +@MainActor final class LiveViewNativeStylesheetTests: XCTestCase { func testAlignment() throws { XCTAssertEqual(try Alignment.parser(in: .init()).parse("{:., [], [nil, :topLeading]}"), Alignment.topLeading) diff --git a/Tests/LiveViewNativeStylesheetTests/ShapeStyleTests.swift b/Tests/LiveViewNativeStylesheetTests/ShapeStyleTests.swift index c5cb4fa51..d381dceec 100644 --- a/Tests/LiveViewNativeStylesheetTests/ShapeStyleTests.swift +++ b/Tests/LiveViewNativeStylesheetTests/ShapeStyleTests.swift @@ -11,6 +11,7 @@ import SwiftUI @testable import LiveViewNative extension XCTestCase { + @MainActor func testParserEqual( _ ast: String, _ value: T @@ -20,6 +21,8 @@ extension XCTestCase { value ) } + + @MainActor func testParser( _ ast: String, as t: T.Type = T.self @@ -29,6 +32,7 @@ extension XCTestCase { } extension XCTestCase { + @MainActor func testParserShapeStyle( _ ast: String, _ value: T @@ -37,6 +41,7 @@ extension XCTestCase { testParser(ast, as: AnyShapeStyle.Resolvable.self) } + @MainActor @_disfavoredOverload func testParserShapeStyle( _ ast: String, @@ -46,6 +51,7 @@ extension XCTestCase { } } +@MainActor final class ShapeStyleTests: XCTestCase { func testColor() { // static members @@ -181,7 +187,7 @@ final class ShapeStyleTests: XCTestCase { #"{:., [], [nil, :background]}"#, AnyShapeStyle.Resolvable(.background) ) - #if !os(watchOS) + #if !os(watchOS) && !os(tvOS) testParserShapeStyle( #"{:., [], [nil, :selection]}"#, AnyShapeStyle.Resolvable(.selection) diff --git a/Tests/LiveViewNativeTests/FormModelTests.swift b/Tests/LiveViewNativeTests/FormModelTests.swift index cc79e5303..c25dc6ead 100644 --- a/Tests/LiveViewNativeTests/FormModelTests.swift +++ b/Tests/LiveViewNativeTests/FormModelTests.swift @@ -9,10 +9,13 @@ import XCTest import LiveViewNativeCore @_spi(LiveForm) @testable import LiveViewNative +@MainActor class FormModelTests: XCTestCase { func testFormChangeEvent() async throws { let expectation = XCTestExpectation(description: "Send a form change event.") + @Sendable + @MainActor func pushEvent(type: String, event: String, value: Any, target: Int? = nil) async throws -> [String:Any]? { XCTAssertEqual(type, "form") XCTAssertEqual(event, "validate") diff --git a/Tests/RenderingTests/IndicatorTests.swift b/Tests/RenderingTests/IndicatorTests.swift index 81e6b6941..3b4f2fe51 100644 --- a/Tests/RenderingTests/IndicatorTests.swift +++ b/Tests/RenderingTests/IndicatorTests.swift @@ -84,4 +84,75 @@ final class IndicatorTests: XCTestCase { } } #endif + + @available(iOS 17.0, macOS 14.0, tvOS 17.0, watchOS 10.0, *) + func testContentUnavailableView() throws { + try assertMatch( + #""" + + Label + + """# + ) { + ContentUnavailableView { + Text("Label") + } + } + try assertMatch( + #""" + + Label + + """# + ) { + ContentUnavailableView { + Text("Label") + } + } + try assertMatch( + #""" + + Label + Description + + """# + ) { + ContentUnavailableView { + Text("Label") + } description: { + Text("Description") + } + } + try assertMatch( + #""" + + Label + Description + + + """# + ) { + ContentUnavailableView { + Text("Label") + } description: { + Text("Description") + } actions: { + Button("Action") {} + } + } + try assertMatch( + #""" + + """# + ) { + ContentUnavailableView.search + } + try assertMatch( + #""" + + """# + ) { + ContentUnavailableView.search(text: "query text") + } + } }