Skip to content

Commit 0f6136d

Browse files
committed
update
1 parent d4b20c0 commit 0f6136d

14 files changed

+18
-14
lines changed

Package.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import PackageDescription
55

66
let package = Package(
77
name: "openai-async-image-swiftui",
8-
platforms: [.iOS(.v15), .macOS(.v12), .watchOS(.v8), .tvOS(.v15)],
8+
platforms: [.iOS(.v15), .macOS(.v12)],
99
products: [
1010
// Products define the executables and libraries a package produces, and make them visible to other packages.
1111
.library(

README.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,12 @@
22

33
SwiftUI view that asynchronously loads and displays an OpenAI image from open API
44

5+
[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2FThe-Igor%2Fopenai-async-image-swiftui%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/The-Igor/openai-async-image-swiftui)
6+
7+
[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2FThe-Igor%2Fopenai-async-image-swiftui%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/The-Igor/openai-async-image-swiftui)
8+
59
## Features
6-
- [x] Multiplatform
10+
- [x] Multiplatform iOS and macOS
711
- [x] Customizable in term of SwiftUI Image specs [renderingMode, resizable, antialiased...]
812
- [x] Customizable in term of the transport layer [Loader]
913
- [x] Based on interfaces not implementations

Sources/openai-async-image-swiftui/OpenAIAsyncImage.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import SwiftUI
1010
fileprivate typealias ImageSize = OpenAIImageSize
1111

1212
/// Async image component to load and show OpenAI image from OpenAI image API
13-
@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)
13+
@available(iOS 15.0, macOS 12.0, *)
1414
public struct OpenAIAsyncImage<Content: View, T: IOpenAILoader>: View {
1515

1616
/// Custom view builder tpl

Sources/openai-async-image-swiftui/enum/AsyncImageErrors.swift

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

1010
/// Set of errors for ``OpenAIAsyncImage``
11-
@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)
11+
@available(iOS 15.0, macOS 12.0, *)
1212
enum AsyncImageErrors: Error, Equatable{
1313

1414
/// Could not create Image from uiImage

Sources/openai-async-image-swiftui/enum/ImageState.swift

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

1010
/// Set of states for ``OpenAIAsyncImage``
11-
@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)
11+
@available(iOS 15.0, macOS 12.0, *)
1212
public enum ImageState{
1313

1414
/// Loading currently

Sources/openai-async-image-swiftui/enum/OpenAIImageSize.swift

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

1010
/// The size of the generated images. Must be one of 256x256, 512x512, or 1024x1024
11-
@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)
11+
@available(iOS 15.0, macOS 12.0, *)
1212
public enum OpenAIImageSize: String, Encodable{
1313

1414
case dpi256 = "256x256"

Sources/openai-async-image-swiftui/enum/ResponseFormat.swift

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

1010
/// Type of response format from OpenAI API
11-
@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)
11+
@available(iOS 15.0, macOS 12.0, *)
1212
enum ResponseFormat: String,Encodable{
1313

1414
case url = "url"

Sources/openai-async-image-swiftui/environmentKey/OpenAIAsyncImageLoaderKey.swift

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

1010
/// A key for accessing default loader in the environment
11-
@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)
11+
@available(iOS 15.0, macOS 12.0, *)
1212
public struct OpenAIDefaultLoaderKey : EnvironmentKey{
1313
public typealias Value = OpenAIDefaultLoader
1414

Sources/openai-async-image-swiftui/model/Input.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import Foundation
99

1010

1111
/// Input format to OpenAI API
12-
@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)
12+
@available(iOS 15.0, macOS 12.0, *)
1313
struct Input: Encodable{
1414

1515
/// A text description of the desired image(s). The maximum length is 1000 characters

Sources/openai-async-image-swiftui/model/Output.swift

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

1010
/// Output format for OpenAI API
11-
@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)
11+
@available(iOS 15.0, macOS 12.0, *)
1212
struct Output: Decodable{
1313

1414
/// Date and time

Sources/openai-async-image-swiftui/net/OpenAIImageEndpoint.swift

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

1010
/// Set of specs for acces to OpenAPI image resource
11-
@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)
11+
@available(iOS 15.0, macOS 12.0, *)
1212
public struct OpenAIImageEndpoint: IOpenAIImageEndpoint{
1313

1414
// MARK: - Static

Sources/openai-async-image-swiftui/protocol/IOpenAIImageEndpoint.swift

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

1010
/// Defines access API to OpenAI image API
11-
@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)
11+
@available(iOS 15.0, macOS 12.0, *)
1212
public protocol IOpenAIImageEndpoint{
1313

1414
/// Base url to OpenAPI image resource

Sources/openai-async-image-swiftui/protocol/IOpenAILoader.swift

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

1010
/// Loader for getting images
11-
@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)
11+
@available(iOS 15.0, macOS 12.0, *)
1212
public protocol IOpenAILoader: ObservableObject{
1313

1414
/// Load image by text

Sources/openai-async-image-swiftui/viewModel/OpenAIDefaultLoader.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import AppKit.NSImage
1717

1818
import SwiftUI
1919

20-
@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)
20+
@available(iOS 15.0, macOS 12.0, *)
2121
public final class OpenAIDefaultLoader : IOpenAILoader{
2222

2323
/// Http async client

0 commit comments

Comments
 (0)