feat(keyboard): harden clipboard command and add What's New sheet

Stabilize clipboard long-press prepare/resume across paste alerts and cold start, add an in-app release-notes sheet with remote bilingual HTML, localize typing input settings, and bump build to 55.
This commit is contained in:
Rocky
2026-08-08 00:20:42 +08:00
parent f197b68573
commit 9da32b81e9
45 changed files with 3670 additions and 422 deletions
@@ -0,0 +1,22 @@
// KeyboardOpenSurfacePolicy.swift
// OSGKeyboard · Shared
//
// Pure open-surface decision used by the keyboard extension. Extracted so
// paste-alert sticky resume can be unit-tested without UIKit.
import Foundation
public enum KeyboardOpenSurfacePolicy: Sendable {
/// Surface to show on the first frame of a keyboard presentation.
public static func resolve(
locksTypingSurface: Bool,
clipboardCommandActive: Bool,
stickyPreferVoice: Bool,
preferred: KeyboardState.Surface
) -> KeyboardState.Surface {
if locksTypingSurface || clipboardCommandActive || stickyPreferVoice {
return .voice
}
return preferred
}
}