Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Sources/OpenSwiftUICore/OpenGraph/Attribute/OGSearchOptions.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
//
// OGSearchOptions.swift
// OpenSwiftUICore

import OpenGraphShims

extension OGSearchOptions {
// FIXME
static var _2: OGSearchOptions {
.init(rawValue: 2)
}
}
57 changes: 55 additions & 2 deletions Sources/OpenSwiftUICore/View/CustomView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
// CustomView.swift
// OpenSwiftUICore
//
// Audited for iOS 18.0
// Status: Complete
// ID: 9F92ACD17B554E8AB7D29ABB1E796415 (SwiftUI)
// ID: CE1D93D8ECBBEB5FE2E32E69A123E7CB (SwiftUICore)

import OpenGraphShims
package import OpenGraphShims

// MARK: - View default implmementation [6.0.87]

@available(OpenSwiftUI_v1_0, *)
extension View {
Expand Down Expand Up @@ -60,3 +61,55 @@ extension View {
}
}
}

// MARK: - ViewBodyAccessor [6.0.87]

package struct ViewBodyAccessor<V>: BodyAccessor where V: View {
package init() {}

package func updateBody(of container: Container, changed: Bool) {
guard changed else {
return
}
setBody {
container.body
}
}

package typealias Body = V.Body

package typealias Container = V
}

// MARK: - ViewBodyAccessor [6.4.41]

package struct ViewValuePredicate<V> where V: View {
package var view: V?

package init(view: V?) {
self.view = view
}

package mutating func apply(to ident: AnyAttribute) -> Bool {
if let rule = ident._bodyType as? BodyAccessorRule.Type {
view = rule.value(as: V.self, attribute: ident)
}
return view != nil
}
}

// MARK: - ViewBodyAccessor [6.4.41]

package struct ViewStatePredicate<V, S> where V: View {
package var state: Binding<S>?

package init() {}

package mutating func apply(to ident: AnyAttribute) -> Bool {
if let rule = ident._bodyType as? BodyAccessorRule.Type,
let buffer = rule.buffer(as: V.self, attribute: ident) {
state = buffer.getState(type: S.self)
}
return state != nil
}
}
19 changes: 0 additions & 19 deletions Sources/OpenSwiftUICore/View/ViewBodyAccessor.swift

This file was deleted.