feat: TypeWhisper Flow sessions, Phase 4 UX, and GitHub Pages privacy site

Migrate keyboard dictation to continuous Flow sessions with auto-start,
tap-to-toggle recording, 60s countdown, five-step onboarding, and App Group
IPC. Add docs/ GitHub Pages site with en/zh privacy policy for App Store compliance.
This commit is contained in:
Rocky
2026-06-19 18:05:50 +08:00
parent 6148d05093
commit 7f059dbd45
48 changed files with 3815 additions and 1065 deletions
@@ -0,0 +1,17 @@
// DictationTextComposer.swift
// OSGKeyboard · Shared
//
// Merges pre-dictation anchor text with a live cumulative transcript.
import Foundation
public enum DictationTextComposer {
/// Combine text that existed before dictation with the current live transcript.
public static func compose(anchor: String, live: String) -> String {
let trimmed = live.trimmingCharacters(in: .whitespacesAndNewlines)
guard !trimmed.isEmpty else { return anchor }
if anchor.isEmpty { return trimmed }
if anchor.last == " " || anchor.last == "\n" { return anchor + trimmed }
return anchor + " " + trimmed
}
}