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:
agra
2026-05-21 08:58:07 +03:00
parent a508aca2bb
commit d68a2978eb
83 changed files with 5006 additions and 275 deletions

View File

@@ -7,7 +7,7 @@ import UIKit
public class FilePlugin: NSObject, NativePlugin {
private var channel: FlutterMethodChannel?
private var previewDataSource: FilePreviewDataSource?
private var pickerDelegate: UxDocumentPickerDelegate?
private var pickerDelegate: XDocumentPickerDelegate?
private struct ScopedEntry {
let url: URL
@@ -91,7 +91,7 @@ public class FilePlugin: NSObject, NativePlugin {
let path = args["path"] as? String else {
return result(FlutterError(code: "bad_args", message: "path is required", details: nil))
}
guard let topVC = UxWindow.topViewController else {
guard let topVC = XWindow.topViewController else {
return result(FlutterError(code: "no_view", message: "no top view controller", details: nil))
}
@@ -123,7 +123,7 @@ public class FilePlugin: NSObject, NativePlugin {
}
private func handlePick(_ call: FlutterMethodCall, result: @escaping FlutterResult) {
guard let topVC = UxWindow.topViewController else {
guard let topVC = XWindow.topViewController else {
return result(FlutterError(code: "no_view", message: "no top view controller", details: nil))
}
let args = call.arguments as? [String: Any]
@@ -136,7 +136,7 @@ public class FilePlugin: NSObject, NativePlugin {
// cold starts.
let picker = UIDocumentPickerViewController(documentTypes: utis, in: .open)
picker.allowsMultipleSelection = false
let delegate = UxDocumentPickerDelegate(result: result) { [weak self] in
let delegate = XDocumentPickerDelegate(result: result) { [weak self] in
self?.pickerDelegate = nil
}
// The delegate is weak on UIDocumentPickerViewController; keep a strong ref.
@@ -180,7 +180,7 @@ public class FilePlugin: NSObject, NativePlugin {
let path = args["path"] as? String else {
return result(FlutterError(code: "bad_args", message: "path is required", details: nil))
}
guard let topVC = UxWindow.topViewController else {
guard let topVC = XWindow.topViewController else {
return result(FlutterError(code: "no_view", message: "no top view controller", details: nil))
}
@@ -322,7 +322,7 @@ fileprivate func mimeFromExtension(_ ext: String) -> String? {
/// we briefly start access to read attributes + create a bookmark, then
/// stop access. Persisted bookmark lets Dart re-acquire scope later via
/// `beginScopedAccess`.
private final class UxDocumentPickerDelegate: NSObject, UIDocumentPickerDelegate {
private final class XDocumentPickerDelegate: NSObject, UIDocumentPickerDelegate {
let result: FlutterResult
let onDone: () -> Void
private var settled = false