feat(input): expand Araso Han/Eng contractions, acronyms, typo recovery, and fast cursor-tail replacement
This commit is contained in:
parent
51bf664302
commit
f403111256
80 changed files with 1449 additions and 458 deletions
17
CHANGELOG.md
17
CHANGELOG.md
|
|
@ -12,6 +12,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
- Additional Whisper model management UI
|
- Additional Whisper model management UI
|
||||||
- Plugin system for custom pipelines
|
- Plugin system for custom pipelines
|
||||||
|
|
||||||
|
## [1.12.0] - 2026-10-28
|
||||||
|
|
||||||
|
> Published from an annotated tag. Installer and update metadata are served by the
|
||||||
|
> canonical Forgejo feed; no binaries are committed to this repository.
|
||||||
|
|
||||||
|
### Added
|
||||||
|
- **Hangul-typed English contractions, acronyms, function words & fuzzy typo recovery (한영 축약형·약어·오타 자동 교정 고도화).**
|
||||||
|
- Converts Hangul-typed English contractions and contraction+particle tokens (`ㅊ무ㅅ` / `ㅊ무'ㅅ` / `ㅊ무ㅜ'ㅅ` → `can't`, `ㅊ무'ㅅ는` → `can't는`, `애ㅜ'ㅅ` → `don't`, `ㅑ'ㅡ` / `ㅑㅡ` → `I'm`, `재ㅜ'ㅅ` → `won't`), standalone sentence-initial `ㅑ ` → `I `, and English-clause function words (`새 애` → `to do`, `뭉` → `and`, `랙` → `for`, `소됴` → `they`, `생묘` → `today`, `갸홋` → `right`).
|
||||||
|
- General Araso batchim-harmony and rare-stem acronym detection (`츤를` / `츤는` → `CMS를` / `CMS는`, `눈를` → `SNS를`, `운를` → `DNS를`, `긴를` → `RLS를`, `틔을` → `XML을`, `먀를` → `AI를`, `뗘를` → `EU를`, `쓰은` → `TM은`, `꾸은` → `RN은`, `띠이` → `EL이`, `꺼을` → `RJ을`, `ㅏㅅㅌ를` → `KTX를`, `ㅎㅅㅌ를` → `GTX를`).
|
||||||
|
- Recovers 1-edit Hangul-typed English typos (`ㅗ디ㅐ` → `hello`, `ㅔㅐㄴ냐ㅠㅣ` → `possible`, `세갸ㅜㅎ` → `spring`, `ㅡㅁ가애주` → `markdown`), trailing bracket mistypes (`help[` → `help`), and split reflexive pronouns (`my self` → `myself`).
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- **Cursor-tail-only replacement without racing your typing (타이핑 경합 없는 꼬리 구간 즉시 교정).**
|
||||||
|
- Auto-correction now replaces only the contiguous token chain at the cursor tail (up to 22 characters) instead of backspacing and retyping entire lines, and skips background LLM typo calls during active typing bursts so your keystrokes are never interrupted.
|
||||||
|
- **Design System v4 ("조용한 계기") across Desktop, Web, Admin, and Landing site.**
|
||||||
|
- Pretendard Variable + JetBrains Mono typography, `#08090C` matte obsidian surfaces, `#E04F3E` signal-red recording accent, and WCAG AA contrast tokens across all surfaces.
|
||||||
|
|
||||||
## [1.11.0] - 2026-10-27
|
## [1.11.0] - 2026-10-27
|
||||||
|
|
||||||
> Published from an annotated tag. Installer and update metadata are served by the
|
> Published from an annotated tag. Installer and update metadata are served by the
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ function HeaderBar(): React.ReactElement {
|
||||||
FAIL-CLOSED SANDBOX
|
FAIL-CLOSED SANDBOX
|
||||||
</TactileBadge>
|
</TactileBadge>
|
||||||
</Box>
|
</Box>
|
||||||
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '11px', color: C.dim, letterSpacing: '0.04em', mt: 0.25 }}>
|
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '11px', color: C.dim, letterSpacing: 0, mt: 0.25 }}>
|
||||||
Mediation waterfall roster, rewarded token grants, network integration state
|
Mediation waterfall roster, rewarded token grants, network integration state
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
@ -95,7 +95,7 @@ function RewardKpis({ stats }: { stats: AdRewardStats }): React.ReactElement {
|
||||||
{cards.map((card) => (
|
{cards.map((card) => (
|
||||||
<Box key={card.title} sx={{ ...panelSx, p: 2.5 }}>
|
<Box key={card.title} sx={{ ...panelSx, p: 2.5 }}>
|
||||||
<Typography
|
<Typography
|
||||||
sx={{ fontFamily: FONT_SANS, fontSize: '11px', color: C.dim, mb: 1, textTransform: 'uppercase', letterSpacing: '0.08em' }}
|
sx={{ fontFamily: FONT_SANS, fontSize: '11px', fontWeight: 500, color: C.dim, mb: 1, letterSpacing: 0 }}
|
||||||
>
|
>
|
||||||
{card.title}
|
{card.title}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
|
||||||
|
|
@ -99,7 +99,7 @@ export default async function AuditLogPage({ searchParams }: PageProps): Promise
|
||||||
fontFamily: FONT_MONO,
|
fontFamily: FONT_MONO,
|
||||||
fontSize: '11px',
|
fontSize: '11px',
|
||||||
color: C.dim,
|
color: C.dim,
|
||||||
letterSpacing: '0.04em',
|
letterSpacing: 0,
|
||||||
mt: 0.25,
|
mt: 0.25,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -372,7 +372,7 @@ export default function ServiceModelsPage(): React.ReactElement {
|
||||||
fontFamily: FONT_MONO,
|
fontFamily: FONT_MONO,
|
||||||
fontSize: '11px',
|
fontSize: '11px',
|
||||||
color: C.dim,
|
color: C.dim,
|
||||||
letterSpacing: '0.04em',
|
letterSpacing: 0,
|
||||||
mt: 0.25,
|
mt: 0.25,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|
@ -457,7 +457,7 @@ export default function ServiceModelsPage(): React.ReactElement {
|
||||||
width: 44,
|
width: 44,
|
||||||
height: 44,
|
height: 44,
|
||||||
borderRadius: '12px',
|
borderRadius: '12px',
|
||||||
bgcolor: 'var(--d3-tag-cyan)',
|
bgcolor: 'var(--d3-tag-cyanBg)',
|
||||||
border: '1px solid var(--d3-tag-cyan)',
|
border: '1px solid var(--d3-tag-cyan)',
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
|
|
@ -483,7 +483,7 @@ export default function ServiceModelsPage(): React.ReactElement {
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
<Box sx={{ display: 'flex', alignItems: 'center', gap: 2 }}>
|
<Box sx={{ display: 'flex', alignItems: 'center', gap: 2 }}>
|
||||||
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '11px', color: C.cyanLight, bgcolor: 'var(--d3-tag-cyan)', px: 1.5, py: 0.75, borderRadius: '8px', border: `1px solid ${C.borderHl}` }}>
|
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '11px', color: C.cyanLight, bgcolor: 'var(--d3-tag-cyanBg)', px: 1.5, py: 0.75, borderRadius: '8px', border: `1px solid ${C.borderHl}` }}>
|
||||||
🛡️ Auto Failover Route: {sttEndpoints.map((e) => e.providerType).join(' ➔ ')}
|
🛡️ Auto Failover Route: {sttEndpoints.map((e) => e.providerType).join(' ➔ ')}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
@ -536,7 +536,7 @@ export default function ServiceModelsPage(): React.ReactElement {
|
||||||
</Box>
|
</Box>
|
||||||
<Box component="td" sx={{ fontWeight: 600, color: C.bright }}>
|
<Box component="td" sx={{ fontWeight: 600, color: C.bright }}>
|
||||||
{ep.name}
|
{ep.name}
|
||||||
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '10px', color: C.dim, mt: 0.25, maxWidth: 220, overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}>
|
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '11px', color: C.dim, mt: 0.25, maxWidth: 220, overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}>
|
||||||
{ep.endpointUrl}
|
{ep.endpointUrl}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
@ -556,7 +556,7 @@ export default function ServiceModelsPage(): React.ReactElement {
|
||||||
</Box>
|
</Box>
|
||||||
<Box component="td">
|
<Box component="td">
|
||||||
{ep.isDefault ? (
|
{ep.isDefault ? (
|
||||||
<Box component="span" sx={{ px: 1, py: 0.3, borderRadius: '4px', bgcolor: 'var(--d3-status-success)', color: C.green400, fontSize: '10px', fontWeight: 500 }}>
|
<Box component="span" sx={{ px: 1, py: 0.3, borderRadius: '4px', bgcolor: 'var(--d3-status-successBg)', color: C.green400, fontSize: '11px', fontWeight: 500 }}>
|
||||||
⭐ DEFAULT
|
⭐ DEFAULT
|
||||||
</Box>
|
</Box>
|
||||||
) : (
|
) : (
|
||||||
|
|
@ -574,12 +574,12 @@ export default function ServiceModelsPage(): React.ReactElement {
|
||||||
onClick={() => handleSetDefaultStt(ep.id)}
|
onClick={() => handleSetDefaultStt(ep.id)}
|
||||||
sx={{
|
sx={{
|
||||||
fontFamily: FONT_SANS,
|
fontFamily: FONT_SANS,
|
||||||
fontSize: '10px',
|
fontSize: '11px',
|
||||||
color: C.green400,
|
color: C.green400,
|
||||||
borderColor: 'var(--d3-status-success)',
|
borderColor: 'var(--d3-status-success)',
|
||||||
px: 1,
|
px: 1,
|
||||||
py: 0.25,
|
py: 0.25,
|
||||||
'&:hover': { bgcolor: 'var(--d3-status-success)', borderColor: C.green400 },
|
'&:hover': { bgcolor: 'var(--d3-status-successBg)', borderColor: C.green400 },
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Set Default
|
Set Default
|
||||||
|
|
@ -591,7 +591,7 @@ export default function ServiceModelsPage(): React.ReactElement {
|
||||||
onClick={() => handlePingStt(ep.id)}
|
onClick={() => handlePingStt(ep.id)}
|
||||||
sx={{
|
sx={{
|
||||||
fontFamily: FONT_MONO,
|
fontFamily: FONT_MONO,
|
||||||
fontSize: '10px',
|
fontSize: '11px',
|
||||||
color: C.bright,
|
color: C.bright,
|
||||||
borderColor: C.borderHl,
|
borderColor: C.borderHl,
|
||||||
px: 1,
|
px: 1,
|
||||||
|
|
@ -607,7 +607,7 @@ export default function ServiceModelsPage(): React.ReactElement {
|
||||||
onClick={() => openEditSttModal(ep)}
|
onClick={() => openEditSttModal(ep)}
|
||||||
sx={{
|
sx={{
|
||||||
fontFamily: FONT_SANS,
|
fontFamily: FONT_SANS,
|
||||||
fontSize: '10px',
|
fontSize: '11px',
|
||||||
color: C.dim,
|
color: C.dim,
|
||||||
borderColor: C.border,
|
borderColor: C.border,
|
||||||
px: 1,
|
px: 1,
|
||||||
|
|
@ -621,7 +621,7 @@ export default function ServiceModelsPage(): React.ReactElement {
|
||||||
size="small"
|
size="small"
|
||||||
color="error"
|
color="error"
|
||||||
onClick={() => handleDeleteStt(ep.id)}
|
onClick={() => handleDeleteStt(ep.id)}
|
||||||
sx={{ fontFamily: FONT_MONO, fontSize: '10px', px: 1, py: 0.25 }}
|
sx={{ fontFamily: FONT_MONO, fontSize: '11px', px: 1, py: 0.25 }}
|
||||||
>
|
>
|
||||||
Delete
|
Delete
|
||||||
</Button>
|
</Button>
|
||||||
|
|
@ -676,7 +676,7 @@ export default function ServiceModelsPage(): React.ReactElement {
|
||||||
<Box component="td" sx={{ fontFamily: FONT_MONO, fontSize: '12px', color: C.bright, fontWeight: 600 }}>
|
<Box component="td" sx={{ fontFamily: FONT_MONO, fontSize: '12px', color: C.bright, fontWeight: 600 }}>
|
||||||
{ep.modelId}
|
{ep.modelId}
|
||||||
{ep.isDefault && (
|
{ep.isDefault && (
|
||||||
<Box component="span" sx={{ ml: 1, px: 0.75, py: 0.1, borderRadius: '4px', bgcolor: 'var(--d3-accent-glow)', color: C.cyanLight, fontSize: '9px' }}>
|
<Box component="span" sx={{ ml: 1, px: 0.75, py: 0.1, borderRadius: '4px', bgcolor: 'var(--d3-accent-glow)', color: C.cyanLight, fontSize: '11px' }}>
|
||||||
DEFAULT
|
DEFAULT
|
||||||
</Box>
|
</Box>
|
||||||
)}
|
)}
|
||||||
|
|
@ -711,7 +711,7 @@ export default function ServiceModelsPage(): React.ReactElement {
|
||||||
onClick={() => handleDeleteLlm(ep.id)}
|
onClick={() => handleDeleteLlm(ep.id)}
|
||||||
sx={{
|
sx={{
|
||||||
fontFamily: FONT_MONO,
|
fontFamily: FONT_MONO,
|
||||||
fontSize: '10px',
|
fontSize: '11px',
|
||||||
color: C.bright,
|
color: C.bright,
|
||||||
borderColor: C.borderHl,
|
borderColor: C.borderHl,
|
||||||
px: 1,
|
px: 1,
|
||||||
|
|
@ -740,8 +740,7 @@ export default function ServiceModelsPage(): React.ReactElement {
|
||||||
fullWidth
|
fullWidth
|
||||||
PaperProps={{
|
PaperProps={{
|
||||||
sx: {
|
sx: {
|
||||||
bgcolor: 'var(--d3-bg-card-soft)',
|
bgcolor: C.card,
|
||||||
backdropFilter: 'blur(32px)',
|
|
||||||
border: `1px solid ${C.borderHl}`,
|
border: `1px solid ${C.borderHl}`,
|
||||||
borderRadius: '20px',
|
borderRadius: '20px',
|
||||||
boxShadow: '0 24px 60px var(--d3-scrim)',
|
boxShadow: '0 24px 60px var(--d3-scrim)',
|
||||||
|
|
@ -1013,8 +1012,7 @@ export default function ServiceModelsPage(): React.ReactElement {
|
||||||
fullWidth
|
fullWidth
|
||||||
PaperProps={{
|
PaperProps={{
|
||||||
sx: {
|
sx: {
|
||||||
bgcolor: 'var(--d3-bg-card-soft)',
|
bgcolor: C.card,
|
||||||
backdropFilter: 'blur(32px)',
|
|
||||||
border: `1px solid ${C.borderHl}`,
|
border: `1px solid ${C.borderHl}`,
|
||||||
borderRadius: '20px',
|
borderRadius: '20px',
|
||||||
boxShadow: '0 24px 60px var(--d3-scrim)',
|
boxShadow: '0 24px 60px var(--d3-scrim)',
|
||||||
|
|
|
||||||
|
|
@ -156,7 +156,7 @@ export default async function AdminOverviewPage(): Promise<React.ReactElement> {
|
||||||
fontFamily: FONT_MONO,
|
fontFamily: FONT_MONO,
|
||||||
fontSize: '11px',
|
fontSize: '11px',
|
||||||
color: C.dim,
|
color: C.dim,
|
||||||
letterSpacing: '0.04em',
|
letterSpacing: 0,
|
||||||
mt: 0.25,
|
mt: 0.25,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|
@ -222,7 +222,7 @@ export default async function AdminOverviewPage(): Promise<React.ReactElement> {
|
||||||
fontSize: '11px',
|
fontSize: '11px',
|
||||||
fontWeight: 500,
|
fontWeight: 500,
|
||||||
color: C.dim,
|
color: C.dim,
|
||||||
letterSpacing: '0.04em',
|
letterSpacing: 0,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{card.title}
|
{card.title}
|
||||||
|
|
@ -285,7 +285,7 @@ export default async function AdminOverviewPage(): Promise<React.ReactElement> {
|
||||||
fontSize: '11px',
|
fontSize: '11px',
|
||||||
fontWeight: 500,
|
fontWeight: 500,
|
||||||
color: C.dim,
|
color: C.dim,
|
||||||
letterSpacing: '0.04em',
|
letterSpacing: 0,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{card.title}
|
{card.title}
|
||||||
|
|
@ -373,7 +373,6 @@ export default async function AdminOverviewPage(): Promise<React.ReactElement> {
|
||||||
height: 8,
|
height: 8,
|
||||||
borderRadius: '50%',
|
borderRadius: '50%',
|
||||||
bgcolor: node.status === 'operational' ? 'var(--d3-status-success)' : node.status === 'degraded' ? 'var(--d3-status-warning)' : 'var(--d3-status-danger)',
|
bgcolor: node.status === 'operational' ? 'var(--d3-status-success)' : node.status === 'degraded' ? 'var(--d3-status-warning)' : 'var(--d3-status-danger)',
|
||||||
boxShadow: `0 0 8px ${node.status === 'operational' ? 'var(--d3-status-success)' : node.status === 'degraded' ? 'var(--d3-status-warning)' : 'var(--d3-status-danger)'}`,
|
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
@ -383,10 +382,10 @@ export default async function AdminOverviewPage(): Promise<React.ReactElement> {
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
||||||
<Box sx={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', pt: 1, borderTop: `1px solid ${C.border}` }}>
|
<Box sx={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', pt: 1, borderTop: `1px solid ${C.border}` }}>
|
||||||
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '10px', color: C.dim }}>
|
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '11px', color: C.dim }}>
|
||||||
Latency: <strong style={{ color: C.bright }}>{node.latencyMs}ms</strong>
|
Latency: <strong style={{ color: C.bright }}>{node.latencyMs}ms</strong>
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '10px', color: node.status === 'operational' ? C.green400 : node.status === 'degraded' ? C.orange400 : C.red400 }}>
|
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '11px', color: node.status === 'operational' ? C.green400 : node.status === 'degraded' ? C.orange400 : C.red400 }}>
|
||||||
{node.uptimePercent}% · {node.status.toUpperCase()}
|
{node.uptimePercent}% · {node.status.toUpperCase()}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@ export default async function PipelinesPage(): Promise<React.ReactElement> {
|
||||||
fontFamily: FONT_MONO,
|
fontFamily: FONT_MONO,
|
||||||
fontSize: '11px',
|
fontSize: '11px',
|
||||||
color: C.dim,
|
color: C.dim,
|
||||||
letterSpacing: '0.04em',
|
letterSpacing: 0,
|
||||||
mt: 0.25,
|
mt: 0.25,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|
@ -130,19 +130,19 @@ export default async function PipelinesPage(): Promise<React.ReactElement> {
|
||||||
|
|
||||||
<Box sx={{ display: 'grid', gridTemplateColumns: 'repeat(3, 1fr)', gap: 1.5, mb: 2.5 }}>
|
<Box sx={{ display: 'grid', gridTemplateColumns: 'repeat(3, 1fr)', gap: 1.5, mb: 2.5 }}>
|
||||||
<Box sx={{ p: 1.5, borderRadius: '10px', bgcolor: 'var(--d3-bg-inset-soft)', border: `1px solid ${C.border}` }}>
|
<Box sx={{ p: 1.5, borderRadius: '10px', bgcolor: 'var(--d3-bg-inset-soft)', border: `1px solid ${C.border}` }}>
|
||||||
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '10px', color: C.dim }}>AVG LATENCY</Typography>
|
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '11px', color: C.dim }}>AVG LATENCY</Typography>
|
||||||
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '16px', fontWeight: 500, color: C.bright }}>
|
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '16px', fontWeight: 500, color: C.bright }}>
|
||||||
{whisper.avgLatencyMs}ms
|
{whisper.avgLatencyMs}ms
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
<Box sx={{ p: 1.5, borderRadius: '10px', bgcolor: 'var(--d3-bg-inset-soft)', border: `1px solid ${C.border}` }}>
|
<Box sx={{ p: 1.5, borderRadius: '10px', bgcolor: 'var(--d3-bg-inset-soft)', border: `1px solid ${C.border}` }}>
|
||||||
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '10px', color: C.dim }}>SPEEDUP FACTOR</Typography>
|
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '11px', color: C.dim }}>SPEEDUP FACTOR</Typography>
|
||||||
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '16px', fontWeight: 500, color: C.green400 }}>
|
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '16px', fontWeight: 500, color: C.green400 }}>
|
||||||
{whisper.speedupFactor}
|
{whisper.speedupFactor}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
<Box sx={{ p: 1.5, borderRadius: '10px', bgcolor: 'var(--d3-bg-inset-soft)', border: `1px solid ${C.border}` }}>
|
<Box sx={{ p: 1.5, borderRadius: '10px', bgcolor: 'var(--d3-bg-inset-soft)', border: `1px solid ${C.border}` }}>
|
||||||
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '10px', color: C.dim }}>GPU VRAM</Typography>
|
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '11px', color: C.dim }}>GPU VRAM</Typography>
|
||||||
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '16px', fontWeight: 500, color: C.cyanLight }}>
|
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '16px', fontWeight: 500, color: C.cyanLight }}>
|
||||||
{whisper.gpuVramUsage}
|
{whisper.gpuVramUsage}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
@ -183,19 +183,19 @@ export default async function PipelinesPage(): Promise<React.ReactElement> {
|
||||||
|
|
||||||
<Box sx={{ display: 'grid', gridTemplateColumns: 'repeat(3, 1fr)', gap: 1.5, mb: 2.5 }}>
|
<Box sx={{ display: 'grid', gridTemplateColumns: 'repeat(3, 1fr)', gap: 1.5, mb: 2.5 }}>
|
||||||
<Box sx={{ p: 1.5, borderRadius: '10px', bgcolor: 'var(--d3-bg-inset-soft)', border: `1px solid ${C.border}` }}>
|
<Box sx={{ p: 1.5, borderRadius: '10px', bgcolor: 'var(--d3-bg-inset-soft)', border: `1px solid ${C.border}` }}>
|
||||||
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '10px', color: C.dim }}>THROUGHPUT</Typography>
|
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '11px', color: C.dim }}>THROUGHPUT</Typography>
|
||||||
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '16px', fontWeight: 500, color: C.bright }}>
|
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '16px', fontWeight: 500, color: C.bright }}>
|
||||||
{ollama.tokensPerSecond} tok/s
|
{ollama.tokensPerSecond} tok/s
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
<Box sx={{ p: 1.5, borderRadius: '10px', bgcolor: 'var(--d3-bg-inset-soft)', border: `1px solid ${C.border}` }}>
|
<Box sx={{ p: 1.5, borderRadius: '10px', bgcolor: 'var(--d3-bg-inset-soft)', border: `1px solid ${C.border}` }}>
|
||||||
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '10px', color: C.dim }}>CONTEXT LIMIT</Typography>
|
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '11px', color: C.dim }}>CONTEXT LIMIT</Typography>
|
||||||
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '16px', fontWeight: 500, color: C.cyanLight }}>
|
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '16px', fontWeight: 500, color: C.cyanLight }}>
|
||||||
{ollama.activeContextLimit}
|
{ollama.activeContextLimit}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
<Box sx={{ p: 1.5, borderRadius: '10px', bgcolor: 'var(--d3-bg-inset-soft)', border: `1px solid ${C.border}` }}>
|
<Box sx={{ p: 1.5, borderRadius: '10px', bgcolor: 'var(--d3-bg-inset-soft)', border: `1px solid ${C.border}` }}>
|
||||||
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '10px', color: C.dim }}>VRAM OCCUPANCY</Typography>
|
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '11px', color: C.dim }}>VRAM OCCUPANCY</Typography>
|
||||||
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '16px', fontWeight: 500, color: C.purple400 }}>
|
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '16px', fontWeight: 500, color: C.purple400 }}>
|
||||||
{ollama.vramAllocated}
|
{ollama.vramAllocated}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
@ -239,19 +239,19 @@ export default async function PipelinesPage(): Promise<React.ReactElement> {
|
||||||
|
|
||||||
<Box sx={{ display: 'grid', gridTemplateColumns: 'repeat(3, 1fr)', gap: 1.5, mb: 2.5 }}>
|
<Box sx={{ display: 'grid', gridTemplateColumns: 'repeat(3, 1fr)', gap: 1.5, mb: 2.5 }}>
|
||||||
<Box sx={{ p: 1.5, borderRadius: '10px', bgcolor: 'var(--d3-bg-inset-soft)', border: `1px solid ${C.border}` }}>
|
<Box sx={{ p: 1.5, borderRadius: '10px', bgcolor: 'var(--d3-bg-inset-soft)', border: `1px solid ${C.border}` }}>
|
||||||
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '10px', color: C.dim }}>LIVE STREAMS</Typography>
|
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '11px', color: C.dim }}>LIVE STREAMS</Typography>
|
||||||
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '16px', fontWeight: 500, color: C.orange400 }}>
|
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '16px', fontWeight: 500, color: C.orange400 }}>
|
||||||
{realtimeVoice.activeStreams} Active
|
{realtimeVoice.activeStreams} Active
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
<Box sx={{ p: 1.5, borderRadius: '10px', bgcolor: 'var(--d3-bg-inset-soft)', border: `1px solid ${C.border}` }}>
|
<Box sx={{ p: 1.5, borderRadius: '10px', bgcolor: 'var(--d3-bg-inset-soft)', border: `1px solid ${C.border}` }}>
|
||||||
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '10px', color: C.dim }}>AUDIO RTT</Typography>
|
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '11px', color: C.dim }}>AUDIO RTT</Typography>
|
||||||
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '16px', fontWeight: 500, color: C.bright }}>
|
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '16px', fontWeight: 500, color: C.bright }}>
|
||||||
{realtimeVoice.avgAudioRttMs}ms
|
{realtimeVoice.avgAudioRttMs}ms
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
<Box sx={{ p: 1.5, borderRadius: '10px', bgcolor: 'var(--d3-bg-inset-soft)', border: `1px solid ${C.border}` }}>
|
<Box sx={{ p: 1.5, borderRadius: '10px', bgcolor: 'var(--d3-bg-inset-soft)', border: `1px solid ${C.border}` }}>
|
||||||
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '10px', color: C.dim }}>LOCAL FALLBACK</Typography>
|
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '11px', color: C.dim }}>LOCAL FALLBACK</Typography>
|
||||||
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '16px', fontWeight: 500, color: C.green400 }}>
|
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '16px', fontWeight: 500, color: C.green400 }}>
|
||||||
{realtimeVoice.localFallbackRate}
|
{realtimeVoice.localFallbackRate}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
@ -292,19 +292,19 @@ export default async function PipelinesPage(): Promise<React.ReactElement> {
|
||||||
|
|
||||||
<Box sx={{ display: 'grid', gridTemplateColumns: 'repeat(3, 1fr)', gap: 1.5, mb: 2.5 }}>
|
<Box sx={{ display: 'grid', gridTemplateColumns: 'repeat(3, 1fr)', gap: 1.5, mb: 2.5 }}>
|
||||||
<Box sx={{ p: 1.5, borderRadius: '10px', bgcolor: 'var(--d3-bg-inset-soft)', border: `1px solid ${C.border}` }}>
|
<Box sx={{ p: 1.5, borderRadius: '10px', bgcolor: 'var(--d3-bg-inset-soft)', border: `1px solid ${C.border}` }}>
|
||||||
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '10px', color: C.dim }}>INDEXED DOCS</Typography>
|
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '11px', color: C.dim }}>INDEXED DOCS</Typography>
|
||||||
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '16px', fontWeight: 500, color: C.bright }}>
|
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '16px', fontWeight: 500, color: C.bright }}>
|
||||||
{ragVector.indexedDocuments.toLocaleString()}
|
{ragVector.indexedDocuments.toLocaleString()}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
<Box sx={{ p: 1.5, borderRadius: '10px', bgcolor: 'var(--d3-bg-inset-soft)', border: `1px solid ${C.border}` }}>
|
<Box sx={{ p: 1.5, borderRadius: '10px', bgcolor: 'var(--d3-bg-inset-soft)', border: `1px solid ${C.border}` }}>
|
||||||
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '10px', color: C.dim }}>VECTOR CHUNKS</Typography>
|
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '11px', color: C.dim }}>VECTOR CHUNKS</Typography>
|
||||||
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '16px', fontWeight: 500, color: C.cyanLight }}>
|
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '16px', fontWeight: 500, color: C.cyanLight }}>
|
||||||
{ragVector.totalVectorChunks.toLocaleString()}
|
{ragVector.totalVectorChunks.toLocaleString()}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
<Box sx={{ p: 1.5, borderRadius: '10px', bgcolor: 'var(--d3-bg-inset-soft)', border: `1px solid ${C.border}` }}>
|
<Box sx={{ p: 1.5, borderRadius: '10px', bgcolor: 'var(--d3-bg-inset-soft)', border: `1px solid ${C.border}` }}>
|
||||||
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '10px', color: C.dim }}>SEARCH HIT RATE</Typography>
|
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '11px', color: C.dim }}>SEARCH HIT RATE</Typography>
|
||||||
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '16px', fontWeight: 500, color: C.green400 }}>
|
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '16px', fontWeight: 500, color: C.green400 }}>
|
||||||
{ragVector.topHitRatePercent}%
|
{ragVector.topHitRatePercent}%
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
@ -346,7 +346,7 @@ export default async function PipelinesPage(): Promise<React.ReactElement> {
|
||||||
|
|
||||||
<Box sx={{ display: 'grid', gridTemplateColumns: { xs: '1fr', sm: 'repeat(2, 1fr)', md: 'repeat(4, 1fr)' }, gap: 2, mb: 3 }}>
|
<Box sx={{ display: 'grid', gridTemplateColumns: { xs: '1fr', sm: 'repeat(2, 1fr)', md: 'repeat(4, 1fr)' }, gap: 2, mb: 3 }}>
|
||||||
<Box sx={{ p: 2, borderRadius: '12px', bgcolor: 'var(--d3-bg-inset-soft)', border: `1px solid ${C.border}` }}>
|
<Box sx={{ p: 2, borderRadius: '12px', bgcolor: 'var(--d3-bg-inset-soft)', border: `1px solid ${C.border}` }}>
|
||||||
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '10px', color: C.dim }}>SPEAKER ACCURACY</Typography>
|
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '11px', color: C.dim }}>SPEAKER ACCURACY</Typography>
|
||||||
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '20px', fontWeight: 500, color: C.green400 }}>
|
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '20px', fontWeight: 500, color: C.green400 }}>
|
||||||
{meetingIntelligence.speakerAccuracyPercent}%
|
{meetingIntelligence.speakerAccuracyPercent}%
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
@ -355,7 +355,7 @@ export default async function PipelinesPage(): Promise<React.ReactElement> {
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
<Box sx={{ p: 2, borderRadius: '12px', bgcolor: 'var(--d3-bg-inset-soft)', border: `1px solid ${C.border}` }}>
|
<Box sx={{ p: 2, borderRadius: '12px', bgcolor: 'var(--d3-bg-inset-soft)', border: `1px solid ${C.border}` }}>
|
||||||
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '10px', color: C.dim }}>ACTIVE MEETINGS</Typography>
|
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '11px', color: C.dim }}>ACTIVE MEETINGS</Typography>
|
||||||
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '20px', fontWeight: 500, color: C.cyanLight }}>
|
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '20px', fontWeight: 500, color: C.cyanLight }}>
|
||||||
{meetingIntelligence.activeMeetingSessions} Live
|
{meetingIntelligence.activeMeetingSessions} Live
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
@ -364,7 +364,7 @@ export default async function PipelinesPage(): Promise<React.ReactElement> {
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
<Box sx={{ p: 2, borderRadius: '12px', bgcolor: 'var(--d3-bg-inset-soft)', border: `1px solid ${C.border}` }}>
|
<Box sx={{ p: 2, borderRadius: '12px', bgcolor: 'var(--d3-bg-inset-soft)', border: `1px solid ${C.border}` }}>
|
||||||
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '10px', color: C.dim }}>TEMPLATES TODAY</Typography>
|
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '11px', color: C.dim }}>TEMPLATES TODAY</Typography>
|
||||||
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '20px', fontWeight: 500, color: C.purple400 }}>
|
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '20px', fontWeight: 500, color: C.purple400 }}>
|
||||||
{meetingIntelligence.templatesGeneratedToday} Docs
|
{meetingIntelligence.templatesGeneratedToday} Docs
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
@ -373,7 +373,7 @@ export default async function PipelinesPage(): Promise<React.ReactElement> {
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
<Box sx={{ p: 2, borderRadius: '12px', bgcolor: 'var(--d3-bg-inset-soft)', border: `1px solid ${C.border}` }}>
|
<Box sx={{ p: 2, borderRadius: '12px', bgcolor: 'var(--d3-bg-inset-soft)', border: `1px solid ${C.border}` }}>
|
||||||
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '10px', color: C.dim }}>MINDMAP EXPORTS</Typography>
|
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '11px', color: C.dim }}>MINDMAP EXPORTS</Typography>
|
||||||
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '20px', fontWeight: 500, color: C.orange400 }}>
|
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '20px', fontWeight: 500, color: C.orange400 }}>
|
||||||
{meetingIntelligence.mindmapsExported} Maps
|
{meetingIntelligence.mindmapsExported} Maps
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,7 @@ function HeaderBar({ feedLive, repoHtmlUrl }: { feedLive: boolean; repoHtmlUrl:
|
||||||
</TactileBadge>
|
</TactileBadge>
|
||||||
)}
|
)}
|
||||||
</Box>
|
</Box>
|
||||||
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '11px', color: C.dim, letterSpacing: '0.04em', mt: 0.25 }}>
|
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '11px', color: C.dim, letterSpacing: 0, mt: 0.25 }}>
|
||||||
Desktop & mobile installers, SHA-256 integrity, download telemetry
|
Desktop & mobile installers, SHA-256 integrity, download telemetry
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
@ -162,7 +162,7 @@ function KpiCards({ hub }: { hub: ReleaseHub }): React.ReactElement {
|
||||||
{cards.map((card) => (
|
{cards.map((card) => (
|
||||||
<Box key={card.title} sx={{ ...panelSx, p: 2.5 }}>
|
<Box key={card.title} sx={{ ...panelSx, p: 2.5 }}>
|
||||||
<Typography
|
<Typography
|
||||||
sx={{ fontFamily: FONT_SANS, fontSize: '11px', color: C.dim, mb: 1, textTransform: 'uppercase', letterSpacing: '0.08em' }}
|
sx={{ fontFamily: FONT_SANS, fontSize: '11px', fontWeight: 500, color: C.dim, mb: 1, letterSpacing: 0 }}
|
||||||
>
|
>
|
||||||
{card.title}
|
{card.title}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ export function NewSubscriptionClient({ initialUserId }: NewSubscriptionClientPr
|
||||||
return (
|
return (
|
||||||
<Box>
|
<Box>
|
||||||
<Box sx={{ mb: 3 }}>
|
<Box sx={{ mb: 3 }}>
|
||||||
<Typography sx={{ fontFamily: FONT_SANS, fontSize: '13px', fontWeight: 600, color: C.dim, mb: 1, textTransform: 'uppercase' }}>
|
<Typography sx={{ fontFamily: FONT_SANS, fontSize: '13px', fontWeight: 600, color: C.dim, mb: 1 }}>
|
||||||
Target Account User ID or UID
|
Target Account User ID or UID
|
||||||
</Typography>
|
</Typography>
|
||||||
<TextField
|
<TextField
|
||||||
|
|
|
||||||
|
|
@ -142,7 +142,7 @@ export default async function AdminSubscriptionsPage({ searchParams }: PageProps
|
||||||
fontFamily: FONT_MONO,
|
fontFamily: FONT_MONO,
|
||||||
fontSize: '11px',
|
fontSize: '11px',
|
||||||
color: C.dim,
|
color: C.dim,
|
||||||
letterSpacing: '0.04em',
|
letterSpacing: 0,
|
||||||
mt: 0.25,
|
mt: 0.25,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|
@ -175,7 +175,7 @@ export default async function AdminSubscriptionsPage({ searchParams }: PageProps
|
||||||
<Box sx={{ display: 'grid', gridTemplateColumns: { xs: '1fr', sm: 'repeat(3, 1fr)' }, gap: 2.5 }}>
|
<Box sx={{ display: 'grid', gridTemplateColumns: { xs: '1fr', sm: 'repeat(3, 1fr)' }, gap: 2.5 }}>
|
||||||
<DoubleBezelCard interactive bezelPadding="5px" innerPadding="20px">
|
<DoubleBezelCard interactive bezelPadding="5px" innerPadding="20px">
|
||||||
<Box sx={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', mb: 1.5 }}>
|
<Box sx={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', mb: 1.5 }}>
|
||||||
<Typography sx={{ fontFamily: FONT_SANS, fontSize: '11px', fontWeight: 600, color: C.dim, textTransform: 'uppercase' }}>
|
<Typography sx={{ fontFamily: FONT_SANS, fontSize: '11px', fontWeight: 600, color: C.dim }}>
|
||||||
Total Subscription Records
|
Total Subscription Records
|
||||||
</Typography>
|
</Typography>
|
||||||
<StatRing color="purple" size={38}>
|
<StatRing color="purple" size={38}>
|
||||||
|
|
@ -192,7 +192,7 @@ export default async function AdminSubscriptionsPage({ searchParams }: PageProps
|
||||||
|
|
||||||
<DoubleBezelCard interactive bezelPadding="5px" innerPadding="20px">
|
<DoubleBezelCard interactive bezelPadding="5px" innerPadding="20px">
|
||||||
<Box sx={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', mb: 1.5 }}>
|
<Box sx={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', mb: 1.5 }}>
|
||||||
<Typography sx={{ fontFamily: FONT_SANS, fontSize: '11px', fontWeight: 600, color: C.dim, textTransform: 'uppercase' }}>
|
<Typography sx={{ fontFamily: FONT_SANS, fontSize: '11px', fontWeight: 600, color: C.dim }}>
|
||||||
Active Subscriptions
|
Active Subscriptions
|
||||||
</Typography>
|
</Typography>
|
||||||
<StatRing color="blue" size={38}>
|
<StatRing color="blue" size={38}>
|
||||||
|
|
@ -209,7 +209,7 @@ export default async function AdminSubscriptionsPage({ searchParams }: PageProps
|
||||||
|
|
||||||
<DoubleBezelCard interactive bezelPadding="5px" innerPadding="20px">
|
<DoubleBezelCard interactive bezelPadding="5px" innerPadding="20px">
|
||||||
<Box sx={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', mb: 1.5 }}>
|
<Box sx={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', mb: 1.5 }}>
|
||||||
<Typography sx={{ fontFamily: FONT_SANS, fontSize: '11px', fontWeight: 600, color: C.dim, textTransform: 'uppercase' }}>
|
<Typography sx={{ fontFamily: FONT_SANS, fontSize: '11px', fontWeight: 600, color: C.dim }}>
|
||||||
Renewal Failures
|
Renewal Failures
|
||||||
</Typography>
|
</Typography>
|
||||||
<StatRing color="green" size={38}>
|
<StatRing color="green" size={38}>
|
||||||
|
|
@ -267,7 +267,7 @@ export default async function AdminSubscriptionsPage({ searchParams }: PageProps
|
||||||
<Typography sx={{ fontFamily: FONT_SANS, fontSize: '13px', fontWeight: 600, color: C.accentLight }}>
|
<Typography sx={{ fontFamily: FONT_SANS, fontSize: '13px', fontWeight: 600, color: C.accentLight }}>
|
||||||
{s.profile_name ?? s.user_id}
|
{s.profile_name ?? s.user_id}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '10px', color: C.dim }}>
|
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '11px', color: C.dim }}>
|
||||||
{s.user_id}
|
{s.user_id}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Link>
|
</Link>
|
||||||
|
|
|
||||||
|
|
@ -111,7 +111,7 @@ export default async function AdminUsagePage(): Promise<React.ReactElement> {
|
||||||
fontFamily: FONT_MONO,
|
fontFamily: FONT_MONO,
|
||||||
fontSize: '11px',
|
fontSize: '11px',
|
||||||
color: C.dim,
|
color: C.dim,
|
||||||
letterSpacing: '0.04em',
|
letterSpacing: 0,
|
||||||
mt: 0.25,
|
mt: 0.25,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|
@ -134,7 +134,7 @@ export default async function AdminUsagePage(): Promise<React.ReactElement> {
|
||||||
{metricCards.map((m) => (
|
{metricCards.map((m) => (
|
||||||
<DoubleBezelCard key={m.title} interactive bezelPadding="5px" innerPadding="20px">
|
<DoubleBezelCard key={m.title} interactive bezelPadding="5px" innerPadding="20px">
|
||||||
<Box sx={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', mb: 1.5 }}>
|
<Box sx={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', mb: 1.5 }}>
|
||||||
<Typography sx={{ fontFamily: FONT_SANS, fontSize: '11px', fontWeight: 600, color: C.dim, textTransform: 'uppercase' }}>
|
<Typography sx={{ fontFamily: FONT_SANS, fontSize: '11px', fontWeight: 600, color: C.dim }}>
|
||||||
{m.title}
|
{m.title}
|
||||||
</Typography>
|
</Typography>
|
||||||
<StatRing color={m.color} size={38}>
|
<StatRing color={m.color} size={38}>
|
||||||
|
|
|
||||||
|
|
@ -143,10 +143,9 @@ export default async function AdminUserDetailPage({ params }: PageProps): Promis
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
color: 'var(--d3-text-inverse)',
|
color: 'var(--d3-accent-ink)',
|
||||||
fontWeight: 500,
|
fontWeight: 500,
|
||||||
fontSize: '20px',
|
fontSize: '20px',
|
||||||
boxShadow: '0 0 20px var(--d3-accent-glow)',
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{((profile.name as string) || (profile.email as string) || '?').charAt(0).toUpperCase()}
|
{((profile.name as string) || (profile.email as string) || '?').charAt(0).toUpperCase()}
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,7 @@ export default async function AdminUsersPage({ searchParams }: PageProps): Promi
|
||||||
fontFamily: FONT_MONO,
|
fontFamily: FONT_MONO,
|
||||||
fontSize: '11px',
|
fontSize: '11px',
|
||||||
color: C.dim,
|
color: C.dim,
|
||||||
letterSpacing: '0.04em',
|
letterSpacing: 0,
|
||||||
mt: 0.25,
|
mt: 0.25,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|
@ -170,10 +170,9 @@ export default async function AdminUsersPage({ searchParams }: PageProps): Promi
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
color: 'var(--d3-text-inverse)',
|
color: 'var(--d3-accent-ink)',
|
||||||
fontWeight: 500,
|
fontWeight: 500,
|
||||||
fontSize: '13px',
|
fontSize: '13px',
|
||||||
boxShadow: isProPlus ? '0 0 12px var(--d3-tag-purple)' : 'none',
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{u.name.charAt(0)}
|
{u.name.charAt(0)}
|
||||||
|
|
@ -206,7 +205,7 @@ export default async function AdminUsersPage({ searchParams }: PageProps): Promi
|
||||||
|
|
||||||
{/* Daily Quota Status */}
|
{/* Daily Quota Status */}
|
||||||
<Box component="td">
|
<Box component="td">
|
||||||
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '10px', color: C.dim }}>
|
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '11px', color: C.dim }}>
|
||||||
Open user detail for measured usage
|
Open user detail for measured usage
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
|
||||||
|
|
@ -128,10 +128,11 @@ function LoginForm(): React.ReactElement {
|
||||||
mb: 2,
|
mb: 2,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<LockOutlinedIcon sx={{ color: 'var(--d3-text-inverse)', fontSize: 28 }} />
|
<LockOutlinedIcon sx={{ color: 'var(--d3-accent-ink)', fontSize: 28 }} />
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
<Typography
|
<Typography
|
||||||
|
component="h1"
|
||||||
sx={{
|
sx={{
|
||||||
fontFamily: FONT_SANS,
|
fontFamily: FONT_SANS,
|
||||||
fontSize: '22px',
|
fontSize: '22px',
|
||||||
|
|
@ -149,7 +150,7 @@ function LoginForm(): React.ReactElement {
|
||||||
fontFamily: FONT_MONO,
|
fontFamily: FONT_MONO,
|
||||||
fontSize: '11px',
|
fontSize: '11px',
|
||||||
color: C.dim,
|
color: C.dim,
|
||||||
letterSpacing: '0.08em',
|
letterSpacing: 0,
|
||||||
mt: 0.5,
|
mt: 0.5,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|
@ -168,7 +169,7 @@ function LoginForm(): React.ReactElement {
|
||||||
severity="error"
|
severity="error"
|
||||||
sx={{
|
sx={{
|
||||||
mb: 2.5,
|
mb: 2.5,
|
||||||
bgcolor: 'var(--d3-status-danger)',
|
bgcolor: 'var(--d3-status-dangerBg)',
|
||||||
color: 'var(--d3-status-danger)',
|
color: 'var(--d3-status-danger)',
|
||||||
border: '1px solid var(--d3-status-danger)',
|
border: '1px solid var(--d3-status-danger)',
|
||||||
borderRadius: '10px',
|
borderRadius: '10px',
|
||||||
|
|
@ -246,7 +247,7 @@ function LoginForm(): React.ReactElement {
|
||||||
|
|
||||||
<Box sx={{ display: 'flex', alignItems: 'center', gap: 1.5, my: 1 }}>
|
<Box sx={{ display: 'flex', alignItems: 'center', gap: 1.5, my: 1 }}>
|
||||||
<Box sx={{ flex: 1, height: '1px', bgcolor: C.border }} />
|
<Box sx={{ flex: 1, height: '1px', bgcolor: C.border }} />
|
||||||
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '10px', color: C.dim }}>
|
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '11px', color: C.dim }}>
|
||||||
OR VIA OAUTH
|
OR VIA OAUTH
|
||||||
</Typography>
|
</Typography>
|
||||||
<Box sx={{ flex: 1, height: '1px', bgcolor: C.border }} />
|
<Box sx={{ flex: 1, height: '1px', bgcolor: C.border }} />
|
||||||
|
|
@ -279,7 +280,7 @@ function LoginForm(): React.ReactElement {
|
||||||
|
|
||||||
{/* Footer Note */}
|
{/* Footer Note */}
|
||||||
<Box sx={{ mt: 3.5, textAlign: 'center' }}>
|
<Box sx={{ mt: 3.5, textAlign: 'center' }}>
|
||||||
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '10px', color: C.dim }}>
|
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '11px', color: C.dim }}>
|
||||||
Protected by D3RO Unified Auth & Session Cookie Cryptography
|
Protected by D3RO Unified Auth & Session Cookie Cryptography
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
|
||||||
|
|
@ -168,34 +168,19 @@ export function AdminSidebar({ identity }: {
|
||||||
height: '100%',
|
height: '100%',
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
flexDirection: 'column',
|
flexDirection: 'column',
|
||||||
bgcolor: 'var(--d3-bg-card-soft)',
|
bgcolor: C.sidebar,
|
||||||
backdropFilter: 'blur(28px)',
|
border: `1px solid ${C.borderHl}`,
|
||||||
border: `1px solid ${C.border}`,
|
borderRadius: '12px',
|
||||||
borderRadius: '22px',
|
|
||||||
flexShrink: 0,
|
flexShrink: 0,
|
||||||
position: 'relative',
|
position: 'relative',
|
||||||
overflow: 'hidden',
|
overflow: 'hidden',
|
||||||
boxShadow: '0 24px 60px var(--d3-scrim), inset 0 1px 0 var(--d3-glass-hairlineStrong)',
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{/* Top Ambient Sheen */}
|
|
||||||
<Box
|
|
||||||
sx={{
|
|
||||||
position: 'absolute',
|
|
||||||
top: 0,
|
|
||||||
left: 0,
|
|
||||||
right: 0,
|
|
||||||
height: 120,
|
|
||||||
background: 'radial-gradient(ellipse 80% 60% at 50% -10%, var(--d3-accent-glow) 0%, transparent 80%)',
|
|
||||||
pointerEvents: 'none',
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
|
|
||||||
{/* Brand Header */}
|
{/* Brand Header */}
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
px: 3,
|
px: 3,
|
||||||
pt: 3.5,
|
pt: 3,
|
||||||
pb: 2.5,
|
pb: 2.5,
|
||||||
borderBottom: `1px solid ${C.border}`,
|
borderBottom: `1px solid ${C.border}`,
|
||||||
position: 'relative',
|
position: 'relative',
|
||||||
|
|
@ -210,14 +195,13 @@ export function AdminSidebar({ identity }: {
|
||||||
width: 34,
|
width: 34,
|
||||||
height: 34,
|
height: 34,
|
||||||
borderRadius: '10px',
|
borderRadius: '10px',
|
||||||
background: 'linear-gradient(135deg, var(--d3-tag-cyan) 0%, var(--d3-accent-main) 50%, var(--d3-tag-purple) 100%)',
|
bgcolor: 'var(--d3-accent-solid)',
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
boxShadow: '0 0 20px var(--d3-accent-glow)',
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="#ffffff" strokeWidth="2.2">
|
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="var(--d3-accent-ink)" strokeWidth="2.2">
|
||||||
<path d="M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z" />
|
<path d="M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z" />
|
||||||
<path d="M19 10v2a7 7 0 0 1-14 0v-2" />
|
<path d="M19 10v2a7 7 0 0 1-14 0v-2" />
|
||||||
<line x1="12" y1="19" x2="12" y2="22" />
|
<line x1="12" y1="19" x2="12" y2="22" />
|
||||||
|
|
@ -230,7 +214,7 @@ export function AdminSidebar({ identity }: {
|
||||||
fontFamily: FONT_SANS,
|
fontFamily: FONT_SANS,
|
||||||
fontSize: '15px',
|
fontSize: '15px',
|
||||||
fontWeight: 500,
|
fontWeight: 500,
|
||||||
letterSpacing: '-0.02em',
|
letterSpacing: '-0.01em',
|
||||||
color: C.bright,
|
color: C.bright,
|
||||||
lineHeight: 1.2,
|
lineHeight: 1.2,
|
||||||
}}
|
}}
|
||||||
|
|
@ -240,10 +224,10 @@ export function AdminSidebar({ identity }: {
|
||||||
<Typography
|
<Typography
|
||||||
sx={{
|
sx={{
|
||||||
fontFamily: FONT_MONO,
|
fontFamily: FONT_MONO,
|
||||||
fontSize: '10px',
|
fontSize: '11px',
|
||||||
fontWeight: 600,
|
fontWeight: 600,
|
||||||
color: C.cyan,
|
color: C.cyanLight,
|
||||||
letterSpacing: '0.04em',
|
letterSpacing: 0,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
INTELLIGENCE CRM
|
INTELLIGENCE CRM
|
||||||
|
|
@ -260,7 +244,7 @@ export function AdminSidebar({ identity }: {
|
||||||
px: 1,
|
px: 1,
|
||||||
py: 0.35,
|
py: 0.35,
|
||||||
borderRadius: '999px',
|
borderRadius: '999px',
|
||||||
bgcolor: 'var(--d3-status-success)',
|
bgcolor: 'var(--d3-status-successBg)',
|
||||||
border: '1px solid var(--d3-status-success)',
|
border: '1px solid var(--d3-status-success)',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|
@ -270,11 +254,10 @@ export function AdminSidebar({ identity }: {
|
||||||
height: 6,
|
height: 6,
|
||||||
borderRadius: '50%',
|
borderRadius: '50%',
|
||||||
bgcolor: 'var(--d3-status-success)',
|
bgcolor: 'var(--d3-status-success)',
|
||||||
boxShadow: '0 0 8px var(--d3-status-success)',
|
|
||||||
animation: 'pulse-ring 2s infinite',
|
animation: 'pulse-ring 2s infinite',
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '9px', fontWeight: 600, color: 'var(--d3-status-success)' }}>
|
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '11px', fontWeight: 600, color: 'var(--d3-status-success)' }}>
|
||||||
SESSION
|
SESSION
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
@ -284,6 +267,7 @@ export function AdminSidebar({ identity }: {
|
||||||
{/* Nav Scroll Area */}
|
{/* Nav Scroll Area */}
|
||||||
<Box
|
<Box
|
||||||
component="nav"
|
component="nav"
|
||||||
|
aria-label="관리자 메뉴"
|
||||||
sx={{
|
sx={{
|
||||||
flex: 1,
|
flex: 1,
|
||||||
overflowY: 'auto',
|
overflowY: 'auto',
|
||||||
|
|
@ -306,8 +290,7 @@ export function AdminSidebar({ identity }: {
|
||||||
fontSize: '11px',
|
fontSize: '11px',
|
||||||
fontWeight: 600,
|
fontWeight: 600,
|
||||||
color: C.dim,
|
color: C.dim,
|
||||||
textTransform: 'uppercase',
|
letterSpacing: 0,
|
||||||
letterSpacing: '0.08em',
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{group.title}
|
{group.title}
|
||||||
|
|
@ -318,29 +301,33 @@ export function AdminSidebar({ identity }: {
|
||||||
return (
|
return (
|
||||||
<Box
|
<Box
|
||||||
key={item.key}
|
key={item.key}
|
||||||
|
role="button"
|
||||||
|
tabIndex={0}
|
||||||
|
aria-current={active ? 'page' : undefined}
|
||||||
onClick={() => router.push(item.path)}
|
onClick={() => router.push(item.path)}
|
||||||
|
onKeyDown={(e) => {
|
||||||
|
if (e.key === 'Enter' || e.key === ' ') {
|
||||||
|
e.preventDefault()
|
||||||
|
router.push(item.path)
|
||||||
|
}
|
||||||
|
}}
|
||||||
sx={{
|
sx={{
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
justifyContent: 'space-between',
|
justifyContent: 'space-between',
|
||||||
px: 1.75,
|
px: 1.75,
|
||||||
py: 1.1,
|
py: 1.1,
|
||||||
borderRadius: '12px',
|
borderRadius: '8px',
|
||||||
cursor: 'pointer',
|
cursor: 'pointer',
|
||||||
position: 'relative',
|
position: 'relative',
|
||||||
border: `1px solid ${active ? 'var(--d3-accent-glow)' : 'transparent'}`,
|
border: `1px solid ${active ? 'var(--d3-accent-dim)' : 'transparent'}`,
|
||||||
bgcolor: active ? 'var(--d3-accent-glow)' : 'transparent',
|
bgcolor: active ? 'var(--d3-accent-dim)' : 'transparent',
|
||||||
color: active ? C.bright : C.text,
|
color: active ? C.bright : C.text,
|
||||||
boxShadow: active ? '0 0 20px var(--d3-accent-glow), inset 0 1px 0 var(--d3-overlay-strong)' : 'none',
|
transition: 'background-color 160ms cubic-bezier(0.22, 1, 0.36, 1), border-color 160ms cubic-bezier(0.22, 1, 0.36, 1), color 160ms cubic-bezier(0.22, 1, 0.36, 1)',
|
||||||
transition: 'all 0.18s cubic-bezier(0.16, 1, 0.3, 1)',
|
|
||||||
'&:hover': {
|
'&:hover': {
|
||||||
bgcolor: active ? 'var(--d3-accent-glow)' : 'var(--d3-bg-raised-soft)',
|
bgcolor: active ? 'var(--d3-accent-dim)' : 'var(--d3-overlay-soft)',
|
||||||
borderColor: active ? 'var(--d3-accent-light)' : C.border,
|
borderColor: active ? 'var(--d3-accent-light)' : C.border,
|
||||||
color: C.bright,
|
color: C.bright,
|
||||||
transform: 'translateX(3px)',
|
|
||||||
},
|
|
||||||
'&:active': {
|
|
||||||
transform: 'scale(0.98)',
|
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|
@ -360,7 +347,7 @@ export function AdminSidebar({ identity }: {
|
||||||
fontFamily: FONT_SANS,
|
fontFamily: FONT_SANS,
|
||||||
fontSize: '13px',
|
fontSize: '13px',
|
||||||
fontWeight: active ? 600 : 500,
|
fontWeight: active ? 600 : 500,
|
||||||
letterSpacing: '-0.01em',
|
letterSpacing: 0,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{item.label}
|
{item.label}
|
||||||
|
|
@ -391,9 +378,9 @@ export function AdminSidebar({ identity }: {
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
justifyContent: 'space-between',
|
justifyContent: 'space-between',
|
||||||
p: 1.25,
|
p: 1.25,
|
||||||
borderRadius: '12px',
|
borderRadius: '10px',
|
||||||
border: `1px solid ${C.borderHl}`,
|
border: `1px solid ${C.borderHl}`,
|
||||||
bgcolor: 'var(--d3-bg-card-soft)',
|
bgcolor: C.card,
|
||||||
transition: 'border-color 0.15s ease',
|
transition: 'border-color 0.15s ease',
|
||||||
'&:hover': {
|
'&:hover': {
|
||||||
borderColor: C.accentLight,
|
borderColor: C.accentLight,
|
||||||
|
|
@ -406,14 +393,13 @@ export function AdminSidebar({ identity }: {
|
||||||
width: 32,
|
width: 32,
|
||||||
height: 32,
|
height: 32,
|
||||||
borderRadius: '8px',
|
borderRadius: '8px',
|
||||||
background: 'linear-gradient(135deg, var(--d3-accent-dark) 0%, var(--d3-accent-main) 100%)',
|
bgcolor: 'var(--d3-accent-solid)',
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
fontWeight: 500,
|
fontWeight: 500,
|
||||||
fontSize: '13px',
|
fontSize: '13px',
|
||||||
color: 'var(--d3-text-inverse)',
|
color: 'var(--d3-accent-ink)',
|
||||||
boxShadow: '0 0 12px var(--d3-accent-glow)',
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{identity.email.slice(0, 1).toUpperCase()}
|
{identity.email.slice(0, 1).toUpperCase()}
|
||||||
|
|
@ -422,18 +408,23 @@ export function AdminSidebar({ identity }: {
|
||||||
<Typography sx={{ fontFamily: FONT_SANS, fontSize: '12px', fontWeight: 600, color: C.bright, lineHeight: 1.2 }}>
|
<Typography sx={{ fontFamily: FONT_SANS, fontSize: '12px', fontWeight: 600, color: C.bright, lineHeight: 1.2 }}>
|
||||||
{identity.email}
|
{identity.email}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '9px', fontWeight: 600, color: C.purple400, letterSpacing: '0.04em' }}>
|
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '11px', fontWeight: 600, color: C.purple400, letterSpacing: 0 }}>
|
||||||
{identity.role.toUpperCase()}
|
{identity.role.toUpperCase()}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
<Box
|
<Box
|
||||||
|
component="button"
|
||||||
|
type="button"
|
||||||
|
aria-label="로그아웃"
|
||||||
onClick={() => void handleLogout()}
|
onClick={() => void handleLogout()}
|
||||||
title="Sign Out"
|
title="Sign Out"
|
||||||
sx={{
|
sx={{
|
||||||
p: 0.75,
|
p: 0.75,
|
||||||
borderRadius: '8px',
|
borderRadius: '8px',
|
||||||
|
bgcolor: 'transparent',
|
||||||
|
border: 'none',
|
||||||
color: C.dim,
|
color: C.dim,
|
||||||
cursor: 'pointer',
|
cursor: 'pointer',
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
|
|
@ -442,7 +433,7 @@ export function AdminSidebar({ identity }: {
|
||||||
transition: 'all 0.15s ease',
|
transition: 'all 0.15s ease',
|
||||||
'&:hover': {
|
'&:hover': {
|
||||||
color: C.red400,
|
color: C.red400,
|
||||||
bgcolor: 'var(--d3-status-danger)',
|
bgcolor: 'var(--d3-status-dangerBg)',
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -32,10 +32,10 @@ export function DauChart({ data }: DauChartProps): React.ReactElement {
|
||||||
<CartesianGrid strokeDasharray="3 3" stroke={d3roPalette.border.subtle} />
|
<CartesianGrid strokeDasharray="3 3" stroke={d3roPalette.border.subtle} />
|
||||||
<XAxis
|
<XAxis
|
||||||
dataKey="date"
|
dataKey="date"
|
||||||
tick={{ fill: d3roPalette.text.muted, fontFamily: d3roFontMono, fontSize: 10 }}
|
tick={{ fill: d3roPalette.text.muted, fontFamily: d3roFontMono, fontSize: 11 }}
|
||||||
tickFormatter={(val: string) => val.slice(5)}
|
tickFormatter={(val: string) => val.slice(5)}
|
||||||
/>
|
/>
|
||||||
<YAxis tick={{ fill: d3roPalette.text.muted, fontFamily: d3roFontMono, fontSize: 10 }} />
|
<YAxis tick={{ fill: d3roPalette.text.muted, fontFamily: d3roFontMono, fontSize: 11 }} />
|
||||||
<Tooltip
|
<Tooltip
|
||||||
contentStyle={{
|
contentStyle={{
|
||||||
background: d3roPalette.bg.card,
|
background: d3roPalette.bg.card,
|
||||||
|
|
|
||||||
|
|
@ -59,10 +59,10 @@ export function FeatureUsageChart({ data }: FeatureUsageChartProps): React.React
|
||||||
<CartesianGrid strokeDasharray="3 3" stroke={d3roPalette.border.subtle} />
|
<CartesianGrid strokeDasharray="3 3" stroke={d3roPalette.border.subtle} />
|
||||||
<XAxis
|
<XAxis
|
||||||
dataKey="date"
|
dataKey="date"
|
||||||
tick={{ fill: d3roPalette.text.muted, fontFamily: d3roFontMono, fontSize: 10 }}
|
tick={{ fill: d3roPalette.text.muted, fontFamily: d3roFontMono, fontSize: 11 }}
|
||||||
tickFormatter={(val: string) => val.slice(5)}
|
tickFormatter={(val: string) => val.slice(5)}
|
||||||
/>
|
/>
|
||||||
<YAxis tick={{ fill: d3roPalette.text.muted, fontFamily: d3roFontMono, fontSize: 10 }} />
|
<YAxis tick={{ fill: d3roPalette.text.muted, fontFamily: d3roFontMono, fontSize: 11 }} />
|
||||||
<Tooltip
|
<Tooltip
|
||||||
contentStyle={{
|
contentStyle={{
|
||||||
background: d3roPalette.bg.card,
|
background: d3roPalette.bg.card,
|
||||||
|
|
|
||||||
|
|
@ -40,13 +40,13 @@ export function TopUsersChart({ data }: TopUsersChartProps): React.ReactElement
|
||||||
<CartesianGrid strokeDasharray="3 3" stroke={d3roPalette.border.subtle} />
|
<CartesianGrid strokeDasharray="3 3" stroke={d3roPalette.border.subtle} />
|
||||||
<XAxis
|
<XAxis
|
||||||
type="number"
|
type="number"
|
||||||
tick={{ fill: d3roPalette.text.muted, fontFamily: d3roFontMono, fontSize: 10 }}
|
tick={{ fill: d3roPalette.text.muted, fontFamily: d3roFontMono, fontSize: 11 }}
|
||||||
/>
|
/>
|
||||||
<YAxis
|
<YAxis
|
||||||
type="category"
|
type="category"
|
||||||
dataKey="name"
|
dataKey="name"
|
||||||
width={100}
|
width={100}
|
||||||
tick={{ fill: d3roPalette.text.muted, fontFamily: d3roFontMono, fontSize: 10 }}
|
tick={{ fill: d3roPalette.text.muted, fontFamily: d3roFontMono, fontSize: 11 }}
|
||||||
/>
|
/>
|
||||||
<Tooltip
|
<Tooltip
|
||||||
contentStyle={{
|
contentStyle={{
|
||||||
|
|
|
||||||
|
|
@ -134,7 +134,7 @@ export function LicenseIssuerDialog({ open, onClose }: LicenseIssuerDialogProps)
|
||||||
ED25519 SERVER-SIGNED OFFLINE / ENTERPRISE TOKEN
|
ED25519 SERVER-SIGNED OFFLINE / ENTERPRISE TOKEN
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
<IconButton onClick={onClose} size="small" sx={{ color: C.dim }}>
|
<IconButton onClick={onClose} size="small" aria-label="닫기" sx={{ color: C.dim }}>
|
||||||
✕
|
✕
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</DialogTitle>
|
</DialogTitle>
|
||||||
|
|
|
||||||
|
|
@ -131,7 +131,7 @@ export function PaymentHistory({ userId }: PaymentHistoryProps): React.ReactElem
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Box sx={{ display: 'flex', gap: 1, alignItems: 'baseline' }}>
|
<Box sx={{ display: 'flex', gap: 1, alignItems: 'baseline' }}>
|
||||||
<Box component="span" sx={{ color: d3roPalette.text.muted, fontSize: 10 }}>
|
<Box component="span" sx={{ color: d3roPalette.text.muted, fontSize: 11 }}>
|
||||||
{new Date(log.created_at).toLocaleString()}
|
{new Date(log.created_at).toLocaleString()}
|
||||||
</Box>
|
</Box>
|
||||||
<Box component="span" sx={{ color: d3roPalette.accent.main }}>
|
<Box component="span" sx={{ color: d3roPalette.accent.main }}>
|
||||||
|
|
|
||||||
|
|
@ -22,10 +22,10 @@ export const C = {
|
||||||
borderStrong: 'rgba(148, 180, 255, 0.24)',
|
borderStrong: 'rgba(148, 180, 255, 0.24)',
|
||||||
|
|
||||||
// text
|
// text
|
||||||
dim: '#67789e',
|
dim: '#7e8eb0',
|
||||||
text: '#93a4c8',
|
text: '#93a4c8',
|
||||||
bright: '#eef2fb',
|
bright: '#eef2fb',
|
||||||
muted: '#3c4763',
|
muted: '#5c6b8a',
|
||||||
|
|
||||||
// accents & gradients
|
// accents & gradients
|
||||||
accent: '#3b82f6',
|
accent: '#3b82f6',
|
||||||
|
|
@ -46,31 +46,28 @@ export const C = {
|
||||||
export const FONT_SANS = d3roFontSans
|
export const FONT_SANS = d3roFontSans
|
||||||
export const FONT_MONO = d3roFontMono
|
export const FONT_MONO = d3roFontMono
|
||||||
|
|
||||||
/** High-End Double-Bezel Glass Panel Style */
|
/** Flat Precision Panel Style (v4) */
|
||||||
export const panelSx = {
|
export const panelSx = {
|
||||||
position: 'relative' as const,
|
position: 'relative' as const,
|
||||||
bgcolor: 'rgba(17, 26, 48, 0.65)',
|
bgcolor: C.card,
|
||||||
backdropFilter: 'blur(24px)',
|
border: `1px solid ${C.borderHl}`,
|
||||||
border: `1px solid ${C.border}`,
|
borderRadius: '12px',
|
||||||
borderRadius: '20px',
|
|
||||||
overflow: 'hidden',
|
overflow: 'hidden',
|
||||||
boxShadow: '0 16px 40px rgba(3, 7, 18, 0.5), inset 0 1px 0 rgba(148, 180, 255, 0.08)',
|
boxShadow: 'none',
|
||||||
transition: 'border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, transform 0.25s ease',
|
transition: 'border-color 160ms cubic-bezier(0.22, 1, 0.36, 1)',
|
||||||
'&:hover': {
|
'&:hover': {
|
||||||
borderColor: C.borderHl,
|
borderColor: C.borderStrong,
|
||||||
boxShadow: '0 20px 48px rgba(3, 7, 18, 0.6), inset 0 1px 0 rgba(148, 180, 255, 0.15)',
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Inner Glass Core Style (Double-Bezel nested architecture) */
|
/** Inner Core Style (v4) */
|
||||||
export const innerCoreSx = {
|
export const innerCoreSx = {
|
||||||
position: 'relative' as const,
|
position: 'relative' as const,
|
||||||
borderRadius: '14px',
|
borderRadius: '10px',
|
||||||
bgcolor: 'rgba(13, 21, 38, 0.75)',
|
bgcolor: C.inset,
|
||||||
backdropFilter: 'blur(16px)',
|
|
||||||
border: `1px solid ${C.border}`,
|
border: `1px solid ${C.border}`,
|
||||||
p: 2.5,
|
p: 2.5,
|
||||||
boxShadow: 'inset 0 2px 6px rgba(3, 7, 18, 0.5)',
|
boxShadow: 'none',
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Interactive Table Style */
|
/** Interactive Table Style */
|
||||||
|
|
@ -85,8 +82,7 @@ export const tableSx = {
|
||||||
pb: 1.5,
|
pb: 1.5,
|
||||||
fontWeight: 500,
|
fontWeight: 500,
|
||||||
fontSize: '11px',
|
fontSize: '11px',
|
||||||
textTransform: 'uppercase' as const,
|
letterSpacing: 0,
|
||||||
letterSpacing: '0.08em',
|
|
||||||
color: C.dim,
|
color: C.dim,
|
||||||
textAlign: 'left' as const,
|
textAlign: 'left' as const,
|
||||||
borderBottom: `1px solid ${C.borderHl}`,
|
borderBottom: `1px solid ${C.borderHl}`,
|
||||||
|
|
@ -96,23 +92,23 @@ export const tableSx = {
|
||||||
py: 1.75,
|
py: 1.75,
|
||||||
textAlign: 'left' as const,
|
textAlign: 'left' as const,
|
||||||
color: C.text,
|
color: C.text,
|
||||||
bgcolor: 'rgba(17, 26, 48, 0.45)',
|
bgcolor: C.card,
|
||||||
borderTop: `1px solid ${C.border}`,
|
borderTop: `1px solid ${C.border}`,
|
||||||
borderBottom: `1px solid ${C.border}`,
|
borderBottom: `1px solid ${C.border}`,
|
||||||
transition: 'all 0.15s cubic-bezier(0.16, 1, 0.3, 1)',
|
transition: 'background-color 160ms cubic-bezier(0.22, 1, 0.36, 1), border-color 160ms cubic-bezier(0.22, 1, 0.36, 1), color 160ms cubic-bezier(0.22, 1, 0.36, 1)',
|
||||||
'&:first-of-type': {
|
'&:first-of-type': {
|
||||||
borderLeft: `1px solid ${C.border}`,
|
borderLeft: `1px solid ${C.border}`,
|
||||||
borderTopLeftRadius: '10px',
|
borderTopLeftRadius: '8px',
|
||||||
borderBottomLeftRadius: '10px',
|
borderBottomLeftRadius: '8px',
|
||||||
},
|
},
|
||||||
'&:last-of-type': {
|
'&:last-of-type': {
|
||||||
borderRight: `1px solid ${C.border}`,
|
borderRight: `1px solid ${C.border}`,
|
||||||
borderTopRightRadius: '10px',
|
borderTopRightRadius: '8px',
|
||||||
borderBottomRightRadius: '10px',
|
borderBottomRightRadius: '8px',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
'& tr:hover td': {
|
'& tr:hover td': {
|
||||||
bgcolor: 'rgba(26, 38, 68, 0.75)',
|
bgcolor: C.cardHover,
|
||||||
borderColor: C.borderHl,
|
borderColor: C.borderHl,
|
||||||
color: C.bright,
|
color: C.bright,
|
||||||
},
|
},
|
||||||
|
|
@ -126,35 +122,30 @@ export const filterBtnSx = (active: boolean) => ({
|
||||||
fontFamily: FONT_SANS,
|
fontFamily: FONT_SANS,
|
||||||
fontSize: '11px',
|
fontSize: '11px',
|
||||||
fontWeight: 500,
|
fontWeight: 500,
|
||||||
letterSpacing: '0.04em',
|
letterSpacing: 0,
|
||||||
textTransform: 'none' as const,
|
textTransform: 'none' as const,
|
||||||
cursor: 'pointer',
|
cursor: 'pointer',
|
||||||
border: `1px solid ${active ? 'rgba(59, 130, 246, 0.4)' : C.border}`,
|
border: `1px solid ${active ? 'rgba(59, 130, 246, 0.4)' : C.borderHl}`,
|
||||||
bgcolor: active ? 'rgba(59, 130, 246, 0.16)' : 'rgba(17, 26, 48, 0.5)',
|
bgcolor: active ? 'rgba(59, 130, 246, 0.16)' : C.card,
|
||||||
color: active ? C.bright : C.dim,
|
color: active ? C.bright : C.dim,
|
||||||
boxShadow: active ? '0 0 16px rgba(59, 130, 246, 0.25)' : 'none',
|
boxShadow: 'none',
|
||||||
backdropFilter: 'blur(12px)',
|
|
||||||
'&:hover': {
|
'&:hover': {
|
||||||
bgcolor: active ? 'rgba(59, 130, 246, 0.22)' : 'rgba(26, 38, 68, 0.8)',
|
bgcolor: active ? 'rgba(59, 130, 246, 0.22)' : C.cardHover,
|
||||||
borderColor: active ? C.accentLight : C.borderHl,
|
borderColor: active ? C.accentLight : C.borderStrong,
|
||||||
color: C.bright,
|
color: C.bright,
|
||||||
transform: 'translateY(-1px)',
|
|
||||||
},
|
},
|
||||||
'&:active': {
|
transition: 'background-color 160ms cubic-bezier(0.22, 1, 0.36, 1), border-color 160ms cubic-bezier(0.22, 1, 0.36, 1), color 160ms cubic-bezier(0.22, 1, 0.36, 1)',
|
||||||
transform: 'translateY(0) scale(0.98)',
|
|
||||||
},
|
|
||||||
transition: 'all 0.15s cubic-bezier(0.16, 1, 0.3, 1)',
|
|
||||||
})
|
})
|
||||||
|
|
||||||
/** Semantic Status Badge Style */
|
/** Semantic Status Badge Style */
|
||||||
export function statusBadgeSx(variant: 'green' | 'red' | 'orange' | 'blue' | 'purple' | 'cyan') {
|
export function statusBadgeSx(variant: 'green' | 'red' | 'orange' | 'blue' | 'purple' | 'cyan') {
|
||||||
const colorMap = {
|
const colorMap = {
|
||||||
green: { bg: 'rgba(16, 185, 129, 0.12)', fg: C.green400, border: 'rgba(16, 185, 129, 0.3)', glow: '0 0 12px rgba(16, 185, 129, 0.2)' },
|
green: { bg: 'rgba(16, 185, 129, 0.12)', fg: C.green400, border: 'rgba(16, 185, 129, 0.3)' },
|
||||||
red: { bg: 'rgba(239, 68, 68, 0.12)', fg: C.red400, border: 'rgba(239, 68, 68, 0.3)', glow: '0 0 12px rgba(239, 68, 68, 0.2)' },
|
red: { bg: 'rgba(239, 68, 68, 0.12)', fg: C.red400, border: 'rgba(239, 68, 68, 0.3)' },
|
||||||
orange: { bg: 'rgba(245, 158, 11, 0.12)', fg: C.orange400, border: 'rgba(245, 158, 11, 0.3)', glow: '0 0 12px rgba(245, 158, 11, 0.2)' },
|
orange: { bg: 'rgba(245, 158, 11, 0.12)', fg: C.orange400, border: 'rgba(245, 158, 11, 0.3)' },
|
||||||
blue: { bg: 'rgba(59, 130, 246, 0.12)', fg: C.accentLight, border: 'rgba(59, 130, 246, 0.3)', glow: '0 0 12px rgba(59, 130, 246, 0.2)' },
|
blue: { bg: 'rgba(59, 130, 246, 0.12)', fg: C.accentLight, border: 'rgba(59, 130, 246, 0.3)' },
|
||||||
purple: { bg: 'rgba(139, 92, 246, 0.12)', fg: C.purple400, border: 'rgba(139, 92, 246, 0.3)', glow: '0 0 12px rgba(139, 92, 246, 0.2)' },
|
purple: { bg: 'rgba(139, 92, 246, 0.12)', fg: C.purple400, border: 'rgba(139, 92, 246, 0.3)' },
|
||||||
cyan: { bg: 'rgba(6, 182, 212, 0.12)', fg: C.cyanLight, border: 'rgba(6, 182, 212, 0.3)', glow: '0 0 12px rgba(6, 182, 212, 0.2)' },
|
cyan: { bg: 'rgba(6, 182, 212, 0.12)', fg: C.cyanLight, border: 'rgba(6, 182, 212, 0.3)' },
|
||||||
}
|
}
|
||||||
const c = colorMap[variant]
|
const c = colorMap[variant]
|
||||||
return {
|
return {
|
||||||
|
|
@ -167,35 +158,30 @@ export function statusBadgeSx(variant: 'green' | 'red' | 'orange' | 'blue' | 'pu
|
||||||
fontSize: '11px',
|
fontSize: '11px',
|
||||||
fontFamily: FONT_SANS,
|
fontFamily: FONT_SANS,
|
||||||
fontWeight: 500,
|
fontWeight: 500,
|
||||||
letterSpacing: '0.04em',
|
letterSpacing: 0,
|
||||||
bgcolor: c.bg,
|
bgcolor: c.bg,
|
||||||
color: c.fg,
|
color: c.fg,
|
||||||
border: `1px solid ${c.border}`,
|
border: `1px solid ${c.border}`,
|
||||||
boxShadow: c.glow,
|
boxShadow: 'none',
|
||||||
backdropFilter: 'blur(8px)',
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Primary Action Button Style with Gradient & Glow */
|
/** Primary Action Button Style */
|
||||||
export const primaryButtonSx = {
|
export const primaryButtonSx = {
|
||||||
background: 'linear-gradient(135deg, #1d4ed8 0%, #3b82f6 55%, #60a5fa 100%)',
|
bgcolor: C.accentDark,
|
||||||
color: '#ffffff',
|
color: '#ffffff',
|
||||||
fontFamily: FONT_SANS,
|
fontFamily: FONT_SANS,
|
||||||
fontSize: '13px',
|
fontSize: '13px',
|
||||||
fontWeight: 500,
|
fontWeight: 500,
|
||||||
borderRadius: '10px',
|
borderRadius: '8px',
|
||||||
px: 2.5,
|
px: 2.5,
|
||||||
py: 1,
|
py: 1,
|
||||||
boxShadow: '0 0 0 1px rgba(59,130,246,0.35), 0 8px 24px rgba(37,99,235,0.35)',
|
boxShadow: 'none',
|
||||||
textTransform: 'none' as const,
|
textTransform: 'none' as const,
|
||||||
transition: 'all 0.2s cubic-bezier(0.16, 1, 0.3, 1)',
|
transition: 'background-color 160ms cubic-bezier(0.22, 1, 0.36, 1)',
|
||||||
'&:hover': {
|
'&:hover': {
|
||||||
filter: 'brightness(1.12)',
|
bgcolor: C.accent,
|
||||||
boxShadow: '0 0 0 1px rgba(96,165,250,0.5), 0 12px 32px rgba(59,130,246,0.5)',
|
boxShadow: 'none',
|
||||||
transform: 'translateY(-1px)',
|
|
||||||
},
|
|
||||||
'&:active': {
|
|
||||||
transform: 'translateY(0) scale(0.98)',
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -249,16 +249,12 @@ async function initInputIntelligence(): Promise<void> {
|
||||||
typo.on('corrected', () => {
|
typo.on('corrected', () => {
|
||||||
if (suggestion.isPresentationActive) suggestion.dismiss('stale')
|
if (suggestion.isPresentationActive) suggestion.dismiss('stale')
|
||||||
})
|
})
|
||||||
// 제안이 켜져 있을 때도 한영 전환(Araso 방식 영→한·한→영·혼합어)은 기본 기능으로 즉시 고치고,
|
// 인플레이스 자동 교정(handleTypingContext)은 타이핑과 절대 경합하지 않도록
|
||||||
// 일반 철자·모델 오타는 제안 창에 "지운 글자 → 고친 글자" 로 함께 내놓는다.
|
// 0.1ms 결정적 한영·영문오타 엔진(layoutOnly: true, 커서 직전 어절만 교체)만 즉시 실행하고,
|
||||||
|
// 문장 단위 로컬 LLM(Gemma) 오타 교정은 키보드를 건드리지 않는 제안 팝업(propose)에서만 제시한다.
|
||||||
suggestion.setTypoProposer({ propose: (context, signal, options) => typo.propose(context, signal, options) })
|
suggestion.setTypoProposer({ propose: (context, signal, options) => typo.propose(context, signal, options) })
|
||||||
telemetry.on('typed-context', (context) => {
|
telemetry.on('typed-context', (context) => {
|
||||||
if (suggestion.isEnabled()) {
|
const verdict = typo.handleTypingContext(context, { layoutOnly: true, trailingWordOnly: true })
|
||||||
const layoutVerdict = typo.handleTypingContext(context, { layoutOnly: true })
|
|
||||||
if (layoutVerdict === 'pass') suggestion.handleTypingContext(context)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
const verdict = typo.handleTypingContext(context)
|
|
||||||
if (verdict === 'pass') suggestion.handleTypingContext(context)
|
if (verdict === 'pass') suggestion.handleTypingContext(context)
|
||||||
})
|
})
|
||||||
telemetry.on('state-changed', (state) =>
|
telemetry.on('state-changed', (state) =>
|
||||||
|
|
|
||||||
|
|
@ -571,9 +571,23 @@ export class SuggestionService extends EventEmitter {
|
||||||
this.emit('state-changed', this.getState())
|
this.emit('state-changed', this.getState())
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 설정에서 명시적으로 제안을 켤 때만 모델을 짧게 준비한다. */
|
private _isModelWarmNeeded(allowForTypo = false): boolean {
|
||||||
warmUp(options: { silent?: boolean } = {}): Promise<void> {
|
if (this.isEnabled()) return true
|
||||||
if (!this.isEnabled()) return Promise.resolve()
|
return (
|
||||||
|
allowForTypo &&
|
||||||
|
configGet('typoAutoCorrectEnabled') !== false &&
|
||||||
|
configGet('typoAutoCorrectUseModel') !== false
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 타이핑 중 오타·한영 교정 모델(Gemma)과 제안 모델을 백그라운드에서 미리 데운다. */
|
||||||
|
ensureWarmForTyping(context: TypingContext): void {
|
||||||
|
this._keepWarm(context, Date.now())
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 설정에서 명시적으로 제안을 켤 때 또는 백그라운드 오타 교정 워밍업 시 모델을 짧게 준비한다. */
|
||||||
|
warmUp(options: { silent?: boolean; allowForTypo?: boolean } = {}): Promise<void> {
|
||||||
|
if (!this._isModelWarmNeeded(options.allowForTypo === true)) return Promise.resolve()
|
||||||
if (this._warmUpPromise) return this._warmUpPromise
|
if (this._warmUpPromise) return this._warmUpPromise
|
||||||
|
|
||||||
const abort = new AbortController()
|
const abort = new AbortController()
|
||||||
|
|
@ -582,7 +596,7 @@ export class SuggestionService extends EventEmitter {
|
||||||
// 열려 실제로 제안을 기다릴 때(_showWarming)만 한다.
|
// 열려 실제로 제안을 기다릴 때(_showWarming)만 한다.
|
||||||
if (!options.silent) this._warmingUp = true
|
if (!options.silent) this._warmingUp = true
|
||||||
this.emit('state-changed', this.getState())
|
this.emit('state-changed', this.getState())
|
||||||
const warmUp = this._warmUpUntilReady(abort)
|
const warmUp = this._warmUpUntilReady(abort, options.allowForTypo === true)
|
||||||
this._warmUpPromise = warmUp
|
this._warmUpPromise = warmUp
|
||||||
void warmUp.finally(() => {
|
void warmUp.finally(() => {
|
||||||
if (this._warmUpPromise === warmUp) this._warmUpPromise = null
|
if (this._warmUpPromise === warmUp) this._warmUpPromise = null
|
||||||
|
|
@ -591,10 +605,10 @@ export class SuggestionService extends EventEmitter {
|
||||||
return warmUp
|
return warmUp
|
||||||
}
|
}
|
||||||
|
|
||||||
private async _warmUpUntilReady(abort: AbortController): Promise<void> {
|
private async _warmUpUntilReady(abort: AbortController, allowForTypo = false): Promise<void> {
|
||||||
try {
|
try {
|
||||||
for (let attempt = 0; attempt <= 15; attempt += 1) {
|
for (let attempt = 0; attempt <= 15; attempt += 1) {
|
||||||
if (abort.signal.aborted || !this.isEnabled()) return
|
if (abort.signal.aborted || !this._isModelWarmNeeded(allowForTypo)) return
|
||||||
if (!getLocalLLMService().isAvailable()) {
|
if (!getLocalLLMService().isAvailable()) {
|
||||||
if (attempt === 15) return
|
if (attempt === 15) return
|
||||||
await this._waitForWarmUpRetry(abort.signal)
|
await this._waitForWarmUpRetry(abort.signal)
|
||||||
|
|
@ -861,14 +875,14 @@ export class SuggestionService extends EventEmitter {
|
||||||
* - 따뜻하지만 유지 시간이 얼마 안 남았으면 1토큰 요청으로 연장한다.
|
* - 따뜻하지만 유지 시간이 얼마 안 남았으면 1토큰 요청으로 연장한다.
|
||||||
*/
|
*/
|
||||||
private _keepWarm(context: TypingContext, now: number): void {
|
private _keepWarm(context: TypingContext, now: number): void {
|
||||||
if (!this.isEnabled() || !context.typedRecently || !context.isEditable || context.isPassword) return
|
if (!this._isModelWarmNeeded(true) || !context.typedRecently || !context.isEditable || context.isPassword) return
|
||||||
if (this._warmUpPromise || this._inFlight || this._filling) return
|
if (this._warmUpPromise || this._inFlight || this._filling) return
|
||||||
const model = this.resolveModel()
|
const model = this.resolveModel()
|
||||||
if (!model || !getLocalLLMService().isAvailable()) return
|
if (!model || !getLocalLLMService().isAvailable()) return
|
||||||
if (!this._warmth.isWarm(model, now)) {
|
if (!this._warmth.isWarm(model, now)) {
|
||||||
if (this._warmth.isBackingOff(model, now, WARM_UP_FAILURE_BACKOFF_MS)) return
|
if (this._warmth.isBackingOff(model, now, WARM_UP_FAILURE_BACKOFF_MS)) return
|
||||||
logger.info(`타이핑 감지 — 식은 제안 모델을 미리 올린다 (model=${model})`)
|
logger.info(`타이핑 감지 — 식은 제안 모델을 미리 올린다 (model=${model})`)
|
||||||
void this.warmUp({ silent: true })
|
void this.warmUp({ silent: true, allowForTypo: true })
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (this._warmth.warmUntil - now > KEEP_WARM_REFRESH_MS) return
|
if (this._warmth.warmUntil - now > KEEP_WARM_REFRESH_MS) return
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ import {
|
||||||
type TypoCorrection,
|
type TypoCorrection,
|
||||||
type TypoReplacementPlan
|
type TypoReplacementPlan
|
||||||
} from '@d3ro/core/typo-correction'
|
} from '@d3ro/core/typo-correction'
|
||||||
import { isAppExcluded, isTerminalApp, shouldLearnFromApp } from '@d3ro/core/input-intelligence'
|
import { isAppExcluded, isTerminalApp } from '@d3ro/core/input-intelligence'
|
||||||
import { analyzeWritingContext } from '@d3ro/core/writing-context'
|
import { analyzeWritingContext } from '@d3ro/core/writing-context'
|
||||||
import { configGet, configSet } from './ConfigService'
|
import { configGet, configSet } from './ConfigService'
|
||||||
import { getLogger } from './LoggerService'
|
import { getLogger } from './LoggerService'
|
||||||
|
|
@ -56,13 +56,21 @@ const VOCABULARY_TTL_MS = 60_000
|
||||||
/** 제안용 모델 검사 응답 제한 — 제안 첫 후보가 그만큼 늦어진다. */
|
/** 제안용 모델 검사 응답 제한 — 제안 첫 후보가 그만큼 늦어진다. */
|
||||||
const PROPOSAL_CHECK_TIMEOUT_MS = 1500
|
const PROPOSAL_CHECK_TIMEOUT_MS = 1500
|
||||||
/** 모델 검사 최소 구간 길이 (글자) */
|
/** 모델 검사 최소 구간 길이 (글자) */
|
||||||
const MODEL_CHECK_MIN_CHARS = 6
|
const MODEL_CHECK_MIN_CHARS = 3
|
||||||
/** 공백·문장부호로 단어가 끝난 직후 한영 전환(Araso) 최소 유휴 시간 (ms) */
|
/** 공백·문장부호로 단어가 끝난 직후 한영 전환(Araso) 최소 유휴 시간 (ms) */
|
||||||
const LAYOUT_BOUNDARY_MIN_IDLE_MS = 25
|
const LAYOUT_BOUNDARY_MIN_IDLE_MS = 25
|
||||||
|
/** 공백·문장부호로 끝난 어절에 수상한 자모·한영 오타가 있을 때 모델 검사를 시작할 최소 유휴 시간 (ms) */
|
||||||
|
const SUSPICIOUS_BOUNDARY_MIN_IDLE_MS = 350
|
||||||
/** Vim 명령줄(:wq 등)에서 공백 없이 엔터를 치기 전 한영 전환 최소 유휴 시간 (ms) */
|
/** Vim 명령줄(:wq 등)에서 공백 없이 엔터를 치기 전 한영 전환 최소 유휴 시간 (ms) */
|
||||||
const LAYOUT_VIM_CMD_MIN_IDLE_MS = 135
|
const LAYOUT_VIM_CMD_MIN_IDLE_MS = 135
|
||||||
/** 공백 없이 단어 끝에서 멈췄을 때 한영 전환(Araso) 최소 유휴 시간 (ms) — 단어 입력 도중(some->sometime) 끼어들지 않게 함 */
|
/** 공백 없이 단어 끝에서 멈췄을 때 한영 전환(Araso) 최소 유휴 시간 (ms) — 단어 입력 도중(some->sometime) 끼어들지 않게 함 */
|
||||||
const LAYOUT_TRAILING_MIN_IDLE_MS = 650
|
const LAYOUT_TRAILING_MIN_IDLE_MS = 650
|
||||||
|
/** 타이핑 도중(짧은 유휴) 인플레이스 교정이 지울 수 있는 커서 앞 최대 글자 수 — 문장 전체 재작성 방지 */
|
||||||
|
const MAX_FAST_DELETE_CHARS = 22
|
||||||
|
/** 모델·자모 잡음 인플레이스 교정이 지울 수 있는 커서 앞 최대 글자 수 — 방금 친 마지막 어절만 교정 */
|
||||||
|
const MAX_MODEL_DELETE_CHARS = 18
|
||||||
|
/** 멈춘 뒤에도 인플레이스 교정이 한 번에 지울 수 있는 최대 글자 수 */
|
||||||
|
const MAX_INPLACE_DELETE_CHARS = 32
|
||||||
|
|
||||||
/** 'typed-context' 에 대한 판단 — 제안 서비스로 그대로 넘길지(pass), 미룰지. */
|
/** 'typed-context' 에 대한 판단 — 제안 서비스로 그대로 넘길지(pass), 미룰지. */
|
||||||
export type TypoVerdict = 'pass' | 'correcting' | 'checking'
|
export type TypoVerdict = 'pass' | 'correcting' | 'checking'
|
||||||
|
|
@ -116,8 +124,9 @@ const REVERT_LENGTH_TOLERANCE = 12
|
||||||
export class TypoCorrectionService extends EventEmitter {
|
export class TypoCorrectionService extends EventEmitter {
|
||||||
private _applying = false
|
private _applying = false
|
||||||
private _check: { abort: AbortController; prefix: string; context: TypingContext } | null = null
|
private _check: { abort: AbortController; prefix: string; context: TypingContext } | null = null
|
||||||
/** 마지막으로 결정적·모델 검사를 마친 구간 — 같은 구간을 되풀이해 묻지 않는다. */
|
/** 마지막으로 결정적·모델 검사를 마친 구간(교정 전·후 모두 포함) — 같은 구간을 되풀이해 묻거나 연쇄 재교정하지 않는다. */
|
||||||
private _lastCheckedRegion = ''
|
private _lastCheckedRegion = ''
|
||||||
|
private _lastPostRegion = ''
|
||||||
private _lastApplied: AppliedCorrection | null = null
|
private _lastApplied: AppliedCorrection | null = null
|
||||||
private _vocabulary: { at: number; latin: Map<string, number>; known: Set<string> } | null = null
|
private _vocabulary: { at: number; latin: Map<string, number>; known: Set<string> } | null = null
|
||||||
|
|
||||||
|
|
@ -154,7 +163,10 @@ export class TypoCorrectionService extends EventEmitter {
|
||||||
* `layoutOnly`: 한영 전환(Araso 방식 영→한·한→영·혼합어 자동 변환)만 즉시 교정하고,
|
* `layoutOnly`: 한영 전환(Araso 방식 영→한·한→영·혼합어 자동 변환)만 즉시 교정하고,
|
||||||
* 일반 철자·모델 오타는 제안 오버레이(`propose()`)에 맡긴다.
|
* 일반 철자·모델 오타는 제안 오버레이(`propose()`)에 맡긴다.
|
||||||
*/
|
*/
|
||||||
handleTypingContext(context: TypingContext, options: { layoutOnly?: boolean } = {}): TypoVerdict {
|
handleTypingContext(
|
||||||
|
context: TypingContext,
|
||||||
|
options: { layoutOnly?: boolean; trailingWordOnly?: boolean } = {}
|
||||||
|
): TypoVerdict {
|
||||||
this._watchRevert(context)
|
this._watchRevert(context)
|
||||||
if (this._applying) return 'correcting'
|
if (this._applying) return 'correcting'
|
||||||
|
|
||||||
|
|
@ -170,6 +182,11 @@ export class TypoCorrectionService extends EventEmitter {
|
||||||
if (!this._eligible(context, { allowComposing: true })) return 'pass'
|
if (!this._eligible(context, { allowComposing: true })) return 'pass'
|
||||||
|
|
||||||
const prefix = context.prefix
|
const prefix = context.prefix
|
||||||
|
const region = prefix.slice(typoRegionStart(prefix))
|
||||||
|
if (region !== this._lastCheckedRegion && region !== this._lastPostRegion) {
|
||||||
|
this._lastCheckedRegion = ''
|
||||||
|
this._lastPostRegion = ''
|
||||||
|
}
|
||||||
const hasTrailingBoundary = /[ \t.,!?;:]$/u.test(prefix)
|
const hasTrailingBoundary = /[ \t.,!?;:]$/u.test(prefix)
|
||||||
const isVimCommand = context.vimMode === 'command' || prefix.trimStart().startsWith(':')
|
const isVimCommand = context.vimMode === 'command' || prefix.trimStart().startsWith(':')
|
||||||
const minLayoutIdle = hasTrailingBoundary
|
const minLayoutIdle = hasTrailingBoundary
|
||||||
|
|
@ -179,36 +196,79 @@ export class TypoCorrectionService extends EventEmitter {
|
||||||
: LAYOUT_TRAILING_MIN_IDLE_MS
|
: LAYOUT_TRAILING_MIN_IDLE_MS
|
||||||
if (context.idleMs < minLayoutIdle) return 'pass'
|
if (context.idleMs < minLayoutIdle) return 'pass'
|
||||||
|
|
||||||
const region = prefix.slice(typoRegionStart(prefix))
|
if (!region.trim() || this._isRegionChecked(region)) return 'pass'
|
||||||
if (!region.trim() || region === this._lastCheckedRegion) return 'pass'
|
|
||||||
|
|
||||||
// Chromium/Discord 등은 영문 입력·공백 뒤에도 comp=true 를 유지하고, 한글 자판에서 ㅎ샤ㅗㅕㅠ에 를 치고
|
// Chromium/Discord/Electron 등은 한글 입력·공백 뒤에도 comp=true 를 유지한다.
|
||||||
// 멈췄을 때도 마지막 음절이 조합 중이다. 한영 전환(layoutOnly)은 조합 여부와 짧은 유휴에서도 즉시 허용하고,
|
// 1단계(한영 전환 layoutOnly)는 단어 경계(25ms)와 어절 끝 유휴(650ms)에서 즉시 실행하고,
|
||||||
// 일반 철자·모델 검사는 터미널·개발 도구가 아니고 조합이 없으며 TYPO_MIN_IDLE_MS 이상 멈췄을 때만 실행한다.
|
// 2단계(철자 사전 + Gemma 배경 오타·한영 보정)는 터미널이 아니면서 유휴 조건을 충족했을 때 실행한다.
|
||||||
const isTerminalOrDev =
|
const isTerminal = context.terminalMode === true || isTerminalApp(context.appName)
|
||||||
context.terminalMode === true ||
|
const suspicious = hasSuspiciousTypo(region)
|
||||||
isTerminalApp(context.appName) ||
|
const minFullCheckIdle =
|
||||||
!shouldLearnFromApp(context.appName)
|
hasTrailingBoundary && suspicious
|
||||||
|
? SUSPICIOUS_BOUNDARY_MIN_IDLE_MS
|
||||||
|
: context.isComposing && !hasTrailingBoundary
|
||||||
|
? Math.ceil(TYPO_MIN_IDLE_MS * 1.15)
|
||||||
|
: TYPO_MIN_IDLE_MS
|
||||||
const fullCheckEligible =
|
const fullCheckEligible =
|
||||||
options.layoutOnly !== true &&
|
options.layoutOnly !== true &&
|
||||||
!isTerminalOrDev &&
|
!isTerminal &&
|
||||||
!context.isComposing &&
|
context.idleMs >= minFullCheckIdle
|
||||||
context.idleMs >= TYPO_MIN_IDLE_MS
|
|
||||||
|
|
||||||
const ignoredWords = configGet('typoIgnoredWords') ?? []
|
const ignoredWords = configGet('typoIgnoredWords') ?? []
|
||||||
const vocabulary = this._loadVocabulary()
|
const vocabulary = this._loadVocabulary()
|
||||||
const keyAtDecision = this._deps.lastKeyAt()
|
const keyAtDecision = this._deps.lastKeyAt()
|
||||||
|
|
||||||
const corrections = detectTypos(prefix, {
|
const maxDeterministicSpan =
|
||||||
|
options.trailingWordOnly === true || context.idleMs < TYPO_MIN_IDLE_MS
|
||||||
|
? MAX_FAST_DELETE_CHARS
|
||||||
|
: MAX_INPLACE_DELETE_CHARS
|
||||||
|
const allCorrections = detectTypos(prefix, {
|
||||||
includeTrailingToken: true,
|
includeTrailingToken: true,
|
||||||
ignoredWords,
|
ignoredWords,
|
||||||
vocabulary: vocabulary.latin,
|
vocabulary: vocabulary.latin,
|
||||||
layoutOnly: !fullCheckEligible,
|
layoutOnly: !fullCheckEligible,
|
||||||
terminalMode: context.terminalMode === true || isTerminalApp(context.appName)
|
terminalMode: isTerminal
|
||||||
})
|
})
|
||||||
|
const baseCorrections: TypoCorrection[] = []
|
||||||
|
if (options.trailingWordOnly !== true) {
|
||||||
|
for (const c of allCorrections) {
|
||||||
|
if (prefix.length - c.start <= maxDeterministicSpan) {
|
||||||
|
baseCorrections.push(c)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// trailingWordOnly: 커서 끝에서 가까운 연속 교정 사슬만 남긴다 (예: "ㅑ ㅊ무'ㅅ " → "I can't ",
|
||||||
|
// 반면 문장 앞쪽의 이미 지나간 긴 문장은 건드리지 않는다).
|
||||||
|
for (let i = allCorrections.length - 1; i >= 0; i -= 1) {
|
||||||
|
const c = allCorrections[i]
|
||||||
|
if (prefix.length - c.start > maxDeterministicSpan) break
|
||||||
|
if (baseCorrections.length === 0) {
|
||||||
|
const tailAfter = prefix.slice(c.end)
|
||||||
|
const nonSpaceTailLen = tailAfter.replace(/[ \t.,!?;:]/gu, '').length
|
||||||
|
if (nonSpaceTailLen > 2) break
|
||||||
|
baseCorrections.unshift(c)
|
||||||
|
} else {
|
||||||
|
const nextCorr = baseCorrections[0]
|
||||||
|
const between = prefix.slice(c.end, nextCorr.start)
|
||||||
|
if (/^[ \t.,!?;:]*$/u.test(between) || between.trim().length <= 2) {
|
||||||
|
baseCorrections.unshift(c)
|
||||||
|
} else {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const loneJamoRemovals =
|
||||||
|
!isTerminal && options.trailingWordOnly !== true && (fullCheckEligible || baseCorrections.length > 0)
|
||||||
|
? detectJamoNoise(prefix, { ignoredWords }).filter(
|
||||||
|
(c) => c.to === '' && /[ \t]$/u.test(c.from) && prefix.length - c.start <= maxDeterministicSpan
|
||||||
|
)
|
||||||
|
: []
|
||||||
|
const corrections =
|
||||||
|
loneJamoRemovals.length > 0 ? mergeTypoCorrections(baseCorrections, loneJamoRemovals) : baseCorrections
|
||||||
const plan = planTypoReplacement(prefix, corrections)
|
const plan = planTypoReplacement(prefix, corrections)
|
||||||
if (plan) {
|
if (plan && plan.deleteCount <= maxDeterministicSpan) {
|
||||||
this._lastCheckedRegion = region
|
this._markRegionChecked(region)
|
||||||
void this._apply(plan, context, keyAtDecision)
|
void this._apply(plan, context, keyAtDecision)
|
||||||
return 'correcting'
|
return 'correcting'
|
||||||
}
|
}
|
||||||
|
|
@ -216,13 +276,25 @@ export class TypoCorrectionService extends EventEmitter {
|
||||||
return 'pass'
|
return 'pass'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const worthModel = this._worthModelCheck(region)
|
||||||
const model = configGet('typoAutoCorrectUseModel') !== false ? this._deps.warmModel() : null
|
const model = configGet('typoAutoCorrectUseModel') !== false ? this._deps.warmModel() : null
|
||||||
if (!model || !this._worthModelCheck(region)) {
|
if (!model || !worthModel) {
|
||||||
this._lastCheckedRegion = region
|
const tailJamo = detectJamoNoise(prefix, { ignoredWords }).filter(
|
||||||
|
(c) => prefix.length - c.start <= MAX_MODEL_DELETE_CHARS
|
||||||
|
)
|
||||||
|
const jamoPlan = planTypoReplacement(prefix, tailJamo)
|
||||||
|
if (jamoPlan && jamoPlan.deleteCount <= MAX_MODEL_DELETE_CHARS) {
|
||||||
|
this._markRegionChecked(region)
|
||||||
|
void this._apply(jamoPlan, context, keyAtDecision)
|
||||||
|
return 'correcting'
|
||||||
|
}
|
||||||
|
if (!worthModel || configGet('typoAutoCorrectUseModel') === false) {
|
||||||
|
this._markRegionChecked(region)
|
||||||
|
}
|
||||||
return 'pass'
|
return 'pass'
|
||||||
}
|
}
|
||||||
|
|
||||||
this._lastCheckedRegion = region
|
this._markRegionChecked(region)
|
||||||
const abort = new AbortController()
|
const abort = new AbortController()
|
||||||
this._check = { abort, prefix, context }
|
this._check = { abort, prefix, context }
|
||||||
void this._runModelCheck(model, context, abort, keyAtDecision, ignoredWords, vocabulary.known)
|
void this._runModelCheck(model, context, abort, keyAtDecision, ignoredWords, vocabulary.known)
|
||||||
|
|
@ -313,10 +385,17 @@ export class TypoCorrectionService extends EventEmitter {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 모델에 물어볼 만한 구간인가 — 끝난 단어가 2개 이상인 글. */
|
/** 모델에 물어볼 만한 구간인가 — 2어절 이상이거나 수상한 1어절(낱자·비상용 음절·미등록 영타) 또는 공백으로 끝난 4자 이상 어절. */
|
||||||
private _worthModelCheck(region: string): boolean {
|
private _worthModelCheck(region: string): boolean {
|
||||||
if (region.replace(/\s+/gu, '').length < MODEL_CHECK_MIN_CHARS) return false
|
const compact = region.replace(/\s+/gu, '')
|
||||||
return tokenizeWords(region).length >= 2
|
if (compact.length < MODEL_CHECK_MIN_CHARS) return false
|
||||||
|
const words = tokenizeWords(region)
|
||||||
|
if (words.length >= 2) return compact.length >= 4
|
||||||
|
if (words.length === 1) {
|
||||||
|
if (hasSuspiciousTypo(region)) return true
|
||||||
|
return compact.length >= 4 && /[ \t.,!?;:]$/u.test(region)
|
||||||
|
}
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
private _loadVocabulary(): { latin: Map<string, number>; known: Set<string> } {
|
private _loadVocabulary(): { latin: Map<string, number>; known: Set<string> } {
|
||||||
|
|
@ -352,10 +431,15 @@ export class TypoCorrectionService extends EventEmitter {
|
||||||
let corrected = false
|
let corrected = false
|
||||||
try {
|
try {
|
||||||
const prefix = context.prefix
|
const prefix = context.prefix
|
||||||
const corrections = await this._askModel(model, prefix, abort.signal, ignoredWords, knownWords)
|
const fromModel = await this._askModel(model, prefix, abort.signal, ignoredWords, knownWords)
|
||||||
if (abort.signal.aborted || this._check?.abort !== abort) return
|
if (abort.signal.aborted || this._check?.abort !== abort) return
|
||||||
const plan = planTypoReplacement(prefix, corrections)
|
// 인플레이스 모델 교정은 커서 바로 앞 어절(MAX_MODEL_DELETE_CHARS 이내)만 고친다.
|
||||||
if (!plan) return
|
// 문장 앞쪽 단어를 고치려고 50~70자를 통째로 백스페이스하면 사용자의 다음 타이핑과 정면 충돌한다.
|
||||||
|
const tailCorrections = mergeTypoCorrections(fromModel, detectJamoNoise(prefix, { ignoredWords })).filter(
|
||||||
|
(c) => prefix.length - c.start <= MAX_MODEL_DELETE_CHARS
|
||||||
|
)
|
||||||
|
const plan = planTypoReplacement(prefix, tailCorrections)
|
||||||
|
if (!plan || plan.deleteCount > MAX_MODEL_DELETE_CHARS) return
|
||||||
// 검사하는 사이 사용자가 더 쳤으면 접두가 달라져 위에서 취소됐다. 여기서 한 번 더 키를 본다.
|
// 검사하는 사이 사용자가 더 쳤으면 접두가 달라져 위에서 취소됐다. 여기서 한 번 더 키를 본다.
|
||||||
this._check = null
|
this._check = null
|
||||||
corrected = await this._apply(plan, context, keyAtDecision)
|
corrected = await this._apply(plan, context, keyAtDecision)
|
||||||
|
|
@ -405,16 +489,33 @@ export class TypoCorrectionService extends EventEmitter {
|
||||||
|
|
||||||
// ── 적용 ───────────────────────────────────────────────
|
// ── 적용 ───────────────────────────────────────────────
|
||||||
|
|
||||||
|
private _isRegionChecked(region: string): boolean {
|
||||||
|
return region === this._lastCheckedRegion || (this._lastPostRegion !== '' && region === this._lastPostRegion)
|
||||||
|
}
|
||||||
|
|
||||||
|
private _markRegionChecked(region: string, postRegion?: string): void {
|
||||||
|
this._lastCheckedRegion = region
|
||||||
|
if (postRegion !== undefined) {
|
||||||
|
this._lastPostRegion = postRegion
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private _unmarkRegionChecked(region: string): void {
|
||||||
|
if (this._lastCheckedRegion === region) this._lastCheckedRegion = ''
|
||||||
|
if (this._lastPostRegion === region) this._lastPostRegion = ''
|
||||||
|
}
|
||||||
|
|
||||||
private async _apply(plan: TypoReplacementPlan, context: TypingContext, keyAtDecision: number): Promise<boolean> {
|
private async _apply(plan: TypoReplacementPlan, context: TypingContext, keyAtDecision: number): Promise<boolean> {
|
||||||
|
const preRegion = context.prefix.slice(typoRegionStart(context.prefix))
|
||||||
if (this._deps.lastKeyAt() !== keyAtDecision) {
|
if (this._deps.lastKeyAt() !== keyAtDecision) {
|
||||||
this._lastCheckedRegion = ''
|
this._unmarkRegionChecked(preRegion)
|
||||||
logger.debug('오타 교정 취소: 판단 뒤 키 입력이 있었다')
|
logger.debug('오타 교정 취소: 판단 뒤 키 입력이 있었다')
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if (context.windowHandle != null) {
|
if (context.windowHandle != null) {
|
||||||
const current = this._deps.foregroundHandle()
|
const current = this._deps.foregroundHandle()
|
||||||
if (current !== null && current !== context.windowHandle) {
|
if (current !== null && current !== context.windowHandle) {
|
||||||
this._lastCheckedRegion = ''
|
this._unmarkRegionChecked(preRegion)
|
||||||
logger.debug('오타 교정 취소: 포커스가 다른 창으로 옮겨 갔다')
|
logger.debug('오타 교정 취소: 포커스가 다른 창으로 옮겨 갔다')
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
@ -434,15 +535,19 @@ export class TypoCorrectionService extends EventEmitter {
|
||||||
: await this._deps.replaceBeforeCaret(plan.deleteCount, plan.insertText)
|
: await this._deps.replaceBeforeCaret(plan.deleteCount, plan.insertText)
|
||||||
if (!ok) {
|
if (!ok) {
|
||||||
cancelInsert()
|
cancelInsert()
|
||||||
this._lastCheckedRegion = ''
|
this._unmarkRegionChecked(preRegion)
|
||||||
logger.warn('오타 교정 삽입 실패')
|
logger.warn('오타 교정 삽입 실패')
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
const postPrefix =
|
||||||
|
context.prefix.slice(0, Math.max(0, context.prefix.length - plan.deleteCount)) + plan.insertText
|
||||||
|
const postRegion = postPrefix.slice(typoRegionStart(postPrefix))
|
||||||
|
this._markRegionChecked(preRegion, postRegion)
|
||||||
this._lastApplied = {
|
this._lastApplied = {
|
||||||
corrections: plan.corrections,
|
corrections: plan.corrections,
|
||||||
completedAt: Date.now(),
|
completedAt: Date.now(),
|
||||||
tailLength: plan.insertText.length,
|
tailLength: plan.insertText.length,
|
||||||
prefixLength: context.prefix.length - plan.deleteCount + plan.insertText.length,
|
prefixLength: postPrefix.length,
|
||||||
prefixBefore: context.prefix.slice(0, Math.max(0, context.prefix.length - plan.deleteCount)),
|
prefixBefore: context.prefix.slice(0, Math.max(0, context.prefix.length - plan.deleteCount)),
|
||||||
windowHandle: context.windowHandle ?? null
|
windowHandle: context.windowHandle ?? null
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@ import {
|
||||||
type WritingRegister
|
type WritingRegister
|
||||||
} from '@d3ro/core/writing-context'
|
} from '@d3ro/core/writing-context'
|
||||||
import { containsEmoji } from '@d3ro/core/input-intelligence'
|
import { containsEmoji } from '@d3ro/core/input-intelligence'
|
||||||
|
import { buildModelTypoHints } from '@d3ro/core/typo-correction'
|
||||||
|
|
||||||
const logger = getLogger('llm-prompts')
|
const logger = getLogger('llm-prompts')
|
||||||
|
|
||||||
|
|
@ -455,14 +456,15 @@ export { SUGGESTION_SYSTEM_PROMPT, SUGGESTION_CONTINUE_SYSTEM_PROMPT }
|
||||||
* 띄어쓰기·문체·단어 선택은 고치지 않는다. 호출자는 core `validateModelCorrections` 로
|
* 띄어쓰기·문체·단어 선택은 고치지 않는다. 호출자는 core `validateModelCorrections` 로
|
||||||
* 결과를 다시 거른다(모델 출력은 신뢰하지 않는다).
|
* 결과를 다시 거른다(모델 출력은 신뢰하지 않는다).
|
||||||
*/
|
*/
|
||||||
const TYPO_CHECK_SYSTEM_PROMPT = `사용자가 입력창에 방금 친 문장에서 오타만 찾습니다.
|
const TYPO_CHECK_SYSTEM_PROMPT = `사용자가 입력창에 방금 친 문장에서 오타와 한영 자판 오타를 찾습니다.
|
||||||
|
|
||||||
규칙:
|
규칙:
|
||||||
- 잘못 누른 글자, 빠지거나 겹친 글자, 자모가 뒤바뀐 글자, 틀린 맞춤법 철자처럼 명백한 오타만 고르세요.
|
- 잘못 누른 글자, 빠지거나 겹친 글자, 자모가 뒤바뀐 글자, 틀린 맞춤법 철자처럼 명백한 오타만 고르세요.
|
||||||
|
- 한영키가 잘못 눌린 채 입력된 영단어·한글 단어(예: ㅗ디ㅐ => hello, ㅡㅁ가둥 => markdown, 네갸ㅜㅎ에서 => spring에서, dkssudgktpd => 안녕하세요)도 [한영 자판 변환 참고]와 문맥을 보고 바르게 고치세요.
|
||||||
- 띄어쓰기, 문장부호, 말투, 단어 선택, 어순은 고치지 마세요.
|
- 띄어쓰기, 문장부호, 말투, 단어 선택, 어순은 고치지 마세요.
|
||||||
- 고유명사, 약어, 신조어, 외래어, 일부러 쓴 줄임말·구어체(ㅋㅋ, 넘, 젤 등)는 그대로 두세요.
|
- 고유명사, 약어, 신조어, 외래어, 일부러 쓴 줄임말·구어체(ㅋㅋ, 넘, 젤 등)는 그대로 두세요.
|
||||||
- 확실하지 않으면 고치지 마세요.
|
- 확실하지 않으면 고치지 마세요.
|
||||||
- 오타마다 한 줄에 "틀린단어 => 고친단어" 형식으로 출력하세요. 단어는 문장에 나온 어절 그대로 쓰세요.
|
- 오타마다 한 줄에 "틀린단어 => 고친단어" 형식으로 출력하세요. 왼쪽에는 [검사할 문장]에 나온 어절 원문을 그대로 쓰세요.
|
||||||
- 오타가 없으면 "없음" 한 단어만 출력하세요. 다른 설명은 쓰지 마세요.`
|
- 오타가 없으면 "없음" 한 단어만 출력하세요. 다른 설명은 쓰지 마세요.`
|
||||||
|
|
||||||
export function buildTypoCheckPrompt(input: { sentence: string; previous?: string | null }): {
|
export function buildTypoCheckPrompt(input: { sentence: string; previous?: string | null }): {
|
||||||
|
|
@ -471,8 +473,13 @@ export function buildTypoCheckPrompt(input: { sentence: string; previous?: strin
|
||||||
} {
|
} {
|
||||||
const sections: string[] = []
|
const sections: string[] = []
|
||||||
const previous = input.previous?.replace(/\s+/gu, ' ').trim()
|
const previous = input.previous?.replace(/\s+/gu, ' ').trim()
|
||||||
|
const sentence = input.sentence.replace(/\s+/gu, ' ').trim()
|
||||||
if (previous) sections.push('[앞 문맥]', previous.slice(-200), '')
|
if (previous) sections.push('[앞 문맥]', previous.slice(-200), '')
|
||||||
sections.push('[검사할 문장]', input.sentence.replace(/\s+/gu, ' ').trim())
|
sections.push('[검사할 문장]', sentence)
|
||||||
|
const layoutHints = buildModelTypoHints(sentence)
|
||||||
|
if (layoutHints.length > 0) {
|
||||||
|
sections.push('', '[한영 자판 변환 참고]', ...layoutHints)
|
||||||
|
}
|
||||||
return {
|
return {
|
||||||
systemPrompt: `${SUGGESTION_NO_THINK_PREFIX}\n${TYPO_CHECK_SYSTEM_PROMPT}`,
|
systemPrompt: `${SUGGESTION_NO_THINK_PREFIX}\n${TYPO_CHECK_SYSTEM_PROMPT}`,
|
||||||
text: sections.join('\n')
|
text: sections.join('\n')
|
||||||
|
|
|
||||||
|
|
@ -567,7 +567,7 @@ export function InputConsentPanel(): React.ReactElement {
|
||||||
<Typography
|
<Typography
|
||||||
sx={{
|
sx={{
|
||||||
...typoSx('micro'),
|
...typoSx('micro'),
|
||||||
color: suggestion?.visible ? d3roPalette.accent.main : d3roPalette.text.tertiary
|
color: suggestion?.visible ? d3roPalette.accent.light : d3roPalette.text.tertiary
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{suggestion?.visible ? t('input.suggestion.onScreen') : t('input.suggestion.offScreen')}
|
{suggestion?.visible ? t('input.suggestion.onScreen') : t('input.suggestion.offScreen')}
|
||||||
|
|
|
||||||
|
|
@ -459,7 +459,7 @@ export function KeyBindingPicker({
|
||||||
fontFamily: d3roFontMono,
|
fontFamily: d3roFontMono,
|
||||||
fontSize: d3roTypo.small.size,
|
fontSize: d3roTypo.small.size,
|
||||||
fontWeight: 500,
|
fontWeight: 500,
|
||||||
letterSpacing: '0.04em',
|
letterSpacing: 0,
|
||||||
color: active ? d3roPalette.text.primary : d3roPalette.text.secondary,
|
color: active ? d3roPalette.text.primary : d3roPalette.text.secondary,
|
||||||
bgcolor: active ? d3roPalette.accent.dim : 'transparent',
|
bgcolor: active ? d3roPalette.accent.dim : 'transparent',
|
||||||
border: `1px solid ${
|
border: `1px solid ${
|
||||||
|
|
|
||||||
|
|
@ -195,7 +195,7 @@ export function EditableSegment({
|
||||||
label={speaker}
|
label={speaker}
|
||||||
size="small"
|
size="small"
|
||||||
sx={{
|
sx={{
|
||||||
fontSize: 10,
|
fontSize: 11,
|
||||||
height: 18,
|
height: 18,
|
||||||
flexShrink: 0,
|
flexShrink: 0,
|
||||||
bgcolor: `${speakerColor}22`,
|
bgcolor: `${speakerColor}22`,
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,9 @@
|
||||||
--d3-accent-main: #3b82f6;
|
--d3-accent-main: #3b82f6;
|
||||||
--d3-accent-light: #60a5fa;
|
--d3-accent-light: #60a5fa;
|
||||||
--d3-accent-dim: rgba(59, 130, 246, 0.14);
|
--d3-accent-dim: rgba(59, 130, 246, 0.14);
|
||||||
|
--d3-accent-solid: #2563eb;
|
||||||
|
--d3-accent-solidHover: #1d4ed8;
|
||||||
|
--d3-accent-ink: #ffffff;
|
||||||
--d3-status-danger: #f87171;
|
--d3-status-danger: #f87171;
|
||||||
--d3-status-success: #34d399;
|
--d3-status-success: #34d399;
|
||||||
--d3-overlay-soft: rgba(238, 242, 251, 0.06);
|
--d3-overlay-soft: rgba(238, 242, 251, 0.06);
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
<div id="container" class="result-popup d3-panel" role="alertdialog" aria-labelledby="result-title" aria-describedby="result-text">
|
<div id="container" class="result-popup d3-panel" role="alertdialog" aria-labelledby="result-title" aria-describedby="result-text">
|
||||||
<div class="result-head">
|
<div class="result-head">
|
||||||
<span id="result-title" class="result-title" data-i18n="resultTitle"></span>
|
<span id="result-title" class="result-title" data-i18n="resultTitle"></span>
|
||||||
<button id="close-btn" class="icon-btn" type="button" data-i18n-label="close">
|
<button id="close-btn" class="icon-btn" type="button" aria-label="닫기" data-i18n-label="close">
|
||||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true">
|
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true">
|
||||||
<line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line>
|
<line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line>
|
||||||
</svg>
|
</svg>
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
<body>
|
<body>
|
||||||
<div id="root">
|
<div id="root">
|
||||||
<div id="panel" class="suggestion-panel">
|
<div id="panel" class="suggestion-panel">
|
||||||
<button id="close" class="close" type="button">
|
<button id="close" class="close" type="button" aria-label="닫기">
|
||||||
<svg viewBox="0 0 16 16" width="10" height="10" aria-hidden="true">
|
<svg viewBox="0 0 16 16" width="10" height="10" aria-hidden="true">
|
||||||
<path d="M3 3 L13 13 M13 3 L3 13" stroke="currentColor" stroke-width="2" stroke-linecap="round" />
|
<path d="M3 3 L13 13 M13 3 L3 13" stroke="currentColor" stroke-width="2" stroke-linecap="round" />
|
||||||
</svg>
|
</svg>
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@ body {
|
||||||
--d3-text-result: #eef2fb;
|
--d3-text-result: #eef2fb;
|
||||||
--d3-text-secondary: #93a4c8;
|
--d3-text-secondary: #93a4c8;
|
||||||
--d3-accent-main: #3b82f6;
|
--d3-accent-main: #3b82f6;
|
||||||
|
--d3-accent-light: #60a5fa;
|
||||||
--d3-accent-dim: rgba(59, 130, 246, 0.14);
|
--d3-accent-dim: rgba(59, 130, 246, 0.14);
|
||||||
--d3-shadow-popup: 0 8px 32px rgba(3, 7, 18, 0.5);
|
--d3-shadow-popup: 0 8px 32px rgba(3, 7, 18, 0.5);
|
||||||
}
|
}
|
||||||
|
|
@ -184,7 +185,7 @@ body {
|
||||||
}
|
}
|
||||||
|
|
||||||
.suggestion-item.active .suggestion-num {
|
.suggestion-item.active .suggestion-num {
|
||||||
color: var(--d3-accent-main);
|
color: var(--d3-accent-light);
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -328,7 +329,7 @@ kbd {
|
||||||
padding: 1px 6px;
|
padding: 1px 6px;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
background: var(--d3-accent-dim);
|
background: var(--d3-accent-dim);
|
||||||
color: var(--d3-accent-main);
|
color: var(--d3-accent-light);
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
@ -345,7 +346,7 @@ kbd {
|
||||||
}
|
}
|
||||||
|
|
||||||
.correction ins {
|
.correction ins {
|
||||||
color: var(--d3-accent-main);
|
color: var(--d3-accent-light);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
@ -357,6 +358,6 @@ kbd {
|
||||||
|
|
||||||
/* 후보 앞에 붙는 고친 글 — 이 글자들로 바뀐 뒤 후보가 이어진다는 표시 */
|
/* 후보 앞에 붙는 고친 글 — 이 글자들로 바뀐 뒤 후보가 이어진다는 표시 */
|
||||||
.suggestion-text .corrected {
|
.suggestion-text .corrected {
|
||||||
color: var(--d3-accent-main);
|
color: var(--d3-accent-light);
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -99,16 +99,16 @@ describe('TypoCorrectionService', () => {
|
||||||
expect(fake.replaceBeforeCaret).not.toHaveBeenCalled()
|
expect(fake.replaceBeforeCaret).not.toHaveBeenCalled()
|
||||||
})
|
})
|
||||||
|
|
||||||
it('비밀번호·조합 중·선택·터미널·에디터·제외 앱·클릭만 한 칸은 건드리지 않는다', () => {
|
it('비밀번호·조합 진행 중(짧은 유휴)·선택·터미널·제외 앱·클릭만 한 칸은 건드리지 않는다', () => {
|
||||||
const fake = deps()
|
const fake = deps()
|
||||||
const service = new TypoCorrectionService(fake.deps)
|
const service = new TypoCorrectionService(fake.deps)
|
||||||
config.inputExcludedApps = ['notes.exe']
|
config.inputExcludedApps = ['notes.exe']
|
||||||
for (const overrides of [
|
for (const overrides of [
|
||||||
{ isPassword: true },
|
{ isPassword: true },
|
||||||
{ isComposing: true },
|
{ isComposing: true, prefix: '오늘 회의는 잘 됬어', idleMs: 300 },
|
||||||
{ hasSelection: true },
|
{ hasSelection: true },
|
||||||
{ appName: 'WindowsTerminal.exe' },
|
{ appName: 'WindowsTerminal.exe' },
|
||||||
{ appName: 'Code.exe' },
|
{ terminalMode: true },
|
||||||
{ appName: 'notes.exe' },
|
{ appName: 'notes.exe' },
|
||||||
{ editedSinceFocus: false },
|
{ editedSinceFocus: false },
|
||||||
{ caretReliable: false }
|
{ caretReliable: false }
|
||||||
|
|
@ -118,6 +118,29 @@ describe('TypoCorrectionService', () => {
|
||||||
expect(fake.replaceBeforeCaret).not.toHaveBeenCalled()
|
expect(fake.replaceBeforeCaret).not.toHaveBeenCalled()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
it('사전에서 놓친 한영+오타 복합 어절(ㅗ디ㅐ, ㅡㅁ가둥 등)은 단 1어절이어도 공백 뒤 짧은 멈춤(380ms)에서 Gemma 모델로 즉시 자동 교정한다', async () => {
|
||||||
|
const generate = vi.fn(async function* () {
|
||||||
|
yield 'ㅡㅁ가둥 => markdown'
|
||||||
|
})
|
||||||
|
const fake = deps({ warmModel: () => 'gemma4:e4b', generate })
|
||||||
|
const service = new TypoCorrectionService(fake.deps)
|
||||||
|
|
||||||
|
expect(
|
||||||
|
service.handleTypingContext(
|
||||||
|
typingContext({
|
||||||
|
prefix: 'ㅡㅁ가둥 ',
|
||||||
|
isComposing: true,
|
||||||
|
idleMs: 380,
|
||||||
|
appName: 'Antigravity.exe'
|
||||||
|
})
|
||||||
|
)
|
||||||
|
).toBe('checking')
|
||||||
|
await flush()
|
||||||
|
await flush()
|
||||||
|
expect(generate).toHaveBeenCalledTimes(1)
|
||||||
|
expect(fake.replaceBeforeCaret).toHaveBeenCalledWith('ㅡㅁ가둥 '.length, 'markdown ')
|
||||||
|
})
|
||||||
|
|
||||||
it('설정으로 끌 수 있다', () => {
|
it('설정으로 끌 수 있다', () => {
|
||||||
config.typoAutoCorrectEnabled = false
|
config.typoAutoCorrectEnabled = false
|
||||||
const fake = deps()
|
const fake = deps()
|
||||||
|
|
@ -299,6 +322,43 @@ describe('TypoCorrectionService', () => {
|
||||||
'dlrjs github dp commit gkf rjdi'.length,
|
'dlrjs github dp commit gkf rjdi'.length,
|
||||||
'이건 github 에 commit 할 거야'
|
'이건 github 에 commit 할 거야'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
fake.replaceBeforeCaret.mockClear()
|
||||||
|
// trailingWordOnly 모드에서는 문장 앞쪽에 미변환 어절이 남아 있어도 문장 전체를 지우지 않고 커서 직전 마지막 어절만 고친다
|
||||||
|
expect(
|
||||||
|
service.handleTypingContext(
|
||||||
|
typingContext({ prefix: "dlrjs already typed long sentence and ㅊ무ㅜ'ㅅ ", idleMs: 60 }),
|
||||||
|
{ layoutOnly: true, trailingWordOnly: true }
|
||||||
|
)
|
||||||
|
).toBe('correcting')
|
||||||
|
await flush()
|
||||||
|
expect(fake.replaceBeforeCaret).toHaveBeenCalledWith("ㅊ무ㅜ'ㅅ ".length, "can't ")
|
||||||
|
|
||||||
|
fake.replaceBeforeCaret.mockClear()
|
||||||
|
// 커서 끝의 짧은 연속 교정 사슬("ㅑ ㅊ무'ㅅ ")은 함께 "I can't " 로 고치고, 지운 뒤 다시 쳐도 재교정한다
|
||||||
|
expect(
|
||||||
|
service.handleTypingContext(typingContext({ prefix: "ㅑ ㅊ무'ㅅ ", idleMs: 60 }), {
|
||||||
|
layoutOnly: true,
|
||||||
|
trailingWordOnly: true
|
||||||
|
})
|
||||||
|
).toBe('correcting')
|
||||||
|
await flush()
|
||||||
|
expect(fake.replaceBeforeCaret).toHaveBeenCalledWith("ㅑ ㅊ무'ㅅ ".length, "I can't ")
|
||||||
|
|
||||||
|
// 지워서 다른 구간이 되었다가 다시 "ㅑ ㅊ무'ㅅ " 를 치면 다시 교정된다
|
||||||
|
fake.replaceBeforeCaret.mockClear()
|
||||||
|
service.handleTypingContext(typingContext({ prefix: 'ㅑ ', idleMs: 10 }), {
|
||||||
|
layoutOnly: true,
|
||||||
|
trailingWordOnly: true
|
||||||
|
})
|
||||||
|
expect(
|
||||||
|
service.handleTypingContext(typingContext({ prefix: "ㅑ ㅊ무'ㅅ ", idleMs: 60 }), {
|
||||||
|
layoutOnly: true,
|
||||||
|
trailingWordOnly: true
|
||||||
|
})
|
||||||
|
).toBe('correcting')
|
||||||
|
await flush()
|
||||||
|
expect(fake.replaceBeforeCaret).toHaveBeenCalledWith("ㅑ ㅊ무'ㅅ ".length, "I can't ")
|
||||||
})
|
})
|
||||||
|
|
||||||
it('Discord/Chromium 처럼 comp=true 가 계속 켜져 있거나 스페이스 직후 짧은 유휴(60ms)여도 한영 전환은 즉시 교정한다', async () => {
|
it('Discord/Chromium 처럼 comp=true 가 계속 켜져 있거나 스페이스 직후 짧은 유휴(60ms)여도 한영 전환은 즉시 교정한다', async () => {
|
||||||
|
|
|
||||||
|
|
@ -99,6 +99,6 @@ const styles = StyleSheet.create({
|
||||||
borderTopWidth: 1,
|
borderTopWidth: 1,
|
||||||
overflow: 'hidden',
|
overflow: 'hidden',
|
||||||
},
|
},
|
||||||
statusText: { fontSize: 11, letterSpacing: 0.6 },
|
statusText: { fontSize: 11, letterSpacing: 0 },
|
||||||
loadingOverlay: { position: 'absolute', fontSize: 11, letterSpacing: 0.6 },
|
loadingOverlay: { position: 'absolute', fontSize: 11, letterSpacing: 0 },
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -380,7 +380,7 @@ function createStyles(palette: Palette) {
|
||||||
dividerLine: { flex: 1, height: 1, backgroundColor: palette.border.default },
|
dividerLine: { flex: 1, height: 1, backgroundColor: palette.border.default },
|
||||||
dividerText: { letterSpacing: 0 },
|
dividerText: { letterSpacing: 0 },
|
||||||
formSection: { gap: 16, marginBottom: 24 },
|
formSection: { gap: 16, marginBottom: 24 },
|
||||||
fieldLabel: { letterSpacing: 0.4, marginBottom: 6, marginLeft: 4 },
|
fieldLabel: { letterSpacing: 0, marginBottom: 6, marginLeft: 4 },
|
||||||
input: {
|
input: {
|
||||||
minHeight: 48,
|
minHeight: 48,
|
||||||
backgroundColor: palette.bg.inset,
|
backgroundColor: palette.bg.inset,
|
||||||
|
|
|
||||||
|
|
@ -309,7 +309,7 @@ function createStyles(palette: Palette) {
|
||||||
content: { paddingHorizontal: 20 },
|
content: { paddingHorizontal: 20 },
|
||||||
title: { marginBottom: 8 },
|
title: { marginBottom: 8 },
|
||||||
section: { marginTop: 20 },
|
section: { marginTop: 20 },
|
||||||
sectionTitle: { minHeight: 32, justifyContent: 'center', letterSpacing: 0.4 },
|
sectionTitle: { minHeight: 32, justifyContent: 'center', letterSpacing: 0 },
|
||||||
rows: { borderTopWidth: 1, borderBottomWidth: 1 },
|
rows: { borderTopWidth: 1, borderBottomWidth: 1 },
|
||||||
row: {
|
row: {
|
||||||
minHeight: 72,
|
minHeight: 72,
|
||||||
|
|
|
||||||
|
|
@ -705,13 +705,13 @@ const styles = StyleSheet.create({
|
||||||
paddingHorizontal: 20,
|
paddingHorizontal: 20,
|
||||||
paddingBottom: 12,
|
paddingBottom: 12,
|
||||||
borderBottomWidth: 1,
|
borderBottomWidth: 1,
|
||||||
letterSpacing: 1.2,
|
letterSpacing: 0,
|
||||||
},
|
},
|
||||||
sectionLabel: {
|
sectionLabel: {
|
||||||
paddingHorizontal: 24,
|
paddingHorizontal: 24,
|
||||||
paddingTop: 22,
|
paddingTop: 22,
|
||||||
paddingBottom: 8,
|
paddingBottom: 8,
|
||||||
letterSpacing: 0.4,
|
letterSpacing: 0,
|
||||||
},
|
},
|
||||||
section: { marginHorizontal: 20, padding: 0, overflow: 'hidden' },
|
section: { marginHorizontal: 20, padding: 0, overflow: 'hidden' },
|
||||||
profileRow: {
|
profileRow: {
|
||||||
|
|
@ -800,5 +800,5 @@ const styles = StyleSheet.create({
|
||||||
gap: 8,
|
gap: 8,
|
||||||
paddingVertical: 8,
|
paddingVertical: 8,
|
||||||
},
|
},
|
||||||
footerText: { fontSize: 8, letterSpacing: 0.4 },
|
footerText: { fontSize: 11, letterSpacing: 0 },
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -906,7 +906,7 @@ function createStyles(palette: Palette): ReturnType<typeof StyleSheet.create> {
|
||||||
justifyContent: 'space-between',
|
justifyContent: 'space-between',
|
||||||
gap: 16,
|
gap: 16,
|
||||||
},
|
},
|
||||||
bubbleLabel: { fontSize: 11, letterSpacing: 0.6 },
|
bubbleLabel: { fontSize: 11, letterSpacing: 0 },
|
||||||
bubbleActions: { flexDirection: 'row', alignItems: 'center', gap: 4 },
|
bubbleActions: { flexDirection: 'row', alignItems: 'center', gap: 4 },
|
||||||
bubbleAction: { minWidth: 48, minHeight: 48, alignItems: 'center', justifyContent: 'center' },
|
bubbleAction: { minWidth: 48, minHeight: 48, alignItems: 'center', justifyContent: 'center' },
|
||||||
busyRow: { flexDirection: 'row', alignItems: 'center', gap: 10, paddingVertical: 12 },
|
busyRow: { flexDirection: 'row', alignItems: 'center', gap: 10, paddingVertical: 12 },
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ import { ActionRunner } from '@/components/actions/action-runner'
|
||||||
export default function ActionsPage(): React.ReactElement {
|
export default function ActionsPage(): React.ReactElement {
|
||||||
return (
|
return (
|
||||||
<Box sx={{ p: 4 }}>
|
<Box sx={{ p: 4 }}>
|
||||||
<PhosphorText variant="title" sx={{ mb: 1 }}>
|
<PhosphorText variant="title" component="h1" sx={{ mb: 1, display: 'block' }}>
|
||||||
ACTIONS
|
ACTIONS
|
||||||
</PhosphorText>
|
</PhosphorText>
|
||||||
<Box sx={{ color: d3roPalette.text.muted, fontSize: 13, mb: 4 }}>
|
<Box sx={{ color: d3roPalette.text.muted, fontSize: 13, mb: 4 }}>
|
||||||
|
|
|
||||||
|
|
@ -172,7 +172,7 @@ export default async function BillingPage({ searchParams }: BillingPageProps): P
|
||||||
<Box sx={{ display: 'inline-flex', alignItems: 'center', gap: 1, mb: 1.5 }}>
|
<Box sx={{ display: 'inline-flex', alignItems: 'center', gap: 1, mb: 1.5 }}>
|
||||||
<TactileBadge ledColor="amber" tone="accent">D3RO VOICE PRO</TactileBadge>
|
<TactileBadge ledColor="amber" tone="accent">D3RO VOICE PRO</TactileBadge>
|
||||||
</Box>
|
</Box>
|
||||||
<Typography component="h1" sx={{ fontSize: 28, fontWeight: 500, color: 'var(--d3-text-inverse)', letterSpacing: '-0.02em', mb: 1 }}>
|
<Typography component="h1" sx={{ fontSize: 28, fontWeight: 500, color: 'var(--d3-text-primary)', letterSpacing: '-0.02em', mb: 1 }}>
|
||||||
구독 및 결제
|
구독 및 결제
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography sx={{ fontSize: 14, color: 'var(--d3-text-label)' }}>
|
<Typography sx={{ fontSize: 14, color: 'var(--d3-text-label)' }}>
|
||||||
|
|
@ -183,11 +183,11 @@ export default async function BillingPage({ searchParams }: BillingPageProps): P
|
||||||
<MetalCard sx={{ p: { xs: 2.5, md: 3.5 }, mb: 4 }}>
|
<MetalCard sx={{ p: { xs: 2.5, md: 3.5 }, mb: 4 }}>
|
||||||
<Stack direction={{ xs: 'column', md: 'row' }} justifyContent="space-between" gap={3}>
|
<Stack direction={{ xs: 'column', md: 'row' }} justifyContent="space-between" gap={3}>
|
||||||
<Box>
|
<Box>
|
||||||
<Typography sx={{ fontFamily: d3roFontMono, fontSize: 11, letterSpacing: 1.5, color: 'var(--d3-text-label)', mb: 1 }}>
|
<Typography sx={{ fontFamily: d3roFontMono, fontSize: 11, letterSpacing: 0, color: 'var(--d3-text-label)', mb: 1 }}>
|
||||||
CURRENT SUBSCRIPTION
|
CURRENT SUBSCRIPTION
|
||||||
</Typography>
|
</Typography>
|
||||||
<Box sx={{ display: 'flex', alignItems: 'center', gap: 1.5, flexWrap: 'wrap' }}>
|
<Box sx={{ display: 'flex', alignItems: 'center', gap: 1.5, flexWrap: 'wrap' }}>
|
||||||
<Typography data-testid="billing-current-tier" sx={{ fontSize: 28, fontWeight: 600, color: 'var(--d3-text-inverse)' }}>
|
<Typography data-testid="billing-current-tier" sx={{ fontSize: 28, fontWeight: 600, color: 'var(--d3-text-primary)' }}>
|
||||||
{tierLabel(subscription.tier)}
|
{tierLabel(subscription.tier)}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Chip
|
<Chip
|
||||||
|
|
@ -290,7 +290,7 @@ function PlanCard({
|
||||||
<Typography sx={{ fontFamily: d3roFontMono, fontSize: 11, color: active || selected ? 'var(--d3-accent-main)' : 'var(--d3-text-label)', mb: 0.75 }}>
|
<Typography sx={{ fontFamily: d3roFontMono, fontSize: 11, color: active || selected ? 'var(--d3-accent-main)' : 'var(--d3-text-label)', mb: 0.75 }}>
|
||||||
{active ? 'CURRENT PLAN' : selected ? 'SELECTED PLAN' : recommended ? 'RECOMMENDED' : 'PLAN'}
|
{active ? 'CURRENT PLAN' : selected ? 'SELECTED PLAN' : recommended ? 'RECOMMENDED' : 'PLAN'}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography component="h2" sx={{ fontSize: 24, fontWeight: 600, color: 'var(--d3-text-inverse)' }}>{plan.name}</Typography>
|
<Typography component="h2" sx={{ fontSize: 24, fontWeight: 600, color: 'var(--d3-text-primary)' }}>{plan.name}</Typography>
|
||||||
<Typography sx={{ mt: 0.5, mb: 3, color: plan.tier === 'free' ? 'var(--d3-text-label)' : 'var(--d3-accent-main)', fontFamily: d3roFontMono, fontSize: 16 }}>
|
<Typography sx={{ mt: 0.5, mb: 3, color: plan.tier === 'free' ? 'var(--d3-text-label)' : 'var(--d3-accent-main)', fontFamily: d3roFontMono, fontSize: 16 }}>
|
||||||
{priceLabel}
|
{priceLabel}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
// apps/web/src/app/(app)/chat/page.tsx
|
// apps/web/src/app/(app)/chat/page.tsx
|
||||||
// D3RO-VOICE 음성 대화 (Talk) 페이지
|
// D3RO-VOICE 음성 대화 (Talk) 페이지
|
||||||
|
|
||||||
import { Box } from '@mui/material'
|
import { Box } from '@mui/material'
|
||||||
|
|
@ -9,7 +9,7 @@ export default function ChatPage(): React.ReactElement {
|
||||||
return (
|
return (
|
||||||
<Box sx={{ maxWidth: 1080, mx: 'auto', p: { xs: 2.5, md: 4 }, pt: 4, pb: 6 }}>
|
<Box sx={{ maxWidth: 1080, mx: 'auto', p: { xs: 2.5, md: 4 }, pt: 4, pb: 6 }}>
|
||||||
<Box sx={{ mb: 3 }}>
|
<Box sx={{ mb: 3 }}>
|
||||||
<PhosphorText variant="title">
|
<PhosphorText variant="title" component="h1">
|
||||||
VOICE INTELLIGENCE TALK
|
VOICE INTELLIGENCE TALK
|
||||||
</PhosphorText>
|
</PhosphorText>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
|
||||||
|
|
@ -371,8 +371,8 @@ export default function CommandsPage(): React.ReactElement {
|
||||||
<Box sx={{ display: 'flex', alignItems: 'center', gap: 2 }}>
|
<Box sx={{ display: 'flex', alignItems: 'center', gap: 2 }}>
|
||||||
<Box sx={{ width: 44, height: 44, borderRadius: '12px', bgcolor: 'var(--d3-accent-glow)', border: '1px solid var(--d3-accent-glow)', display: 'grid', placeItems: 'center', color: 'var(--d3-accent-main)' }}><Zap size={22} /></Box>
|
<Box sx={{ width: 44, height: 44, borderRadius: '12px', bgcolor: 'var(--d3-accent-glow)', border: '1px solid var(--d3-accent-glow)', display: 'grid', placeItems: 'center', color: 'var(--d3-accent-main)' }}><Zap size={22} /></Box>
|
||||||
<Box>
|
<Box>
|
||||||
<Typography sx={{ fontFamily: d3roFontMono, fontSize: 10, color: 'var(--d3-text-label)' }}>ACTIVE SYNCED INSTRUCTION</Typography>
|
<Typography sx={{ fontFamily: d3roFontMono, fontSize: 11, color: 'var(--d3-text-label)' }}>ACTIVE SYNCED INSTRUCTION</Typography>
|
||||||
<Typography sx={{ fontSize: 18, fontWeight: 500, color: 'var(--d3-text-inverse)' }}>{activeInstruction?.name ?? '활성 명령 없음'}</Typography>
|
<Typography component="h1" sx={{ fontSize: 18, fontWeight: 500, color: 'var(--d3-text-primary)' }}>{activeInstruction?.name ?? '활성 명령 없음'}</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
<TactileBadge ledColor="green" tone="success">SUPABASE SSOT · REV {state.settingsRevision}</TactileBadge>
|
<TactileBadge ledColor="green" tone="success">SUPABASE SSOT · REV {state.settingsRevision}</TactileBadge>
|
||||||
|
|
@ -470,7 +470,7 @@ export default function CommandsPage(): React.ReactElement {
|
||||||
</MetalCard>
|
</MetalCard>
|
||||||
|
|
||||||
<Dialog open={dialogOpen} onClose={() => { if (!saving) setDialogOpen(false) }} maxWidth="sm" fullWidth PaperProps={{ sx: { bgcolor: 'var(--d3-bg-card)', border: '1px solid var(--d3-border-default)', borderRadius: '16px', p: 1 } }}>
|
<Dialog open={dialogOpen} onClose={() => { if (!saving) setDialogOpen(false) }} maxWidth="sm" fullWidth PaperProps={{ sx: { bgcolor: 'var(--d3-bg-card)', border: '1px solid var(--d3-border-default)', borderRadius: '16px', p: 1 } }}>
|
||||||
<DialogTitle sx={{ color: 'var(--d3-text-inverse)', fontWeight: 500 }}>{editing ? '사용자 명령 편집' : '사용자 명령 추가'}</DialogTitle>
|
<DialogTitle sx={{ color: 'var(--d3-text-primary)', fontWeight: 500 }}>{editing ? '사용자 명령 편집' : '사용자 명령 추가'}</DialogTitle>
|
||||||
<DialogContent sx={{ display: 'flex', flexDirection: 'column', gap: 2, pt: 1 }}>
|
<DialogContent sx={{ display: 'flex', flexDirection: 'column', gap: 2, pt: 1 }}>
|
||||||
<TextField label="명령 이름" value={draft.name} onChange={(event) => setDraft((current) => ({ ...current, name: event.target.value }))} inputProps={{ maxLength: 80 }} autoFocus fullWidth size="small" sx={{ mt: 1 }} />
|
<TextField label="명령 이름" value={draft.name} onChange={(event) => setDraft((current) => ({ ...current, name: event.target.value }))} inputProps={{ maxLength: 80 }} autoFocus fullWidth size="small" sx={{ mt: 1 }} />
|
||||||
<TextField label="명령 설명" value={draft.description} onChange={(event) => setDraft((current) => ({ ...current, description: event.target.value }))} inputProps={{ maxLength: 240 }} fullWidth size="small" />
|
<TextField label="명령 설명" value={draft.description} onChange={(event) => setDraft((current) => ({ ...current, description: event.target.value }))} inputProps={{ maxLength: 240 }} fullWidth size="small" />
|
||||||
|
|
@ -489,7 +489,7 @@ function PipelineStep({ icon, step, label, accent = false, last = false }: { ico
|
||||||
return (
|
return (
|
||||||
<Box sx={{ display: 'flex', alignItems: 'center', gap: 1.5 }}>
|
<Box sx={{ display: 'flex', alignItems: 'center', gap: 1.5 }}>
|
||||||
<Box sx={{ width: 32, height: 32, borderRadius: '50%', bgcolor: accent ? 'var(--d3-accent-glow)' : 'var(--d3-bg-elevated)', display: 'grid', placeItems: 'center', color: accent ? 'var(--d3-accent-main)' : 'var(--d3-text-secondary)' }}>{icon}</Box>
|
<Box sx={{ width: 32, height: 32, borderRadius: '50%', bgcolor: accent ? 'var(--d3-accent-glow)' : 'var(--d3-bg-elevated)', display: 'grid', placeItems: 'center', color: accent ? 'var(--d3-accent-main)' : 'var(--d3-text-secondary)' }}>{icon}</Box>
|
||||||
<Box sx={{ flex: 1 }}><Typography sx={{ fontFamily: d3roFontMono, fontSize: 9, color: 'var(--d3-text-label)' }}>STEP {step}</Typography><Typography sx={{ fontSize: 12, fontWeight: 600, color: accent ? 'var(--d3-accent-main)' : 'var(--d3-text-primary)' }}>{label}</Typography></Box>
|
<Box sx={{ flex: 1 }}><Typography sx={{ fontFamily: d3roFontMono, fontSize: 11, color: 'var(--d3-text-label)' }}>STEP {step}</Typography><Typography sx={{ fontSize: 12, fontWeight: 600, color: accent ? 'var(--d3-accent-main)' : 'var(--d3-text-primary)' }}>{label}</Typography></Box>
|
||||||
{!last && <ArrowRight size={14} color="var(--d3-text-label)" />}
|
{!last && <ArrowRight size={14} color="var(--d3-text-label)" />}
|
||||||
</Box>
|
</Box>
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -152,7 +152,7 @@ export default function DashboardPage(): React.ReactElement {
|
||||||
|
|
||||||
<Box sx={{ display: 'grid', gridTemplateColumns: { xs: '1fr', md: '1fr auto' }, gap: 3, alignItems: 'center' }}>
|
<Box sx={{ display: 'grid', gridTemplateColumns: { xs: '1fr', md: '1fr auto' }, gap: 3, alignItems: 'center' }}>
|
||||||
<Box>
|
<Box>
|
||||||
<PhosphorText variant="hero" sx={{ mb: 1, letterSpacing: '-0.02em', lineHeight: 1.15 }}>
|
<PhosphorText variant="hero" component="h1" sx={{ mb: 1, letterSpacing: '-0.02em', lineHeight: 1.15 }}>
|
||||||
내 음성 작업 현황
|
내 음성 작업 현황
|
||||||
</PhosphorText>
|
</PhosphorText>
|
||||||
<PhosphorText variant="body" sx={{ color: d3roPalette.text.secondary, display: 'block', mb: 2.5 }}>
|
<PhosphorText variant="body" sx={{ color: d3roPalette.text.secondary, display: 'block', mb: 2.5 }}>
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ import {
|
||||||
import { Download, Pencil, Plus, RefreshCw, Search, Trash2, Upload } from 'lucide-react'
|
import { Download, Pencil, Plus, RefreshCw, Search, Trash2, Upload } from 'lucide-react'
|
||||||
import type { D3roSupabaseClient, DictionaryEntry } from '@d3ro/api-client'
|
import type { D3roSupabaseClient, DictionaryEntry } from '@d3ro/api-client'
|
||||||
import { MetalCard, PhosphorText, PhysicalButton, TactileBadge } from '@d3ro/ui/components/ds'
|
import { MetalCard, PhosphorText, PhysicalButton, TactileBadge } from '@d3ro/ui/components/ds'
|
||||||
import { d3roFontMono, d3roPalette } from '@d3ro/ui/theme'
|
import { d3roPalette } from '@d3ro/ui/theme'
|
||||||
import { useAuth } from '@/components/providers/auth-provider'
|
import { useAuth } from '@/components/providers/auth-provider'
|
||||||
import { getSupabaseBrowserClient } from '@/lib/supabase-browser'
|
import { getSupabaseBrowserClient } from '@/lib/supabase-browser'
|
||||||
import {
|
import {
|
||||||
|
|
@ -355,7 +355,7 @@ export default function DictionaryPage(): React.ReactElement {
|
||||||
<Box sx={{ maxWidth: 1080, mx: 'auto', p: { xs: 2.5, md: 4 }, pt: 4, pb: 10 }}>
|
<Box sx={{ maxWidth: 1080, mx: 'auto', p: { xs: 2.5, md: 4 }, pt: 4, pb: 10 }}>
|
||||||
<Box sx={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', gap: 2, mb: 3 }}>
|
<Box sx={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', gap: 2, mb: 3 }}>
|
||||||
<Box>
|
<Box>
|
||||||
<PhosphorText variant="title">CUSTOM DICTIONARY</PhosphorText>
|
<PhosphorText variant="title" component="h1">CUSTOM DICTIONARY</PhosphorText>
|
||||||
<PhosphorText variant="meta" sx={{ display: 'block', mt: 0.75, color: d3roPalette.text.dimLabel }}>
|
<PhosphorText variant="meta" sx={{ display: 'block', mt: 0.75, color: d3roPalette.text.dimLabel }}>
|
||||||
{total} ENTRIES · ACCOUNT SYNC
|
{total} ENTRIES · ACCOUNT SYNC
|
||||||
</PhosphorText>
|
</PhosphorText>
|
||||||
|
|
@ -422,7 +422,6 @@ export default function DictionaryPage(): React.ReactElement {
|
||||||
{(['all', 'user', 'technical', 'auto'] as const).map((value) => (
|
{(['all', 'user', 'technical', 'auto'] as const).map((value) => (
|
||||||
<TactileBadge
|
<TactileBadge
|
||||||
key={value}
|
key={value}
|
||||||
mono
|
|
||||||
tone={category === value ? 'accent' : 'default'}
|
tone={category === value ? 'accent' : 'default'}
|
||||||
onClick={() => setCategory(value)}
|
onClick={() => setCategory(value)}
|
||||||
sx={{ cursor: 'pointer', height: 36, px: 1.5 }}
|
sx={{ cursor: 'pointer', height: 36, px: 1.5 }}
|
||||||
|
|
@ -458,12 +457,12 @@ export default function DictionaryPage(): React.ReactElement {
|
||||||
<Box sx={{ display: 'flex', justifyContent: 'space-between', alignItems: 'flex-start', gap: 2 }}>
|
<Box sx={{ display: 'flex', justifyContent: 'space-between', alignItems: 'flex-start', gap: 2 }}>
|
||||||
<Box sx={{ minWidth: 0 }}>
|
<Box sx={{ minWidth: 0 }}>
|
||||||
<Box sx={{ display: 'flex', alignItems: 'center', gap: 1.5, mb: 1, flexWrap: 'wrap' }}>
|
<Box sx={{ display: 'flex', alignItems: 'center', gap: 1.5, mb: 1, flexWrap: 'wrap' }}>
|
||||||
<Typography sx={{ fontSize: 18, fontWeight: 500, color: 'var(--d3-text-inverse)', overflowWrap: 'anywhere' }}>{entry.word}</Typography>
|
<Typography sx={{ fontSize: 18, fontWeight: 500, color: 'var(--d3-text-primary)', overflowWrap: 'anywhere' }}>{entry.word}</Typography>
|
||||||
{entry.pronunciation && <TactileBadge mono tone="accent">[{entry.pronunciation}]</TactileBadge>}
|
{entry.pronunciation && <TactileBadge tone="accent">[{entry.pronunciation}]</TactileBadge>}
|
||||||
</Box>
|
</Box>
|
||||||
<Box sx={{ display: 'flex', alignItems: 'center', gap: 1 }}>
|
<Box sx={{ display: 'flex', alignItems: 'center', gap: 1 }}>
|
||||||
<TactileBadge mono tone="mono">{CATEGORY_LABELS[entry.category]}</TactileBadge>
|
<TactileBadge tone="mono">{CATEGORY_LABELS[entry.category]}</TactileBadge>
|
||||||
<Typography sx={{ fontFamily: d3roFontMono, fontSize: 11, color: 'var(--d3-text-label)' }}>{entry.usage_count}회 사용</Typography>
|
<Typography sx={{ fontSize: 11, fontVariantNumeric: 'tabular-nums', color: 'var(--d3-text-label)' }}>{entry.usage_count}회 사용</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
<Box sx={{ display: 'flex', gap: 0.25 }}>
|
<Box sx={{ display: 'flex', gap: 0.25 }}>
|
||||||
|
|
@ -492,7 +491,7 @@ export default function DictionaryPage(): React.ReactElement {
|
||||||
fullWidth
|
fullWidth
|
||||||
PaperProps={{ sx: { bgcolor: 'var(--d3-bg-card)', border: '1px solid var(--d3-border-default)', borderRadius: '16px', p: 1 } }}
|
PaperProps={{ sx: { bgcolor: 'var(--d3-bg-card)', border: '1px solid var(--d3-border-default)', borderRadius: '16px', p: 1 } }}
|
||||||
>
|
>
|
||||||
<DialogTitle sx={{ color: 'var(--d3-text-inverse)', fontWeight: 500 }}>{editing ? '단어 편집' : '새 단어 추가'}</DialogTitle>
|
<DialogTitle sx={{ color: 'var(--d3-text-primary)', fontWeight: 500 }}>{editing ? '단어 편집' : '새 단어 추가'}</DialogTitle>
|
||||||
<DialogContent sx={{ display: 'flex', flexDirection: 'column', gap: 2, pt: 1 }}>
|
<DialogContent sx={{ display: 'flex', flexDirection: 'column', gap: 2, pt: 1 }}>
|
||||||
<TextField
|
<TextField
|
||||||
label="단어"
|
label="단어"
|
||||||
|
|
|
||||||
|
|
@ -205,7 +205,7 @@ export default function HistoryDetailPage(): React.ReactElement {
|
||||||
<Stack spacing={3}>
|
<Stack spacing={3}>
|
||||||
<Box sx={{ display: 'flex', justifyContent: 'space-between', alignItems: 'flex-start', gap: 2 }}>
|
<Box sx={{ display: 'flex', justifyContent: 'space-between', alignItems: 'flex-start', gap: 2 }}>
|
||||||
<Box>
|
<Box>
|
||||||
<PhosphorText variant="title">TRANSCRIPTION DETAIL</PhosphorText>
|
<PhosphorText variant="title" component="h1">TRANSCRIPTION DETAIL</PhosphorText>
|
||||||
<Typography sx={{ mt: 1, color: d3roPalette.text.muted, fontFamily: d3roFontMono, fontSize: 12 }}>
|
<Typography sx={{ mt: 1, color: d3roPalette.text.muted, fontFamily: d3roFontMono, fontSize: 12 }}>
|
||||||
{new Date(entry.created_at).toLocaleString('ko-KR')} · REV {entry.revision}
|
{new Date(entry.created_at).toLocaleString('ko-KR')} · REV {entry.revision}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
@ -313,8 +313,8 @@ export default function HistoryDetailPage(): React.ReactElement {
|
||||||
function HistoryField({ label, children }: { label: string; children: React.ReactNode }): React.ReactElement {
|
function HistoryField({ label, children }: { label: string; children: React.ReactNode }): React.ReactElement {
|
||||||
return (
|
return (
|
||||||
<Box>
|
<Box>
|
||||||
<Typography component="h2" sx={{ mb: 1, color: d3roPalette.text.muted, fontFamily: d3roFontMono, fontSize: 11, letterSpacing: 1.5 }}>
|
<Typography component="h2" sx={{ mb: 1, color: d3roPalette.text.muted, fontSize: 11, fontWeight: 500, letterSpacing: 0 }}>
|
||||||
{label.toUpperCase()}
|
{label}
|
||||||
</Typography>
|
</Typography>
|
||||||
{children}
|
{children}
|
||||||
</Box>
|
</Box>
|
||||||
|
|
@ -324,7 +324,7 @@ function HistoryField({ label, children }: { label: string; children: React.Reac
|
||||||
function Metadata({ label, value }: { label: string; value: string }): React.ReactElement {
|
function Metadata({ label, value }: { label: string; value: string }): React.ReactElement {
|
||||||
return (
|
return (
|
||||||
<Box sx={{ p: 1.5, bgcolor: d3roPalette.bg.inset, borderRadius: 1 }}>
|
<Box sx={{ p: 1.5, bgcolor: d3roPalette.bg.inset, borderRadius: 1 }}>
|
||||||
<Typography sx={{ color: d3roPalette.text.muted, fontFamily: d3roFontMono, fontSize: 10 }}>{label}</Typography>
|
<Typography sx={{ color: d3roPalette.text.muted, fontSize: 11, fontWeight: 500 }}>{label}</Typography>
|
||||||
<Typography sx={{ mt: 0.5, color: d3roPalette.text.primary, fontSize: 13, overflowWrap: 'anywhere' }}>{value}</Typography>
|
<Typography sx={{ mt: 0.5, color: d3roPalette.text.primary, fontSize: 13, overflowWrap: 'anywhere' }}>{value}</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -245,7 +245,7 @@ export default function HistoryPage(): React.ReactElement {
|
||||||
return (
|
return (
|
||||||
<Box sx={{ maxWidth: 1080, mx: 'auto', p: { xs: 2.5, md: 4 }, pt: 4, pb: 10 }}>
|
<Box sx={{ maxWidth: 1080, mx: 'auto', p: { xs: 2.5, md: 4 }, pt: 4, pb: 10 }}>
|
||||||
<Box sx={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', mb: 3 }}>
|
<Box sx={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', mb: 3 }}>
|
||||||
<PhosphorText variant="title">TRANSCRIPTION HISTORY</PhosphorText>
|
<PhosphorText variant="title" component="h1">TRANSCRIPTION HISTORY</PhosphorText>
|
||||||
<PhosphorText variant="meta" sx={{ color: d3roPalette.text.dimLabel }}>
|
<PhosphorText variant="meta" sx={{ color: d3roPalette.text.dimLabel }}>
|
||||||
{items.length}{nextCursor ? '+' : ''} ENTRIES
|
{items.length}{nextCursor ? '+' : ''} ENTRIES
|
||||||
</PhosphorText>
|
</PhosphorText>
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ export default async function KnowledgePage(): Promise<React.ReactElement> {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box sx={{ p: 4 }}>
|
<Box sx={{ p: 4 }}>
|
||||||
<PhosphorText variant="title" sx={{ mb: 1 }}>
|
<PhosphorText variant="title" component="h1" sx={{ mb: 1, display: 'block' }}>
|
||||||
KNOWLEDGE
|
KNOWLEDGE
|
||||||
</PhosphorText>
|
</PhosphorText>
|
||||||
<Box sx={{ color: d3roPalette.text.muted, fontSize: 13, mb: 4 }}>
|
<Box sx={{ color: d3roPalette.text.muted, fontSize: 13, mb: 4 }}>
|
||||||
|
|
@ -77,9 +77,9 @@ export default async function KnowledgePage(): Promise<React.ReactElement> {
|
||||||
px: 1.5,
|
px: 1.5,
|
||||||
py: 0.5,
|
py: 0.5,
|
||||||
borderRadius: 1,
|
borderRadius: 1,
|
||||||
fontSize: 10,
|
fontSize: 11,
|
||||||
letterSpacing: '1px',
|
fontWeight: 500,
|
||||||
textTransform: 'uppercase',
|
letterSpacing: 0,
|
||||||
bgcolor: doc.indexed ? d3roPalette.tag.greenBg : d3roPalette.tag.orangeBg,
|
bgcolor: doc.indexed ? d3roPalette.tag.greenBg : d3roPalette.tag.orangeBg,
|
||||||
color: doc.indexed ? d3roPalette.tag.green : d3roPalette.tag.orange
|
color: doc.indexed ? d3roPalette.tag.green : d3roPalette.tag.orange
|
||||||
}}
|
}}
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ export default async function MeetingDetailPage({ params }: PageProps): Promise<
|
||||||
return (
|
return (
|
||||||
<Box sx={{ p: 4 }}>
|
<Box sx={{ p: 4 }}>
|
||||||
<Box sx={{ mb: 4 }}>
|
<Box sx={{ mb: 4 }}>
|
||||||
<PhosphorText variant="title">
|
<PhosphorText variant="title" component="h1">
|
||||||
{meeting.title ?? '(제목 없음)'}
|
{meeting.title ?? '(제목 없음)'}
|
||||||
</PhosphorText>
|
</PhosphorText>
|
||||||
<Box sx={{ color: d3roPalette.text.muted, fontSize: 12, mt: 1 }}>
|
<Box sx={{ color: d3roPalette.text.muted, fontSize: 12, mt: 1 }}>
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ export default async function MeetingsPage(): Promise<React.ReactElement> {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box sx={{ p: 4 }}>
|
<Box sx={{ p: 4 }}>
|
||||||
<PhosphorText variant="title" sx={{ mb: 4 }}>
|
<PhosphorText variant="title" component="h1" sx={{ mb: 4, display: 'block' }}>
|
||||||
MEETINGS
|
MEETINGS
|
||||||
</PhosphorText>
|
</PhosphorText>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
// apps/web/src/app/(app)/record/page.tsx
|
// apps/web/src/app/(app)/record/page.tsx
|
||||||
// D3RO-VOICE 실시간 음성 녹음 페이지
|
// D3RO-VOICE 실시간 음성 녹음 페이지
|
||||||
|
|
||||||
import { Box } from '@mui/material'
|
import { Box } from '@mui/material'
|
||||||
|
|
@ -9,7 +9,7 @@ export default function RecordPage(): React.ReactElement {
|
||||||
return (
|
return (
|
||||||
<Box sx={{ maxWidth: 1080, mx: 'auto', p: { xs: 2.5, md: 4 }, pt: 4, pb: 10 }}>
|
<Box sx={{ maxWidth: 1080, mx: 'auto', p: { xs: 2.5, md: 4 }, pt: 4, pb: 10 }}>
|
||||||
<Box sx={{ mb: 4 }}>
|
<Box sx={{ mb: 4 }}>
|
||||||
<PhosphorText variant="title">
|
<PhosphorText variant="title" component="h1">
|
||||||
REAL-TIME VOICE RECORDER
|
REAL-TIME VOICE RECORDER
|
||||||
</PhosphorText>
|
</PhosphorText>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ export default async function TeamDetailPage({ params }: PageProps): Promise<Rea
|
||||||
return (
|
return (
|
||||||
<Box sx={{ p: 4 }}>
|
<Box sx={{ p: 4 }}>
|
||||||
<Box sx={{ mb: 4 }}>
|
<Box sx={{ mb: 4 }}>
|
||||||
<PhosphorText variant="title">{teamData.name}</PhosphorText>
|
<PhosphorText variant="title" component="h1">{teamData.name}</PhosphorText>
|
||||||
<Box sx={{ color: d3roPalette.text.muted, fontSize: 12, mt: 1 }}>
|
<Box sx={{ color: d3roPalette.text.muted, fontSize: 12, mt: 1 }}>
|
||||||
생성 {new Date(teamData.created_at).toLocaleDateString('ko-KR')}
|
생성 {new Date(teamData.created_at).toLocaleDateString('ko-KR')}
|
||||||
</Box>
|
</Box>
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ export default async function TeamsPage(): Promise<React.ReactElement> {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box sx={{ p: 4 }}>
|
<Box sx={{ p: 4 }}>
|
||||||
<PhosphorText variant="title" sx={{ mb: 4 }}>
|
<PhosphorText variant="title" component="h1" sx={{ mb: 4, display: 'block' }}>
|
||||||
TEAMS
|
TEAMS
|
||||||
</PhosphorText>
|
</PhosphorText>
|
||||||
|
|
||||||
|
|
@ -75,7 +75,8 @@ export default async function TeamsPage(): Promise<React.ReactElement> {
|
||||||
px: 1.5,
|
px: 1.5,
|
||||||
py: 0.5,
|
py: 0.5,
|
||||||
borderRadius: 1,
|
borderRadius: 1,
|
||||||
fontSize: 10,
|
fontSize: 11,
|
||||||
|
fontWeight: 500,
|
||||||
bgcolor:
|
bgcolor:
|
||||||
team.role === 'owner'
|
team.role === 'owner'
|
||||||
? d3roPalette.tag.purpleBg
|
? d3roPalette.tag.purpleBg
|
||||||
|
|
@ -88,11 +89,10 @@ export default async function TeamsPage(): Promise<React.ReactElement> {
|
||||||
: team.role === 'admin'
|
: team.role === 'admin'
|
||||||
? d3roPalette.tag.orange
|
? d3roPalette.tag.orange
|
||||||
: d3roPalette.tag.green,
|
: d3roPalette.tag.green,
|
||||||
textTransform: 'uppercase',
|
letterSpacing: 0
|
||||||
letterSpacing: '1px'
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{team.role}
|
{team.role.toUpperCase()}
|
||||||
</Box>
|
</Box>
|
||||||
</MetalCard>
|
</MetalCard>
|
||||||
</Link>
|
</Link>
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
import { useRouter } from 'next/navigation'
|
import { useRouter } from 'next/navigation'
|
||||||
import { useEffect, useState } from 'react'
|
import { useEffect, useState } from 'react'
|
||||||
import { d3roPalette } from '@d3ro/ui/theme'
|
import { d3roFontMono, d3roFontSans, d3roFocusRing, d3roPalette } from '@d3ro/ui/theme'
|
||||||
import { Box, Stack, Alert } from '@mui/material'
|
import { Box, Stack, Alert } from '@mui/material'
|
||||||
import { useI18n } from '@d3ro/i18n'
|
import { useI18n } from '@d3ro/i18n'
|
||||||
import { getSupabaseBrowserClient, isSupabaseConfigured } from '@/lib/supabase-browser'
|
import { getSupabaseBrowserClient, isSupabaseConfigured } from '@/lib/supabase-browser'
|
||||||
|
|
@ -95,7 +95,7 @@ export default function LoginPage(): React.ReactElement {
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
bgcolor: d3roPalette.bg.app,
|
bgcolor: d3roPalette.bg.app,
|
||||||
p: 2,
|
p: 2,
|
||||||
fontFamily: '"Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif'
|
fontFamily: d3roFontSans
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Box
|
<Box
|
||||||
|
|
@ -143,10 +143,9 @@ export default function LoginPage(): React.ReactElement {
|
||||||
m: 0,
|
m: 0,
|
||||||
fontSize: '22px',
|
fontSize: '22px',
|
||||||
fontWeight: 500,
|
fontWeight: 500,
|
||||||
fontFamily: 'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace',
|
fontFamily: d3roFontMono,
|
||||||
letterSpacing: '0.25em',
|
letterSpacing: '0.02em',
|
||||||
color: d3roPalette.text.primary,
|
color: d3roPalette.text.primary
|
||||||
textIndent: '0.25em'
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
D3RO-VOICE
|
D3RO-VOICE
|
||||||
|
|
@ -154,11 +153,10 @@ export default function LoginPage(): React.ReactElement {
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
mt: 1,
|
mt: 1,
|
||||||
fontSize: '9px',
|
fontSize: '11px',
|
||||||
fontFamily: 'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace',
|
fontFamily: d3roFontSans,
|
||||||
letterSpacing: '0.18em',
|
letterSpacing: 0,
|
||||||
color: d3roPalette.text.label,
|
color: d3roPalette.text.label
|
||||||
textTransform: 'uppercase'
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('login.subtitle') ?? 'Precision Voice Intelligence'}
|
{t('login.subtitle') ?? 'Precision Voice Intelligence'}
|
||||||
|
|
@ -300,10 +298,10 @@ export default function LoginPage(): React.ReactElement {
|
||||||
<Box sx={{ flex: 1, height: '1px', bgcolor: d3roPalette.border.default }} />
|
<Box sx={{ flex: 1, height: '1px', bgcolor: d3roPalette.border.default }} />
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
fontSize: '10px',
|
fontSize: '11px',
|
||||||
fontFamily: 'ui-monospace, monospace',
|
fontFamily: d3roFontSans,
|
||||||
color: d3roPalette.text.label,
|
color: d3roPalette.text.label,
|
||||||
letterSpacing: '0.1em'
|
letterSpacing: 0
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('login.or') ?? '또는'}
|
{t('login.or') ?? '또는'}
|
||||||
|
|
@ -317,11 +315,12 @@ export default function LoginPage(): React.ReactElement {
|
||||||
<Box>
|
<Box>
|
||||||
<Box
|
<Box
|
||||||
component="label"
|
component="label"
|
||||||
|
htmlFor="login-email"
|
||||||
sx={{
|
sx={{
|
||||||
display: 'block',
|
display: 'block',
|
||||||
fontSize: '10px',
|
fontSize: '11px',
|
||||||
fontFamily: 'ui-monospace, monospace',
|
fontFamily: d3roFontMono,
|
||||||
letterSpacing: '0.15em',
|
letterSpacing: 0,
|
||||||
color: d3roPalette.text.label,
|
color: d3roPalette.text.label,
|
||||||
mb: 0.75,
|
mb: 0.75,
|
||||||
pl: 0.5
|
pl: 0.5
|
||||||
|
|
@ -330,6 +329,7 @@ export default function LoginPage(): React.ReactElement {
|
||||||
EMAIL
|
EMAIL
|
||||||
</Box>
|
</Box>
|
||||||
<Box
|
<Box
|
||||||
|
id="login-email"
|
||||||
component="input"
|
component="input"
|
||||||
type="email"
|
type="email"
|
||||||
required
|
required
|
||||||
|
|
@ -345,12 +345,12 @@ export default function LoginPage(): React.ReactElement {
|
||||||
px: 2,
|
px: 2,
|
||||||
fontSize: '14px',
|
fontSize: '14px',
|
||||||
color: d3roPalette.text.primary,
|
color: d3roPalette.text.primary,
|
||||||
outline: 'none',
|
|
||||||
boxSizing: 'border-box',
|
boxSizing: 'border-box',
|
||||||
transition: 'border-color 0.15s ease',
|
transition: 'border-color 0.15s ease',
|
||||||
'&:focus': {
|
'&:focus': {
|
||||||
borderColor: d3roPalette.accent.main
|
borderColor: d3roPalette.accent.main
|
||||||
},
|
},
|
||||||
|
'&:focus-visible': d3roFocusRing,
|
||||||
'&::placeholder': {
|
'&::placeholder': {
|
||||||
color: 'color-mix(in srgb, var(--d3-text-label) 40%, transparent)'
|
color: 'color-mix(in srgb, var(--d3-text-label) 40%, transparent)'
|
||||||
}
|
}
|
||||||
|
|
@ -361,11 +361,12 @@ export default function LoginPage(): React.ReactElement {
|
||||||
<Box>
|
<Box>
|
||||||
<Box
|
<Box
|
||||||
component="label"
|
component="label"
|
||||||
|
htmlFor="login-password"
|
||||||
sx={{
|
sx={{
|
||||||
display: 'block',
|
display: 'block',
|
||||||
fontSize: '10px',
|
fontSize: '11px',
|
||||||
fontFamily: 'ui-monospace, monospace',
|
fontFamily: d3roFontMono,
|
||||||
letterSpacing: '0.15em',
|
letterSpacing: 0,
|
||||||
color: d3roPalette.text.label,
|
color: d3roPalette.text.label,
|
||||||
mb: 0.75,
|
mb: 0.75,
|
||||||
pl: 0.5
|
pl: 0.5
|
||||||
|
|
@ -374,6 +375,7 @@ export default function LoginPage(): React.ReactElement {
|
||||||
PASSWORD
|
PASSWORD
|
||||||
</Box>
|
</Box>
|
||||||
<Box
|
<Box
|
||||||
|
id="login-password"
|
||||||
component="input"
|
component="input"
|
||||||
type="password"
|
type="password"
|
||||||
required
|
required
|
||||||
|
|
@ -389,12 +391,12 @@ export default function LoginPage(): React.ReactElement {
|
||||||
px: 2,
|
px: 2,
|
||||||
fontSize: '14px',
|
fontSize: '14px',
|
||||||
color: d3roPalette.text.primary,
|
color: d3roPalette.text.primary,
|
||||||
outline: 'none',
|
|
||||||
boxSizing: 'border-box',
|
boxSizing: 'border-box',
|
||||||
transition: 'border-color 0.15s ease',
|
transition: 'border-color 0.15s ease',
|
||||||
'&:focus': {
|
'&:focus': {
|
||||||
borderColor: d3roPalette.accent.main
|
borderColor: d3roPalette.accent.main
|
||||||
},
|
},
|
||||||
|
'&:focus-visible': d3roFocusRing,
|
||||||
'&::placeholder': {
|
'&::placeholder': {
|
||||||
color: 'color-mix(in srgb, var(--d3-text-label) 40%, transparent)'
|
color: 'color-mix(in srgb, var(--d3-text-label) 40%, transparent)'
|
||||||
}
|
}
|
||||||
|
|
@ -403,28 +405,27 @@ export default function LoginPage(): React.ReactElement {
|
||||||
</Box>
|
</Box>
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|
||||||
{/* Primary Orange CTA Button */}
|
{/* Primary CTA Button */}
|
||||||
<Box
|
<Box
|
||||||
component="button"
|
component="button"
|
||||||
type="submit"
|
type="submit"
|
||||||
disabled={signingIn}
|
disabled={signingIn}
|
||||||
sx={{
|
sx={{
|
||||||
width: '100%',
|
width: '100%',
|
||||||
bgcolor: d3roPalette.accent.main,
|
bgcolor: d3roPalette.accent.solid,
|
||||||
border: 'none',
|
border: 'none',
|
||||||
borderRadius: '12px',
|
borderRadius: '12px',
|
||||||
py: 1.75,
|
py: 1.75,
|
||||||
fontSize: '14px',
|
fontSize: '14px',
|
||||||
fontWeight: 500,
|
fontWeight: 500,
|
||||||
letterSpacing: '0.05em',
|
letterSpacing: 0,
|
||||||
color: d3roPalette.bg.app,
|
color: d3roPalette.accent.ink,
|
||||||
cursor: signingIn ? 'not-allowed' : 'pointer',
|
cursor: signingIn ? 'not-allowed' : 'pointer',
|
||||||
boxShadow: '0 0 25px var(--d3-accent-glow)',
|
|
||||||
transition: 'all 0.15s ease',
|
transition: 'all 0.15s ease',
|
||||||
'&:hover': {
|
'&:hover': {
|
||||||
filter: 'brightness(1.08)',
|
bgcolor: d3roPalette.accent.solidHover
|
||||||
boxShadow: '0 0 30px var(--d3-accent-glow)'
|
|
||||||
},
|
},
|
||||||
|
'&:focus-visible': d3roFocusRing,
|
||||||
'&:active': {
|
'&:active': {
|
||||||
transform: 'scale(0.99)'
|
transform: 'scale(0.99)'
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -218,7 +218,7 @@ export function ActionRunner(): React.ReactElement {
|
||||||
sx={{
|
sx={{
|
||||||
bgcolor: d3roPalette.tag.purpleBg,
|
bgcolor: d3roPalette.tag.purpleBg,
|
||||||
color: d3roPalette.tag.purple,
|
color: d3roPalette.tag.purple,
|
||||||
fontFamily: 'monospace'
|
fontFamily: 'var(--d3-font-mono)'
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
|
||||||
|
|
@ -209,7 +209,7 @@ export function ChatPanel(): React.ReactElement {
|
||||||
sx={{
|
sx={{
|
||||||
fontFamily: d3roFontMono,
|
fontFamily: d3roFontMono,
|
||||||
fontSize: '11px',
|
fontSize: '11px',
|
||||||
letterSpacing: '0.2em',
|
letterSpacing: 0,
|
||||||
fontWeight: 500,
|
fontWeight: 500,
|
||||||
color: 'var(--d3-text-label)'
|
color: 'var(--d3-text-label)'
|
||||||
}}
|
}}
|
||||||
|
|
@ -232,7 +232,7 @@ export function ChatPanel(): React.ReactElement {
|
||||||
animation: 'pulse 1s infinite'
|
animation: 'pulse 1s infinite'
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<IconButton size="small" onClick={() => setMessages([])} sx={{ color: 'var(--d3-text-label)', ml: 1 }}>
|
<IconButton aria-label="대화 초기화" size="small" onClick={() => setMessages([])} sx={{ color: 'var(--d3-text-label)', ml: 1 }}>
|
||||||
<Trash2 size={15} />
|
<Trash2 size={15} />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
@ -282,7 +282,7 @@ export function ChatPanel(): React.ReactElement {
|
||||||
<Typography
|
<Typography
|
||||||
sx={{
|
sx={{
|
||||||
fontFamily: d3roFontMono,
|
fontFamily: d3roFontMono,
|
||||||
fontSize: '9px',
|
fontSize: '11px',
|
||||||
color: 'var(--d3-text-label)',
|
color: 'var(--d3-text-label)',
|
||||||
mt: 0.5,
|
mt: 0.5,
|
||||||
textAlign: msg.role === 'user' ? 'right' : 'left',
|
textAlign: msg.role === 'user' ? 'right' : 'left',
|
||||||
|
|
@ -319,11 +319,15 @@ export function ChatPanel(): React.ReactElement {
|
||||||
borderRadius: '14px',
|
borderRadius: '14px',
|
||||||
border: '1px solid var(--d3-border-default)',
|
border: '1px solid var(--d3-border-default)',
|
||||||
p: 1,
|
p: 1,
|
||||||
gap: 1
|
gap: 1,
|
||||||
|
'&:focus-within': {
|
||||||
|
borderColor: 'var(--d3-accent-main)'
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
|
aria-label="메시지 입력"
|
||||||
value={input}
|
value={input}
|
||||||
onChange={(e) => setInput(e.target.value)}
|
onChange={(e) => setInput(e.target.value)}
|
||||||
onKeyDown={(e) => {
|
onKeyDown={(e) => {
|
||||||
|
|
@ -337,13 +341,13 @@ export function ChatPanel(): React.ReactElement {
|
||||||
flex: 1,
|
flex: 1,
|
||||||
background: 'transparent',
|
background: 'transparent',
|
||||||
border: 'none',
|
border: 'none',
|
||||||
outline: 'none',
|
|
||||||
color: 'var(--d3-text-secondary)',
|
color: 'var(--d3-text-secondary)',
|
||||||
fontSize: '14px',
|
fontSize: '14px',
|
||||||
paddingLeft: '12px'
|
paddingLeft: '12px'
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<IconButton
|
<IconButton
|
||||||
|
aria-label="메시지 보내기"
|
||||||
onClick={() => void handleSend()}
|
onClick={() => void handleSend()}
|
||||||
disabled={busy || !input.trim()}
|
disabled={busy || !input.trim()}
|
||||||
sx={{
|
sx={{
|
||||||
|
|
@ -351,7 +355,7 @@ export function ChatPanel(): React.ReactElement {
|
||||||
height: 36,
|
height: 36,
|
||||||
bgcolor: 'var(--d3-accent-glow)',
|
bgcolor: 'var(--d3-accent-glow)',
|
||||||
color: 'var(--d3-accent-main)',
|
color: 'var(--d3-accent-main)',
|
||||||
'&:hover': { bgcolor: 'var(--d3-accent-main)', color: 'var(--d3-text-inverse)' }
|
'&:hover': { bgcolor: 'var(--d3-accent-solid)', color: 'var(--d3-accent-ink)' }
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Send size={16} />
|
<Send size={16} />
|
||||||
|
|
@ -361,11 +365,11 @@ export function ChatPanel(): React.ReactElement {
|
||||||
<Box sx={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', mt: 1.5, px: 1 }}>
|
<Box sx={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', mt: 1.5, px: 1 }}>
|
||||||
<Box sx={{ display: 'flex', alignItems: 'center', gap: 1 }}>
|
<Box sx={{ display: 'flex', alignItems: 'center', gap: 1 }}>
|
||||||
<Box sx={{ width: 6, height: 6, borderRadius: '50%', bgcolor: 'var(--d3-tag-green)', boxShadow: '0 0 5px var(--d3-tag-green)' }} />
|
<Box sx={{ width: 6, height: 6, borderRadius: '50%', bgcolor: 'var(--d3-tag-green)', boxShadow: '0 0 5px var(--d3-tag-green)' }} />
|
||||||
<Typography sx={{ fontFamily: d3roFontMono, fontSize: '9px', color: 'var(--d3-text-label)' }}>
|
<Typography sx={{ fontFamily: d3roFontMono, fontSize: '11px', color: 'var(--d3-text-label)' }}>
|
||||||
CLOUD CLAUDE
|
CLOUD CLAUDE
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
<Typography sx={{ fontFamily: d3roFontMono, fontSize: '9px', color: 'var(--d3-text-label)', opacity: 0.5 }}>
|
<Typography sx={{ fontFamily: d3roFontMono, fontSize: '11px', color: 'var(--d3-text-label)', opacity: 0.5 }}>
|
||||||
PRECISION DATA LINK
|
PRECISION DATA LINK
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
|
||||||
|
|
@ -115,7 +115,8 @@ export function KnowledgeSearch(): React.ReactElement {
|
||||||
borderRadius: 0.5,
|
borderRadius: 0.5,
|
||||||
bgcolor: d3roPalette.tag.greenBg,
|
bgcolor: d3roPalette.tag.greenBg,
|
||||||
color: d3roPalette.tag.green,
|
color: d3roPalette.tag.green,
|
||||||
fontSize: 10
|
fontSize: 11,
|
||||||
|
fontVariantNumeric: 'tabular-nums'
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{Math.round(r.similarity * 100)}%
|
{Math.round(r.similarity * 100)}%
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
'use client'
|
'use client'
|
||||||
|
|
||||||
// apps/web/src/components/layout/sidebar.tsx
|
// apps/web/src/components/layout/sidebar.tsx
|
||||||
// D3RO VOICE 대시보드 좌측 사이드바 — 정본 네비게이션
|
// D3RO VOICE 대시보드 좌측 사이드바 — 정본 네비게이션
|
||||||
|
|
@ -134,11 +134,11 @@ export function Sidebar(): React.ReactElement {
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
<PhosphorText variant="heading" sx={{ letterSpacing: '0.1em' }}>
|
<PhosphorText variant="heading">
|
||||||
D3RO VOICE
|
D3RO VOICE
|
||||||
</PhosphorText>
|
</PhosphorText>
|
||||||
</Box>
|
</Box>
|
||||||
<Box sx={{ fontSize: '10px', fontFamily: 'ui-monospace, monospace', color: d3roPalette.text.muted }}>
|
<Box sx={{ fontSize: '11px', fontFamily: 'var(--d3-font-mono)', color: d3roPalette.text.muted }}>
|
||||||
v1.11.0
|
v1.11.0
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
|
||||||
|
|
@ -121,7 +121,7 @@ export function DocumentEditor({ doc }: DocumentEditorProps): React.ReactElement
|
||||||
placeholder="제목"
|
placeholder="제목"
|
||||||
sx={{ flex: 1, mr: 2 }}
|
sx={{ flex: 1, mr: 2 }}
|
||||||
/>
|
/>
|
||||||
<IconButton onClick={() => setOpen(false)} size="small">
|
<IconButton aria-label="닫기" onClick={() => setOpen(false)} size="small">
|
||||||
<CloseIcon />
|
<CloseIcon />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|
@ -153,7 +153,7 @@ export function DocumentEditor({ doc }: DocumentEditorProps): React.ReactElement
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
slotProps={{
|
slotProps={{
|
||||||
input: {
|
input: {
|
||||||
style: { fontFamily: 'monospace', fontSize: 13 }
|
style: { fontFamily: 'var(--d3-font-mono)', fontSize: 13 }
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,8 @@ export function LiveTranscriptList({
|
||||||
borderRadius: 0.5,
|
borderRadius: 0.5,
|
||||||
bgcolor: d3roPalette.tag.orangeBg,
|
bgcolor: d3roPalette.tag.orangeBg,
|
||||||
color: d3roPalette.tag.orange,
|
color: d3roPalette.tag.orange,
|
||||||
fontSize: 9
|
fontSize: 11,
|
||||||
|
fontWeight: 500
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
EDITED
|
EDITED
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,7 @@ export function MemoForm({ meetingId, meetingStartedAt }: MemoFormProps): React.
|
||||||
{error}
|
{error}
|
||||||
</Alert>
|
</Alert>
|
||||||
)}
|
)}
|
||||||
<Box sx={{ color: d3roPalette.text.muted, fontSize: 10, mt: 0.5 }}>
|
<Box sx={{ color: d3roPalette.text.muted, fontSize: 11, mt: 0.5 }}>
|
||||||
회의 시작 후 경과 시간으로 timestamp_ms가 자동 계산됩니다.
|
회의 시작 후 경과 시간으로 timestamp_ms가 자동 계산됩니다.
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
|
||||||
|
|
@ -243,7 +243,7 @@ export function MicRecorder(): React.ReactElement {
|
||||||
sx={{
|
sx={{
|
||||||
fontFamily: d3roFontMono,
|
fontFamily: d3roFontMono,
|
||||||
fontSize: '11px',
|
fontSize: '11px',
|
||||||
letterSpacing: '0.2em',
|
letterSpacing: 0,
|
||||||
fontWeight: 500,
|
fontWeight: 500,
|
||||||
color: state === 'recording' ? 'var(--d3-accent-main)' : 'var(--d3-text-label)'
|
color: state === 'recording' ? 'var(--d3-accent-main)' : 'var(--d3-text-label)'
|
||||||
}}
|
}}
|
||||||
|
|
@ -376,9 +376,9 @@ export function MicRecorder(): React.ReactElement {
|
||||||
<Typography
|
<Typography
|
||||||
sx={{
|
sx={{
|
||||||
fontFamily: d3roFontMono,
|
fontFamily: d3roFontMono,
|
||||||
fontSize: '10px',
|
fontSize: '11px',
|
||||||
color: state === 'recording' ? 'var(--d3-accent-main)' : 'var(--d3-text-label)',
|
color: state === 'recording' ? 'var(--d3-accent-main)' : 'var(--d3-text-label)',
|
||||||
letterSpacing: '0.1em'
|
letterSpacing: 0
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{state === 'recording' ? 'LISTENING_' : 'STANDBY'}
|
{state === 'recording' ? 'LISTENING_' : 'STANDBY'}
|
||||||
|
|
@ -424,9 +424,9 @@ export function MicRecorder(): React.ReactElement {
|
||||||
<Typography
|
<Typography
|
||||||
sx={{
|
sx={{
|
||||||
fontFamily: d3roFontMono,
|
fontFamily: d3roFontMono,
|
||||||
fontSize: '9px',
|
fontSize: '11px',
|
||||||
color: 'var(--d3-text-label)',
|
color: 'var(--d3-text-label)',
|
||||||
letterSpacing: '0.15em',
|
letterSpacing: 0,
|
||||||
opacity: 0.6
|
opacity: 0.6
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|
|
||||||
27
design.md
27
design.md
|
|
@ -351,3 +351,30 @@
|
||||||
통합 검색 자체는 아직 부분 완료다. 데스크톱은 소스와 자동 테스트까지만 확인했고 Electron에서 `Ctrl+K`·결과 이동을
|
통합 검색 자체는 아직 부분 완료다. 데스크톱은 소스와 자동 테스트까지만 확인했고 Electron에서 `Ctrl+K`·결과 이동을
|
||||||
수동으로 실행한 증거가 없다. 별도 `transcripts` 구간 검색도 없고, 모바일은 검색 때 원문 필드를 과전송하며 실행된 요청을
|
수동으로 실행한 증거가 없다. 별도 `transcripts` 구간 검색도 없고, 모바일은 검색 때 원문 필드를 과전송하며 실행된 요청을
|
||||||
취소하지 않는다. 어느 표면도 FTS/index 또는 실제 대규모 데이터 성능을 증명하지 않았다.
|
취소하지 않는다. 어느 표면도 FTS/index 또는 실제 대규모 데이터 성능을 증명하지 않았다.
|
||||||
|
|
||||||
|
### 2026-10-28 추기 · 물결 ⑥ 전 표면 디자인파카(designpaca) 순회 감사 및 정합성 보정
|
||||||
|
- **공통 UI·토큰 게이트 (`packages/ui`, `scripts/ci/check-design-tokens.mjs`)**:
|
||||||
|
- `packages/ui/src/components/ds/InstrumentPanel.tsx`: 잔존하던 `backdropFilter` 블러·`sheen`·`borderGradient` 마스크·`textTransform: 'uppercase'`를 걷어내 평면 표면 계약으로 통일했다.
|
||||||
|
- `packages/ui/src/components/ds/SegmentControl.tsx`: 배지 최소 글자 크기를 `10px`→`11px`(`tabular-nums`)로 올렸다.
|
||||||
|
- `packages/ui/src/theme-raw.ts`: `buildCssVars()`에 `--d3-text-inverse: r.accent.ink` 폴백을 추가해 미정의 CSS 변수로 인한 투명/검정 글자 폴백을 막았다.
|
||||||
|
- `scripts/ci/check-design-tokens.mjs`: 원시 토큰 정의 파일(`packages/ui/src/theme-raw.ts`, `apps/desktop/src/renderer/popups/_shared/popup-base.css`)을 `ALLOWLIST`에 명시해 `npm run check:design`이 `design-token violations: 0`으로 통과하도록 고정했다.
|
||||||
|
- **웹 콘솔 (`apps/web`)**:
|
||||||
|
- 23개 페이지·컴포넌트 전반에서 미정의 `--d3-text-inverse`를 `--d3-accent-ink`로 교체하고, `10px` 이하 미세 글자(`0.6rem`/`0.65rem`/`9px`/`10px`)를 모두 `11px`(`0.6875rem`) 이상으로 올렸다.
|
||||||
|
- 한글·다국어 UI에 걸려 있던 `textTransform: 'uppercase'` 및 양수 자간(`letterSpacing: '0.04em'~'0.14em'`)을 `0`으로 정리하고, 단독 `'monospace'` 선언을 `var(--d3-font-mono)`(한글 산세리프 폴백 포함)로 교체했다.
|
||||||
|
- 모든 라우트 헤더(`dashboard`, `record`, `history`, `history/[id]`, `meetings`, `meetings/[id]`, `commands`, `dictionary`, `knowledge`, `teams`, `teams/[id]`, `chat`, `actions`, `billing`, `login`)에 단일 `component="h1"` 위계를 부여하고, 네이티브 `<input>`/`<select>`/`<textarea>`에 `:focus-visible` 링과 `<label htmlFor>`·아이콘 버튼 `aria-label`을 보강했다.
|
||||||
|
- **관리자 콘솔 (`apps/admin`)**:
|
||||||
|
- `apps/admin/src/lib/console-theme.ts`: 3차 텍스트 토큰 `C.dim`을 `#67789e`→`#7e8eb0`(어두운 카드 위 대비 4.94:1, WCAG AA 통과)으로 상향하고, `panelSx`·`innerCoreSx`·`filterBtnSx`·`statusBadgeSx`·`primaryButtonSx`의 블러·그라디언트·과장된 그림자·`uppercase`·양수 자간을 평면 표면 문법으로 정리했다.
|
||||||
|
- `admin-sidebar.tsx`·`ads`·`releases`·`subscriptions`·`usage`·`users`·`login`에서 전경과 배경에 동일 토큰(`--d3-status-successBg`, `--d3-status-dangerBg`, `--d3-tag-cyanBg`)을 써서 대비가 1.0:1로 무너지던 배지·호버 결함과 다이얼로그 `backdropFilter: 'blur(32px)'`를 제거했다.
|
||||||
|
- 사이드바 내비 항목에 키보드 접근성(`role="button"`, `tabIndex={0}`, `onKeyDown`)과 아이콘 버튼 `aria-label`을 추가했다.
|
||||||
|
- **데스크톱 렌더러·팝업 (`apps/desktop/src/renderer`)**:
|
||||||
|
- `EditableSegment.tsx`(`fontSize: 10`→`11`), `KeyBindingPicker.tsx`(`letterSpacing: 0`), `InputConsentPanel.tsx`(활성 배지 전경색 `d3roPalette.accent.main` 4.48:1 → `d3roPalette.accent.light` 6.96:1)를 보정했다.
|
||||||
|
- 팝업(`_shared/popup-base.css`, `suggestion-overlay/style.css`, `result-popup/index.html`, `suggestion-overlay/index.html`)에서 `:root` 폴백에 `--d3-accent-solid: #2563eb`·`--d3-accent-ink: #ffffff`를 추가해 복사 버튼 대비(3.68:1→5.17:1)를 확보하고, 제안 오버레이 강조 텍스트를 `var(--d3-accent-light)`(3.94:1→6.12:1)로 상향했으며 닫기 버튼 기본 `aria-label`을 부여했다.
|
||||||
|
- **마케팅·법무·초대 사이트 (`site/`)**:
|
||||||
|
- `Header.tsx`의 `backdrop-blur-xl`을 제거해 평면 헤더(`bg-surface-950`)로 통일하고, `AppLoopDemo.tsx` 창 컨트롤 기호 대비를 `text-neutral-500`(3.67:1)→`text-neutral-400`(6.1:1)으로 올렸다.
|
||||||
|
- `site/public/legal.css`에 `h1, h2, h3 { font-weight: 500 }` 및 `strong, b { font-weight: 600 }`를 명시해 브라우저 기본 `700` 폴백을 차단하고 `uppercase`·양수 자간을 제거했다.
|
||||||
|
- `site/public/accept-invite.css` 및 `accept-invite/{index.html,accept-invite.js}`에서 `--faint: #94a3b8`·`--accent: #2563eb`로 WCAG AA 대비를 맞추고, 반말 문구(`"확인해."`, `"완료돼."`, `"설치되지 않았어?"`, `"복사했어"`)를 해요체/명사형(`"확인합니다."`, `"완료됩니다."`, `"설치되지 않았나요?"`, `"복사됨"`)으로 통일했다.
|
||||||
|
- **모바일 (`apps/mobile-rn`)**:
|
||||||
|
- `SettingsScreen.tsx`(`fontSize: 8`→`11`, `letterSpacing: 0`), `FreeTierBanner.tsx`, `LoginScreen.tsx`, `MoreScreen.tsx`, `TalkScreen.tsx`의 양수 자간을 `0`으로 정리했다.
|
||||||
|
- **검증 증거**:
|
||||||
|
- `npm run check:design` (`design-token violations: 0`), `npm run check:desktop-renderer` (`7 page(s) with all assets on disk`), `npm run typecheck` 및 `npm --prefix apps/mobile-rn run typecheck`/`lint` 전부 0 에러.
|
||||||
|
- Playwright 헤드리스 Chromium(`scratch/browser-design-gate.mjs`) 실측: `site` 14개 경로(`ko`/`en`/`ja`/`zh`/`es`/`fr`/`de`/`pt`/`ru`/`vi` 홈 + `privacy`/`terms`/`delete-account`/`accept-invite`) + `desktop` 메인·설정 16개 경로(`home`, `records`, `meetings`, `conversation`, `commands`, `dictionary`, `knowledge`, `search`, `settings` 8탭) + `desktop` 팝업 6종(`recording-tip`, `result-popup`, `command-popup`, `history-popup`, `caption-overlay`, `suggestion-overlay`) **총 36/36 경로 PASS** (가로 오버플로 0건, H1 단일 위계 충족, WCAG AA 대비 미달 0건, `<11px` 텍스트 0건, `>=700` 웨이트 0건, `backdrop-filter` 블러 0건, 미라벨 버튼 0건).
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,9 @@
|
||||||
|
|
||||||
> Status: ACTIVE
|
> Status: ACTIVE
|
||||||
> Last full audit: 2026-09-13
|
> Last full audit: 2026-09-13
|
||||||
> Last update: 2026-10-27 — **v1.11.0 릴리스 + Araso 방식 한영 자동 변환·터미널/Vim/xterm.js 지원 완성 (`INPUT-19`, `GAP-INPUT-08`).** `nyttastudio/araso`를 분석해 `@d3ro/core/araso-layout` 및 `@d3ro/core/typo-correction`을 대폭 업그레이드하고 터미널·Vim·xterm.js(`Agent Switchboard`)까지 확장했다: 영어·약어·CamelCase+한국어 조사/단어 혼합어 분리(`githubdp`→`github에`, `PDFvkdlf`/`ㅖㅇㄹ파일`→`PDF파일`, `Reactzjavhsjsxm`→`React컴포넌트`, `dhsmfdmsgoogledptj`→`오늘은google에서`, `1:1ansdml`→`1:1문의`, 2글자 약어 받침 호응 `TMdms`→`TM은` vs `TMsms`→`쓰는`), 쌍자음 잔여 Shift 정규화(`djEJs`→`어떤`, `qkRNjTdj`→`바꿨어`), 한글 자판 상태 영어/혼합어 역변환(`ㅗ디ㅣㅐ 재깅`→`hello world`, `내ㅡㄷ샤ㅡㄷ`→`sometime`, `ㅎ샤ㅗㅕㅠ에`→`github에`, `ㅠㅕㅎ가`→`bug가`, 알파벳+조사 `ㄴ가`→`s가`, `ㄴ은`→`s은`), 문장 문맥 한영 전환(`Stay hungry, stay foolishsms wkqtmdml akfdlek.`), URL·경로·이메일 보호(`isUrlOrPathRun`), 터미널·Vim 명령(`:ㅈㅂ`→`:wq`, `:ㅂ!`→`:q!`, `퍄ㅡ `→`vim `, Vim 노멀 모드 교정 억제), `SendInput(KEYEVENTF_UNICODE)` 직접 유니코드 타이핑(클립보드 무접촉), 단어 경계(`25ms`)와 어절 내부(`650ms`) 유휴 분리 및 완성형 음절(`[가-힣]`) 한정 `commitComposition`으로 고속 타이핑 시 글자 삼킴·유령 공백·앞글자 중복을 완전히 해소했다. 통계 수집 동의(`inputTelemetryEnabled`)가 꺼져 있어도 기본 기능(`typoAutoCorrectEnabled: true`)으로 즉시 동작한다.
|
> Last update: 2026-10-28 — **v1.12.0 릴리스 + 한영 축약형·약어·오타 자동 교정 고도화(`INPUT-19`) + 전 표면 디자인파카(`designpaca`) 순회 감사(`SHELL-11`, `SHELL-15`).** (1) `@d3ro/core/typo-correction` 및 `TypoCorrectionService`를 확장해 영어 축약형·축약형+조사(`ㅊ무ㅅ`/`ㅊ무'ㅅ`/`ㅊ무ㅜ'ㅅ`→`can't`, `ㅊ무'ㅅ는`→`can't는`, `애ㅜ'ㅅ`→`don't`, `ㅑ'ㅡ`/`ㅑㅡ`→`I'm`, `재ㅜ'ㅅ`→`won't`), 문두 단독 `ㅑ `→`I `, 영어절 단음절 기능어(`새 애`→`to do`, `뭉`→`and`, `랙`→`for`, `소됴`→`they`, `생묘`→`today`), 일반 Araso 받침-조사 불일치 및 희소 어간 약어(`츤를`/`츤는`→`CMS를`/`CMS는`, `눈를`→`SNS를`, `운를`→`DNS를`, `긴를`→`RLS를`, `틔을`→`XML을`, `먀를`→`AI를`, `뗘를`→`EU를`, `쓰은`→`TM은`, `꾸은`→`RN은`, `띠이`→`EL이`, `꺼을`→`RJ을`, `ㅏㅅㅌ를`→`KTX를`, `ㅎㅅㅌ를`→`GTX를`), 1-편집 오타(`ㅗ디ㅐ`→`hello`, `ㅔㅐㄴ냐ㅠㅣ`→`possible`, `세갸ㅜㅎ`→`spring`, `ㅡㅁ가애주`→`markdown`, `help[`→`help`, `my self`→`myself`), 커서 꼬리 연쇄 구간(`MAX_FAST_DELETE_CHARS = 22`) 한정 고속 치환으로 타이핑 경합을 완전히 해소했다. (2) `packages/ui`, `apps/web`, `apps/admin`, `apps/desktop/src/renderer`(메인·팝업 6종), `site/`, `apps/mobile-rn` 6개 표면을 전수 순회해 `design.md` 계약 위반(WCAG AA 대비, `<11px` 미세 글자, `>=700` 굵기, 양수 자간, `uppercase`, 단독 `monospace`, `backdrop-filter` 블러, `h1` 위계 및 접근성 라벨)을 모두 해소했다 (`npm run check:design` 0건).
|
||||||
|
>
|
||||||
|
> Previous update: 2026-10-27 — **v1.11.0 릴리스 + Araso 방식 한영 자동 변환·터미널/Vim/xterm.js 지원 완성 (`INPUT-19`, `GAP-INPUT-08`).** `nyttastudio/araso`를 분석해 `@d3ro/core/araso-layout` 및 `@d3ro/core/typo-correction`을 대폭 업그레이드하고 터미널·Vim·xterm.js(`Agent Switchboard`)까지 확장했다: 영어·약어·CamelCase+한국어 조사/단어 혼합어 분리(`githubdp`→`github에`, `PDFvkdlf`/`ㅖㅇㄹ파일`→`PDF파일`, `Reactzjavhsjsxm`→`React컴포넌트`, `dhsmfdmsgoogledptj`→`오늘은google에서`, `1:1ansdml`→`1:1문의`, 2글자 약어 받침 호응 `TMdms`→`TM은` vs `TMsms`→`쓰는`), 쌍자음 잔여 Shift 정규화(`djEJs`→`어떤`, `qkRNjTdj`→`바꿨어`), 한글 자판 상태 영어/혼합어 역변환(`ㅗ디ㅣㅐ 재깅`→`hello world`, `내ㅡㄷ샤ㅡㄷ`→`sometime`, `ㅎ샤ㅗㅕㅠ에`→`github에`, `ㅠㅕㅎ가`→`bug가`, 알파벳+조사 `ㄴ가`→`s가`, `ㄴ은`→`s은`), 문장 문맥 한영 전환(`Stay hungry, stay foolishsms wkqtmdml akfdlek.`), URL·경로·이메일 보호(`isUrlOrPathRun`), 터미널·Vim 명령(`:ㅈㅂ`→`:wq`, `:ㅂ!`→`:q!`, `퍄ㅡ `→`vim `, Vim 노멀 모드 교정 억제), `SendInput(KEYEVENTF_UNICODE)` 직접 유니코드 타이핑(클립보드 무접촉), 단어 경계(`25ms`)와 어절 내부(`650ms`) 유휴 분리 및 완성형 음절(`[가-힣]`) 한정 `commitComposition`으로 고속 타이핑 시 글자 삼킴·유령 공백·앞글자 중복을 완전히 해소했다. 통계 수집 동의(`inputTelemetryEnabled`)가 꺼져 있어도 기본 기능(`typoAutoCorrectEnabled: true`)으로 즉시 동작한다.
|
||||||
>
|
>
|
||||||
> Previous update: 2026-09-27 — **v1.7.0·v1.8.0·v1.9.0 릴리스 + 기기 간 동기화 재작성 + 운영 DB 정렬.** 데스크톱↔모바일·웹 동기화를 outbox·서버시각 커서·삭제 기록(`sync_tombstones`)·실시간(`ws`) 엔진으로 다시 만들고, 이력·사전·회의·메모 태그·명령·템플릿·지식베이스·녹음·공통 설정·기기 등록까지 넓혔다(MEM-13, ACC-08/09, MEM-05). 운영 Supabase가 `0028`에 멈춰 있던 것을 발견해 `0029`–`0035`를 적용하고 함수 23개를 재배포했다(GAP-OPS-01 — 사용자가 자기 tier를 올릴 수 있던 권한 구멍 포함). 모바일 기기 목록·데이터 내보내기 결함도 고쳤다(GAP-SYNC-03/04). 무서명 로컬 게시 예외(GAP-REL-06) 유지.
|
> Previous update: 2026-09-27 — **v1.7.0·v1.8.0·v1.9.0 릴리스 + 기기 간 동기화 재작성 + 운영 DB 정렬.** 데스크톱↔모바일·웹 동기화를 outbox·서버시각 커서·삭제 기록(`sync_tombstones`)·실시간(`ws`) 엔진으로 다시 만들고, 이력·사전·회의·메모 태그·명령·템플릿·지식베이스·녹음·공통 설정·기기 등록까지 넓혔다(MEM-13, ACC-08/09, MEM-05). 운영 Supabase가 `0028`에 멈춰 있던 것을 발견해 `0029`–`0035`를 적용하고 함수 23개를 재배포했다(GAP-OPS-01 — 사용자가 자기 tier를 올릴 수 있던 권한 구멍 포함). 모바일 기기 목록·데이터 내보내기 결함도 고쳤다(GAP-SYNC-03/04). 무서명 로컬 게시 예외(GAP-REL-06) 유지.
|
||||||
>
|
>
|
||||||
|
|
@ -11,7 +13,7 @@
|
||||||
> Previous update: 2026-09-22 — **Gemma/Ollama 폭주 방어 계약을 기록했다.** 19:14:12 부팅 워밍업이 `keep_alive: 30m`으로 `gemma4:e4b`를 19:44:12까지 VRAM 3,226,342,521 bytes / context 4096으로 강제 상주시킨 것이 관측됐으며, 같은 시점 Windows GPU Engine PID 표본에는 Ollama의 활성 compute가 없었다. 즉 당시 상태는 무한 추론이 아니라 강제 residency였다. 19:11:17~19:11:58의 자동 제안 연속 생성은 기존 900 ms·12/min·5 candidates·128 tokens·한 글자 재생성 정책이 허용한 burst였다. 현재 구현 계약은 부팅 warmup 제거, `keep_alive: 2m`, 제안 600 ms / 최소 5 s 간격 / 기본 6회·hard max 12회 per min / 3 candidates / 64 tokens / 12-char growth / 8 s timeout, 그리고 요청별 취소·상한·종료 정리다. 독립 표적 검증은 6 test files / 69 tests passed / 0 failed, 변경 코드·테스트 ESLint와 `git diff --check`도 exit 0이다. Raw Ollama에서는 cold bounded 요청이 client hard timeout 15.044 s에 취소된 뒤 `/api/ps`가 비었고 `/api/version`은 80 ms에 회복했다. 명시 warmup은 HTTP 200 / 16.639 s, 후속 warm 요청은 body `options.num_predict=1`, `keep_alive='2m'`로 553 ms HTTP 200 / `done:true` / `eval_count:1` / `done_reason:length`였고 `/api/ps` expiry는 약 119.9 s였다. **19:48:59 +09:00에는 새 generate/unload/kill/retry 없이 충분히 지난 뒤 한 번의 `/api/ps`가 HTTP 200 / 45.8 ms / `{models:[]}`였고 `/api/version`은 HTTP 200 / 7.3 ms / `0.32.13`이었다.** 이는 raw API 수준의 expiry 뒤 unload 확인일 뿐 앱 재시작·GUI·실제 타이핑 증거는 아니므로 상태는 `[~]`로 유지한다 (`11` GAP-LLM-04, GAP-INPUT-06).
|
> Previous update: 2026-09-22 — **Gemma/Ollama 폭주 방어 계약을 기록했다.** 19:14:12 부팅 워밍업이 `keep_alive: 30m`으로 `gemma4:e4b`를 19:44:12까지 VRAM 3,226,342,521 bytes / context 4096으로 강제 상주시킨 것이 관측됐으며, 같은 시점 Windows GPU Engine PID 표본에는 Ollama의 활성 compute가 없었다. 즉 당시 상태는 무한 추론이 아니라 강제 residency였다. 19:11:17~19:11:58의 자동 제안 연속 생성은 기존 900 ms·12/min·5 candidates·128 tokens·한 글자 재생성 정책이 허용한 burst였다. 현재 구현 계약은 부팅 warmup 제거, `keep_alive: 2m`, 제안 600 ms / 최소 5 s 간격 / 기본 6회·hard max 12회 per min / 3 candidates / 64 tokens / 12-char growth / 8 s timeout, 그리고 요청별 취소·상한·종료 정리다. 독립 표적 검증은 6 test files / 69 tests passed / 0 failed, 변경 코드·테스트 ESLint와 `git diff --check`도 exit 0이다. Raw Ollama에서는 cold bounded 요청이 client hard timeout 15.044 s에 취소된 뒤 `/api/ps`가 비었고 `/api/version`은 80 ms에 회복했다. 명시 warmup은 HTTP 200 / 16.639 s, 후속 warm 요청은 body `options.num_predict=1`, `keep_alive='2m'`로 553 ms HTTP 200 / `done:true` / `eval_count:1` / `done_reason:length`였고 `/api/ps` expiry는 약 119.9 s였다. **19:48:59 +09:00에는 새 generate/unload/kill/retry 없이 충분히 지난 뒤 한 번의 `/api/ps`가 HTTP 200 / 45.8 ms / `{models:[]}`였고 `/api/version`은 HTTP 200 / 7.3 ms / `0.32.13`이었다.** 이는 raw API 수준의 expiry 뒤 unload 확인일 뿐 앱 재시작·GUI·실제 타이핑 증거는 아니므로 상태는 `[~]`로 유지한다 (`11` GAP-LLM-04, GAP-INPUT-06).
|
||||||
>
|
>
|
||||||
> Previous update: 2026-09-21 — **Input intelligence (입력 레메트리 + 다음 문장 제안) 신규**. 데스크톱에 입력 수집기(`InputTelemetryService`), UIA 컨텍스트 브리지(사이드카 `GET /uia/focus`), 제안 서비스(`SuggestionService`), 어렛 커 오버레이, 설정 > 입력 탭(동의·정책·주간 인사이트·개인 문구)을 추가했다. 카탈로그에 `INPUT-01`~`INPUT-08`(전부 데스크톱 `[~]` — 유닛 48건은 GREEN 이지만 **실앱 타이핑 검증 전**), 백로그에 GAP-INPUT-01~05 + GAP-LLM-03, §7 에 CONSTRAINT-INPUT-01(키 내용 미저장 — ActivityWatch 정책 채택)을 기록. 설계 근거는 조사 기반이다: 어렛은 `GetGUIThreadInfo` 가 아니라 UIA `TextPattern.GetSelection`(Chromium 은 `TextPattern2` 미구현), 타이핑 스트는 키코드 복원이 아니라 UIA 스냅샷 diff(한/일 IME 대응), 디바운스/토큰 한도는 인라인 컴플리션 실측값(Continue 350 / Tabby 250 / twinny 300 ms, 출력 64~256 토큰). 의존성: `koffi` 3.3.1(포그라운드 창 FFI), 사이드카 `uiautomation` 2.0.29 + `comtypes`. 데스크톱 유닛 총계 1409(+49), Electron ABI 실행에서 신규 실패 0건. 당시의 24.7초/4.9초 지연 설명과 `keep_alive: 30m`·부팅 워밍업 처방은 **현재 상태가 아닌 과거 가설/완화 이력**이며, 최신 운영 결론은 위 2026-09-22 항목과 `11` GAP-LLM-04를 따른다. 직전: LLM instruction-prompt fix (`9c2b4d4`): the custom-instruction path inserted the instruction's own wording instead of the processed result and had **never worked in any shipped release** (`v0.1.0-alpha`..`v1.4.0`, introduced `fea923d` 2026-04-05, not a regression). `llm-prompts.ts` is now the SSOT for prompt resolution and placeholder substitution, shared by `VoiceModeService` / `ChainService` / `LLM.PROCESS`. AI-04/05/06/07 are demoted to `[~]` on desktop — fixed with unit tests, but **not verified in a running app** and the four related `tests/red/*.usecase.test.ts` could not execute (`better-sqlite3` ABI). New: GAP-LLM-01 (no target-language setting), GAP-LLM-02 (this fix unverified); GAP-INFRA-06 amended (the ABI masks verification, not just dev-env switching cost); GAP-I18N-01 amended (`popup.error.default` missing in 10 locales). Earlier the same day: CAP-16 (desktop key bindings rebuilt on one `@d3ro/core/keybinding` SSOT — multiple bindings per action, mouse buttons, `HOTKEY` → `KEYBINDING` IPC group), verified on Windows by a manual run, so CAP-16 and CAP-02 are `[x]` and GAP-KEY-01 is closed. Still open: GAP-KEY-02/03, GAP-QA-02, GAP-I18N-01/02, GAP-INFRA-06, GAP-LLM-01/02, GAP-INPUT-01~05; `11` §7 holds accepted design constraints (things deliberately kept, not gaps)
|
> Previous update: 2026-09-21 — **Input intelligence (입력 레메트리 + 다음 문장 제안) 신규**. 데스크톱에 입력 수집기(`InputTelemetryService`), UIA 컨텍스트 브리지(사이드카 `GET /uia/focus`), 제안 서비스(`SuggestionService`), 어렛 커 오버레이, 설정 > 입력 탭(동의·정책·주간 인사이트·개인 문구)을 추가했다. 카탈로그에 `INPUT-01`~`INPUT-08`(전부 데스크톱 `[~]` — 유닛 48건은 GREEN 이지만 **실앱 타이핑 검증 전**), 백로그에 GAP-INPUT-01~05 + GAP-LLM-03, §7 에 CONSTRAINT-INPUT-01(키 내용 미저장 — ActivityWatch 정책 채택)을 기록. 설계 근거는 조사 기반이다: 어렛은 `GetGUIThreadInfo` 가 아니라 UIA `TextPattern.GetSelection`(Chromium 은 `TextPattern2` 미구현), 타이핑 스트는 키코드 복원이 아니라 UIA 스냅샷 diff(한/일 IME 대응), 디바운스/토큰 한도는 인라인 컴플리션 실측값(Continue 350 / Tabby 250 / twinny 300 ms, 출력 64~256 토큰). 의존성: `koffi` 3.3.1(포그라운드 창 FFI), 사이드카 `uiautomation` 2.0.29 + `comtypes`. 데스크톱 유닛 총계 1409(+49), Electron ABI 실행에서 신규 실패 0건. 당시의 24.7초/4.9초 지연 설명과 `keep_alive: 30m`·부팅 워밍업 처방은 **현재 상태가 아닌 과거 가설/완화 이력**이며, 최신 운영 결론은 위 2026-09-22 항목과 `11` GAP-LLM-04를 따른다. 직전: LLM instruction-prompt fix (`9c2b4d4`): the custom-instruction path inserted the instruction's own wording instead of the processed result and had **never worked in any shipped release** (`v0.1.0-alpha`..`v1.4.0`, introduced `fea923d` 2026-04-05, not a regression). `llm-prompts.ts` is now the SSOT for prompt resolution and placeholder substitution, shared by `VoiceModeService` / `ChainService` / `LLM.PROCESS`. AI-04/05/06/07 are demoted to `[~]` on desktop — fixed with unit tests, but **not verified in a running app** and the four related `tests/red/*.usecase.test.ts` could not execute (`better-sqlite3` ABI). New: GAP-LLM-01 (no target-language setting), GAP-LLM-02 (this fix unverified); GAP-INFRA-06 amended (the ABI masks verification, not just dev-env switching cost); GAP-I18N-01 amended (`popup.error.default` missing in 10 locales). Earlier the same day: CAP-16 (desktop key bindings rebuilt on one `@d3ro/core/keybinding` SSOT — multiple bindings per action, mouse buttons, `HOTKEY` → `KEYBINDING` IPC group), verified on Windows by a manual run, so CAP-16 and CAP-02 are `[x]` and GAP-KEY-01 is closed. Still open: GAP-KEY-02/03, GAP-QA-02, GAP-I18N-01/02, GAP-INFRA-06, GAP-LLM-01/02, GAP-INPUT-01~05; `11` §7 holds accepted design constraints (things deliberately kept, not gaps)
|
||||||
> Scope: entire monorepo `D:/workspace/D3ROVoice` at product version `1.11.0` (`release/product-version.json`, released 2026-10-27)
|
> Scope: entire monorepo `D:/workspace/D3ROVoice` at product version `1.12.0` (`release/product-version.json`, released 2026-10-28)
|
||||||
> Purpose: let any agent (or human) answer two questions in under a minute:
|
> Purpose: let any agent (or human) answer two questions in under a minute:
|
||||||
> 1. **What infrastructure exists?** (build, CI, services, APIs, data, packages, deploy)
|
> 1. **What infrastructure exists?** (build, CI, services, APIs, data, packages, deploy)
|
||||||
> 2. **How far is each feature developed?** (per surface, with file anchors and status)
|
> 2. **How far is each feature developed?** (per surface, with file anchors and status)
|
||||||
|
|
|
||||||
|
|
@ -84,3 +84,4 @@ Playwright specs in `apps/web/e2e/`: billing, payple-checkout, dashboard-diction
|
||||||
- Action runner team-invite uses a manual redirect safety path instead of a live invite (`action-runner.tsx`).
|
- Action runner team-invite uses a manual redirect safety path instead of a live invite (`action-runner.tsx`).
|
||||||
- `/download` shows "artifact not yet published" for the current desktop release.
|
- `/download` shows "artifact not yet published" for the current desktop release.
|
||||||
- Knowledge file upload, semantic search, dictionary import/export, and the team activity feed are now implemented (`[x]` in the catalog).
|
- Knowledge file upload, semantic search, dictionary import/export, and the team activity feed are now implemented (`[x]` in the catalog).
|
||||||
|
- **2026-10-28 designpaca audit (`SHELL-15`):** All 15 routes and shared components aligned with `design.md` v4 ("조용한 계기"): undefined `--d3-text-inverse` replaced with `--d3-accent-ink`, minimum font size raised to `11px` (`0.6875rem`), `uppercase` and positive `letterSpacing` removed from Korean UI copy, raw `monospace` replaced with `var(--d3-font-mono)`, single `component="h1"` hierarchy enforced per route, and native form controls equipped with `:focus-visible` rings and `<label htmlFor>` / `aria-label` attributes.
|
||||||
|
|
|
||||||
|
|
@ -89,3 +89,4 @@ Root files: `instrumentation.ts` (startup security validation), `proxy.ts` (edge
|
||||||
- `UnavailableAdminPanel` whenever Supabase env absent; writes disabled, no sample metrics.
|
- `UnavailableAdminPanel` whenever Supabase env absent; writes disabled, no sample metrics.
|
||||||
- `/pipelines` and dashboard node/error sections render only measured data.
|
- `/pipelines` and dashboard node/error sections render only measured data.
|
||||||
- Deploy: `apps/admin/Dockerfile` → GHCR + NAS compose; the duplicate root `Dockerfile.admin` was deleted 2026-09-26 (Wave 3, cd9d199) since `apps/admin/Dockerfile` is the one actually used. GitLab admin NAS deploy job disabled.
|
- Deploy: `apps/admin/Dockerfile` → GHCR + NAS compose; the duplicate root `Dockerfile.admin` was deleted 2026-09-26 (Wave 3, cd9d199) since `apps/admin/Dockerfile` is the one actually used. GitLab admin NAS deploy job disabled.
|
||||||
|
- **2026-10-28 designpaca audit (`SHELL-15`):** `console-theme.ts` `C.dim` upgraded from `#67789e` to `#7e8eb0` (WCAG AA 4.94:1 on dark card surface), `panelSx`/`innerCoreSx`/`filterBtnSx`/`statusBadgeSx`/`primaryButtonSx` flattened (removed `backdropFilter` blur, decorative gradients, `uppercase`, and positive `letterSpacing`), 1.0:1 foreground/background token collisions (`--d3-status-successBg`, `--d3-status-dangerBg`, `--d3-tag-cyanBg`) fixed across `admin-sidebar.tsx`, `ads`, `releases`, `subscriptions`, `usage`, `users`, and `login`, sub-11px font sizes raised to `11px`, and keyboard navigation (`role="button"`, `tabIndex={0}`) + `aria-label` added to sidebar and dialog controls.
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
import { describe, expect, it } from 'vitest'
|
import { describe, expect, it } from 'vitest'
|
||||||
import {
|
import {
|
||||||
|
buildModelTypoHints,
|
||||||
buildVocabulary,
|
buildVocabulary,
|
||||||
detectHangulTypedLatin,
|
detectHangulTypedLatin,
|
||||||
detectJamoNoise,
|
detectJamoNoise,
|
||||||
|
|
@ -19,7 +20,6 @@ import {
|
||||||
parseModelTypoPairs,
|
parseModelTypoPairs,
|
||||||
planTypoReplacement,
|
planTypoReplacement,
|
||||||
alignCorrectionToPrefix,
|
alignCorrectionToPrefix,
|
||||||
validateModelCorrections,
|
|
||||||
typoRegionStart,
|
typoRegionStart,
|
||||||
validateModelCorrections
|
validateModelCorrections
|
||||||
} from '../src/typo-correction'
|
} from '../src/typo-correction'
|
||||||
|
|
@ -86,6 +86,109 @@ describe('한영 전환 오타 판정', () => {
|
||||||
expect(detectHangulTypedLatin('ㄴ은', KO)).toBe('s은')
|
expect(detectHangulTypedLatin('ㄴ은', KO)).toBe('s은')
|
||||||
expect(detectHangulTypedLatin('ㅠㅕㅎ가', KO)).toBe('bug가')
|
expect(detectHangulTypedLatin('ㅠㅕㅎ가', KO)).toBe('bug가')
|
||||||
})
|
})
|
||||||
|
|
||||||
|
it('한글로 친 영어 축약형·오타(ㅊ무ㅅ, ㅊ무\'ㅅ, ㅊ무ㅜ\'ㅅ, 애ㅜ\'ㅅ, ㅑ\'ㅡ, ㅗ디ㅐ, ㅔㅐㄴ냐ㅠㅣ, 세갸ㅜㅎ)를 즉시 복원한다', () => {
|
||||||
|
expect(detectHangulTypedLatin('ㅊ무ㅅ', KO)).toBe("can't")
|
||||||
|
expect(detectHangulTypedLatin("ㅊ무'ㅅ", KO)).toBe("can't")
|
||||||
|
expect(detectHangulTypedLatin("ㅊ무ㅜ'ㅅ", KO)).toBe("can't")
|
||||||
|
expect(detectHangulTypedLatin("애ㅜ'ㅅ", KO)).toBe("don't")
|
||||||
|
expect(detectHangulTypedLatin("ㅑ'ㅡ", KO)).toBe("I'm")
|
||||||
|
expect(detectHangulTypedLatin('ㅑㅡ', KO)).toBe("I'm")
|
||||||
|
expect(detectHangulTypedLatin("ㅑㅅ'ㄴ", KO)).toBe("it's")
|
||||||
|
expect(detectHangulTypedLatin('ㅗ디ㅐ', KO)).toBe('hello')
|
||||||
|
expect(detectHangulTypedLatin('ㅗ디ㅣㅐㅐ', KO)).toBe('hello')
|
||||||
|
expect(detectHangulTypedLatin('ㅔㅐㄴ냐ㅠㅣ', KO)).toBe('possible')
|
||||||
|
expect(detectHangulTypedLatin('세갸ㅜㅎ', KO)).toBe('spring')
|
||||||
|
expect(detectHangulTypedLatin('ㅡㅁ가애주', KO)).toBe('markdown')
|
||||||
|
})
|
||||||
|
|
||||||
|
it('사용자 실측 문장("I ㅊ무ㅅ ㅅ I ㅊ무ㅜ\'ㅅ help[ my self ")을 한 번에 교정한다', () => {
|
||||||
|
const prefix = "I ㅊ무ㅅ ㅅ I ㅊ무ㅜ'ㅅ help[ my self "
|
||||||
|
const merged = mergeTypoCorrections(
|
||||||
|
detectTypos(prefix, { includeTrailingToken: true, layoutOnly: true }),
|
||||||
|
detectJamoNoise(prefix)
|
||||||
|
)
|
||||||
|
const plan = planTypoReplacement(prefix, merged)
|
||||||
|
expect(plan).not.toBeNull()
|
||||||
|
expect(plan?.insertText).toBe("can't I can't help myself ")
|
||||||
|
})
|
||||||
|
|
||||||
|
it('문장 첫머리의 단독 모음 "ㅑ " 와 "ㅑ ㅊ무\'ㅅ (는)" 및 Araso 받침 호응 약어("츤를" → "CMS를", "눈를" → "SNS를")를 복원한다', () => {
|
||||||
|
// 1. 문장 첫머리 "ㅑ " 단독 입력 시 공백 경계 즉시 "I " 복원
|
||||||
|
expect(detectTypos('ㅑ ', { layoutOnly: true }).map((c) => c.to)).toEqual(['I'])
|
||||||
|
|
||||||
|
// 2. "ㅑ ㅊ무'ㅅ " 및 "ㅑ ㅊ무'ㅅ 는 안되네." / "ㅑ ㅊ무'ㅅ는 안되네."
|
||||||
|
const cantPlan = planTypoReplacement('ㅑ ㅊ무\'ㅅ ', detectTypos('ㅑ ㅊ무\'ㅅ ', { layoutOnly: true }))
|
||||||
|
expect(cantPlan?.insertText).toBe("I can't ")
|
||||||
|
|
||||||
|
const cantWithParticleSpace = planTypoReplacement(
|
||||||
|
"ㅑ ㅊ무'ㅅ 는 안되네.",
|
||||||
|
detectTypos("ㅑ ㅊ무'ㅅ 는 안되네.", { includeTrailingToken: true, layoutOnly: true })
|
||||||
|
)
|
||||||
|
expect(cantWithParticleSpace?.insertText).toBe("I can't 는 안되네.")
|
||||||
|
|
||||||
|
const cantWithAttachedParticle = planTypoReplacement(
|
||||||
|
"ㅑ ㅊ무'ㅅ는 안되네.",
|
||||||
|
detectTypos("ㅑ ㅊ무'ㅅ는 안되네.", { includeTrailingToken: true, layoutOnly: true })
|
||||||
|
)
|
||||||
|
expect(cantWithAttachedParticle?.insertText).toBe("I can't는 안되네.")
|
||||||
|
|
||||||
|
// 3. "나는 츤를 만들려고 해." → "나는 CMS를 만들려고 해." 및 Araso 받침 호응 약어+조사
|
||||||
|
const cmsPlan = planTypoReplacement(
|
||||||
|
'나는 츤를 만들려고 해.',
|
||||||
|
detectTypos('나는 츤를 만들려고 해.', { includeTrailingToken: true, layoutOnly: true })
|
||||||
|
)
|
||||||
|
expect(cmsPlan?.insertText).toBe('CMS를 만들려고 해.')
|
||||||
|
|
||||||
|
expect(detectHangulTypedLatin('츤를', KO)).toBe('CMS를')
|
||||||
|
expect(detectHangulTypedLatin('먀를', KO)).toBe('AI를')
|
||||||
|
expect(detectHangulTypedLatin('틔을', KO)).toBe('XML을')
|
||||||
|
expect(detectHangulTypedLatin('뗘를', KO)).toBe('EU를')
|
||||||
|
expect(detectHangulTypedLatin('넴를', KO)).toBe('SPA를')
|
||||||
|
expect(detectHangulTypedLatin('젳를', KO)).toBe('VPC를')
|
||||||
|
expect(detectHangulTypedLatin('눈를', KO)).toBe('SNS를')
|
||||||
|
expect(detectHangulTypedLatin('운를', KO)).toBe('DNS를')
|
||||||
|
expect(detectHangulTypedLatin('긴를', KO)).toBe('RLS를')
|
||||||
|
expect(detectHangulTypedLatin('쓰은', KO)).toBe('TM은')
|
||||||
|
expect(detectHangulTypedLatin('꾸은', KO)).toBe('RN은')
|
||||||
|
expect(detectHangulTypedLatin('띠이', KO)).toBe('EL이')
|
||||||
|
expect(detectHangulTypedLatin('꺼을', KO)).toBe('RJ을')
|
||||||
|
expect(detectHangulTypedLatin('씨은', KO)).toBe('TL은')
|
||||||
|
expect(detectHangulTypedLatin('ㅏㅅㅌ를', KO)).toBe('KTX를')
|
||||||
|
expect(detectHangulTypedLatin('ㅎㅅㅌ를', KO)).toBe('GTX를')
|
||||||
|
expect(detectHangulTypedLatin('ㅠㅅㄴ를', KO)).toBe('BTS를')
|
||||||
|
expect(detectHangulTypedLatin('ㅐㅅㅅ를', KO)).toBe('OTT를')
|
||||||
|
expect(detectHangulTypedLatin('ㄷㅅㄹ를', KO)).toBe('ETF를')
|
||||||
|
expect(detectHangulTypedLatin('ㅊㄷㅐ가', KO)).toBe('CEO가')
|
||||||
|
expect(detectHangulTypedLatin('ㅔㅡ을', KO)).toBe('PM을')
|
||||||
|
|
||||||
|
// 받침이 정상 호응하는 한국어 어절은 절대 약어로 오변환하지 않는다
|
||||||
|
expect(detectHangulTypedLatin('눈을', KO)).toBeNull()
|
||||||
|
expect(detectHangulTypedLatin('운이', KO)).toBeNull()
|
||||||
|
expect(detectHangulTypedLatin('쓰는', KO)).toBeNull()
|
||||||
|
expect(detectHangulTypedLatin('꾸는', KO)).toBeNull()
|
||||||
|
expect(detectHangulTypedLatin('이를', KO)).toBeNull()
|
||||||
|
|
||||||
|
// 4. 영문 문맥 안의 "새"(to), "애"(do), "뭉"(and), "랙"(for), "소됴"(they), "생묘"(today) 복원
|
||||||
|
expect(
|
||||||
|
planTypoReplacement('CMS는 I want 새 ', detectTypos('CMS는 I want 새 ', { layoutOnly: true }))?.insertText
|
||||||
|
).toBe('to ')
|
||||||
|
expect(
|
||||||
|
planTypoReplacement('CMS는 I want 새 애 ', detectTypos('CMS는 I want 새 애 ', { layoutOnly: true }))?.insertText
|
||||||
|
).toBe('to do ')
|
||||||
|
const fullSentence = "CMS는 I want 새 애 this but this won't change into english 새 애"
|
||||||
|
const fullPlan = planTypoReplacement(
|
||||||
|
fullSentence,
|
||||||
|
detectTypos(fullSentence, { includeTrailingToken: true, layoutOnly: true })
|
||||||
|
)
|
||||||
|
expect(
|
||||||
|
fullPlan ? fullSentence.slice(0, fullSentence.length - fullPlan.deleteCount) + fullPlan.insertText : fullSentence
|
||||||
|
).toBe("CMS는 I want to do this but this won't change into english to do")
|
||||||
|
|
||||||
|
// 한국어 문장의 "새 API", "이거 commit 해" 는 절대 to/go 로 오변환하지 않는다
|
||||||
|
expect(detectTypos('오늘 새 API를 만들었어 ', { includeTrailingToken: true, layoutOnly: true })).toEqual([])
|
||||||
|
expect(detectTypos('이거 commit 해 ', { includeTrailingToken: true, layoutOnly: true })).toEqual([])
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('늘 틀린 철자', () => {
|
describe('늘 틀린 철자', () => {
|
||||||
|
|
@ -182,6 +285,41 @@ describe('모델 교정 검증', () => {
|
||||||
expect(isPlausibleTypoFix('갠적', '개인적')).toBe(false)
|
expect(isPlausibleTypoFix('갠적', '개인적')).toBe(false)
|
||||||
// 긴 어절에서 빠진 음절을 채우는 것은 오타 수정이다
|
// 긴 어절에서 빠진 음절을 채우는 것은 오타 수정이다
|
||||||
expect(isPlausibleTypoFix('공유드립다', '공유드립니다')).toBe(true)
|
expect(isPlausibleTypoFix('공유드립다', '공유드립니다')).toBe(true)
|
||||||
|
// 한영 자판 오타 + 철자 오타 복합 교정 (사전에 없거나 1~2타 오타가 겹친 경우)
|
||||||
|
expect(isPlausibleTypoFix('ㅗ디ㅐ', 'hello')).toBe(true)
|
||||||
|
expect(isPlausibleTypoFix('ㅡㅁ가둥', 'markdown')).toBe(true)
|
||||||
|
expect(isPlausibleTypoFix('네갸ㅜㅎ에서', 'spring에서')).toBe(true)
|
||||||
|
expect(isPlausibleTypoFix('세갸ㅜㅎ에서', 'spring에서')).toBe(true)
|
||||||
|
expect(isPlausibleTypoFix('dkssudgktpd', '안녕하세요')).toBe(true)
|
||||||
|
expect(isPlausibleTypoFix('아ㄴ녀ㅇ', '안녕')).toBe(true)
|
||||||
|
// 단순 번역(키열 무관)은 거른다
|
||||||
|
expect(isPlausibleTypoFix('hello', '안녕')).toBe(false)
|
||||||
|
expect(isPlausibleTypoFix('회의', 'meeting')).toBe(false)
|
||||||
|
})
|
||||||
|
|
||||||
|
it('수상한 한영·자모 어절에 대해 두벌식 키 입력 힌트를 생성하고 모델 교정을 검증한다', () => {
|
||||||
|
const sentence = 'ㅡㅁ가둥 문서와 ㅗ디ㅐ 네갸ㅜㅎ에서 dkssudgktpd '
|
||||||
|
const hints = buildModelTypoHints(sentence)
|
||||||
|
expect(hints).toEqual([
|
||||||
|
'- "ㅡㅁ가둥" (영문 자판 키 입력값: "markend")',
|
||||||
|
'- "ㅗ디ㅐ" (영문 자판 키 입력값: "helo")',
|
||||||
|
'- "네갸ㅜㅎ에서" (영문 자판 키 입력값: "spring에서")',
|
||||||
|
'- "dkssudgktpd" (한글 자판 조합값: "안녕하셍")'
|
||||||
|
])
|
||||||
|
|
||||||
|
// 모델이 원문 어절("ㅡㅁ가둥")이나 힌트 키값("helo", "안녕하셍") 어느 쪽을 from 으로 돌려줘도 매칭한다
|
||||||
|
const validated = validateModelCorrections(sentence, [
|
||||||
|
{ from: 'ㅡㅁ가둥', to: 'markdown' },
|
||||||
|
{ from: 'helo', to: 'hello' },
|
||||||
|
{ from: '네갸ㅜㅎ에서', to: 'spring에서' },
|
||||||
|
{ from: '안녕하셍', to: '안녕하세요' }
|
||||||
|
])
|
||||||
|
expect(validated.map((c) => [c.from, c.to])).toEqual([
|
||||||
|
['ㅡㅁ가둥', 'markdown'],
|
||||||
|
['ㅗ디ㅐ', 'hello'],
|
||||||
|
['네갸ㅜㅎ에서', 'spring에서'],
|
||||||
|
['dkssudgktpd', '안녕하세요']
|
||||||
|
])
|
||||||
})
|
})
|
||||||
|
|
||||||
it('접두의 실제 단어 위치로 옮기고, 무시·자주 쓴 단어는 뺀다', () => {
|
it('접두의 실제 단어 위치로 옮기고, 무시·자주 쓴 단어는 뺀다', () => {
|
||||||
|
|
|
||||||
|
|
@ -838,11 +838,11 @@ export class TerminalKeystrokeTracker {
|
||||||
this._committed = this._committed.slice(0, this._unreplacedStart) + convertedTail
|
this._committed = this._committed.slice(0, this._unreplacedStart) + convertedTail
|
||||||
} else if (
|
} else if (
|
||||||
this._unreplacedStart === 0 &&
|
this._unreplacedStart === 0 &&
|
||||||
raw.startsWith(this.currentPrefix()) &&
|
this._lastXtermValue === '' &&
|
||||||
raw.length > this.currentPrefix().length
|
this._committed.length === 0 &&
|
||||||
|
this._composingKeys.length === 0
|
||||||
) {
|
) {
|
||||||
this._committed = raw
|
this._committed = raw
|
||||||
this._composingKeys = ''
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this._lastXtermValue = raw
|
this._lastXtermValue = raw
|
||||||
|
|
|
||||||
|
|
@ -15,8 +15,12 @@ import {
|
||||||
CORE_KOREAN_WORDS,
|
CORE_KOREAN_WORDS,
|
||||||
KOREAN_COUNTER_KEYS,
|
KOREAN_COUNTER_KEYS,
|
||||||
PARTICLE_KEYS,
|
PARTICLE_KEYS,
|
||||||
|
finalSoundOfAcronym,
|
||||||
|
finalSoundOfHangul,
|
||||||
isUrlOrPathRun,
|
isUrlOrPathRun,
|
||||||
|
lingersAfterKoreanShift,
|
||||||
normalizeLingeringShift,
|
normalizeLingeringShift,
|
||||||
|
particleAgrees,
|
||||||
splitMixedWord
|
splitMixedWord
|
||||||
} from './araso-layout'
|
} from './araso-layout'
|
||||||
|
|
||||||
|
|
@ -432,7 +436,7 @@ const COMMON_ENGLISH_WORDS: ReadonlySet<string> = new Set(
|
||||||
'wait walk wall watch water weapon wear weight west whatever ' +
|
'wait walk wall watch water weapon wear weight west whatever ' +
|
||||||
'whether white whole wide wife wind window wish within without ' +
|
'whether white whole wide wife wind window wish within without ' +
|
||||||
'woman wonder word worker worry write writer wrong yard ' +
|
'woman wonder word worker worry write writer wrong yard ' +
|
||||||
'yeah young yourself ' +
|
'yeah young yourself myself himself herself ourselves themselves yourselves ' +
|
||||||
'button menu view mode state value error warning info debug output input process thread local cloud ' +
|
'button menu view mode state value error warning info debug output input process thread local cloud ' +
|
||||||
' column filter sort count average limit delay timeout retry cancel accept reject ignore clear reset ' +
|
' column filter sort count average limit delay timeout retry cancel accept reject ignore clear reset ' +
|
||||||
'load copy paste undo redo select focus blur click press enter shift ctrl alt tab esc backspace delete ' +
|
'load copy paste undo redo select focus blur click press enter shift ctrl alt tab esc backspace delete ' +
|
||||||
|
|
@ -536,6 +540,8 @@ export interface LayoutDetectOptions {
|
||||||
afterEnglishWord?: boolean
|
afterEnglishWord?: boolean
|
||||||
/** 바로 뒤 토큰이 영문(또는 한글 자판으로 친 영문)인가 */
|
/** 바로 뒤 토큰이 영문(또는 한글 자판으로 친 영문)인가 */
|
||||||
nextIsEnglish?: boolean
|
nextIsEnglish?: boolean
|
||||||
|
/** 토큰 바로 뒤에 공백·문장부호 등 단어 경계가 이미 확정되었는가 (예: "ㅑ " → "I ") */
|
||||||
|
hasWordBoundaryAfter?: boolean
|
||||||
/** 슬래시 쌍(ska/du)·약어 조사(L.A.fh)처럼 1음절 변환을 폭넓게 허용할 문맥인가 */
|
/** 슬래시 쌍(ska/du)·약어 조사(L.A.fh)처럼 1음절 변환을 폭넓게 허용할 문맥인가 */
|
||||||
allowSingleSyllable?: boolean
|
allowSingleSyllable?: boolean
|
||||||
/** 개인 어휘(소문자 영단어 → 빈도) */
|
/** 개인 어휘(소문자 영단어 → 빈도) */
|
||||||
|
|
@ -727,6 +733,228 @@ function findAdjacentTransposedEnglishWord(latin: string): string | null {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const QWERTY_ADJACENT: Readonly<Record<string, string>> = {
|
||||||
|
q: 'wa',
|
||||||
|
w: 'qeasd',
|
||||||
|
e: 'wsdr',
|
||||||
|
r: 'edft',
|
||||||
|
t: 'rfgy',
|
||||||
|
y: 'tghu',
|
||||||
|
u: 'yhji',
|
||||||
|
i: 'ujko',
|
||||||
|
o: 'iklp',
|
||||||
|
p: 'ol',
|
||||||
|
a: 'qwsxz',
|
||||||
|
s: 'qweadzx',
|
||||||
|
d: 'wersfxc',
|
||||||
|
f: 'ertdgcv',
|
||||||
|
g: 'rtyfhvb',
|
||||||
|
h: 'tyugjbn',
|
||||||
|
j: 'yuihknm',
|
||||||
|
k: 'uiojlm',
|
||||||
|
l: 'opk',
|
||||||
|
z: 'asx',
|
||||||
|
x: 'zsdc',
|
||||||
|
c: 'xdfv',
|
||||||
|
v: 'cfgb',
|
||||||
|
b: 'vghn',
|
||||||
|
n: 'bhjm',
|
||||||
|
m: 'njk'
|
||||||
|
}
|
||||||
|
|
||||||
|
function isQwertyAdjacent(a: string, b: string): boolean {
|
||||||
|
const la = a.toLowerCase()
|
||||||
|
const lb = b.toLowerCase()
|
||||||
|
return Boolean(QWERTY_ADJACENT[la]?.includes(lb))
|
||||||
|
}
|
||||||
|
|
||||||
|
const ENGLISH_CONTRACTIONS: Readonly<Record<string, string>> = {
|
||||||
|
"can't": "can't",
|
||||||
|
"cann't": "can't",
|
||||||
|
"don't": "don't",
|
||||||
|
"donn't": "don't",
|
||||||
|
"doesn't": "doesn't",
|
||||||
|
"didn't": "didn't",
|
||||||
|
"won't": "won't",
|
||||||
|
"isn't": "isn't",
|
||||||
|
"aren't": "aren't",
|
||||||
|
"wasn't": "wasn't",
|
||||||
|
"weren't": "weren't",
|
||||||
|
"haven't": "haven't",
|
||||||
|
"hasn't": "hasn't",
|
||||||
|
"hadn't": "hadn't",
|
||||||
|
"couldn't": "couldn't",
|
||||||
|
"wouldn't": "wouldn't",
|
||||||
|
"shouldn't": "shouldn't",
|
||||||
|
"mustn't": "mustn't",
|
||||||
|
"mightn't": "mightn't",
|
||||||
|
"i'm": "I'm",
|
||||||
|
"i've": "I've",
|
||||||
|
"i'll": "I'll",
|
||||||
|
"i'd": "I'd",
|
||||||
|
"you're": "you're",
|
||||||
|
"you've": "you've",
|
||||||
|
"you'll": "you'll",
|
||||||
|
"you'd": "you'd",
|
||||||
|
"he's": "he's",
|
||||||
|
"he'll": "he'll",
|
||||||
|
"he'd": "he'd",
|
||||||
|
"she's": "she's",
|
||||||
|
"she'll": "she'll",
|
||||||
|
"she'd": "she'd",
|
||||||
|
"it's": "it's",
|
||||||
|
"it'll": "it'll",
|
||||||
|
"we're": "we're",
|
||||||
|
"we've": "we've",
|
||||||
|
"we'll": "we'll",
|
||||||
|
"we'd": "we'd",
|
||||||
|
"they're": "they're",
|
||||||
|
"they've": "they've",
|
||||||
|
"they'll": "they'll",
|
||||||
|
"they'd": "they'd",
|
||||||
|
"that's": "that's",
|
||||||
|
"that'll": "that'll",
|
||||||
|
"what's": "what's",
|
||||||
|
"where's": "where's",
|
||||||
|
"when's": "when's",
|
||||||
|
"who's": "who's",
|
||||||
|
"why's": "why's",
|
||||||
|
"how's": "how's",
|
||||||
|
"let's": "let's",
|
||||||
|
"there's": "there's",
|
||||||
|
"here's": "here's"
|
||||||
|
}
|
||||||
|
|
||||||
|
function resolveContraction(candidate: string): string | null {
|
||||||
|
const lower = candidate.toLowerCase()
|
||||||
|
const contraction = ENGLISH_CONTRACTIONS[lower]
|
||||||
|
if (!contraction) return null
|
||||||
|
return /^[iI]'|^I'/u.test(contraction) ? contraction : matchCase(candidate, contraction)
|
||||||
|
}
|
||||||
|
|
||||||
|
function resolveExactOrKnownEnglish(candidate: string): string | null {
|
||||||
|
const contraction = resolveContraction(candidate)
|
||||||
|
if (contraction) return contraction
|
||||||
|
if (/^[A-Za-z]+$/u.test(candidate) && isCommonEnglishWord(candidate)) return candidate
|
||||||
|
const known = fixKnownMisspelling(candidate)
|
||||||
|
if (known) return known
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 낱자가 섞인 두벌식 영타(정상 한국어 어절일 수 없음)에서
|
||||||
|
* 중복 타건·빠진 쌍자음·1타 오타(인접 키/누락/추가)를 복원한다.
|
||||||
|
*/
|
||||||
|
function findFuzzyEnglishForLooseJamo(latin: string): string | null {
|
||||||
|
if (latin.length < 3) return null
|
||||||
|
|
||||||
|
// 1) 3번 이상 반복된 글자를 2글자/1글자로 축약하거나, 연속 2글자 구간을 하나씩 줄여 본다
|
||||||
|
// 예: ㅊ무ㅜ'ㅅ(cann't) → can't, ㅊ무ㅜㅅ(cannt) → can't, ㅗ디ㅣㅐㅐ(helloo) → hello, ㅗ디ㅔㅔ(helpp) → help
|
||||||
|
const collapsedTriple = latin.replace(/([A-Za-z])\1{2,}/gu, '$1$1')
|
||||||
|
if (collapsedTriple !== latin) {
|
||||||
|
const resolved = resolveExactOrKnownEnglish(collapsedTriple)
|
||||||
|
if (resolved) return resolved
|
||||||
|
}
|
||||||
|
const collapsedAll = latin.replace(/([A-Za-z])\1+/gu, '$1')
|
||||||
|
if (collapsedAll !== latin && collapsedAll.length >= 3) {
|
||||||
|
const resolved = resolveExactOrKnownEnglish(collapsedAll)
|
||||||
|
if (resolved) return resolved
|
||||||
|
}
|
||||||
|
const doubleRunRegex = /([A-Za-z])\1+/gu
|
||||||
|
for (let match = doubleRunRegex.exec(latin); match !== null; match = doubleRunRegex.exec(latin)) {
|
||||||
|
const singleCollapsed =
|
||||||
|
latin.slice(0, match.index) + match[1] + latin.slice(match.index + match[0].length)
|
||||||
|
if (singleCollapsed.length >= 3) {
|
||||||
|
const resolved =
|
||||||
|
resolveExactOrKnownEnglish(singleCollapsed) ??
|
||||||
|
(/^[A-Za-z]+$/u.test(singleCollapsed) ? findAdjacentTransposedEnglishWord(singleCollapsed) : null)
|
||||||
|
if (resolved) return resolved
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!/^[A-Za-z]+$/u.test(latin)) return null
|
||||||
|
const lower = latin.toLowerCase()
|
||||||
|
|
||||||
|
// 2) 영어에서 자주 겹쳐 쓰는 글자(l, s, r, t, n, m, p, c, f, g, d, b, o, e)가 1글자만 눌린 경우
|
||||||
|
// 예: ㅗ디ㅐ(helo) → hello, ㅔㅐ냐ㅠㅣㄷ(posible) → possible, ㄴㅐ교(sory) → sorry, 재교(wory) → worry
|
||||||
|
if (lower.length >= 4) {
|
||||||
|
for (let i = 1; i < lower.length; i += 1) {
|
||||||
|
const ch = lower[i]
|
||||||
|
if (!/[lsrtnmpcfgdboe]/u.test(ch)) continue
|
||||||
|
const doubled = `${lower.slice(0, i)}${ch}${lower.slice(i)}`
|
||||||
|
if (COMMON_ENGLISH_WORDS.has(doubled)) {
|
||||||
|
return matchCase(latin, doubled)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 3) 끝에 글자가 빠졌거나 5글자 이상에서 1글자가 빠진 경우 (ㅔㅐㄴ냐ㅠㅣ[possibl] → possible, ㅡㅁ가애주[markdow] → markdown)
|
||||||
|
if (lower.length >= 5) {
|
||||||
|
for (const tail of ['e', 'n', 'd', 'r', 't', 'l', 'y']) {
|
||||||
|
const extended = `${lower}${tail}`
|
||||||
|
if (COMMON_ENGLISH_WORDS.has(extended)) {
|
||||||
|
return matchCase(latin, extended)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const insertionMatches: string[] = []
|
||||||
|
for (const candidate of COMMON_ENGLISH_WORDS) {
|
||||||
|
if (candidate.length !== lower.length + 1 || candidate[0] !== lower[0]) continue
|
||||||
|
if (editDistance(Array.from(lower), Array.from(candidate)) === 1) {
|
||||||
|
insertionMatches.push(candidate)
|
||||||
|
if (insertionMatches.length > 1) break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (insertionMatches.length === 1) {
|
||||||
|
return matchCase(latin, insertionMatches[0])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 4) 5글자 이상에서 이웃 키가 1글자 더 끼어든 경우 (재ㅜㅇㄷㄱㅅ[wondert] → wonder, ㅗ디ㅣㅐㅔ[hellop] → hello)
|
||||||
|
if (lower.length >= 5) {
|
||||||
|
for (let i = lower.length - 1; i >= 1; i -= 1) {
|
||||||
|
const removed = lower[i]
|
||||||
|
const prev = lower[i - 1]
|
||||||
|
const next = lower[i + 1] ?? ''
|
||||||
|
if (!isQwertyAdjacent(removed, prev) && (!next || !isQwertyAdjacent(removed, next))) continue
|
||||||
|
const shortened = `${lower.slice(0, i)}${lower.slice(i + 1)}`
|
||||||
|
if (COMMON_ENGLISH_WORDS.has(shortened)) {
|
||||||
|
return matchCase(latin, shortened)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 5) 4글자 이상에서 1글자 치환 오타 (세갸ㅜㅎ[tpring] → spring, ㅗ디ㅣㅔ[hellp] → hello, 재기f[worlf] → world)
|
||||||
|
if (lower.length >= 4) {
|
||||||
|
const adjacentSubMatches: string[] = []
|
||||||
|
const anySubMatches: string[] = []
|
||||||
|
for (const candidate of COMMON_ENGLISH_WORDS) {
|
||||||
|
if (candidate.length !== lower.length) continue
|
||||||
|
let diffIndex = -1
|
||||||
|
let diffs = 0
|
||||||
|
for (let i = 0; i < lower.length; i += 1) {
|
||||||
|
if (lower[i] !== candidate[i]) {
|
||||||
|
diffs += 1
|
||||||
|
diffIndex = i
|
||||||
|
if (diffs > 1) break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (diffs !== 1 || diffIndex < 0) continue
|
||||||
|
anySubMatches.push(candidate)
|
||||||
|
if (isQwertyAdjacent(lower[diffIndex], candidate[diffIndex])) {
|
||||||
|
adjacentSubMatches.push(candidate)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (adjacentSubMatches.length === 1) {
|
||||||
|
return matchCase(latin, adjacentSubMatches[0])
|
||||||
|
}
|
||||||
|
if (lower.length >= 5 && anySubMatches.length === 1) {
|
||||||
|
return matchCase(latin, anySubMatches[0])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 두벌식 자판에서 조합되지 않고 낱자가 그대로 남는 2글자 영단어 (한글 단어·초성 줄임말이 될 수 없음).
|
* 두벌식 자판에서 조합되지 않고 낱자가 그대로 남는 2글자 영단어 (한글 단어·초성 줄임말이 될 수 없음).
|
||||||
* 예: "ㅑㄹ ㅑ 쇼ㅔㄷ hello 소두 ㅑㅅ 초뭏ㄷㄴ ㅑㅜ 10 ㄴㄷ채ㅜㅇㄴ" → "if I type hello then it changes in 10 seconds"
|
* 예: "ㅑㄹ ㅑ 쇼ㅔㄷ hello 소두 ㅑㅅ 초뭏ㄷㄴ ㅑㅜ 10 ㄴㄷ채ㅜㅇㄴ" → "if I type hello then it changes in 10 seconds"
|
||||||
|
|
@ -761,7 +989,8 @@ const LOOSE_JAMO_TWO_LETTER_ENGLISH: Readonly<Record<string, string>> = {
|
||||||
ㅔㅊ: 'PC',
|
ㅔㅊ: 'PC',
|
||||||
ㅅㅍ: 'TV',
|
ㅅㅍ: 'TV',
|
||||||
ㅑㅇ: 'ID',
|
ㅑㅇ: 'ID',
|
||||||
ㅑㅔ: 'IP'
|
ㅑㅔ: 'IP',
|
||||||
|
ㅑㅡ: "I'm"
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -802,7 +1031,43 @@ const VIM_EX_COMMANDS: ReadonlySet<string> = new Set([
|
||||||
*/
|
*/
|
||||||
const STANDALONE_SYLLABLE_ENGLISH: Readonly<Record<string, string>> = {
|
const STANDALONE_SYLLABLE_ENGLISH: Readonly<Record<string, string>> = {
|
||||||
재깅: 'world',
|
재깅: 'world',
|
||||||
쟈소: 'with'
|
쟈소: 'with',
|
||||||
|
소됴: 'they',
|
||||||
|
갸홋: 'right',
|
||||||
|
녀초: 'such',
|
||||||
|
생묘: 'today',
|
||||||
|
낵교: 'sorry',
|
||||||
|
잭교: 'worry',
|
||||||
|
쟈노: 'wish',
|
||||||
|
래쳔: 'focus',
|
||||||
|
랙댜후: 'foreign',
|
||||||
|
디드둣: 'element',
|
||||||
|
내챠미: 'social',
|
||||||
|
소대교: 'theory',
|
||||||
|
며쇄갸쇼: 'authority',
|
||||||
|
랴흠: 'figma',
|
||||||
|
님차: 'slack',
|
||||||
|
네둥: 'spend',
|
||||||
|
초먁: 'chair',
|
||||||
|
댜홋: 'eight',
|
||||||
|
랴딩: 'field',
|
||||||
|
랴그: 'firm',
|
||||||
|
랴노: 'fish',
|
||||||
|
래그: 'form',
|
||||||
|
햐기: 'girl',
|
||||||
|
해미: 'goal',
|
||||||
|
갸초: 'rich',
|
||||||
|
갸나: 'risk',
|
||||||
|
개차: 'rock',
|
||||||
|
노맏: 'shake',
|
||||||
|
냐후: 'sign',
|
||||||
|
샛미: 'total',
|
||||||
|
셔구: 'turn',
|
||||||
|
츠맏: 'cmake',
|
||||||
|
녀애: 'sudo',
|
||||||
|
먁: 'air',
|
||||||
|
앳: 'dot',
|
||||||
|
므: 'am'
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -817,7 +1082,28 @@ const CONTEXTUAL_SYLLABLE_ENGLISH: Readonly<Record<string, string>> = {
|
||||||
쟈소: 'with',
|
쟈소: 'with',
|
||||||
소드: 'them',
|
소드: 'them',
|
||||||
소무: 'than',
|
소무: 'than',
|
||||||
미내: 'also'
|
미내: 'also',
|
||||||
|
애주: 'down',
|
||||||
|
새주: 'town',
|
||||||
|
챠쇼: 'city',
|
||||||
|
챔초: 'coach',
|
||||||
|
쳐기: 'curl'
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 영문 어절 바로 뒤(또는 영문 문맥 안)에서 한글 자판으로 찍힌 1음절 영문 기능어 (새 → to, 애 → do, 무 → an, 뭉 → and, 랙 → for 등).
|
||||||
|
* 예: "I want 새 애 this" → "I want to do this", "into english 새 애" → "into english to do"
|
||||||
|
*/
|
||||||
|
const ENGLISH_CLAUSE_SINGLE_SYLLABLE: Readonly<Record<string, string>> = {
|
||||||
|
새: 'to',
|
||||||
|
애: 'do',
|
||||||
|
무: 'an',
|
||||||
|
뭉: 'and',
|
||||||
|
랙: 'for',
|
||||||
|
좨: 'who',
|
||||||
|
양: 'did',
|
||||||
|
햇: 'got',
|
||||||
|
둥: 'end'
|
||||||
}
|
}
|
||||||
|
|
||||||
const SURROUNDED_SINGLE_SYLLABLE_ENGLISH: Readonly<Record<string, string>> = {
|
const SURROUNDED_SINGLE_SYLLABLE_ENGLISH: Readonly<Record<string, string>> = {
|
||||||
|
|
@ -925,9 +1211,41 @@ const COMMON_TECH_ACRONYMS: ReadonlySet<string> = new Set([
|
||||||
'eks',
|
'eks',
|
||||||
'rds',
|
'rds',
|
||||||
'pc',
|
'pc',
|
||||||
'tv'
|
'tv',
|
||||||
|
'cms',
|
||||||
|
'crm',
|
||||||
|
'erp',
|
||||||
|
'sns',
|
||||||
|
'rls',
|
||||||
|
'vad',
|
||||||
|
'pwa',
|
||||||
|
'spa',
|
||||||
|
'msa',
|
||||||
|
'ssr',
|
||||||
|
'csr',
|
||||||
|
'eu',
|
||||||
|
'tm',
|
||||||
|
'rn',
|
||||||
|
'tl'
|
||||||
])
|
])
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 두벌식 한글 상태에서 Shift를 눌러 영문 대문자 약어를 쳤을 때 완성형 음절로 조합되지만,
|
||||||
|
* 한국어에서는 단독 1음절 명사로 쓰이지 않는 어간 (뒤에 조사나 한국어 명사가 붙으면 즉시 약어로 복원).
|
||||||
|
* 예: "츤를" → "CMS를", "먀를" → "AI를", "틔을" → "XML을", "뗘를" → "EU를", "넴를" → "SPA를", "젳를" → "VPC를"
|
||||||
|
*/
|
||||||
|
const NON_KOREAN_NOUN_ACRONYM_STEMS: Readonly<Record<string, string>> = {
|
||||||
|
츤: 'CMS',
|
||||||
|
먀: 'AI',
|
||||||
|
틔: 'XML',
|
||||||
|
뗘: 'EU',
|
||||||
|
뎌: 'EU',
|
||||||
|
넴: 'SPA',
|
||||||
|
섐: 'SPA',
|
||||||
|
젳: 'VPC',
|
||||||
|
춗: 'CORS'
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 한글 자판 상태로 친 영단어(또는 영단어+한국어 조사)인가 → 고칠 문자열을 돌려준다.
|
* 한글 자판 상태로 친 영단어(또는 영단어+한국어 조사)인가 → 고칠 문자열을 돌려준다.
|
||||||
*
|
*
|
||||||
|
|
@ -942,14 +1260,16 @@ export function detectHangulTypedLatin(
|
||||||
context: { hangul: number; latin: number },
|
context: { hangul: number; latin: number },
|
||||||
options: LayoutDetectOptions = {}
|
options: LayoutDetectOptions = {}
|
||||||
): string | null {
|
): string | null {
|
||||||
// 0. 앞부분이 이미 영문으로 변환된 뒤 한글 자판으로 남은 글자(낱자 포함)를 이어 친 경우 (hellㅐ → hello, githuㅠ → github, some샤ㅡㄷ → sometime)
|
// 0. 앞부분이 이미 영문으로 변환된 뒤 한글 자판으로 남은 글자(낱자 포함)를 이어 친 경우 (hellㅐ → hello, githuㅠ → github, some샤ㅡㄷ → sometime, can'ㅅ → can't)
|
||||||
const latinThenJamoMatch = word.match(/^([A-Za-z]+)([가-힣ㄱ-ㆎ]*[ㄱ-ㆎ][가-힣ㄱ-ㆎ]*)$/u)
|
const latinThenJamoMatch = word.match(/^([A-Za-z']+)([가-힣ㄱ-ㆎ]*[ㄱ-ㆎ][가-힣ㄱ-ㆎ]*)$/u)
|
||||||
if (latinThenJamoMatch) {
|
if (latinThenJamoMatch) {
|
||||||
const [, engPrefix, jamoSuffix] = latinThenJamoMatch
|
const [, engPrefix, jamoSuffix] = latinThenJamoMatch
|
||||||
const suffixLatin = hangulToLatin(jamoSuffix)
|
const suffixLatin = hangulToLatin(jamoSuffix)
|
||||||
const combinedLatin = engPrefix + suffixLatin
|
const combinedLatin = (engPrefix + suffixLatin).replace(/’/gu, "'")
|
||||||
if (/^[A-Za-z]+$/u.test(combinedLatin) && isCommonEnglishWord(combinedLatin)) {
|
const resolvedCombined =
|
||||||
return combinedLatin
|
resolveExactOrKnownEnglish(combinedLatin) ?? findFuzzyEnglishForLooseJamo(combinedLatin)
|
||||||
|
if (resolvedCombined) {
|
||||||
|
return resolvedCombined
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
/^[A-Za-z]+$/u.test(suffixLatin) &&
|
/^[A-Za-z]+$/u.test(suffixLatin) &&
|
||||||
|
|
@ -974,9 +1294,9 @@ export function detectHangulTypedLatin(
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!HANGUL_ANY.test(word) || !/^[가-힣ㄱ-ㆎ]+$/u.test(word)) return null
|
if (!HANGUL_ANY.test(word) || !/^[가-힣ㄱ-ㆎ'’]+$/u.test(word)) return null
|
||||||
|
|
||||||
// 0b. 낱자로 풀린 2글자 영단어 (ㅑㄹ → if, ㅑㅅ → it, ㅑㅜ → in, ㅑㄴ → is, ㅐㄹ → of, ㅐㅜ → on 등)
|
// 0b. 낱자로 풀린 2글자 영단어 (ㅑㄹ → if, ㅑㅅ → it, ㅑㅜ → in, ㅑㄴ → is, ㅐㄹ → of, ㅐㅜ → on, ㅑㅡ → I'm 등)
|
||||||
const twoLetter = LOOSE_JAMO_TWO_LETTER_ENGLISH[word]
|
const twoLetter = LOOSE_JAMO_TWO_LETTER_ENGLISH[word]
|
||||||
if (twoLetter) return twoLetter
|
if (twoLetter) return twoLetter
|
||||||
|
|
||||||
|
|
@ -984,16 +1304,35 @@ export function detectHangulTypedLatin(
|
||||||
const standaloneSyllable = STANDALONE_SYLLABLE_ENGLISH[word]
|
const standaloneSyllable = STANDALONE_SYLLABLE_ENGLISH[word]
|
||||||
if (standaloneSyllable) return standaloneSyllable
|
if (standaloneSyllable) return standaloneSyllable
|
||||||
|
|
||||||
// 0c. 영문 문맥 안의 단독 모음 'ㅑ' → 'I' (예: "ㅑㄹ ㅑ 쇼ㅔㄷ" → "if I type")
|
// 0c. 단독 모음 'ㅑ' → 'I' (공백 등 단어 경계가 확정되었거나 영문 문맥일 때), 양쪽 영문 사이 단독 자음 'ㅁ' → 'a'
|
||||||
if (word === 'ㅑ' && (options.afterEnglishWord || options.nextIsEnglish || context.latin >= 2)) {
|
// 한국어 감탄사 '야'는 초성 'ㅇ'이 포함된 완성형 음절('야')이며, 홀로 떨어진 호환 모음 'ㅑ'(i 키 단독)는 한국어 단어가 될 수 없다.
|
||||||
|
// 아직 치는 중일 때(if=ㅑㄹ, in=ㅑㅜ, it=ㅑㅅ 등)만 기다리고, 뒤에 공백이 왔거나 영문 문맥이면 즉시 'I'로 복원한다.
|
||||||
|
if (
|
||||||
|
word === 'ㅑ' &&
|
||||||
|
(options.hasWordBoundaryAfter || options.afterEnglishWord || options.nextIsEnglish || context.latin >= 1)
|
||||||
|
) {
|
||||||
return 'I'
|
return 'I'
|
||||||
}
|
}
|
||||||
|
if (word === 'ㅁ' && options.afterEnglishWord && options.nextIsEnglish) {
|
||||||
|
return 'a'
|
||||||
|
}
|
||||||
|
if (word === '츤' && options.hasWordBoundaryAfter) {
|
||||||
|
return 'CMS'
|
||||||
|
}
|
||||||
|
|
||||||
// 0d. 영문 문맥 안의 기능어 음절 (소두 → then, 조두 → when, 양쪽이 영문일 때의 새 → to / 무 → an / 므 → am)
|
// 0d. 영문 문맥 안의 기능어 음절 (소두 → then, 조두 → when, 새 → to, 애 → do, 무 → an, 내 → so, 해 → go)
|
||||||
const contextualMulti = CONTEXTUAL_SYLLABLE_ENGLISH[word]
|
const contextualMulti = CONTEXTUAL_SYLLABLE_ENGLISH[word]
|
||||||
if (contextualMulti && (options.afterEnglishWord || options.nextIsEnglish || context.latin >= 3)) {
|
if (contextualMulti && (options.afterEnglishWord || options.nextIsEnglish || context.latin >= 3)) {
|
||||||
return contextualMulti
|
return contextualMulti
|
||||||
}
|
}
|
||||||
|
const clauseSingle = ENGLISH_CLAUSE_SINGLE_SYLLABLE[word]
|
||||||
|
if (
|
||||||
|
clauseSingle &&
|
||||||
|
((options.afterEnglishWord && (options.hasWordBoundaryAfter || options.nextIsEnglish || context.latin >= 3)) ||
|
||||||
|
(options.nextIsEnglish && context.latin >= 4 && context.latin > context.hangul * 2))
|
||||||
|
) {
|
||||||
|
return clauseSingle
|
||||||
|
}
|
||||||
const surroundedSingle = SURROUNDED_SINGLE_SYLLABLE_ENGLISH[word]
|
const surroundedSingle = SURROUNDED_SINGLE_SYLLABLE_ENGLISH[word]
|
||||||
if (surroundedSingle && options.afterEnglishWord && options.nextIsEnglish) {
|
if (surroundedSingle && options.afterEnglishWord && options.nextIsEnglish) {
|
||||||
return surroundedSingle
|
return surroundedSingle
|
||||||
|
|
@ -1017,20 +1356,39 @@ export function detectHangulTypedLatin(
|
||||||
// 핵심 한국어 어휘는 절대 영어로 바꾸지 않는다.
|
// 핵심 한국어 어휘는 절대 영어로 바꾸지 않는다.
|
||||||
if (CORE_KOREAN_WORDS.has(word)) return null
|
if (CORE_KOREAN_WORDS.has(word)) return null
|
||||||
|
|
||||||
const latin = hangulToLatin(word)
|
const latin = hangulToLatin(word).replace(/’/gu, "'")
|
||||||
if (!/^[A-Za-z]+$/u.test(latin) || latin.length < 3) return null
|
if (!/^[A-Za-z']+$/u.test(latin) || latin.length < 3) return null
|
||||||
|
|
||||||
|
// 아포스트로피가 들어간 두벌식 영문 축약형 (ㅊ무'ㅅ → can't, ㅊ무ㅜ'ㅅ → can't, 애ㅜ'ㅅ → don't, ㅑ'ㅡ → I'm, ㅑㅅ'ㄴ → it's, ㅊ무'ㅅ는 → can't는)
|
||||||
|
if (latin.includes("'")) {
|
||||||
|
const directContraction = resolveContraction(latin) ?? findFuzzyEnglishForLooseJamo(latin)
|
||||||
|
if (directContraction) return directContraction
|
||||||
|
const contractionWithTail = word.match(/^([가-힣ㄱ-ㆎ]+'’?[가-힣ㄱ-ㆎ]+?)([가-힣]+)$/u)
|
||||||
|
if (contractionWithTail) {
|
||||||
|
const [, cStem, korSuffix] = contractionWithTail
|
||||||
|
const suffixKeys = hangulToLatin(korSuffix)
|
||||||
|
if (PARTICLE_KEYS.has(suffixKeys)) {
|
||||||
|
const stemLatin = hangulToLatin(cStem).replace(/’/gu, "'")
|
||||||
|
const resolvedStem = resolveContraction(stemLatin) ?? findFuzzyEnglishForLooseJamo(stemLatin)
|
||||||
|
if (resolvedStem) return `${resolvedStem}${korSuffix}`
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
const hasLooseJamo = /[ㄱ-ㆎ]/u.test(word)
|
const hasLooseJamo = /[ㄱ-ㆎ]/u.test(word)
|
||||||
const chars = Array.from(word)
|
const chars = Array.from(word)
|
||||||
const hasRareSyllable = chars.some((char) => HANGUL_SYLLABLE.test(char) && !isCommonHangulSyllable(char))
|
const hasRareSyllable = chars.some((char) => HANGUL_SYLLABLE.test(char) && !isCommonHangulSyllable(char))
|
||||||
const allCommonSyllables = !hasLooseJamo && chars.every((char) => isCommonHangulSyllable(char))
|
const allCommonSyllables = !hasLooseJamo && chars.every((char) => isCommonHangulSyllable(char))
|
||||||
|
|
||||||
// 1. 낱자가 섞여 있고(정상 한국어 어절일 수 없음) 되돌린 결과가 흔한 영단어 또는 기술 약어면 문맥 무관 즉시 복원 (ㅗ디ㅣㅐ → hello, 쇼ㅔㄷ → type, 초뭏ㄷㄴ → changes, ㄴㄷ채ㅜㅇㄴ → seconds, ㅖㅇㄹ → PDF)
|
// 1. 낱자가 섞여 있고(정상 한국어 어절일 수 없음) 되돌린 결과가 흔한 영단어·오타 사전 영단어 또는 기술 약어면 문맥 무관 즉시 복원 (ㅗ디ㅣㅐ → hello, 쇼ㅔㄷ → type, 초뭏ㄷㄴ → changes, ㄴㄷ채ㅜㅇㄴ → seconds, ㅖㅇㄹ → PDF, ㅊ무ㅅ → can't)
|
||||||
if (hasLooseJamo) {
|
if (hasLooseJamo) {
|
||||||
if (COMMON_TECH_ACRONYMS.has(latin.toLowerCase()) && /[A-Z]/u.test(latin)) {
|
if (COMMON_TECH_ACRONYMS.has(latin.toLowerCase()) && /[A-Z]/u.test(latin)) {
|
||||||
return latin.toUpperCase()
|
return latin.toUpperCase()
|
||||||
}
|
}
|
||||||
if (isCommonEnglishWord(latin)) return latin
|
if (isCommonEnglishWord(latin)) return latin
|
||||||
|
const knownEnglishFix = fixKnownMisspelling(latin)
|
||||||
|
if (knownEnglishFix) return knownEnglishFix
|
||||||
if (COMMON_TECH_ACRONYMS.has(latin.toLowerCase()) && latin.length >= 3) {
|
if (COMMON_TECH_ACRONYMS.has(latin.toLowerCase()) && latin.length >= 3) {
|
||||||
return latin.toLowerCase()
|
return latin.toLowerCase()
|
||||||
}
|
}
|
||||||
|
|
@ -1075,10 +1433,23 @@ export function detectHangulTypedLatin(
|
||||||
if (stemLatin.length >= 3 && isCommonEnglishWord(stemLatin)) {
|
if (stemLatin.length >= 3 && isCommonEnglishWord(stemLatin)) {
|
||||||
return `${stemLatin}${korSuffix}`
|
return `${stemLatin}${korSuffix}`
|
||||||
}
|
}
|
||||||
const transposedStem = findAdjacentTransposedEnglishWord(stemLatin)
|
const transposedStem =
|
||||||
|
findAdjacentTransposedEnglishWord(stemLatin) ?? findFuzzyEnglishForLooseJamo(stemLatin)
|
||||||
if (transposedStem) {
|
if (transposedStem) {
|
||||||
return `${transposedStem}${korSuffix}`
|
return `${transposedStem}${korSuffix}`
|
||||||
}
|
}
|
||||||
|
// Araso 일반 규칙: 2~4자 미조합 호환 자모(ㅏㅅㅌ, ㅎㅅㅌ, ㅠㅅㄴ, ㅐㅅㅅ, ㄷㅅㄹ, ㅜㄹㅅ, ㅊㄷㅐ, ㅔㅡ 등) 뒤에
|
||||||
|
// 바로 한국어 조사가 오고 약어 끝소리 받침 호응이 맞으면 사전 등록 여부와 무관하게 대문자 약어+조사로 복원한다.
|
||||||
|
if (
|
||||||
|
isParticleSuffix &&
|
||||||
|
/^[ㄱ-ㆎ]{2,4}$/u.test(jamoPrefix) &&
|
||||||
|
!/^[ㅋㅎㅠㅜㅇ]+$/u.test(jamoPrefix) &&
|
||||||
|
stemLatin.length >= 2 &&
|
||||||
|
stemLatin.length <= 4 &&
|
||||||
|
particleAgrees(korSuffix, finalSoundOfAcronym(stemLatin)) !== false
|
||||||
|
) {
|
||||||
|
return `${stemLatin.toUpperCase()}${korSuffix}`
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1097,6 +1468,68 @@ export function detectHangulTypedLatin(
|
||||||
const tailConv = latinToHangul(tail)
|
const tailConv = latinToHangul(tail)
|
||||||
if (tailConv.complete) return `${transposedStem}${tailConv.text}`
|
if (tailConv.complete) return `${transposedStem}${tailConv.text}`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 2.5. 낱자가 섞여 있어 한국어 단어일 수 없는 토큰의 영문 1타 오타 복원 (ㅗ디ㅐ → hello, ㅔㅐㄴ냐ㅠㅣ → possible, 세갸ㅜㅎ → spring, ㅊ무ㅜㅅ → can't)
|
||||||
|
const fuzzyEnglish = findFuzzyEnglishForLooseJamo(latin)
|
||||||
|
if (fuzzyEnglish) return fuzzyEnglish
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2b. 낱자 없이 완성형 음절로 조합된 영문 약어/단어 + 한국어 조사 (Araso 받침 호응 및 비상용 명사 어간 판별)
|
||||||
|
// 예: "츤를" → "CMS를", "먀를" → "AI를", "틔을" → "XML을", "뗘를" → "EU를", "눈를" → "SNS를", "운를" → "DNS를", "긴를" → "RLS를", "쓰은" → "TM은", "꾸은" → "RN은"
|
||||||
|
if (!hasLooseJamo && chars.length >= 2) {
|
||||||
|
for (let splitIdx = 1; splitIdx < chars.length; splitIdx += 1) {
|
||||||
|
const stem = chars.slice(0, splitIdx).join('')
|
||||||
|
const korSuffix = chars.slice(splitIdx).join('')
|
||||||
|
const suffixKeys = hangulToLatin(korSuffix)
|
||||||
|
if (!PARTICLE_KEYS.has(suffixKeys)) continue
|
||||||
|
if (CORE_KOREAN_WORDS.has(word)) continue
|
||||||
|
|
||||||
|
const directAcronym = NON_KOREAN_NOUN_ACRONYM_STEMS[stem]
|
||||||
|
if (directAcronym) {
|
||||||
|
return `${directAcronym}${korSuffix}`
|
||||||
|
}
|
||||||
|
|
||||||
|
const standaloneStem = STANDALONE_SYLLABLE_ENGLISH[stem]
|
||||||
|
if (standaloneStem) {
|
||||||
|
return `${standaloneStem}${korSuffix}`
|
||||||
|
}
|
||||||
|
|
||||||
|
const stemLatin = hangulToLatin(stem)
|
||||||
|
const lowerStemLatin = stemLatin.toLowerCase()
|
||||||
|
const stemHasRareSyllable = Array.from(stem).some((ch) => !isCommonHangulSyllable(ch))
|
||||||
|
|
||||||
|
const korFinal = finalSoundOfHangul(stem)
|
||||||
|
const korAgrees = korFinal !== null ? particleAgrees(korSuffix, korFinal) : null
|
||||||
|
const acronymAgrees = particleAgrees(korSuffix, finalSoundOfAcronym(stemLatin))
|
||||||
|
|
||||||
|
// Araso 일반 받침 호응 판별:
|
||||||
|
// 한글 어간의 받침과 조사가 문법적으로 충돌하는데(korAgrees === false: 예 '츤'+'를', '눈'+'를', '운'+'를', '긴'+'를',
|
||||||
|
// '쓰'+'은', '꾸'+'은', '띠'+'이', '꺼'+'을', '씨'+'은'), 영문 약어 알파벳 끝소리 발음과는 호응하면(acronymAgrees === true)
|
||||||
|
// 사전 등록 여부와 무관하게 대문자 약어+조사로 복원한다.
|
||||||
|
if (
|
||||||
|
korAgrees === false &&
|
||||||
|
stemLatin.length >= 2 &&
|
||||||
|
stemLatin.length <= 4 &&
|
||||||
|
((/[A-Z]/u.test(stemLatin) && stemLatin.length === 2 && korFinal === 'vowel') ||
|
||||||
|
(acronymAgrees === true &&
|
||||||
|
(COMMON_TECH_ACRONYMS.has(lowerStemLatin) ||
|
||||||
|
/[A-Z]/u.test(stemLatin) ||
|
||||||
|
stemHasRareSyllable ||
|
||||||
|
(stem.length === 1 &&
|
||||||
|
stemLatin.length === 3 &&
|
||||||
|
(korSuffix === '를' || korSuffix === '가' || korSuffix === '와')))))
|
||||||
|
) {
|
||||||
|
return `${stemLatin.toUpperCase()}${korSuffix}`
|
||||||
|
}
|
||||||
|
|
||||||
|
if (COMMON_TECH_ACRONYMS.has(lowerStemLatin) && stemHasRareSyllable) {
|
||||||
|
return `${stemLatin.toUpperCase()}${korSuffix}`
|
||||||
|
}
|
||||||
|
|
||||||
|
if (stemHasRareSyllable && stemLatin.length >= 3 && isCommonEnglishWord(stemLatin)) {
|
||||||
|
return `${stemLatin}${korSuffix}`
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 3. 비상용 음절(솓 → the 등)이면서 흔한 영단어면 복원
|
// 3. 비상용 음절(솓 → the 등)이면서 흔한 영단어면 복원
|
||||||
|
|
@ -1165,9 +1598,11 @@ const ENGLISH_MISSPELLINGS: Readonly<Record<string, string>> = {
|
||||||
neccessary: 'necessary', necesary: 'necessary', noticable: 'noticeable', occassion: 'occasion',
|
neccessary: 'necessary', necesary: 'necessary', noticable: 'noticeable', occassion: 'occasion',
|
||||||
persue: 'pursue', posession: 'possession', publically: 'publicly', realy: 'really', recomend: 'recommend',
|
persue: 'pursue', posession: 'possession', publically: 'publicly', realy: 'really', recomend: 'recommend',
|
||||||
refered: 'referred', relevent: 'relevant', succesful: 'successful', successfull: 'successful',
|
refered: 'referred', relevent: 'relevant', succesful: 'successful', successfull: 'successful',
|
||||||
suprise: 'surprise', truely: 'truly', withold: 'withhold', dont: "don't", doesnt: "doesn't", didnt: "didn't",
|
suprise: 'surprise', truely: 'truly', withold: 'withhold', cant: "can't", cannt: "can't", "cann't": "can't",
|
||||||
isnt: "isn't", wasnt: "wasn't", werent: "weren't", havent: "haven't", hasnt: "hasn't", couldnt: "couldn't",
|
dont: "don't", donnt: "don't", "donn't": "don't", doesnt: "doesn't", didnt: "didn't", wont: "won't",
|
||||||
wouldnt: "wouldn't", shouldnt: "shouldn't", arent: "aren't", thats: "that's", whats: "what's",
|
isnt: "isn't", wasnt: "wasn't", werent: "weren't", havent: "haven't", hasnt: "hasn't", hadnt: "hadn't",
|
||||||
|
couldnt: "couldn't", wouldnt: "wouldn't", shouldnt: "shouldn't", arent: "aren't", thats: "that's", whats: "what's",
|
||||||
|
hes: "he's", shes: "she's", lets: "let's",
|
||||||
im: "I'm", ive: "I've", youre: "you're", theyre: "they're", thanx: 'thanks', pls: 'please', plz: 'please',
|
im: "I'm", ive: "I've", youre: "you're", theyre: "they're", thanx: 'thanks', pls: 'please', plz: 'please',
|
||||||
wiht: 'with', woudl: 'would', coudl: 'could', shoudl: 'should', jsut: 'just', konw: 'know', nwo: 'now',
|
wiht: 'with', woudl: 'would', coudl: 'could', shoudl: 'should', jsut: 'just', konw: 'know', nwo: 'now',
|
||||||
waht: 'what', whcih: 'which', thsi: 'this', tihs: 'this', alos: 'also', aslo: 'also', abotu: 'about',
|
waht: 'what', whcih: 'which', thsi: 'this', tihs: 'this', alos: 'also', aslo: 'also', abotu: 'about',
|
||||||
|
|
@ -1268,12 +1703,30 @@ function isIgnored(word: string, ignored: readonly string[] | undefined): boolea
|
||||||
}
|
}
|
||||||
|
|
||||||
function looksLikeEnglishOrHangulTypedEnglish(tokenText: string): boolean {
|
function looksLikeEnglishOrHangulTypedEnglish(tokenText: string): boolean {
|
||||||
if (/^[A-Za-z]{2,}$/u.test(tokenText) && isCommonEnglishWord(tokenText)) return true
|
if (/^[A-Za-z']{2,}$/u.test(tokenText) && (isCommonEnglishWord(tokenText) || resolveContraction(tokenText) !== null)) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
if (LOOSE_JAMO_TWO_LETTER_ENGLISH[tokenText]) return true
|
if (LOOSE_JAMO_TWO_LETTER_ENGLISH[tokenText]) return true
|
||||||
if (STANDALONE_SYLLABLE_ENGLISH[tokenText] || CONTEXTUAL_SYLLABLE_ENGLISH[tokenText]) return true
|
if (
|
||||||
|
STANDALONE_SYLLABLE_ENGLISH[tokenText] ||
|
||||||
|
CONTEXTUAL_SYLLABLE_ENGLISH[tokenText] ||
|
||||||
|
ENGLISH_CLAUSE_SINGLE_SYLLABLE[tokenText]
|
||||||
|
) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
if (/[ㄱ-ㆎ]/u.test(tokenText)) {
|
if (/[ㄱ-ㆎ]/u.test(tokenText)) {
|
||||||
const latin = hangulToLatin(tokenText)
|
const latin = hangulToLatin(tokenText).replace(/’/gu, "'")
|
||||||
if (/^[A-Za-z]{3,}$/u.test(latin) && isCommonEnglishWord(latin)) return true
|
if (latin.includes("'") && (resolveContraction(latin) !== null || findFuzzyEnglishForLooseJamo(latin) !== null)) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
if (
|
||||||
|
/^[A-Za-z]{3,}$/u.test(latin) &&
|
||||||
|
(isCommonEnglishWord(latin) ||
|
||||||
|
fixKnownMisspelling(latin) !== null ||
|
||||||
|
findFuzzyEnglishForLooseJamo(latin) !== null)
|
||||||
|
) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
@ -1372,6 +1825,7 @@ export function detectTypos(prefix: string, options: TypoDetectOptions = {}): Ty
|
||||||
afterKoreanWord,
|
afterKoreanWord,
|
||||||
afterEnglishWord,
|
afterEnglishWord,
|
||||||
nextIsEnglish,
|
nextIsEnglish,
|
||||||
|
hasWordBoundaryAfter: /[ \t.,!?;:]/u.test(after),
|
||||||
vocabulary: options.vocabulary
|
vocabulary: options.vocabulary
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
@ -1423,7 +1877,56 @@ export function detectTypos(prefix: string, options: TypoDetectOptions = {}): Ty
|
||||||
}
|
}
|
||||||
|
|
||||||
afterKoreanWord = HANGUL_SYLLABLE.test(token.text)
|
afterKoreanWord = HANGUL_SYLLABLE.test(token.text)
|
||||||
afterEnglishWord = /^[A-Za-z]+$/u.test(token.text)
|
afterEnglishWord = /^[A-Za-z']+$/u.test(token.text)
|
||||||
|
|
||||||
|
// 영단어 바로 뒤에 실수로 눌린 짝 없는 여는 대괄호 제거 (예: p 옆 키 오타인 "help[ " → "help ")
|
||||||
|
if (
|
||||||
|
!options.terminalMode &&
|
||||||
|
after === '[' &&
|
||||||
|
(token.start === 0 || /\s/u.test(before)) &&
|
||||||
|
/\s/u.test(prefix[token.end + 1] ?? '') &&
|
||||||
|
/^[A-Za-z]{3,}$/u.test(token.text) &&
|
||||||
|
isCommonEnglishWord(token.text) &&
|
||||||
|
!prefix.slice(token.end + 1).includes(']')
|
||||||
|
) {
|
||||||
|
out.push({
|
||||||
|
start: token.start,
|
||||||
|
end: token.end + 1,
|
||||||
|
from: `${token.text}[`,
|
||||||
|
to: token.text,
|
||||||
|
source: 'layout'
|
||||||
|
})
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
// 공백으로 잘못 띄어 쓴 영어 재귀대명사 결합 (예: "my self " → "myself ")
|
||||||
|
if (
|
||||||
|
!options.terminalMode &&
|
||||||
|
/^(?:self|selves)$/iu.test(token.text) &&
|
||||||
|
index > 0 &&
|
||||||
|
(/[ \t.,!?;:]/u.test(after) || !options.layoutOnly)
|
||||||
|
) {
|
||||||
|
const prevToken = tokens[index - 1]
|
||||||
|
if (
|
||||||
|
prevToken &&
|
||||||
|
prevToken.end + 1 === token.start &&
|
||||||
|
prefix[prevToken.end] === ' ' &&
|
||||||
|
!out.some((existing) => existing.end > prevToken.start)
|
||||||
|
) {
|
||||||
|
const mergedReflexive = `${prevToken.text}${token.text}`
|
||||||
|
if (/^(?:myself|yourself|himself|herself|ourselves|themselves|yourselves)$/iu.test(mergedReflexive)) {
|
||||||
|
out.push({
|
||||||
|
start: prevToken.start,
|
||||||
|
end: token.end,
|
||||||
|
from: `${prevToken.text} ${token.text}`,
|
||||||
|
to: mergedReflexive,
|
||||||
|
source: 'layout'
|
||||||
|
})
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (options.layoutOnly) continue
|
if (options.layoutOnly) continue
|
||||||
if (looksTechnical(prefix, token)) continue
|
if (looksTechnical(prefix, token)) continue
|
||||||
|
|
||||||
|
|
@ -1468,9 +1971,14 @@ export function detectJamoNoise(prefix: string, options: { ignoredWords?: readon
|
||||||
if (isIgnored(token.text, options.ignoredWords)) return
|
if (isIgnored(token.text, options.ignoredWords)) return
|
||||||
const chars = Array.from(token.text)
|
const chars = Array.from(token.text)
|
||||||
if (chars.length === 1 && COMPAT_JAMO.test(chars[0])) {
|
if (chars.length === 1 && COMPAT_JAMO.test(chars[0])) {
|
||||||
// 글 첫 단어인 "ㅇ"(응)·"ㄱ"(고) 는 대답이다 — 앞에 한글 단어가 있을 때만 잡음으로 본다.
|
// 글 첫 단어인 "ㅇ"(응)·"ㄱ"(고) 는 대답이다 — 앞에 온전한 단어가 있을 때만 잡음으로 본다.
|
||||||
const previous = tokens[index - 1]
|
const previous = tokens[index - 1]
|
||||||
if (!previous || !HANGUL_SYLLABLE.test(previous.text) || EMOTIVE_JAMO.has(chars[0])) return
|
if (!previous || EMOTIVE_JAMO.has(chars[0])) return
|
||||||
|
const prevIsKorean = HANGUL_SYLLABLE.test(previous.text)
|
||||||
|
const prevIsEnglish = /^[A-Za-z']/u.test(previous.text) || /[ㄱ-ㆎ]/u.test(previous.text)
|
||||||
|
if (!prevIsKorean && !prevIsEnglish) return
|
||||||
|
// 영문 뒤의 'ㅑ'(I), 'ㅁ'(a), 'ㅇ' 은 잡음 삭제 대상에서 제외한다.
|
||||||
|
if (!prevIsKorean && (chars[0] === 'ㅑ' || chars[0] === 'ㅁ' || chars[0] === 'ㅇ')) return
|
||||||
// 뒤 공백과 함께 지운다 — 앞 공백을 지우면 끝에 남은 낱자("있고 ㅇ")가 "있고" 가 되어, 모델이 끝난
|
// 뒤 공백과 함께 지운다 — 앞 공백을 지우면 끝에 남은 낱자("있고 ㅇ")가 "있고" 가 되어, 모델이 끝난
|
||||||
// 단어에 글자를 붙이려 하거나 곧바로 턴을 닫았다(실측 2026-10-17: 교정이 붙은 첫 후보 4번 모두 빈 출력).
|
// 단어에 글자를 붙이려 하거나 곧바로 턴을 닫았다(실측 2026-10-17: 교정이 붙은 첫 후보 4번 모두 빈 출력).
|
||||||
const end = /[ \t]/u.test(prefix[token.end] ?? '') ? token.end + 1 : token.end
|
const end = /[ \t]/u.test(prefix[token.end] ?? '') ? token.end + 1 : token.end
|
||||||
|
|
@ -1495,17 +2003,101 @@ export function detectJamoNoise(prefix: string, options: { ignoredWords?: readon
|
||||||
return out
|
return out
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function isIntentionalJamoToken(word: string): boolean {
|
||||||
|
if (/^[ㅋㅎㅠㅜㅇ]+$/u.test(word)) return true
|
||||||
|
if (word === 'ㅇㅋ' || word === 'ㄱㅅ' || word === 'ㅊㅋ' || word === 'ㅅㄱ') return true
|
||||||
|
if (/^[가-힣]+[ㅋㅎㅠㅜ]+$/u.test(word)) return true
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 모델에 오타 검사를 맡길 만큼 수상한 구간인가 — 낱자가 섞인 한글 단어, 드문 음절, 결정적 탐지 결과.
|
* 모델에 오타 검사를 맡길 만큼 수상한 구간인가 — 낱자가 섞인 한글/한영 오타 단어, 드문 음절, 미등록 소문자 영단어.
|
||||||
*
|
*
|
||||||
* 제안 창에 교정을 함께 내놓을 때 멈출 때마다 모델 검사(0.5초)를 하면 제안이 그만큼 늦는다.
|
* 제안 창에 교정을 함께 내놓을 때 멈출 때마다 모델 검사(0.5초)를 하면 제안이 그만큼 늦는다.
|
||||||
* 수상한 흔적이 있을 때만 묻는다.
|
* 수상한 흔적이 있을 때만 즉시 묻는다.
|
||||||
*/
|
*/
|
||||||
export function hasSuspiciousTypo(region: string): boolean {
|
export function hasSuspiciousTypo(region: string): boolean {
|
||||||
if (detectJamoNoise(region).length > 0) return true
|
if (detectJamoNoise(region).length > 0) return true
|
||||||
return tokenizeWords(region).some((token) =>
|
return tokenizeWords(region).some((token) => {
|
||||||
Array.from(token.text).some((char) => HANGUL_SYLLABLE.test(char) && !isCommonHangulSyllable(char))
|
const word = token.text
|
||||||
)
|
if (/[ㄱ-ㆎ]/u.test(word) && !isIntentionalJamoToken(word)) return true
|
||||||
|
if (Array.from(word).some((char) => HANGUL_SYLLABLE.test(char) && !isCommonHangulSyllable(char))) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
if (
|
||||||
|
/^[a-z]{4,}$/u.test(word) &&
|
||||||
|
!isCommonEnglishWord(word) &&
|
||||||
|
!COMMON_TECH_ACRONYMS.has(word)
|
||||||
|
) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 로컬 LLM(Gemma)이 두벌식 한/영 자판 오타와 철자 오타가 결합된 어절을 정확히 알아보도록
|
||||||
|
* 수상한 어절의 두벌식 영문/한글 변환 힌트 줄을 만든다.
|
||||||
|
*/
|
||||||
|
export function buildModelTypoHints(sentence: string): string[] {
|
||||||
|
const hints: string[] = []
|
||||||
|
const seen = new Set<string>()
|
||||||
|
for (const token of tokenizeWords(sentence)) {
|
||||||
|
const word = token.text
|
||||||
|
if (seen.has(word) || isIntentionalJamoToken(word)) continue
|
||||||
|
|
||||||
|
if (HANGUL_ANY.test(word) && /^[가-힣ㄱ-ㆎ]+$/u.test(word) && !CORE_KOREAN_WORDS.has(word)) {
|
||||||
|
const hasLooseJamo = /[ㄱ-ㆎ]/u.test(word)
|
||||||
|
const hasRareSyllable = Array.from(word).some(
|
||||||
|
(ch) => HANGUL_SYLLABLE.test(ch) && !isCommonHangulSyllable(ch)
|
||||||
|
)
|
||||||
|
const jamoPrefixAndHangulTail = word.match(/^([가-힣ㄱ-ㆎ]*[ㄱ-ㆎ][가-힣ㄱ-ㆎ]*?)([가-힣]+)$/u)
|
||||||
|
if (jamoPrefixAndHangulTail) {
|
||||||
|
const [, jamoPrefix, korSuffix] = jamoPrefixAndHangulTail
|
||||||
|
const stemLatin = hangulToLatin(jamoPrefix)
|
||||||
|
const suffixKeys = hangulToLatin(korSuffix)
|
||||||
|
if (/^[A-Za-z]{2,}$/u.test(stemLatin) && PARTICLE_KEYS.has(suffixKeys)) {
|
||||||
|
seen.add(word)
|
||||||
|
hints.push(`- "${word}" (영문 자판 키 입력값: "${stemLatin}${korSuffix}")`)
|
||||||
|
if (hints.length >= 6) break
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const fullLatin = hangulToLatin(word)
|
||||||
|
if (
|
||||||
|
/^[A-Za-z]{3,}$/u.test(fullLatin) &&
|
||||||
|
(hasLooseJamo || hasRareSyllable || isCommonEnglishWord(fullLatin))
|
||||||
|
) {
|
||||||
|
let particleHint = ''
|
||||||
|
for (let i = fullLatin.length - 2; i >= 3; i -= 1) {
|
||||||
|
const stem = fullLatin.slice(0, i)
|
||||||
|
const tail = fullLatin.slice(i)
|
||||||
|
if (PARTICLE_KEYS.has(tail)) {
|
||||||
|
const tailKor = latinToHangul(tail)
|
||||||
|
if (tailKor.complete) {
|
||||||
|
particleHint = ` 또는 "${stem}${tailKor.text}"`
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
seen.add(word)
|
||||||
|
hints.push(`- "${word}" (영문 자판 키 입력값: "${fullLatin}"${particleHint})`)
|
||||||
|
if (hints.length >= 6) break
|
||||||
|
}
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
if (/^[A-Za-z]{4,}$/u.test(word) && !isCommonEnglishWord(word) && !COMMON_TECH_ACRONYMS.has(word.toLowerCase())) {
|
||||||
|
const conv = latinToHangul(word)
|
||||||
|
const hangulCount = Array.from(conv.text).filter((ch) => HANGUL_SYLLABLE.test(ch)).length
|
||||||
|
if (hangulCount >= 2) {
|
||||||
|
seen.add(word)
|
||||||
|
hints.push(`- "${word}" (한글 자판 조합값: "${conv.text}")`)
|
||||||
|
if (hints.length >= 6) break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return hints
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -1557,23 +2149,86 @@ export function isPlausibleTypoFix(from: string, to: string): boolean {
|
||||||
if (/\s/u.test(from) || /\s/u.test(to)) return false
|
if (/\s/u.test(from) || /\s/u.test(to)) return false
|
||||||
if (/\d/u.test(from) || /\d/u.test(to)) return false
|
if (/\d/u.test(from) || /\d/u.test(to)) return false
|
||||||
if (from.toLowerCase() === to.toLowerCase()) return false
|
if (from.toLowerCase() === to.toLowerCase()) return false
|
||||||
|
|
||||||
|
const fromHasHangulOrJamo = HANGUL_ANY.test(from)
|
||||||
|
const fromPureLatin = /^[A-Za-z']+$/u.test(from)
|
||||||
|
const toPureLatin = /^[A-Za-z']+$/u.test(to)
|
||||||
|
|
||||||
|
// 1) 한→영 (또는 한+조사 → 영+조사) 자판 오타 + 철자 오타 복합 교정
|
||||||
|
// 예: ㅗ디ㅐ(helo) → hello, ㅡㅁ가둥(markend) → markdown, 네갸ㅜㅎ에서 → spring에서, ㅊ무ㅜ'ㅅ → can't
|
||||||
|
const toEngKorMatch = /^([A-Za-z']{2,})([가-힣]*)$/u.exec(to)
|
||||||
|
if (fromHasHangulOrJamo && toEngKorMatch) {
|
||||||
|
const [, toEng, toKorSuffix] = toEngKorMatch
|
||||||
|
if (toEng.length < 3) return false
|
||||||
|
const fromStem =
|
||||||
|
toKorSuffix && from.endsWith(toKorSuffix) ? from.slice(0, from.length - toKorSuffix.length) : from
|
||||||
|
if (!fromStem || CORE_KOREAN_WORDS.has(fromStem)) return false
|
||||||
|
const fromLatin = hangulToLatin(fromStem).replace(/’/gu, "'").toLowerCase()
|
||||||
|
const targetLatin = (
|
||||||
|
toKorSuffix && !from.endsWith(toKorSuffix) ? `${toEng}${hangulToLatin(toKorSuffix)}` : toEng
|
||||||
|
).toLowerCase()
|
||||||
|
if (!/^[a-z']+$/u.test(fromLatin)) return false
|
||||||
|
const keyDist = editDistance(Array.from(fromLatin), Array.from(targetLatin))
|
||||||
|
const hasLooseJamo = /[ㄱ-ㆎ]/u.test(fromStem)
|
||||||
|
const hasRareSyllable = Array.from(fromStem).some(
|
||||||
|
(ch) => HANGUL_SYLLABLE.test(ch) && !isCommonHangulSyllable(ch)
|
||||||
|
)
|
||||||
|
if (hasLooseJamo || hasRareSyllable) {
|
||||||
|
if (Math.abs(fromLatin.length - targetLatin.length) > 2) return false
|
||||||
|
const sharesPrefix3 = fromLatin.length >= 4 && fromLatin.slice(0, 3) === targetLatin.slice(0, 3)
|
||||||
|
const maxDist = sharesPrefix3
|
||||||
|
? Math.max(2, Math.ceil(targetLatin.length * 0.5))
|
||||||
|
: targetLatin.length >= 7 && fromLatin.slice(0, 2) === targetLatin.slice(0, 2)
|
||||||
|
? 3
|
||||||
|
: 2
|
||||||
|
return keyDist <= maxDist
|
||||||
|
}
|
||||||
|
return toEng.length >= 4 && keyDist === 0
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2) 영→한 자판 오타 + 철자 오타 복합 교정 (예: dkssudgktpd → 안녕하세요)
|
||||||
|
if (fromPureLatin && /^[가-힣]{2,}$/u.test(to)) {
|
||||||
|
const toLatin = hangulToLatin(to).toLowerCase()
|
||||||
|
const fromLower = from.toLowerCase()
|
||||||
|
if (Math.abs(fromLower.length - toLatin.length) > 2) return false
|
||||||
|
const keyDist = editDistance(Array.from(fromLower), Array.from(toLatin))
|
||||||
|
return keyDist <= 2
|
||||||
|
}
|
||||||
|
|
||||||
const fromHangul = HANGUL_SYLLABLE.test(from)
|
const fromHangul = HANGUL_SYLLABLE.test(from)
|
||||||
const toHangul = HANGUL_SYLLABLE.test(to)
|
const toHangul = HANGUL_SYLLABLE.test(to)
|
||||||
if (fromHangul !== toHangul) return false
|
if (fromHangul !== toHangul) return false
|
||||||
// 낱자 수가 크게 달라지면 오타 수정이 아니라 단어 교체다.
|
|
||||||
if (Math.abs(Array.from(from).length - Array.from(to).length) > 1) return false
|
// 3) 한글 → 한글 철자·자모 오타 교정
|
||||||
const distance = spellingDistance(from, to)
|
const distance = spellingDistance(from, to)
|
||||||
if (fromHangul) {
|
if (fromHangul) {
|
||||||
|
if (/[ㄱ-ㆎ]/u.test(to)) return false
|
||||||
|
const fromChars = Array.from(from)
|
||||||
|
const toChars = Array.from(to)
|
||||||
|
const fromHasLooseJamo = /[ㄱ-ㆎ]/u.test(from)
|
||||||
|
if (fromHasLooseJamo) {
|
||||||
|
if (toChars.length < 2) return false
|
||||||
|
const fromJamo = decomposeHangul(from)
|
||||||
|
const toJamo = decomposeHangul(to)
|
||||||
|
if (Math.abs(fromJamo.length - toJamo.length) > 2) return false
|
||||||
|
return distance <= Math.min(3, Math.max(1, Math.ceil(fromJamo.length * 0.25)))
|
||||||
|
}
|
||||||
|
// 낱자 수가 크게 달라지면 오타 수정이 아니라 단어 교체다.
|
||||||
|
if (Math.abs(fromChars.length - toChars.length) > 1) return false
|
||||||
// 1음절 어절(넘·젤·걍)과 짧은 어절이 길어지는 것은 오타가 아니라 줄임말 풀기다 (실측: gemma 가
|
// 1음절 어절(넘·젤·걍)과 짧은 어절이 길어지는 것은 오타가 아니라 줄임말 풀기다 (실측: gemma 가
|
||||||
// "넘 => 너무" 를 오타로 냈다). 긴 어절에서 빠진 음절을 채우는 것만 허용한다.
|
// "넘 => 너무" 를 오타로 냈다). 긴 어절에서 빠진 음절을 채우는 것만 허용한다.
|
||||||
const fromSyllables = Array.from(from).length
|
const fromSyllables = fromChars.length
|
||||||
if (fromSyllables < 2) return false
|
if (fromSyllables < 2) return false
|
||||||
if (Array.from(to).length > fromSyllables && fromSyllables <= 3) return false
|
if (toChars.length > fromSyllables && fromSyllables <= 3) return false
|
||||||
const jamoLength = decomposeHangul(from).length
|
const jamoLength = decomposeHangul(from).length
|
||||||
return distance <= Math.min(3, Math.max(1, Math.ceil(jamoLength * 0.25)))
|
return distance <= Math.min(3, Math.max(1, Math.ceil(jamoLength * 0.25)))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 4) 영문 → 영문 철자 오타 교정
|
||||||
|
if (!fromPureLatin || !toPureLatin) return false
|
||||||
|
if (Math.abs(Array.from(from).length - Array.from(to).length) > 1) return false
|
||||||
if (from.length < 3) return false
|
if (from.length < 3) return false
|
||||||
return distance <= (from.length >= 7 ? 2 : 1)
|
return distance <= (from.length >= 6 ? 2 : 1)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -1593,9 +2248,17 @@ export function validateModelCorrections(
|
||||||
const out: TypoCorrection[] = []
|
const out: TypoCorrection[] = []
|
||||||
const reversed = [...tokens].reverse()
|
const reversed = [...tokens].reverse()
|
||||||
for (const pair of pairs) {
|
for (const pair of pairs) {
|
||||||
// 모델은 어절 대신 어간만 돌려주기도 한다("회으에서" 를 "회으 => 회의" 로) — 그때는 어절 안의
|
// 모델은 어절 대신 어간만 돌려주거나("회으에서" 를 "회으 => 회의" 로),
|
||||||
// 그 부분만 바꾼 어절 전체로 다시 판단한다. 어절 앞부분이 맞는 것을 먼저 고른다.
|
// [한영 자판 변환 참고] 에 적힌 자판 키값("ㅗ디ㅐ" 의 "helo => hello")을 from 으로 돌려주기도 한다.
|
||||||
const whole = reversed.find((candidate) => candidate.text === pair.from)
|
const whole =
|
||||||
|
reversed.find((candidate) => candidate.text === pair.from) ??
|
||||||
|
reversed.find(
|
||||||
|
(candidate) =>
|
||||||
|
HANGUL_ANY.test(candidate.text) && hangulToLatin(candidate.text).toLowerCase() === pair.from.toLowerCase()
|
||||||
|
) ??
|
||||||
|
reversed.find(
|
||||||
|
(candidate) => /^[A-Za-z]+$/u.test(candidate.text) && latinToHangul(candidate.text).text === pair.from
|
||||||
|
)
|
||||||
const partial =
|
const partial =
|
||||||
whole || Array.from(pair.from).length < 2
|
whole || Array.from(pair.from).length < 2
|
||||||
? undefined
|
? undefined
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
'use client'
|
'use client'
|
||||||
|
|
||||||
// src/renderer/components/ds/InstrumentPanel.tsx
|
// src/renderer/components/ds/InstrumentPanel.tsx
|
||||||
// v2 "Midnight Glass": 히어로 글래스 패널 — 앰비언트 그라디언트 배경 + 헤어라인.
|
// v4 "조용한 계기": 평면 카드 표면 + 1px 보더.
|
||||||
// v1의 각인(engraving) props는 호환 유지하되 모서리 메타 라벨로 은은하게 렌더.
|
// v1의 각인(engraving) props는 호환 유지하되 모서리 메타 라벨로 조용하게 렌더.
|
||||||
|
|
||||||
import { Box, Typography } from '@mui/material'
|
import { Box, Typography } from '@mui/material'
|
||||||
import { d3roPalette, d3roFontMono, d3roShadow, d3roRadius, d3roTypo } from '../../theme'
|
import { d3roPalette, d3roFontMono, d3roRadius, d3roTypo } from '../../theme'
|
||||||
|
|
||||||
interface InstrumentPanelProps {
|
interface InstrumentPanelProps {
|
||||||
children: React.ReactNode
|
children: React.ReactNode
|
||||||
|
|
@ -27,36 +27,11 @@ export function InstrumentPanel({
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
position: 'relative',
|
position: 'relative',
|
||||||
bgcolor: d3roPalette.glass.surface,
|
bgcolor: d3roPalette.bg.card,
|
||||||
backdropFilter: `blur(${d3roPalette.glass.blur})`,
|
border: `1px solid ${d3roPalette.border.default}`,
|
||||||
borderRadius: d3roRadius.outer,
|
borderRadius: d3roRadius.outer,
|
||||||
p: 3,
|
p: 3,
|
||||||
boxShadow: d3roShadow.glowCard,
|
|
||||||
overflow: 'hidden',
|
overflow: 'hidden',
|
||||||
// 앰비언트 시인 (좌상단 라디얼 + 상단 광택 — theme sheen 토큰)
|
|
||||||
'&::before': {
|
|
||||||
content: '""',
|
|
||||||
position: 'absolute',
|
|
||||||
inset: 0,
|
|
||||||
borderRadius: 'inherit',
|
|
||||||
background: d3roPalette.glass.sheen,
|
|
||||||
pointerEvents: 'none',
|
|
||||||
zIndex: 1,
|
|
||||||
},
|
|
||||||
// 그라디언트 헤어라인 링
|
|
||||||
'&::after': {
|
|
||||||
content: '""',
|
|
||||||
position: 'absolute',
|
|
||||||
inset: 0,
|
|
||||||
borderRadius: 'inherit',
|
|
||||||
padding: '1px',
|
|
||||||
background: d3roPalette.glass.borderGradient,
|
|
||||||
WebkitMask: 'linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)',
|
|
||||||
WebkitMaskComposite: 'xor',
|
|
||||||
maskComposite: 'exclude',
|
|
||||||
pointerEvents: 'none',
|
|
||||||
zIndex: 2,
|
|
||||||
},
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{/* 모서리 메타 라벨 */}
|
{/* 모서리 메타 라벨 */}
|
||||||
|
|
@ -78,11 +53,9 @@ function Engraving({ children, sx }: { children: string; sx: Record<string, unkn
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
fontSize: d3roTypo.engrave.size,
|
fontSize: d3roTypo.engrave.size,
|
||||||
letterSpacing: d3roTypo.engrave.spacing,
|
letterSpacing: d3roTypo.engrave.spacing,
|
||||||
color: d3roPalette.text.dimLabel,
|
color: d3roPalette.text.tertiary,
|
||||||
opacity: 0.7,
|
|
||||||
fontWeight: 500,
|
fontWeight: 500,
|
||||||
fontFamily: d3roFontMono,
|
fontFamily: d3roFontMono,
|
||||||
textTransform: 'uppercase',
|
|
||||||
zIndex: 2,
|
zIndex: 2,
|
||||||
userSelect: 'none',
|
userSelect: 'none',
|
||||||
...sx,
|
...sx,
|
||||||
|
|
|
||||||
|
|
@ -107,9 +107,10 @@ export function SegmentControl<T extends string = string>({
|
||||||
py: 0.15,
|
py: 0.15,
|
||||||
borderRadius: d3roRadius.pill,
|
borderRadius: d3roRadius.pill,
|
||||||
bgcolor: isSelected ? d3roPalette.accent.dim : d3roPalette.bg.chassis,
|
bgcolor: isSelected ? d3roPalette.accent.dim : d3roPalette.bg.chassis,
|
||||||
color: isSelected ? d3roPalette.accent.light : d3roPalette.text.dimLabel,
|
color: isSelected ? d3roPalette.accent.light : d3roPalette.text.tertiary,
|
||||||
fontSize: '10px',
|
fontSize: '11px',
|
||||||
fontWeight: 500,
|
fontWeight: 500,
|
||||||
|
fontVariantNumeric: 'tabular-nums',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{opt.badge}
|
{opt.badge}
|
||||||
|
|
|
||||||
|
|
@ -350,6 +350,7 @@ export function buildCssVars(key: ThemeKey): Record<string, string> {
|
||||||
'--d3-text-primary': r.text.primary,
|
'--d3-text-primary': r.text.primary,
|
||||||
'--d3-text-secondary': r.text.secondary,
|
'--d3-text-secondary': r.text.secondary,
|
||||||
'--d3-text-tertiary': r.text.tertiary,
|
'--d3-text-tertiary': r.text.tertiary,
|
||||||
|
'--d3-text-inverse': r.accent.ink,
|
||||||
'--d3-text-label': r.text.label,
|
'--d3-text-label': r.text.label,
|
||||||
'--d3-text-disabled': r.text.disabled,
|
'--d3-text-disabled': r.text.disabled,
|
||||||
'--d3-text-engraving': r.text.engraving,
|
'--d3-text-engraving': r.text.engraving,
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,7 @@ const TARGETS = [
|
||||||
// Token *definition* layers. Raw values are the point here, not a violation.
|
// Token *definition* layers. Raw values are the point here, not a violation.
|
||||||
const ALLOWLIST = new Set([
|
const ALLOWLIST = new Set([
|
||||||
'packages/ui/src/theme.ts',
|
'packages/ui/src/theme.ts',
|
||||||
|
'packages/ui/src/theme-raw.ts',
|
||||||
'packages/ui/src/theme-vars.ts',
|
'packages/ui/src/theme-vars.ts',
|
||||||
'packages/ui-native/src/theme.ts',
|
'packages/ui-native/src/theme.ts',
|
||||||
'apps/mobile-rn/src/theme/mobile-theme.ts',
|
'apps/mobile-rn/src/theme/mobile-theme.ts',
|
||||||
|
|
@ -53,6 +54,7 @@ const ALLOWLIST = new Set([
|
||||||
'site/public/accept-invite.css',
|
'site/public/accept-invite.css',
|
||||||
'site/public/legal.css',
|
'site/public/legal.css',
|
||||||
'apps/desktop/src/renderer/styles/global.css',
|
'apps/desktop/src/renderer/styles/global.css',
|
||||||
|
'apps/desktop/src/renderer/popups/_shared/popup-base.css',
|
||||||
])
|
])
|
||||||
|
|
||||||
const IGNORED_DIRS = new Set([
|
const IGNORED_DIRS = new Set([
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,9 @@
|
||||||
--line-soft: rgba(255, 255, 255, 0.07);
|
--line-soft: rgba(255, 255, 255, 0.07);
|
||||||
--text: #f4f4f5;
|
--text: #f4f4f5;
|
||||||
--muted: #a1a1aa;
|
--muted: #a1a1aa;
|
||||||
--faint: #71717a;
|
--faint: #94a3b8;
|
||||||
--accent: #3b82f6;
|
--accent: #2563eb;
|
||||||
--accent-hot: #60a5fa;
|
--accent-hot: #3b82f6;
|
||||||
--success: #4ade80;
|
--success: #4ade80;
|
||||||
--danger: #fb7185;
|
--danger: #fb7185;
|
||||||
font-family: "Pretendard Variable", Pretendard, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
font-family: "Pretendard Variable", Pretendard, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
||||||
|
|
@ -90,7 +90,7 @@ a {
|
||||||
color: var(--text);
|
color: var(--text);
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
letter-spacing: 0.16em;
|
letter-spacing: 0;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -99,8 +99,8 @@ a {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
color: var(--muted);
|
color: var(--muted);
|
||||||
font-size: 10px;
|
font-size: 11px;
|
||||||
letter-spacing: 0.12em;
|
letter-spacing: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.signal {
|
.signal {
|
||||||
|
|
@ -149,14 +149,14 @@ a {
|
||||||
color: var(--accent-hot);
|
color: var(--accent-hot);
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
letter-spacing: 0.15em;
|
letter-spacing: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
max-width: 600px;
|
max-width: 600px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-size: clamp(34px, 7.2vw, 60px);
|
font-size: clamp(34px, 7.2vw, 60px);
|
||||||
font-weight: 790;
|
font-weight: 600;
|
||||||
letter-spacing: -0.045em;
|
letter-spacing: -0.045em;
|
||||||
line-height: 1.08;
|
line-height: 1.08;
|
||||||
text-wrap: balance;
|
text-wrap: balance;
|
||||||
|
|
@ -197,8 +197,8 @@ h1 {
|
||||||
|
|
||||||
.token-card dt {
|
.token-card dt {
|
||||||
color: var(--faint);
|
color: var(--faint);
|
||||||
font-size: 9px;
|
font-size: 11px;
|
||||||
letter-spacing: 0.13em;
|
letter-spacing: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.token-card dd {
|
.token-card dd {
|
||||||
|
|
@ -244,7 +244,7 @@ h1 {
|
||||||
border: 1px solid transparent;
|
border: 1px solid transparent;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
padding: 0 18px;
|
padding: 0 18px;
|
||||||
font-weight: 750;
|
font-weight: 600;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
@ -302,7 +302,7 @@ h1 {
|
||||||
|
|
||||||
.support-row a {
|
.support-row a {
|
||||||
color: #d4d4d8;
|
color: #d4d4d8;
|
||||||
font-weight: 650;
|
font-weight: 600;
|
||||||
text-underline-offset: 4px;
|
text-underline-offset: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -321,7 +321,7 @@ h1 {
|
||||||
}
|
}
|
||||||
|
|
||||||
.protocol {
|
.protocol {
|
||||||
font-size: 8px;
|
font-size: 11px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.token-card,
|
.token-card,
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
if (!tokenPattern.test(token)) {
|
if (!tokenPattern.test(token)) {
|
||||||
status.textContent = '사용할 수 없는 링크'
|
status.textContent = '사용할 수 없는 링크'
|
||||||
status.dataset.state = 'invalid'
|
status.dataset.state = 'invalid'
|
||||||
error.textContent = '초대 링크가 없거나 형식이 올바르지 않아. 새 초대 링크를 요청해.'
|
error.textContent = '초대 링크가 없거나 형식이 올바르지 않습니다. 새 초대 링크를 요청해 주세요.'
|
||||||
error.hidden = false
|
error.hidden = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
@ -27,10 +27,10 @@
|
||||||
copyLink.addEventListener('click', async () => {
|
copyLink.addEventListener('click', async () => {
|
||||||
try {
|
try {
|
||||||
await navigator.clipboard.writeText(window.location.href)
|
await navigator.clipboard.writeText(window.location.href)
|
||||||
copyLink.textContent = '복사했어'
|
copyLink.textContent = '복사됨'
|
||||||
window.setTimeout(() => { copyLink.textContent = '초대 링크 복사' }, 1800)
|
window.setTimeout(() => { copyLink.textContent = '초대 링크 복사' }, 1800)
|
||||||
} catch {
|
} catch {
|
||||||
error.textContent = '브라우저가 복사를 허용하지 않았어. 주소 표시줄에서 링크를 직접 복사해.'
|
error.textContent = '브라우저가 복사를 허용하지 않습니다. 주소 표시줄에서 링크를 직접 복사해 주세요.'
|
||||||
error.hidden = false
|
error.hidden = false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -33,10 +33,10 @@
|
||||||
|
|
||||||
<div class="copy-block">
|
<div class="copy-block">
|
||||||
<p class="eyebrow">TEAM ACCESS / MOBILE HANDOFF</p>
|
<p class="eyebrow">TEAM ACCESS / MOBILE HANDOFF</p>
|
||||||
<h1 id="invite-title">D3RO Voice 앱에서<br />팀 초대를 확인해.</h1>
|
<h1 id="invite-title">D3RO Voice 앱에서<br />팀 초대를 확인합니다.</h1>
|
||||||
<p class="description">
|
<p class="description">
|
||||||
초대 수락은 로그인한 계정과 서버 권한을 확인한 뒤에만 완료돼. 이 페이지는 초대 토큰을
|
초대 수락은 로그인한 계정과 서버 권한을 확인한 뒤에만 완료됩니다. 이 페이지는 초대 토큰을
|
||||||
저장하거나 수락 결과를 만들지 않아.
|
저장하거나 수락 결과를 만들지 않습니다.
|
||||||
</p>
|
</p>
|
||||||
<p class="description description--en" lang="en">
|
<p class="description description--en" lang="en">
|
||||||
Acceptance is completed only after the app verifies your signed-in account and server permissions.
|
Acceptance is completed only after the app verifies your signed-in account and server permissions.
|
||||||
|
|
@ -66,7 +66,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<footer class="support-row">
|
<footer class="support-row">
|
||||||
<span>앱이 설치되지 않았어?</span>
|
<span>앱이 설치되지 않았나요?</span>
|
||||||
<a href="/#download">안전한 설치 파일 받기</a>
|
<a href="/#download">안전한 설치 파일 받기</a>
|
||||||
</footer>
|
</footer>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ a:hover { color: #93c5fd; }
|
||||||
color: #f8fafc;
|
color: #f8fafc;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
letter-spacing: .08em;
|
letter-spacing: 0;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -55,14 +55,14 @@ main {
|
||||||
.eyebrow {
|
.eyebrow {
|
||||||
margin: 0 0 12px;
|
margin: 0 0 12px;
|
||||||
color: #60a5fa;
|
color: #60a5fa;
|
||||||
font: 700 11px/1.4 "JetBrains Mono", monospace;
|
font: 500 11px/1.4 "JetBrains Mono", monospace;
|
||||||
letter-spacing: .14em;
|
letter-spacing: 0;
|
||||||
text-transform: uppercase;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
h1 { margin: 0; font-size: clamp(32px, 6vw, 54px); line-height: 1.05; }
|
h1 { margin: 0; font-size: clamp(32px, 6vw, 54px); font-weight: 500; line-height: 1.05; }
|
||||||
h2 { margin: 40px 0 12px; font-size: 21px; }
|
h2 { margin: 40px 0 12px; font-size: 21px; font-weight: 500; }
|
||||||
h3 { margin: 24px 0 8px; font-size: 16px; }
|
h3 { margin: 24px 0 8px; font-size: 16px; font-weight: 500; }
|
||||||
|
strong, b { font-weight: 600; }
|
||||||
p, li { color: #c7cbd4; font-size: 15px; line-height: 1.8; }
|
p, li { color: #c7cbd4; font-size: 15px; line-height: 1.8; }
|
||||||
ul, ol { padding-left: 22px; }
|
ul, ol { padding-left: 22px; }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -187,7 +187,7 @@ export function AppLoopDemo() {
|
||||||
<div className="demo-titlebar">
|
<div className="demo-titlebar">
|
||||||
<span className="demo-app-icon" />
|
<span className="demo-app-icon" />
|
||||||
<span className="truncate">{t.demo.windowTitle}</span>
|
<span className="truncate">{t.demo.windowTitle}</span>
|
||||||
<span className="ml-auto flex items-center gap-3.5 text-neutral-500">
|
<span className="ml-auto flex items-center gap-3.5 text-neutral-400">
|
||||||
<span className="demo-win-glyph">─</span>
|
<span className="demo-win-glyph">─</span>
|
||||||
<span className="demo-win-glyph">□</span>
|
<span className="demo-win-glyph">□</span>
|
||||||
<span className="demo-win-glyph">✕</span>
|
<span className="demo-win-glyph">✕</span>
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ export const en: Translations = {
|
||||||
items: [
|
items: [
|
||||||
{ title: 'Type by voice anywhere', body: 'Works wherever there is a cursor: notes, browsers, code editors, chat apps. Press the shortcut twice to keep talking hands-free.' },
|
{ title: 'Type by voice anywhere', body: 'Works wherever there is a cursor: notes, browsers, code editors, chat apps. Press the shortcut twice to keep talking hands-free.' },
|
||||||
{ title: 'Text cleanup', body: 'Removes filler words and tidies up sentences with a local Ollama model. You can also create your own commands, such as translate or summarize.' },
|
{ title: 'Text cleanup', body: 'Removes filler words and tidies up sentences with a local Ollama model. You can also create your own commands, such as translate or summarize.' },
|
||||||
{ title: 'Instant Han/Eng switch & sentence suggestions', body: 'Fixes words typed in the wrong Korean/English keyboard layout (dkssud→안녕, ㅗ디ㅣㅐ→hello, ㅎ샤ㅗㅕㅠ에→github에, and Vim :ㅈㅂ→:wq) on the spot, and suggests ways to continue with a local model.' },
|
{ title: 'Instant Han/Eng switch, typo fix & suggestions', body: 'Fixes words, contractions, acronyms, and typos typed in the wrong Korean/English keyboard layout (dkssud→안녕, ㅑ ㅊ무\'ㅅ→I can\'t, 츤를→CMS를, 새 애→to do, ㅎ샤ㅗㅕㅠ에→github에, and Vim :ㅈㅂ→:wq) on the spot, and suggests ways to continue with a local model.' },
|
||||||
{ title: 'Live captions', body: 'Shows captions on top of your screen for meetings, lectures, and videos. Finished lines are corrected once more using the lines around them.' },
|
{ title: 'Live captions', body: 'Shows captions on top of your screen for meetings, lectures, and videos. Finished lines are corrected once more using the lines around them.' },
|
||||||
{ title: 'Meeting notes', body: 'Records long meetings and, when they end, writes up a summary and action items.' },
|
{ title: 'Meeting notes', body: 'Records long meetings and, when they end, writes up a summary and action items.' },
|
||||||
{ title: 'File transcription', body: 'Drop in an audio or video file and get a transcript with timestamps.' },
|
{ title: 'File transcription', body: 'Drop in an audio or video file and get a transcript with timestamps.' },
|
||||||
|
|
@ -144,7 +144,7 @@ export const en: Translations = {
|
||||||
facts: {
|
facts: {
|
||||||
title: 'D3RO Voice at a glance',
|
title: 'D3RO Voice at a glance',
|
||||||
rows: [
|
rows: [
|
||||||
{ title: 'What it is', body: 'A voice typing and instant Korean/English layout auto-switching app for Windows. Hold a shortcut to dictate at your cursor, and let D3RO automatically fix wrong-layout mistypes (dkssud→안녕, ㅗ디ㅣㅐ→hello, ㅎ샤ㅗㅕㅠ에→github에, Vim :ㅈㅂ→:wq) while you type.' },
|
{ title: 'What it is', body: 'A voice typing, instant Korean/English layout auto-switching, and typo-correction app for Windows. Hold a shortcut to dictate at your cursor, and let D3RO automatically fix wrong-layout mistypes and typos (dkssud→안녕, ㅑ ㅊ무\'ㅅ→I can\'t, 츤를→CMS를, 새 애→to do, Vim :ㅈㅂ→:wq) while you type.' },
|
||||||
{ title: 'Platform', body: 'Windows 10 · 11 (64-bit)' },
|
{ title: 'Platform', body: 'Windows 10 · 11 (64-bit)' },
|
||||||
{ title: 'Price', body: 'Every local feature is free. For heavier cloud text cleanup, Pro is {pro}/mo and Pro+ is {proPlus}/mo.' },
|
{ title: 'Price', body: 'Every local feature is free. For heavier cloud text cleanup, Pro is {pro}/mo and Pro+ is {proPlus}/mo.' },
|
||||||
{ title: 'Internet', body: 'Once the speech model and a local AI model are downloaded, dictation and cleanup work offline.' },
|
{ title: 'Internet', body: 'Once the speech model and a local AI model are downloaded, dictation and cleanup work offline.' },
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ export const ko: Translations = {
|
||||||
items: [
|
items: [
|
||||||
{ title: '어디서나 받아쓰기', body: '메모장, 브라우저, 코드 편집기, 메신저까지 커서가 깜빡이는 곳이면 어디든 받아 적습니다. 단축키를 두 번 누르면 키에서 손을 떼고도 계속 말할 수 있습니다.' },
|
{ title: '어디서나 받아쓰기', body: '메모장, 브라우저, 코드 편집기, 메신저까지 커서가 깜빡이는 곳이면 어디든 받아 적습니다. 단축키를 두 번 누르면 키에서 손을 떼고도 계속 말할 수 있습니다.' },
|
||||||
{ title: '문장 다듬기', body: '"어…", "그러니까" 같은 군말을 빼고 읽기 좋은 문장으로 고칩니다. PC에 설치한 Ollama 모델이 처리하고, 번역이나 요약처럼 원하는 명령을 직접 만들어 쓸 수도 있습니다.' },
|
{ title: '문장 다듬기', body: '"어…", "그러니까" 같은 군말을 빼고 읽기 좋은 문장으로 고칩니다. PC에 설치한 Ollama 모델이 처리하고, 번역이나 요약처럼 원하는 명령을 직접 만들어 쓸 수도 있습니다.' },
|
||||||
{ title: '한영 자동 전환 · 다음 문장 제안', body: '한영키를 잊고 친 글자(dkssud→안녕, ㅗ디ㅣㅐ→hello, ㅎ샤ㅗㅕㅠ에→github에, ㅠㅕㅎ가→bug가)와 터미널·Vim 명령(:ㅈㅂ→:wq)을 타이핑 즉시 바로잡고, 이어서 쓸 문장을 PC의 모델이 제안합니다.' },
|
{ title: '한영 자동 전환 · 오타 교정 · 문장 제안', body: '한영키를 잊고 친 단어·축약형·약어·오타(dkssud→안녕, ㅑ ㅊ무\'ㅅ→I can\'t, 츤를→CMS를, 새 애→to do, ㅎ샤ㅗㅕㅠ에→github에)와 터미널·Vim 명령(:ㅈㅂ→:wq)을 타이핑 즉시 바로잡고, 이어서 쓸 문장을 PC의 모델이 제안합니다.' },
|
||||||
{ title: '실시간 자막', body: '회의나 강의, 영상의 말소리를 화면 위에 자막으로 띄웁니다. 한 문장이 끝나면 앞뒤 흐름을 보고 한 번 더 바로잡습니다.' },
|
{ title: '실시간 자막', body: '회의나 강의, 영상의 말소리를 화면 위에 자막으로 띄웁니다. 한 문장이 끝나면 앞뒤 흐름을 보고 한 번 더 바로잡습니다.' },
|
||||||
{ title: '회의 기록', body: '긴 회의도 녹음해 두면, 끝난 뒤 요약과 할 일을 문서로 정리해 줍니다.' },
|
{ title: '회의 기록', body: '긴 회의도 녹음해 두면, 끝난 뒤 요약과 할 일을 문서로 정리해 줍니다.' },
|
||||||
{ title: '파일 받아쓰기', body: '녹음 파일이나 영상 파일을 넣으면 말한 시각이 붙은 원고로 풀어 줍니다.' },
|
{ title: '파일 받아쓰기', body: '녹음 파일이나 영상 파일을 넣으면 말한 시각이 붙은 원고로 풀어 줍니다.' },
|
||||||
|
|
@ -144,7 +144,7 @@ export const ko: Translations = {
|
||||||
facts: {
|
facts: {
|
||||||
title: 'D3RO Voice 한눈에 보기',
|
title: 'D3RO Voice 한눈에 보기',
|
||||||
rows: [
|
rows: [
|
||||||
{ title: '무엇인가요', body: 'Windows용 음성 받아쓰기 · 한영 자동 전환 앱입니다. 단축키를 누른 채 말하면 지금 쓰고 있는 앱의 커서 자리에 글이 입력되고, 평소 타이핑할 때도 한영 자판 실수(dkssud→안녕, ㅗ디ㅣㅐ→hello, ㅎ샤ㅗㅕㅠ에→github에, Vim :ㅈㅂ→:wq)를 즉시 바로잡습니다.' },
|
{ title: '무엇인가요', body: 'Windows용 음성 받아쓰기 · 한영 자동 전환 · 오타 교정 앱입니다. 단축키를 누른 채 말하면 지금 쓰고 있는 앱의 커서 자리에 글이 입력되고, 평소 타이핑할 때도 한영 자판 실수와 오타(dkssud→안녕, ㅑ ㅊ무\'ㅅ→I can\'t, 츤를→CMS를, 새 애→to do, Vim :ㅈㅂ→:wq)를 즉시 바로잡습니다.' },
|
||||||
{ title: '지원 환경', body: 'Windows 10 · 11 (64비트)' },
|
{ title: '지원 환경', body: 'Windows 10 · 11 (64비트)' },
|
||||||
{ title: '요금', body: '로컬 기능은 모두 무료입니다. 클라우드 문장 다듬기를 많이 쓰면 Pro {pro}/월 또는 Pro+ {proPlus}/월.' },
|
{ title: '요금', body: '로컬 기능은 모두 무료입니다. 클라우드 문장 다듬기를 많이 쓰면 Pro {pro}/월 또는 Pro+ {proPlus}/월.' },
|
||||||
{ title: '인터넷 연결', body: '음성 인식 모델과 로컬 AI 모델을 한 번 받은 뒤에는 인터넷 없이 받아쓰기와 문장 다듬기가 동작합니다.' },
|
{ title: '인터넷 연결', body: '음성 인식 모델과 로컬 AI 모델을 한 번 받은 뒤에는 인터넷 없이 받아쓰기와 문장 다듬기가 동작합니다.' },
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ export function Header() {
|
||||||
return (
|
return (
|
||||||
<header
|
<header
|
||||||
className={`fixed inset-x-0 top-0 z-50 border-b transition-colors duration-200 ${
|
className={`fixed inset-x-0 top-0 z-50 border-b transition-colors duration-200 ${
|
||||||
solid ? 'bg-surface-950/95 backdrop-blur-xl border-white/10' : 'bg-transparent border-transparent'
|
solid ? 'bg-surface-950 border-white/10' : 'bg-transparent border-transparent'
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
<div className="mx-auto flex h-16 max-w-7xl items-center justify-between gap-6 px-5 md:px-8 lg:px-12">
|
<div className="mx-auto flex h-16 max-w-7xl items-center justify-between gap-6 px-5 md:px-8 lg:px-12">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue