About this drop
The Live Activity is one function marked with the expo-widgets 'widget' directive (Expo SDK 56). Metro serializes it into the widget extension's own JS runtime, where @expo/ui/swift-ui primitives (ZStack, Circle, Image, Button) become real SwiftUI views, so the Lock Screen banner and the compact, minimal and expanded Dynamic Island layouts share one Header, MoonArc and ToggleChip. The app does the astronomy on the JS thread with suncalc v2 (rise, set, altitude, illumination, elapsed rise-to-set fraction for moon and sun) and pushes an update once a minute. The arc dots, body position and terminator shadow are plain layout math on those props; the countdown is a SwiftUI date Text with the relative style, so it ticks between updates. Images are copied into the app-group container (widgetsDirectory), with 96 px thumbnails for the island, which drops oversized images. The sun/moon chip is a Live Activity Button whose intent reaches the app via addUserInteractionListener; ActivityKit replays intents, so requests are idempotent. Mode flips use the animation modifier, which needs the included patch-package patch giving expo-widgets nodes stable SwiftUI identity. The in-app screen uses Reanimated 4 worklets and react-native-svg. iOS only (ActivityKit 16.2+, island on iPhone 14 Pro or newer), development build required, not Expo Go. Tested on the iOS 18 simulator.