Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename WordPressMedia to AsyncImageKit #23937

Merged
merged 1 commit into from
Jan 2, 2025
Merged
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
10 changes: 5 additions & 5 deletions Modules/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ let package = Package(
.library(name: "JetpackStatsWidgetsCore", targets: ["JetpackStatsWidgetsCore"]),
.library(name: "DesignSystem", targets: ["DesignSystem"]),
.library(name: "WordPressFlux", targets: ["WordPressFlux"]),
.library(name: "WordPressMedia", targets: ["WordPressMedia"]),
.library(name: "AsyncImageKit", targets: ["AsyncImageKit"]),
.library(name: "WordPressShared", targets: ["WordPressShared"]),
.library(name: "WordPressUI", targets: ["WordPressUI"]),
],
Expand Down Expand Up @@ -59,7 +59,7 @@ let package = Package(
.product(name: "XCUITestHelpers", package: "XCUITestHelpers"),
], swiftSettings: [.swiftLanguageMode(.v5)]),
.target(name: "WordPressFlux", swiftSettings: [.swiftLanguageMode(.v5)]),
.target(name: "WordPressMedia", dependencies: [
.target(name: "AsyncImageKit", dependencies: [
.product(name: "Collections", package: "swift-collections"),
]),
.target(name: "WordPressSharedObjC", resources: [.process("Resources")], swiftSettings: [.swiftLanguageMode(.v5)]),
Expand All @@ -69,8 +69,8 @@ let package = Package(
.testTarget(name: "JetpackStatsWidgetsCoreTests", dependencies: [.target(name: "JetpackStatsWidgetsCore")], swiftSettings: [.swiftLanguageMode(.v5)]),
.testTarget(name: "DesignSystemTests", dependencies: [.target(name: "DesignSystem")], swiftSettings: [.swiftLanguageMode(.v5)]),
.testTarget(name: "WordPressFluxTests", dependencies: ["WordPressFlux"], swiftSettings: [.swiftLanguageMode(.v5)]),
.testTarget(name: "WordPressMediaTests", dependencies: [
.target(name: "WordPressMedia"),
.testTarget(name: "AsyncImageKitTests", dependencies: [
.target(name: "AsyncImageKit"),
.target(name: "WordPressTesting"),
.product(name: "OHHTTPStubsSwift", package: "OHHTTPStubs")
]),
Expand Down Expand Up @@ -145,7 +145,7 @@ enum XcodeSupport {
"JetpackStatsWidgetsCore",
"WordPressFlux",
"WordPressShared",
"WordPressMedia",
"AsyncImageKit",
"WordPressUI",
.product(name: "Alamofire", package: "Alamofire"),
.product(name: "AutomatticAbout", package: "AutomatticAbout-swift"),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import UIKit
import Testing
import WordPressMedia
import AsyncImageKit
import WordPressTesting
import OHHTTPStubs
import OHHTTPStubsSwift
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import UIKit
import MobileCoreServices
import UniformTypeIdentifiers
import WordPressMedia
import AsyncImageKit

@objc
public extension NSAttributedString {
Expand Down
2 changes: 1 addition & 1 deletion WordPress/Classes/Networking/MediaHost+Extensions.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Foundation
import WordPressMedia
import AsyncImageKit

/// Extends `MediaRequestAuthenticator.MediaHost` so that we can easily
/// initialize it from a given `AbstractPost`.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Foundation
import WordPressMedia
import AsyncImageKit

fileprivate let photonHost = "i0.wp.com"
fileprivate let secureHttpScheme = "https"
Expand Down
2 changes: 1 addition & 1 deletion WordPress/Classes/Services/MediaHelper.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import UIKit
import WordPressMedia
import AsyncImageKit

class MediaHelper: NSObject {

Expand Down
2 changes: 1 addition & 1 deletion WordPress/Classes/Services/MediaImageService.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import UIKit
import CoreData
import WordPressShared
import WordPressMedia
import AsyncImageKit

/// A service for retrieval and caching of thumbnails for ``Media`` objects.
final class MediaImageService {
Expand Down
2 changes: 1 addition & 1 deletion WordPress/Classes/System/WordPressAppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import AutomatticTracks
import AutomatticEncryptedLogs
import WordPressAuthenticator
import WordPressShared
import WordPressMedia
import AsyncImageKit
import AutomatticAbout
import UIDeviceIdentifier
import WordPressUI
Expand Down
2 changes: 1 addition & 1 deletion WordPress/Classes/Utility/Media/AsyncImageView.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import UIKit
import Gifu
import WordPressMedia
import AsyncImageKit

/// A simple image view that supports rendering both static and animated images
/// (see ``AnimatedImage``).
Expand Down
2 changes: 1 addition & 1 deletion WordPress/Classes/Utility/Media/CachedAsyncImage.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import SwiftUI
import DesignSystem
import WordPressMedia
import AsyncImageKit

/// Asynchronous Image View that replicates the public API of `SwiftUI.AsyncImage`.
/// It uses `ImageDownloader` to fetch and cache the images.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Foundation
import WordPressMedia
import AsyncImageKit

extension ImageDownloader {
nonisolated static let shared = ImageDownloader(authenticator: MediaRequestAuthenticator())
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import Foundation
import UIKit
import WordPressUI
import Gravatar
import WordPressMedia
import AsyncImageKit

extension WordPressMedia.ImageDownloader {
extension AsyncImageKit.ImageDownloader {

nonisolated func downloadGravatarImage(with email: String, forceRefresh: Bool = false, completion: @escaping (UIImage?) -> Void) {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation
import UIKit
import WordPressMedia
import AsyncImageKit

/// A convenience class for managing image downloads for individual views.
@MainActor
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Foundation
import WordPressMedia
import AsyncImageKit

/// Media export handling assets from external sources i.e.: Stock Photos
///
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import UIKit
import WordPressMedia
import AsyncImageKit
import WordPressUI

extension MemoryCache {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Foundation
import UIKit
import Gifu
import WordPressMedia
import AsyncImageKit

extension UIImageView {
@MainActor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Gridicons
import WordPressShared
import MobileCoreServices
import WordPressEditor
import WordPressMedia
import AsyncImageKit
import AVKit
import AutomatticTracks
import MediaEditor
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import UIKit
import WordPressMedia
import AsyncImageKit

final class BlazeCampaignTableViewCell: UITableViewCell, Reusable {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import UIKit
import WordPressMedia
import AsyncImageKit

final class BlazePostPreviewView: UIView {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Foundation
import UIKit
import WordPressKit
import WordPressMedia
import AsyncImageKit

final class DashboardBlazeCampaignView: UIView {
private let statusView = BlazeCampaignStatusView()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation
import UIKit
import WordPressUI
import WordPressMedia
import AsyncImageKit
import Gravatar

extension BlogDetailsViewController {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Foundation
import SwiftUI
import WordPressShared
import WordPressKit
import WordPressMedia
import AsyncImageKit

struct SiteIconViewModel {
var imageURL: URL?
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import UIKit
import Gridicons
import WordPressShared
import WordPressMedia
import AsyncImageKit

final class MediaItemHeaderView: UIView {
let imageView = AsyncImageView()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import UIKit
import WordPressUI
import WordPressMedia
import AsyncImageKit

final class PostFeaturedImageCell: UITableViewCell {
let featuredImageView = AsyncImageView()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import UIKit
import WordPressMedia
import AsyncImageKit

/// Renders the comment body through `WPRichContentView`.
///
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Aztec
import WordPressMedia
import AsyncImageKit

class AztecAttachmentDelegate: TextViewAttachmentDelegate {
private let post: AbstractPost
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import AutomatticTracks
import Aztec
import Gridicons
import WordPressShared
import WordPressMedia
import AsyncImageKit

class EditorMediaUtility {
private static let InternalInconsistencyError = NSError(domain: NSExceptionName.internalInconsistencyException.rawValue, code: 0)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import UIKit
import WordPressMedia
import AsyncImageKit
import Gutenberg
import Aztec
import WordPressFlux
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation
import MediaEditor
import WordPressMedia
import AsyncImageKit

/**
This is a struct to be given to MediaEditor that represent the image.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Foundation
import GravatarUI
import WordPressShared
import WordPressAuthenticator
import WordPressMedia
import AsyncImageKit

@MainActor
struct GravatarQuickEditorPresenter {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import UIKit
import WordPressMedia
import AsyncImageKit

final class ExternalMediaPickerCollectionCell: UICollectionViewCell {
private let imageView = AsyncImageView()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import UIKit
import WordPressMedia
import AsyncImageKit

protocol ExternalMediaPickerViewDelegate: AnyObject {
/// If the user cancels the flow, the selection is empty.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import UIKit
import WordPressUI
import WordPressMedia
import AsyncImageKit

final class LightboxImagePageViewController: UIViewController {
private(set) var scrollView = LightboxImageScrollView()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Foundation
import WordPressMedia
import AsyncImageKit

enum LightboxItem {
case image(UIImage)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import UIKit
import WordPressMedia
import AsyncImageKit
import WordPressUI
import UniformTypeIdentifiers

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import UIKit
import Combine
import Gifu
import WordPressMedia
import AsyncImageKit

final class SiteMediaCollectionCell: UICollectionViewCell, Reusable {
private let imageContainerView = UIView()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import UIKit
import WordPressMedia
import AsyncImageKit
import AutomatticTracks
import GutenbergKit
import SafariServices
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation
import UIKit
import WordPressMedia
import AsyncImageKit

/// The purpose of this class is to provide a simple API to download assets from the web.
/// Assets are downloaded, and resized to fit a maximumWidth, specified in the initial download call.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Foundation
import WordPressShared
import WordPressUI
import WordPressMedia
import AsyncImageKit
import Gravatar

// MARK: - NoteBlockHeaderTableViewCell
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Foundation
import UIKit
import Combine
import WordPressMedia
import AsyncImageKit

final class PageListCell: UITableViewCell, AbstractPostListCell, PostSearchResultCell, Reusable {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Aztec
import Gridicons
import WordPressMedia
import AsyncImageKit

class RevisionPreviewTextViewManager: NSObject {
var post: AbstractPost?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import AutomatticTracks
import UIKit
import WordPressShared
import WordPressUI
import WordPressMedia
import AsyncImageKit

final class PostCompactCell: UITableViewCell, Reusable {
private let titleLabel = UILabel()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation
import UIKit
import WordPressMedia
import AsyncImageKit

protocol AbstractPostListCell {
/// A post displayed by the cell.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Foundation
import AutomatticTracks
import WordPressShared
import WordPressUI
import WordPressMedia
import AsyncImageKit

final class ReaderCrossPostCell: ReaderStreamBaseCell {
private let view = ReaderCrossPostView()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import SwiftUI
import UIKit
import Combine
import WordPressShared
import WordPressMedia
import AsyncImageKit

final class ReaderPostCell: ReaderStreamBaseCell {
private let view = ReaderPostCellView()
Expand Down
Loading