ux: bulk WIP — UxPlugin→XPlugin rename + new anim/core/navi/reactive packages
Catch-all commit for outstanding pre-existing local changes. Mixes several themes that would normally be split: - Rename: UxPlugin → XPlugin across iOS, macOS, Android registrants. - New top-level packages under lib/src/: anim/ (animated values, panes, sheets, dock, measured), core/ (Emitter, ReactiveBuilder scaffolding, presenter/widget/value/dispose primitives), navi/ (Screen/ScreenStack/Router/hero/transitions), reactive/. - Edits across existing plugins (clipboard, crash, file, gallery, keyboard, scanner, sensor, url) to align with the new core. - Test updates and CHANGELOG/README touches accompanying the above.
This commit is contained in:
@@ -6,7 +6,7 @@ import FlutterMacOS
|
||||
#endif
|
||||
import Foundation
|
||||
|
||||
/// One per `UxCameraController` on the Dart side. Owns its
|
||||
/// One per `XCameraController` on the Dart side. Owns its
|
||||
/// `AVCaptureSession`, the texture-backed preview pipeline, photo
|
||||
/// output, audio + video data outputs, and the
|
||||
/// [VideoRecorder] when a recording is in flight. Multiple instances
|
||||
@@ -526,7 +526,7 @@ final class CameraInstance {
|
||||
// front camera — raw sensor feed at capture, mirror as a
|
||||
// playback decision.
|
||||
if let videoConn = videoDataOutput?.connection(with: .video) {
|
||||
videoConn.applyUxCaptureOrientation(
|
||||
videoConn.applyXCaptureOrientation(
|
||||
lockedOrientation ?? orientation.current
|
||||
)
|
||||
if videoConn.isVideoMirroringSupported {
|
||||
@@ -558,7 +558,7 @@ final class CameraInstance {
|
||||
|
||||
private func applyVideoOrientationOnPreview(_ next: DeviceOrientationFlutter) {
|
||||
videoDataOutput?.connection(with: .video)?
|
||||
.applyUxCaptureOrientation(next)
|
||||
.applyXCaptureOrientation(next)
|
||||
}
|
||||
|
||||
private func emit(_ extras: [String: Any]) {
|
||||
|
||||
@@ -108,7 +108,7 @@ enum CaptureDevice {
|
||||
|
||||
/// One row of the discovery result. `lens` and `sensorOrientation`
|
||||
/// match the wire shape expected by Dart's
|
||||
/// `MethodChannelUxCameraBackend.availableCameras()`.
|
||||
/// `MethodChannelXCameraBackend.availableCameras()`.
|
||||
struct DiscoveredCamera {
|
||||
let device: AVCaptureDevice
|
||||
let lens: String
|
||||
|
||||
@@ -18,7 +18,7 @@ public enum DeviceOrientationFlutter: String {
|
||||
case landscapeRight
|
||||
|
||||
/// Parse a wire string. Returns `.portraitUp` for unknown inputs
|
||||
/// (matches the Dart-side fallback in `MethodChannelUxCameraBackend`).
|
||||
/// (matches the Dart-side fallback in `MethodChannelXCameraBackend`).
|
||||
public static func parse(_ raw: String?) -> DeviceOrientationFlutter {
|
||||
return DeviceOrientationFlutter(rawValue: raw ?? "") ?? .portraitUp
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ final class PhotoOutput {
|
||||
// JPEG); macOS is a no-op (desktop cams are physically
|
||||
// landscape, any rotation skews the photo). See
|
||||
// `AVCaptureConnection+iOS.swift` / `…+macOS.swift`.
|
||||
connection.applyUxCaptureOrientation(orientation)
|
||||
connection.applyXCaptureOrientation(orientation)
|
||||
// The recorded photo carries no mirror; mirroring is a
|
||||
// preview-only concern.
|
||||
if connection.isVideoMirroringSupported {
|
||||
@@ -79,7 +79,7 @@ final class PhotoOutput {
|
||||
// snapshot defaults cleanly. No-op on macOS (the
|
||||
// extension method is empty there).
|
||||
self?.avOutput.connection(with: .video)?
|
||||
.applyUxCaptureOrientation(.portraitUp)
|
||||
.applyXCaptureOrientation(.portraitUp)
|
||||
self?.inFlight = nil
|
||||
DispatchQueue.main.async { completion(result) }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user