Skip to content
Open
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
5 changes: 4 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.6
// swift-tools-version:5.10
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It could be argued that this should influence swift-markdown-ui’s versioning. It’s a judgement call that could be an argument for deferral and bundling it with StrictConcurrency.


import PackageDescription

Expand Down Expand Up @@ -29,6 +29,9 @@ let package = Package(
.product(name: "cmark-gfm", package: "swift-cmark"),
.product(name: "cmark-gfm-extensions", package: "swift-cmark"),
.product(name: "NetworkImage", package: "NetworkImage"),
],
swiftSettings: [
.enableUpcomingFeature("InferSendableFromCaptures")
]
),
.testTarget(
Expand Down
4 changes: 2 additions & 2 deletions Sources/MarkdownUI/Utility/Deprecations.swift
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ extension View {
_ keyPath: WritableKeyPath<Theme, BlockStyle<BlockConfiguration>>,
@ViewBuilder body: @escaping (_ label: BlockConfiguration.Label) -> Body
) -> some View {
self.environment((\EnvironmentValues.theme).appending(path: keyPath), .init(body: body))
self.environment((\EnvironmentValues.theme as WritableKeyPath).appending(path: keyPath), .init(body: body))
}

@available(
Expand All @@ -71,7 +71,7 @@ extension View {
@ViewBuilder body: @escaping (_ label: BlockConfiguration.Label) -> Body
) -> some View {
self.environment(
(\EnvironmentValues.theme).appending(path: keyPath),
(\EnvironmentValues.theme as WritableKeyPath).appending(path: keyPath),
.init { configuration in
body(.init(configuration.label))
}
Expand Down
6 changes: 3 additions & 3 deletions Sources/MarkdownUI/Views/Environment/Environment+Theme.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ extension View {
_ keyPath: WritableKeyPath<Theme, TextStyle>,
@TextStyleBuilder textStyle: () -> S
) -> some View {
self.environment((\EnvironmentValues.theme).appending(path: keyPath), textStyle())
self.environment((\EnvironmentValues.theme as WritableKeyPath).appending(path: keyPath), textStyle())
}

/// Replaces a specific block style on the current ``Theme`` with a block style initialized with the given body closure.
Expand All @@ -26,7 +26,7 @@ extension View {
_ keyPath: WritableKeyPath<Theme, BlockStyle<Void>>,
@ViewBuilder body: @escaping () -> Body
) -> some View {
self.environment((\EnvironmentValues.theme).appending(path: keyPath), .init(body: body))
self.environment((\EnvironmentValues.theme as WritableKeyPath).appending(path: keyPath), .init(body: body))
}

/// Replaces a specific block style on the current ``Theme`` with a block style initialized with the given body closure.
Expand All @@ -37,7 +37,7 @@ extension View {
_ keyPath: WritableKeyPath<Theme, BlockStyle<Configuration>>,
@ViewBuilder body: @escaping (_ configuration: Configuration) -> Body
) -> some View {
self.environment((\EnvironmentValues.theme).appending(path: keyPath), .init(body: body))
self.environment((\EnvironmentValues.theme as WritableKeyPath).appending(path: keyPath), .init(body: body))
}

/// Replaces the current ``Theme`` task list marker with the given list marker.
Expand Down