diff --git a/Sources/OpenSwiftUI/Integration/Hosting/UIKit/Controller/UIHostingController.swift b/Sources/OpenSwiftUI/Integration/Hosting/UIKit/Controller/UIHostingController.swift index 35929b42d..74c45b262 100644 --- a/Sources/OpenSwiftUI/Integration/Hosting/UIKit/Controller/UIHostingController.swift +++ b/Sources/OpenSwiftUI/Integration/Hosting/UIKit/Controller/UIHostingController.swift @@ -99,6 +99,10 @@ open class UIHostingController: UIViewController where Content : View { func _viewSafeAreaDidChange() { _openSwiftUIUnimplementedWarning() } + + func didRender() { + _openSwiftUIUnimplementedWarning() + } } @available(macOS, unavailable) diff --git a/Sources/OpenSwiftUI/Integration/Hosting/UIKit/View/UIViewControllerProvider.swift b/Sources/OpenSwiftUI/Integration/Hosting/UIKit/Controller/UIViewControllerProvider.swift similarity index 70% rename from Sources/OpenSwiftUI/Integration/Hosting/UIKit/View/UIViewControllerProvider.swift rename to Sources/OpenSwiftUI/Integration/Hosting/UIKit/Controller/UIViewControllerProvider.swift index c1894bcda..5bbd4332a 100644 --- a/Sources/OpenSwiftUI/Integration/Hosting/UIKit/View/UIViewControllerProvider.swift +++ b/Sources/OpenSwiftUI/Integration/Hosting/UIKit/Controller/UIViewControllerProvider.swift @@ -6,15 +6,17 @@ // Status: Complete #if os(iOS) || os(visionOS) +public import UIKit +import COpenSwiftUI -import UIKit +// MARK: - UIViewControllerProvider -protocol UIViewControllerProvider: AnyObject { +package protocol UIViewControllerProvider: AnyObject { var uiViewController: UIViewController? { get } } extension UIViewControllerProvider { - var containingViewController: UIViewController? { + package var containingViewController: UIViewController? { if let uiViewController { return uiViewController } else if let view = self as? UIView { @@ -24,5 +26,4 @@ extension UIViewControllerProvider { } } } - #endif diff --git a/Sources/OpenSwiftUI/Integration/Hosting/UIKit/View/UIHostingView+Extension.swift b/Sources/OpenSwiftUI/Integration/Hosting/UIKit/View/UIHostingView+Extension.swift new file mode 100644 index 000000000..03ab3ecc7 --- /dev/null +++ b/Sources/OpenSwiftUI/Integration/Hosting/UIKit/View/UIHostingView+Extension.swift @@ -0,0 +1,375 @@ +// +// UIHostingView+Render.swift +// OpenSwiftUI +// +// Audited for 6.5.4 +// Status: WIP + +#if os(iOS) || os(visionOS) +public import UIKit +@_spi(ForOpenSwiftUIOnly) +@_spi(Private) +public import OpenSwiftUICore +import COpenSwiftUI + +// MARK: - _UIHostingView + UIViewControllerProvider + +extension _UIHostingView: UIViewControllerProvider { + package var uiViewController: UIViewController? { + viewController + } +} + +// MARK: - _UIHostingView + UIHostingViewBaseDelegate + +extension _UIHostingView: UIHostingViewBaseDelegate { + package var shouldDisableUIKitAnimations: Bool { + guard allowUIKitAnimations == 0, + !base.allowUIKitAnimationsForNextUpdate, + !isInSizeTransition, + !isResizingSheet, + !isRotatingWindow, + !isTabSidebarMorphing + else { + return false + } + return true + } + + package func sceneActivationStateDidChange() { + _openSwiftUIUnimplementedWarning() + } +} + +// MARK: - _UIHostingView + HostingViewProtocol + +@_spi(Private) +extension _UIHostingView: HostingViewProtocol { + public func convertAnchor(_ anchor: Anchor) -> Value { + anchor.convert(to: viewGraph.transform) + } +} + +// MARK: - _UIHostingView + TestHost [6.4.41] + +extension _UIHostingView: TestHost { + package func setTestSize(_ size: CGSize) { + let newSize: CGSize + if size == CGSize.deviceSize { + let screenSize = UIDevice.current.screenSize + let idiom = UIDevice.current.userInterfaceIdiom + if idiom == .pad, screenSize.width < screenSize.height { + newSize = CGSize(width: screenSize.height, height: screenSize.width) + } else { + if idiom == .phone, screenSize.height < screenSize.width { + newSize = CGSize(width: screenSize.height, height: screenSize.width) + } else { + newSize = screenSize + } + } + } else { + newSize = size + } + if bounds.size != newSize { + allowFrameChanges = true + bounds.size = newSize + allowFrameChanges = false + } + } + + package func setTestSafeAreaInsets(_ insets: EdgeInsets) { + explicitSafeAreaInsets = insets + + } + + package var testSize: CGSize { bounds.size } + + package var viewCacheIsEmpty: Bool { + Update.locked { + renderer.viewCacheIsEmpty + } + } + + package func forEachIdentifiedView(body: (_IdentifiedViewProxy) -> Void) { + let tree = preferenceValue(_IdentifiedViewsKey.self) + tree.forEach { proxy in + var proxy = proxy + proxy.adjustment = { [weak self] rect in + guard let self else { return } + rect = convert(rect, from: nil) + } + body(proxy) + } + } + + package func forEachDescendantHost(body: (any TestHost) -> Void) { + forEachDescendantHost { (view: UIView) in + if let testHost = view as? any TestHost { + body(testHost) + } + } + } + + package func renderForTest(interval: Double) { + _renderForTest(interval: interval) + } + + package var attributeCountInfo: AttributeCountTestInfo { + preferenceValue(AttributeCountInfoKey.self) + } + + public func _renderForTest(interval: Double) { + func shouldContinue() -> Bool { + if propertiesNeedingUpdate == [], !CoreTesting.needsRender { + false + } else { + times >= 0 + } + } + advanceTimeForTest(interval: interval) + _base.canAdvanceTimeAutomatically = false + var times = 16 + repeat { + times -= 1 + CoreTesting.needsRender = false + updateGraph { host in + host.flushTransactions() + } + RunLoop.flushObservers() + render(targetTimestamp: nil) + CATransaction.flush() + } while shouldContinue() + CoreTesting.needsRender = false + _base.canAdvanceTimeAutomatically = true + } +} + +extension UIDevice { + package var screenSize: CGSize { + #if !os(visionOS) || OPENSWIFTUI_INTERNAL_XR_SDK + let screenBounds = UIScreen.main.bounds + let screenWidth = screenBounds.width + let screenHeight = screenBounds.height + let orientation = UIDevice.current.orientation + let finalWidth: CGFloat + let finalHeight: CGFloat + switch orientation { + case .landscapeLeft, .landscapeRight: + // In landscape, swap dimensions to ensure width > height + finalWidth = max(screenWidth, screenHeight) + finalHeight = min(screenWidth, screenHeight) + case .portrait, .portraitUpsideDown: + // In portrait, keep original dimensions (height > width) + finalWidth = screenWidth + finalHeight = screenHeight + default: + // For other orientations, keep original dimensions + finalWidth = screenWidth + finalHeight = screenHeight + } + return CGSize(width: finalWidth, height: finalHeight) + #else + return .zero + #endif + } +} + +extension UIView { + func forEachDescendantHost(body: (UIView) -> Void) { + body(self) + for view in subviews { + view.forEachDescendantHost(body: body) + } + } +} + +// MARK: - _UIHostingView + ViewRendererHost [WIP] + +extension _UIHostingView: ViewRendererHost { + // MARK: - GraphDelegate conformance + + @_spi(ForOpenSwiftUIOnly) + public func preferencesDidChange() { + _openSwiftUIUnimplementedWarning() + } + + @_spi(ForOpenSwiftUIOnly) + @available(OpenSwiftUI_v6_0, *) + public func beginTransaction() { + onMainThread { [weak self] in + guard UIKitUpdateCycle.defaultUseSetNeedsLayout else { + let updateAction = { + Update.ensure { + _ = self?.updateGraph { + $0.flushTransactions() + } + } + } + if _UIUpdateCycleEnabled() { + UIKitUpdateCycle.addPreCommitObserver(updateAction) + } + RunLoop.addObserver(updateAction) + return + } + self?.base.requestImmediateUpdate() + } + } + + // MARK: - ViewGraphDelegate conforamnce + + package func `as`(_ type: T.Type) -> T? { + guard let value = base.as(type) else { + // TODO: FocuHost, PlatformItemListHost + if UIViewControllerProvider.self == type { + return unsafeBitCast(self as any UIViewControllerProvider, to: T.self) + // TODO: PointerHost, WindowLayoutHost, + } else if UIView.self == type { + return unsafeBitCast(self as UIView, to: T.self) + // TODO: CurrentEventProvider, FallbackResponderProvider, ContainerBackgroundHost, RootTransformUpdater + } else if ViewRendererHost.self == type { + return unsafeBitCast(self as any ViewRendererHost, to: T.self) + // TODO: ViewGraphRenderObserver, ToolbarInputFeatureDelegate + } else { + return nil + } + } + return value + } + + package func requestUpdate(after delay: Double) { + base.requestUpdate(after: delay) + } + + // MARK: - ViewRendererHost conformance + + package func updateRootView() { + let rootView = makeRootView() + viewGraph.setRootView(rootView) + } + + package func updateEnvironment() { + var environment = base.startUpdateEnvironment() + // WIP + _openSwiftUIUnimplementedWarning() + environment.displayScale = traitCollection.displayScale + if let displayGamut = DisplayGamut(rawValue: traitCollection.displayGamut.rawValue) { + environment.displayGamut = displayGamut + } + environment.feedbackCache = feedbackCache + viewGraph.setEnvironment(environment) + } + + package func updateTransform() { + _openSwiftUIUnimplementedWarning() + } + + package func updateSize() { + base.updateSize() + } + + package func updateSafeArea() { + let changed = viewGraph.setSafeAreaInsets(hostSafeAreaElements) + if changed { + invalidateIntrinsicContentSize() + } + } + + package func updateContainerSize() { + base.updateContainerSize() + } + + package func updateFocusStore() { + _openSwiftUIUnimplementedWarning() + } + + package func updateFocusedItem() { + _openSwiftUIUnimplementedWarning() + } + + package func updateFocusedValues() { + _openSwiftUIUnimplementedWarning() + } + + package func updateAccessibilityEnvironment() { + _openSwiftUIUnimplementedWarning() + } +} + +// MARK: - _UIHostingView + EventGraphHost + +extension _UIHostingView: EventGraphHost { + package var eventBindingManager: EventBindingManager { + base.eventBindingManager + } + + package var focusedResponder: ResponderNode? { + responderNode + } +} + +// MARK: - _UIHostingView + ViewGraphRenderObserver + +extension _UIHostingView: ViewGraphRenderObserver { + package func didRender() { + viewController?.didRender() + } +} + +// MARK: - _UIHostingView + UIKitAnimationCooperating + +package protocol UIKitAnimationCooperating { + func beginAllowUIKitAnimations() + func endAllowUIKitAnimations() +} + +extension _UIHostingView { + package func beginAllowUIKitAnimations() { + allowUIKitAnimations &+= 1 + } + + package func endAllowUIKitAnimations() { + allowUIKitAnimations = max(allowUIKitAnimations - 1, 0) + } +} + +// MARK: - _UIHostingView + RootTransformProvider [WIP] + +extension _UIHostingView: RootTransformProvider { + package func rootTransform() -> ViewTransform { + _openSwiftUIUnimplementedWarning() + return .init() + } +} + +// MARK: - _UIHostingView + Alignment + +extension _UIHostingView { + + @_spi(Private) + @available(OpenSwiftUI_v6_0, *) + @available(macOS, unavailable) + public func horizontalAlignment(_ guide: HorizontalAlignment) -> CGFloat { + alignment(of: guide, at: bounds.size) + } + + @_spi(Private) + @available(OpenSwiftUI_v6_0, *) + @available(macOS, unavailable) + public func verticalAlignment(_ guide: VerticalAlignment) -> CGFloat { + alignment(of: guide, at: bounds.size) + } +} + +// MARK: - _makeUIHostingView + +@available(OpenSwiftUI_v2_0, *) +@available(iOS, unavailable) +@available(macOS, unavailable) +@available(tvOS, unavailable) +@available(visionOS, unavailable) +public func _makeUIHostingView(_ view: Content) -> NSObject where Content: View { + _UIHostingView(rootView: view) +} + +#endif + diff --git a/Sources/OpenSwiftUI/Integration/Hosting/UIKit/View/UIHostingView.swift b/Sources/OpenSwiftUI/Integration/Hosting/UIKit/View/UIHostingView.swift index c76f94331..94d364c8e 100644 --- a/Sources/OpenSwiftUI/Integration/Hosting/UIKit/View/UIHostingView.swift +++ b/Sources/OpenSwiftUI/Integration/Hosting/UIKit/View/UIHostingView.swift @@ -22,9 +22,9 @@ open class _UIHostingView: UIView, XcodeViewDebugDataProvider where Con UIHostingViewDebugLayer.self } - private var _rootView: Content + var _rootView: Content - private let _base: UIHostingViewBase + let _base: UIHostingViewBase var base: UIHostingViewBase { let base = _base @@ -53,6 +53,16 @@ open class _UIHostingView: UIView, XcodeViewDebugDataProvider where Con package var propertiesNeedingUpdate: ViewRendererHostProperties = .all + package var renderingPhase: ViewRenderingPhase { + get { base.renderingPhase } + set { base.renderingPhase = newValue } + } + + package var externalUpdateCount: Int { + get { base.externalUpdateCount } + set { base.externalUpdateCount = newValue } + } + var allowUIKitAnimations: Int32 = .zero var disabledBackgroundColor: Bool = false @@ -130,9 +140,23 @@ open class _UIHostingView: UIView, XcodeViewDebugDataProvider where Con let feedbackCache: UIKitSensoryFeedbackCache = .init() // TODO - + + weak var delegate: UIHostingViewDelegate? + // var currentAccessibilityFocusStore: AccessibilityFocusStore = .init() - + + var appliesContainerBackgroundFallbackColor: Bool = false { + didSet { + updateBackgroundColor() + } + } + + var containerBackgroundFallbackColor: UIColor? { + didSet { + updateBackgroundColor() + } + } + package var accessibilityEnabled: Bool { get { viewGraph.accessibilityEnabled @@ -148,8 +172,6 @@ open class _UIHostingView: UIView, XcodeViewDebugDataProvider where Con } } - // private weak var delegate: UIHostingViewDelegate? - required public init(rootView: Content) { _rootView = rootView Update.begin() @@ -295,6 +317,35 @@ open class _UIHostingView: UIView, XcodeViewDebugDataProvider where Con invalidateProperties([.safeArea, .containerSize], mayDeferUpdate: false) } + open override var backgroundColor: UIColor? { + get { super.backgroundColor } + set { + disabledBackgroundColor = true + super.backgroundColor = newValue + } + } + + package func updateBackgroundColor() { + func setBackground(_ color: UIColor?) { + guard !disabledBackgroundColor else { + return + } + super.backgroundColor = color + } + if appliesContainerBackgroundFallbackColor, let containerBackgroundFallbackColor { + backgroundColor = containerBackgroundFallbackColor + return + } + guard viewController != nil else { + return + } + if wantsTransparentBackground { + super.backgroundColor = nil + } else { + setBackground(.systemBackground) + } + } + // TODO func setRootView(_ view: Content, transaction: Transaction) { @@ -476,23 +527,6 @@ extension _UIHostingView { invalidateProperties([.safeArea, .containerSize]) } - func updateBackgroundColor() { - func setBackground(_ color: UIColor?) { - guard !disabledBackgroundColor else { - return - } - super.backgroundColor = color - } - guard viewController != nil else { - return - } - if wantsTransparentBackground { - super.backgroundColor = nil - } else { - setBackground(.systemBackground) - } - } - func didChangeColorScheme(from oldColorScheme: ColorScheme?) { // TODO } @@ -518,247 +552,10 @@ extension _UIHostingView { // TODO return false } -} - -extension _UIHostingView: ViewRendererHost { - package func `as`(_ type: T.Type) -> T? { - guard let value = base.as(type) else { - // FocusHost - if UIViewControllerProvider.self == type { - return unsafeBitCast(self as any UIViewControllerProvider, to: T.self) - } else { // TODO - return nil - } - } - return value - } - package var renderingPhase: ViewRenderingPhase { - get { base.renderingPhase } - set { base.renderingPhase = newValue } - } - - package var externalUpdateCount: Int { - get { base.externalUpdateCount } - set { base.externalUpdateCount = newValue } - } - - package func updateEnvironment() { - // FIXME - var environment = EnvironmentValues() - environment.displayScale = traitCollection.displayScale - if let displayGamut = DisplayGamut(rawValue: traitCollection.displayGamut.rawValue) { - environment.displayGamut = displayGamut - } - // TODO - environment.feedbackCache = feedbackCache - viewGraph.setEnvironment(environment) - } - - package func updateSize() { - viewGraph.setProposedSize(bounds.size) - } - - package func updateSafeArea() { - let changed = viewGraph.setSafeAreaInsets(hostSafeAreaElements) - if changed { - invalidateIntrinsicContentSize() - } - } - - package func updateContainerSize() { - // _openSwiftUIUnimplementedFailure() - } - - package func updateRootView() { - let rootView = makeRootView() - viewGraph.setRootView(rootView) - } - - package func outputsDidChange(outputs: ViewGraph.Outputs) { - _openSwiftUIUnimplementedWarning() - } - package func focusDidChange() { _openSwiftUIUnimplementedWarning() } - - package func requestUpdate(after delay: Double) { - base.requestUpdate(after: delay) - } - - public func preferencesDidChange() { - _openSwiftUIUnimplementedWarning() - } -} - -@_spi(Private) -extension _UIHostingView: HostingViewProtocol { - public func convertAnchor(_ anchor: Anchor) -> Value { - anchor.convert(to: viewGraph.transform) - } -} - -// MARK: - _UIHostingView + TestHost [6.4.41] - -extension _UIHostingView: TestHost { - package func setTestSize(_ size: CGSize) { - let newSize: CGSize - if size == CGSize.deviceSize { - let screenSize = UIDevice.current.screenSize - let idiom = UIDevice.current.userInterfaceIdiom - if idiom == .pad, screenSize.width < screenSize.height { - newSize = CGSize(width: screenSize.height, height: screenSize.width) - } else { - if idiom == .phone, screenSize.height < screenSize.width { - newSize = CGSize(width: screenSize.height, height: screenSize.width) - } else { - newSize = screenSize - } - } - } else { - newSize = size - } - if bounds.size != newSize { - allowFrameChanges = true - bounds.size = newSize - allowFrameChanges = false - } - } - - package func setTestSafeAreaInsets(_ insets: EdgeInsets) { - explicitSafeAreaInsets = insets - - } - - package var testSize: CGSize { bounds.size } - - package var viewCacheIsEmpty: Bool { - Update.locked { - renderer.viewCacheIsEmpty - } - } - - package func forEachIdentifiedView(body: (_IdentifiedViewProxy) -> Void) { - let tree = preferenceValue(_IdentifiedViewsKey.self) - tree.forEach { proxy in - var proxy = proxy - proxy.adjustment = { [weak self] rect in - guard let self else { return } - rect = convert(rect, from: nil) - } - body(proxy) - } - } - - package func forEachDescendantHost(body: (any TestHost) -> Void) { - forEachDescendantHost { (view: UIView) in - if let testHost = view as? any TestHost { - body(testHost) - } - } - } - - package func renderForTest(interval: Double) { - _renderForTest(interval: interval) - } - - package var attributeCountInfo: AttributeCountTestInfo { - preferenceValue(AttributeCountInfoKey.self) - } - - public func _renderForTest(interval: Double) { - func shouldContinue() -> Bool { - if propertiesNeedingUpdate == [], !CoreTesting.needsRender { - false - } else { - times >= 0 - } - } - advanceTimeForTest(interval: interval) - _base.canAdvanceTimeAutomatically = false - var times = 16 - repeat { - times -= 1 - CoreTesting.needsRender = false - updateGraph { host in - host.flushTransactions() - } - RunLoop.flushObservers() - render(targetTimestamp: nil) - CATransaction.flush() - } while shouldContinue() - CoreTesting.needsRender = false - _base.canAdvanceTimeAutomatically = true - } -} - -extension UIDevice { - package var screenSize: CGSize { - #if !os(visionOS) || OPENSWIFTUI_INTERNAL_XR_SDK - let screenBounds = UIScreen.main.bounds - let screenWidth = screenBounds.width - let screenHeight = screenBounds.height - let orientation = UIDevice.current.orientation - let finalWidth: CGFloat - let finalHeight: CGFloat - switch orientation { - case .landscapeLeft, .landscapeRight: - // In landscape, swap dimensions to ensure width > height - finalWidth = max(screenWidth, screenHeight) - finalHeight = min(screenWidth, screenHeight) - case .portrait, .portraitUpsideDown: - // In portrait, keep original dimensions (height > width) - finalWidth = screenWidth - finalHeight = screenHeight - default: - // For other orientations, keep original dimensions - finalWidth = screenWidth - finalHeight = screenHeight - } - return CGSize(width: finalWidth, height: finalHeight) - #else - return .zero - #endif - } -} - -extension UIView { - func forEachDescendantHost(body: (UIView) -> Void) { - body(self) - for view in subviews { - view.forEachDescendantHost(body: body) - } - } -} - -// MARK: - _UIHostingView + UIHostingViewBaseDelegate [6.5.4] - -extension _UIHostingView: UIHostingViewBaseDelegate { - package var shouldDisableUIKitAnimations: Bool { - guard allowUIKitAnimations == 0, - !base.allowUIKitAnimationsForNextUpdate, - !isInSizeTransition, - !isResizingSheet, - !isRotatingWindow, - !isTabSidebarMorphing - else { - return false - } - return true - } - - package func sceneActivationStateDidChange() { - _openSwiftUIUnimplementedWarning() - } -} - -// MARK: - _UIHostingView + UIViewControllerProvider [6.5.4] - -extension _UIHostingView: UIViewControllerProvider { - var uiViewController: UIViewController? { - viewController - } } // MARK: _UIHostingView.HostViewGraph [6.5.4] [Blocked by Gesture System] @@ -790,4 +587,15 @@ extension _UIHostingView { } } +// MARK: - UIHostingViewDelegate + +package protocol UIHostingViewDelegate: AnyObject { + func hostingView(_ hostingView: _UIHostingView, didMoveTo window: UIWindow?) where A: View + func hostingView(_ hostingView: _UIHostingView, willUpdate environment: inout EnvironmentValues) where A: View + func hostingView(_ hostingView: _UIHostingView, didUpdate environment: EnvironmentValues) where A: View + func hostingView(_ hostingView: _UIHostingView, didChangePreferences preferences: PreferenceValues) where A: View + func hostingView(_ hostingView: _UIHostingView, didChangePlatformItemList itemList: PlatformItemList) where A: View + func hostingView(_ hostingView: _UIHostingView, willModifyViewInputs inputs: inout _ViewInputs) where A: View +} + #endif diff --git a/Sources/OpenSwiftUI/Integration/Hosting/UIKit/View/UIHostingViewBase.swift b/Sources/OpenSwiftUI/Integration/Hosting/UIKit/View/UIHostingViewBase.swift index ba0834cff..8310891a9 100644 --- a/Sources/OpenSwiftUI/Integration/Hosting/UIKit/View/UIHostingViewBase.swift +++ b/Sources/OpenSwiftUI/Integration/Hosting/UIKit/View/UIHostingViewBase.swift @@ -236,8 +236,24 @@ package class UIHostingViewBase { _openSwiftUIUnimplementedFailure() } + @inline(__always) + func updateSize() { + guard let uiView else { return } + viewGraph.setProposedSize(uiView.bounds.size) + } + package func updateContainerSize() { - _openSwiftUIUnimplementedFailure() + guard let uiView else { return } + let safeAreaInsets = uiView.safeAreaInsets + let insets = EdgeInsets( + top: safeAreaInsets.top, + leading: safeAreaInsets.left, + bottom: safeAreaInsets.bottom, + trailing: safeAreaInsets.right + ) + let size = uiView.bounds.size.inset(by: insets) + viewGraph.setContainerSize(.fixed(size)) + _openSwiftUIUnimplementedWarning() } package var updatesAtFullFidelity: Bool { diff --git a/Sources/OpenSwiftUI/Integration/PlatformItemList.swift b/Sources/OpenSwiftUI/Integration/PlatformItemList.swift index 9bc55221b..ff8aa278b 100644 --- a/Sources/OpenSwiftUI/Integration/PlatformItemList.swift +++ b/Sources/OpenSwiftUI/Integration/PlatformItemList.swift @@ -6,7 +6,7 @@ // ID: CE84B1BFBEAEAB6361605407E54625A3 (SwiftUI) // FIXME -struct PlatformItemList { +package struct PlatformItemList { var itesms: [Item] // FIXME diff --git a/Sources/OpenSwiftUICore/View/Graph/ViewGraph.swift b/Sources/OpenSwiftUICore/View/Graph/ViewGraph.swift index 4c3b476e4..358037803 100644 --- a/Sources/OpenSwiftUICore/View/Graph/ViewGraph.swift +++ b/Sources/OpenSwiftUICore/View/Graph/ViewGraph.swift @@ -750,7 +750,7 @@ extension Graph { // MARK: - RootTransformProvider -protocol RootTransformProvider { +package protocol RootTransformProvider { func rootTransform() -> ViewTransform }