Skip to content

Commit 7e8fd47

Browse files
committed
Add InternalImportsByDefault support
1 parent 322f6ff commit 7e8fd47

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+55
-55
lines changed

Package.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ default:
5555

5656
var sharedSwiftSettings: [SwiftSetting] = [
5757
.enableUpcomingFeature("BareSlashRegexLiterals"),
58-
// .enableUpcomingFeature("InternalImportsByDefault"),
58+
.enableUpcomingFeature("InternalImportsByDefault"),
5959
.define("OPENSWIFTUI_SUPPRESS_DEPRECATED_WARNINGS"),
6060
.define("OPENSWIFTUI_RELEASE_\(releaseVersion)"),
6161
.swiftLanguageMode(.v5),

Sources/OpenSwiftUI/EventHandling/SystemEvent/OpenURLAction.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// Status: Complete
77
// ID: 1F1831D737D24A15A8A759DDE72CEF68
88

9-
import Foundation
9+
public import Foundation
1010

1111
/// An action that opens a URL.
1212
///

Sources/OpenSwiftUI/Integration/Representable/UIKit/UIViewRepresentable.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
#if os(iOS)
99

10-
import UIKit
10+
public import UIKit
1111

1212
/// A wrapper for a UIKit view that you use to integrate that view into your
1313
/// OpenSwiftUI view hierarchy.

Sources/OpenSwiftUI/Integration/UIKit/UIHostingController.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#if os(iOS)
2-
import UIKit
2+
public import UIKit
33

44
@available(macOS, unavailable)
55
@available(watchOS, unavailable)

Sources/OpenSwiftUI/Integration/UIKit/UIHostingView.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#if os(iOS)
1010
@_spi(ForOpenSwiftUIOnly) public import OpenSwiftUICore
11-
import UIKit
11+
public import UIKit
1212

1313
@available(macOS, unavailable)
1414
@available(watchOS, unavailable)

Sources/OpenSwiftUI/Test/_BenchmarkHost.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// Status: Complete
77
// ID: 3E629D505F0A70F29ACFC010AA42C6E0
88

9-
import Foundation
9+
public import Foundation
1010

1111
#if canImport(QuartzCore)
1212
import QuartzCore

Sources/OpenSwiftUI/View/Control/Link/Link.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// Audited for RELEASE_2021
66
// Status: Blocked by Text and Accessibility
77

8-
import Foundation
8+
public import Foundation
99

1010
/// A control for navigating to a URL.
1111
///

Sources/OpenSwiftUICore/Animation/TODO/Animatable.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
// Audited for RELEASE_2021
66
// Status: Blocked by Graph
77

8+
public import Foundation
9+
810
// MARK: - Animatable
911

1012
/// A type that describes how to animate a property of a view.
@@ -48,8 +50,6 @@ extension Animatable where AnimatableData == EmptyAnimatableData {
4850
}
4951
}
5052

51-
import Foundation
52-
5353
// MARK: - Animatable + CoreGraphics
5454

