- Add ImagePreview helper class for displaying images using QuickLook - Extend HelperModule with previewImage function to load and display images - Update WebView bridge to support image preview from web content - Implement MarkdownImage component with base64 image conversion - Add cross-platform quickLookImage method for native image preview Signed-off-by: Innei <tukon479@gmail.com>
26 lines
455 B
Swift
26 lines
455 B
Swift
//
|
|
// SharedWebView+BridgeData.swift
|
|
// Pods
|
|
//
|
|
// Created by Innei on 2025/2/7.
|
|
//
|
|
import Foundation
|
|
|
|
private protocol BasePayload {
|
|
var type: String { get }
|
|
}
|
|
|
|
struct SetContentHeightPayload: Hashable, Codable, BasePayload {
|
|
var type: String
|
|
var payload: CGFloat
|
|
}
|
|
|
|
struct BridgeDataBasePayload: Hashable, Codable {
|
|
var type: String
|
|
}
|
|
|
|
struct PreviewImagePayload: Hashable, Codable, BasePayload {
|
|
var type: String
|
|
var payload: [String]
|
|
}
|