feat(desktop): honest, unified dictation popups with Esc to cancel

Wave 3 of the 2026-09-28 design overhaul.

- Esc (no modifiers) cancels an in-progress dictation, recording or
  processing: VoiceModeService.requestEscape() queues the dead 'escape'
  action. Clicking the capsule cancels only while recording, so a stray
  click during processing no longer throws the text away.
- Errors show in the user's language: bootstrap now passes error.code to
  the tip (the translated branch never ran), and one core classifier
  (voice-error-message) feeds both the tip and the main-window alert.
- Capsule: bars stay flat without input (no fake "alive" wobble before the
  mic opens), an indeterminate bar replaces the made-up percentage, the
  partial transcript stays visible while processing, an Esc hint, and a
  brief "Inserted" state so success is visible.
- All six popups share popups/_shared (Pretendard, one panel radius,
  selection, kbd hints, reduced motion). History/command popups get
  titles, listbox roles and window sizes from popup-list-geometry (empty
  states were clipped); the command popup's "0" key is registered;
  result popup explains why it appeared and can be closed; captions keep
  a theme-independent dark backing on purpose.
- Popup themes follow the OS when set to system and the document lang
  follows the app language.
- Site hero demo mirrors the new capsule (done state, indeterminate bar,
  Esc hint; 10 locales).
This commit is contained in:
Yun Chan 2026-09-28 20:46:24 +09:00
parent f064c93197
commit 7b1210b5d1
41 changed files with 1565 additions and 1143 deletions

View file

@ -0,0 +1,146 @@
/* popups/_shared/popup-base.css
* 팝업 6종의 공통 바탕 — v4 "조용한 계기" (2026-09-28).
* 이전에는 팝업마다 radius(999/16/10)·폰트 스택·선택 표시·키 힌트·모션이 제각각이었고,
* Pretendard 를 싣지 않아 시스템 폰트로 그려졌다. 이제 모든 팝업이 이 파일을 @import 한다.
* 색은 main 이 insertCSS 로 주입하는 CSS 변수(@d3ro/ui theme-vars — 렌더러와 같은 원시값)만 쓴다.
* 아래 :root 값은 주입 전 첫 프레임용 폴백(dark 기본값과 같다). */
@font-face {
font-family: 'Pretendard Variable';
font-weight: 45 920;
font-style: normal;
font-display: swap;
src: url('../../assets/fonts/PretendardVariable.woff2') format('woff2-variations');
}
:root {
--d3-bg-card: #111a30;
--d3-bg-elevated: #1a2540;
--d3-bg-inset: #0a111f;
--d3-text-primary: #eef2fb;
--d3-text-secondary: #93a4c8;
--d3-text-tertiary: #7e8eb0;
--d3-border-subtle: rgba(148, 180, 255, 0.07);
--d3-border-default: rgba(148, 180, 255, 0.12);
--d3-border-strong: rgba(148, 180, 255, 0.20);
--d3-accent-main: #3b82f6;
--d3-accent-light: #60a5fa;
--d3-accent-dim: rgba(59, 130, 246, 0.14);
--d3-status-danger: #f87171;
--d3-status-success: #34d399;
--d3-overlay-soft: rgba(238, 242, 251, 0.06);
--d3-overlay-strong: rgba(238, 242, 251, 0.12);
--d3-shadow-overlay: 0 12px 32px rgba(3, 7, 18, 0.55);
/* 팝업 전용 치수 — 한 곳에서만 정한다 */
--popup-radius: 10px;
--popup-radius-item: 6px;
--popup-pad: 6px;
--popup-font: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo',
'Noto Sans KR', 'Segoe UI', 'Malgun Gothic', sans-serif;
--popup-font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, 'Pretendard Variable', 'Malgun Gothic', monospace;
--popup-ease: cubic-bezier(0.22, 1, 0.36, 1);
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html,
body {
background: transparent;
overflow: hidden;
}
body {
font-family: var(--popup-font);
font-size: 13px;
line-height: 1.5;
color: var(--d3-text-primary);
user-select: none;
-webkit-app-region: no-drag;
-webkit-font-smoothing: antialiased;
}
/* 떠 있는 판 하나 — 모든 팝업의 겉모양 */
.d3-panel {
background: var(--d3-bg-card);
border: 1px solid var(--d3-border-default);
border-radius: var(--popup-radius);
box-shadow: var(--d3-shadow-overlay);
}
/* 목록 항목 — 선택은 옅은 오버레이 + 왼쪽 2px 액센트 막대(팝업 공통) */
.d3-item {
position: relative;
border-radius: var(--popup-radius-item);
}
.d3-item:hover {
background: var(--d3-overlay-soft);
}
.d3-item.selected {
background: var(--d3-overlay-strong);
}
.d3-item.selected::before {
content: '';
position: absolute;
left: 0;
top: 6px;
bottom: 6px;
width: 2px;
border-radius: 1px;
background: var(--d3-accent-main);
}
/* 키 힌트 줄 — 키는 kbd 칩, 설명은 3차 텍스트 (최소 11px) */
.d3-hints {
display: flex;
flex-wrap: wrap;
gap: 4px 12px;
padding: 6px 10px 4px;
border-top: 1px solid var(--d3-border-subtle);
font-size: 11px;
color: var(--d3-text-tertiary);
}
.d3-hints span {
display: inline-flex;
align-items: center;
gap: 4px;
}
kbd,
.d3-kbd {
display: inline-flex;
align-items: center;
min-width: 18px;
height: 18px;
padding: 0 4px;
justify-content: center;
border: 1px solid var(--d3-border-strong);
border-radius: 4px;
font-family: var(--popup-font-mono);
font-size: 11px;
line-height: 1;
color: var(--d3-text-secondary);
}
.d3-numeral {
font-variant-numeric: tabular-nums;
}
/* 움직임을 줄인 환경: 반복 애니메이션을 멈추고 전환을 즉시로 */
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
}
}