diff --git a/Sources/PulseUI/Helpers/ShareItems.swift b/Sources/PulseUI/Helpers/ShareItems.swift index 8da64428c..16843b5dd 100644 --- a/Sources/PulseUI/Helpers/ShareItems.swift +++ b/Sources/PulseUI/Helpers/ShareItems.swift @@ -28,11 +28,11 @@ public enum ShareStoreOutput: String, RawRepresentable, Codable, CaseIterable { } } -package struct ShareItems: Identifiable { - package let id = UUID() - package let items: [Any] - package let size: Int64? - package let cleanup: () -> Void +public struct ShareItems: Identifiable { + public let id = UUID() + public let items: [Any] + public let size: Int64? + public let cleanup: () -> Void package init(_ items: [Any], size: Int64? = nil, cleanup: @escaping () -> Void = { }) { self.items = items @@ -41,10 +41,8 @@ package struct ShareItems: Identifiable { } } -package enum ShareService { - private static var task: ShareStoreTask? - - package static func share(_ entities: [NSManagedObject], store: LoggerStore, as output: ShareOutput) async throws -> ShareItems { +public enum ShareService { + public static func share(_ entities: [NSManagedObject], store: LoggerStore, as output: ShareOutput) async throws -> ShareItems { try await withUnsafeThrowingContinuation { continuation in ShareStoreTask(entities: entities, store: store, output: output) { if let value = $0 { @@ -56,12 +54,12 @@ package enum ShareService { } } - package static func share(_ message: LoggerMessageEntity, as output: ShareOutput) -> ShareItems { + public static func share(_ message: LoggerMessageEntity, as output: ShareOutput) -> ShareItems { let string = TextRenderer(options: .sharing).make { $0.render(message) } return share(string, as: output) } - package static func share(_ task: NetworkTaskEntity, as output: ShareOutput, store: LoggerStore) -> ShareItems { + public static func share(_ task: NetworkTaskEntity, as output: ShareOutput, store: LoggerStore) -> ShareItems { let string = TextRenderer(options: .sharing).make { $0.render(task, content: .sharing, store: store) } return share(string, as: output) }