5555
extension CGPoint: Animatable {

Sources/OpenSwiftUICore/Animation/VectorArithmetic.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
// Audited for RELEASE_2023
66
// Status: Complete
77

8+
public import Foundation
9+
810
public protocol VectorArithmetic: AdditiveArithmetic {
911
mutating func scale(by rhs: Double)
1012
var magnitudeSquared: Double { get }
@@ -56,8 +58,6 @@ extension Double: VectorArithmetic {
5658
}
5759
}
5860

59-
import Foundation
60-
6161
extension CGFloat: VectorArithmetic {
6262
@_transparent
6363
public mutating func scale(by rhs: Double) { self *= CGFloat(rhs) }

Sources/OpenSwiftUICore/Data/Environment/Environment.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88

99
internal import OpenGraphShims
1010
#if OPENSWIFTUI_SWIFT_LOG
11-
import Logging
11+
public import Logging
1212
#else
13-
import os
13+
public import os
1414
#endif
1515

1616
/// A property wrapper that reads a value from a view's environment.

Sources/OpenSwiftUICore/Data/Protobuf/ProtobufDecoder.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// Status: Complete
77
// ID: FFA06CAF6B06DC3E21EC75547A0CD421
88

9-
import Foundation
9+
package import Foundation
1010

1111
/// An object that decodes instances of a data type from protobuf objects.
1212
package struct ProtobufDecoder {

Sources/OpenSwiftUICore/Data/Protobuf/ProtobufEncoder.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// Status: Complete
77
// ID: C7B3AAD101AF9EA76FC322BD6EF713E6
88

9-
import Foundation
9+
package import Foundation
1010

1111
/// An object that encodes instances of a data type as protobuf objects.
1212
package struct ProtobufEncoder {

Sources/OpenSwiftUICore/Data/State/ObservedObject.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
// Status: Blocked by DynamicProperty
77

88
#if OPENSWIFTUI_OPENCOMBINE
9-
import OpenCombine
9+
public import OpenCombine
1010
#else
11-
import Combine
11+
public import Combine
1212
#endif
1313

1414
/// A property wrapper type that subscribes to an observable object and

Sources/OpenSwiftUICore/Data/State/StateObject.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
// Status: Blocked by DynamicProperty
77

88
#if OPENSWIFTUI_OPENCOMBINE
9-
import OpenCombine
9+
public import OpenCombine
1010
#else
11-
import Combine
11+
public import Combine
1212
#endif
1313

1414
/// A property wrapper type that instantiates an observable object.

Sources/OpenSwiftUICore/Graphic/Color/Color.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import Foundation
1010
#if canImport(Darwin)
11-
import CoreGraphics
11+
public import CoreGraphics
1212
#endif
1313

1414
/// A representation of a color that adapts to a given context.

Sources/OpenSwiftUICore/Graphic/Color/ColorResolved.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// Audited for RELEASE_2024
66
// Status: WIP
77

8-
import Foundation
8+
package import Foundation
99
internal import OpenSwiftUI_SPI
1010

1111
// MARK: - Color.Resolved

Sources/OpenSwiftUICore/Graphic/Color/CoreColor+Extension.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// Status: Complete
77

88
#if canImport(Darwin)
9-
import Foundation
9+
package import Foundation
1010
internal import OpenSwiftUI_SPI
1111

1212
extension CoreColor {

Sources/OpenSwiftUICore/Layout/LayoutAdjustments/Alignment/AlignmentID.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// Audited for RELEASE_2021
66
// Status: Complete
77

8-
import Foundation
8+
public import Foundation
99

1010
/// A type that you use to create custom alignment guides.
1111
///

Sources/OpenSwiftUICore/Layout/LayoutAdjustments/Alignment/ViewDimensions.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// Audited for RELEASE_2021
66
// Status: Complete
77

8-
import Foundation
8+
public import Foundation
99

1010
/// A view's size and alignment guides in its own coordinate space.
1111
///

Sources/OpenSwiftUICore/Layout/LayoutAdjustments/Direction/LayoutDirection.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ extension LayoutDirection: Sendable {}
4040
#if canImport(UIKit)
4141
// MARK: - UIKit integration
4242

43-
import UIKit
43+
public import UIKit
4444

4545
extension LayoutDirection {
4646
/// Create a direction from its UITraitEnvironmentLayoutDirection equivalent.

Sources/OpenSwiftUICore/Layout/LayoutAdjustments/Edge/EdgeInsets.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// Audited for RELEASE_2021
66
// Status: Complete
77

8-
import Foundation
8+
public import Foundation
99

1010
/// The inset distances for the sides of a rectangle.
1111
@frozen
@@ -91,9 +91,9 @@ extension EdgeInsets: Sendable {}
9191
// MARK: - UIKit/AppKit integration
9292

9393
#if canImport(UIKit)
94-
import UIKit
94+
public import UIKit
9595
#elseif canImport(AppKit)
96-
import AppKit
96+
public import AppKit
9797
#endif
9898
extension EdgeInsets {
9999
/// Create edge insets from the equivalent NSDirectionalEdgeInsets.

Sources/OpenSwiftUICore/Layout/LayoutAdjustments/Padding/PaddingLayout.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// Audited for RELEASE_2021
66
// Status: WIP
77

8-
import Foundation
8+
public import Foundation
99

1010
@frozen
1111
public struct _PaddingLayout: /* UnaryLayout, */ Animatable, PrimitiveViewModifier /* , MultiViewModifier */ {

Sources/OpenSwiftUICore/Layout/LayoutFundamentals/Separators/Spacer.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// Audited for RELEASE_2021
66
// Status: TODO
77

8-
import Foundation
8+
public import Foundation
99

1010
/// A flexible space that expands along the major axis of its containing stack
1111
/// layout, or on both axes if not contained in a stack.

Sources/OpenSwiftUICore/Layout/LayoutFundamentals/Stack/HVStack.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Foundation
1+
public import Foundation
22

33
@frozen
44
public struct HStack<Content: View>: PrimitiveView {

Sources/OpenSwiftUICore/Layout/LayoutFundamentals/Stack/HVStackLayout.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Foundation
1+
public import Foundation
22

33
/// A layout that arranges its children in a horizontal line.
44
@frozen

Sources/OpenSwiftUICore/Layout/LayoutFundamentals/internal/ProjectionTransform.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
// Audited for RELEASE_2021
66
// Status: WIP
77

8-
import Foundation
8+
public import Foundation
99
#if canImport(QuartzCore)
10-
import QuartzCore
10+
public import QuartzCore
1111
#endif
1212

1313
@frozen

Sources/OpenSwiftUICore/Log/Logging.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import Foundation
99
#if OPENSWIFTUI_SWIFT_LOG
10-
import Logging
10+
public import Logging
1111
extension Logger {
1212
package init(subsystem: String, category: String) {
1313
var logger = Logger(label: subsystem)
@@ -16,7 +16,7 @@ extension Logger {
1616
}
1717
}
1818
#else
19-
import os.log
19+
public import os.log
2020

2121
#if DEBUG
2222
package let dso = { () -> UnsafeMutableRawPointer in

Sources/OpenSwiftUICore/Log/Signpost.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
internal import OpenSwiftUI_SPI
1111
internal import OpenGraphShims
1212
#if canImport(Darwin)
13-
import os.signpost
13+
package import os.signpost
1414
#endif
1515

1616
extension Signpost {

Sources/OpenSwiftUICore/Modifier/ClipEffect.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Foundation
1+
public import Foundation
22

33
// MARK: - ClipEffect
44

Sources/OpenSwiftUICore/Render/DisplayList/DisplayList.GraphicsRenderer.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// Status: Blocked by RenderBox and GraphicsContext
77
// ID: EFAEDE41CB8C85EF3A6A18DC05438A3C
88

9-
import Foundation
9+
package import Foundation
1010

1111
extension DisplayList {
1212
final package class GraphicsRenderer {

Sources/OpenSwiftUICore/Render/DisplayList/DisplayList.ViewRenderer.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// Status: Blocked by ViewUpdater and ViewRasterizer
77
// ID: 21FFA3C7D88AC65BB559906758271BFC
88

9-
import Foundation
9+
package import Foundation
1010

1111
protocol ViewRendererBase {
1212
var platform: DisplayList.ViewUpdater.Platform { get }

Sources/OpenSwiftUICore/Render/DisplayList/DisplayList.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// Status: WIP
77
// ID: F37E3733E490AA5E3BDC045E3D34D9F8
88

9-
import Foundation
9+
package import Foundation
1010

1111
// MARK: - _DisplayList_Identity
1212

Sources/OpenSwiftUICore/Render/PlatformViewDefinition.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
internal import OpenSwiftUI_SPI
99
#if canImport(Darwin)
10-
import QuartzCore
10+
public import QuartzCore
1111
#endif
1212

1313
@_spi(DisplayList_ViewSystem)

Sources/OpenSwiftUICore/Semantic/Feature.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// Audited for RELEASE_2024
66
// Status: Complete
77

8-
import Foundation
8+
package import Foundation
99

1010
package protocol Feature: ViewInputBoolFlag {
1111
static var isEnabled: Bool { get }

Sources/OpenSwiftUICore/Shape/Path/Path.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
// ID: 31FD92B70C320DDD253E93C7417D779A RELEASE_2021
88
// ID: 3591905F51357E95FA93E39751507471 RELEASE_2024
99

10-
import Foundation
10+
public import Foundation
1111

1212
#if canImport(CoreGraphics)
1313
internal import OpenSwiftUI_SPI
14-
import CoreGraphics
14+
public import CoreGraphics
1515

1616
@_silgen_name("__CGPathParseString")
1717
private func __CGPathParseString(_ path: CGMutablePath, _ utf8CString: UnsafePointer<CChar>) -> Bool

Sources/OpenSwiftUICore/Shape/Rectangle.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Foundation
1+
public import Foundation
22

33
/// A rectangular shape aligned inside the frame of the view containing it.
44
@frozen

Sources/OpenSwiftUICore/Shape/RoundedRectangle.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Foundation
1+
public import Foundation
22

33
@frozen
44
public struct RoundedRectangle: Shape {

Sources/OpenSwiftUICore/Shape/Shape.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// Audited for RELEASE_2021
66
// Status: WIP
77

8-
import Foundation
8+
public import Foundation
99

1010
/// A 2D shape that you can use when drawing a view.
1111
///

Sources/OpenSwiftUICore/Shape/StrokeStyle.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
// Audited for RELEASE_2021
66
// Status: Complete
77

8-
import Foundation
8+
public import Foundation
99
#if canImport(CoreGraphics)
10-
import CoreGraphics
10+
public import CoreGraphics
1111
#else
1212
/// Line join styles
1313
public enum CGLineJoin: Int32, @unchecked Sendable {

Sources/OpenSwiftUICore/Text/Font/TODO/Font.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Foundation
1+
public import Foundation
22

33
@frozen
44
public struct Font: Hashable {

0 commit comments

Comments
 (0)