mirror of
https://github.com/carey314/mio-plugin-clipper.git
synced 2026-08-10 07:44:32 +00:00
Quick AI actions on clipboard or selected text. Four actions: - 翻译 (中/英/日) - 总结 (3-bullet Chinese) - 改语气 (正式/口语/友好/严谨) - 邮件回复 Powered by DeepSeek with Server-Sent Events streaming for typewriter feedback (~600ms first byte). Two source modes: clipboard (no permission) and selected-text via NSAccessibility (graceful fallback to clipboard + permission banner if denied). Five-state UI machine: idle → input → loading (cancellable) → result → missing-config. Last 20 actions persisted to UserDefaults. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
42 lines
1.4 KiB
Swift
42 lines
1.4 KiB
Swift
//
|
|
// Theme.swift
|
|
// 划词侠 plugin
|
|
//
|
|
// Same visual language as 看盘侠 — pure black panel + lime accent.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
enum ClipperTheme {
|
|
// Lime accent — same value as 看盘侠 `#d4ff3a`.
|
|
static let lime = Color(red: 0xD4/255, green: 0xFF/255, blue: 0x3A/255)
|
|
|
|
// Soft cyan for "info" affordances (translate-target chips, etc.)
|
|
static let cyan = Color(red: 0x6E/255, green: 0xE7/255, blue: 0xFF/255)
|
|
|
|
// Warning amber for permission banners.
|
|
static let amber = Color(red: 0xFF/255, green: 0xC4/255, blue: 0x54/255)
|
|
|
|
// Soft red for error / cancel states.
|
|
static let danger = Color(red: 0xFF/255, green: 0x6E/255, blue: 0x6E/255)
|
|
|
|
// Panel background.
|
|
static let panelBg = Color(red: 0x05/255, green: 0x05/255, blue: 0x05/255)
|
|
|
|
// Subtle white overlays.
|
|
static let overlay04 = Color.white.opacity(0.04)
|
|
static let overlay06 = Color.white.opacity(0.06)
|
|
static let overlay08 = Color.white.opacity(0.08)
|
|
static let overlay12 = Color.white.opacity(0.12)
|
|
static let overlay18 = Color.white.opacity(0.18)
|
|
|
|
// Foreground tints.
|
|
static let fgPrimary = Color(red: 0xF4/255, green: 0xF4/255, blue: 0xF5/255)
|
|
static let fg85 = Color.white.opacity(0.85)
|
|
static let fg70 = Color.white.opacity(0.7)
|
|
static let fg55 = Color.white.opacity(0.55)
|
|
static let fg45 = Color.white.opacity(0.45)
|
|
static let fg40 = Color.white.opacity(0.4)
|
|
static let fg35 = Color.white.opacity(0.35)
|
|
}
|