d4fd15dc20
Introduces expo-bluesky-context-menu, a compositional Root/Trigger/Menu/MenuItem wrapper around UIContextMenuInteraction. The preview ViewController is sized to the image's true aspect ratio so tall/panorama previews don't stretch mid-lift, and menu icons are rasterized from the app's SVG icon set on the native side. The preview prop is a discriminated union (image today; video and externalCard reserved) so the same module can back those embeds in follow-ups. https://claude.ai/code/session_015REmux3R9uuEMMJUHxTyQT
24 lines
647 B
Swift
24 lines
647 B
Swift
import ExpoModulesCore
|
|
|
|
public class ExpoBlueskyContextMenuModule: Module {
|
|
public func definition() -> ModuleDefinition {
|
|
Name("ExpoBlueskyContextMenu")
|
|
|
|
View(ExpoBlueskyContextMenuView.self) {
|
|
Events(["onItemPress", "onPreviewPress"])
|
|
|
|
Prop("preview") { (view: ExpoBlueskyContextMenuView, value: [String: Any]?) in
|
|
view.setPreview(value)
|
|
}
|
|
|
|
Prop("menuItems") { (view: ExpoBlueskyContextMenuView, value: [[String: Any]]) in
|
|
view.setMenuItems(value)
|
|
}
|
|
|
|
Prop("borderRadius") { (view: ExpoBlueskyContextMenuView, value: Double) in
|
|
view.setBorderRadius(value)
|
|
}
|
|
}
|
|
}
|
|
}
|