mirror of
https://github.com/hyungyunlim/obsidian-korean-grammar-assistant.git
synced 2026-07-22 06:42:55 +00:00
Source code (10 final any warnings):
- src/api/{anthropic,google,openai}-client.ts: cast response.json to
unknown before logging/stringify; build error body via typed local
- src/services/aiAnalysisService.ts: cast JSON.parse results to
`unknown[]` so parsedResponse stays typed
- src/services/api.ts:193: use Map iterator .done/.value to safely
derive `string | undefined` firstKey
- src/popup/pagination/PageNavigator.ts:194: stringify error via
`instanceof Error ? .message : String(error)` (was `${error}`)
- src/ui/settingsTab.ts: type originalHide and hide override as
`() => void` to avoid Function/any propagation
CSS (styles/* source files; bundled styles.css regenerates):
- Merge 6 duplicate selectors across error-highlight ↔ inline-mode/suggest:
.korean-grammar-ai-widget, :hover, [data-ai-status=exception/keep-original]
- styles/base.css: remove duplicate min-height/height (use dvh fallback)
- styles/error-summary.css: replace 4 :has() selectors with
existing .kga-editing-mode class
- styles/preview.css: remove redundant text-indent: 0 reset
- Keep `text-decoration: wavy` in BETA inline-mode (opt-in) — partial
Obsidian 1.11.4 support is acceptable for opt-in mode
- !important left as warnings only (full specificity refactor out of scope)
Build: tsc clean (0 errors), main.js 639KB, styles.css 92KB
Residual `any` in shipped code: 0
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
124 lines
3 KiB
CSS
124 lines
3 KiB
CSS
/* styles/error-highlight.css */
|
|
|
|
.spell-error {
|
|
background: rgba(var(--color-red-rgb), 0.1);
|
|
color: var(--color-red);
|
|
padding: 2px 0;
|
|
border-bottom: 2px dotted var(--color-red);
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.spell-error:hover {
|
|
background: rgba(var(--color-red-rgb), 0.2);
|
|
}
|
|
|
|
.kga-clickable-error {
|
|
cursor: pointer;
|
|
position: relative;
|
|
}
|
|
|
|
.kga-clickable-error:hover {
|
|
background: rgba(var(--color-red-rgb), 0.25);
|
|
border-bottom: 2px solid var(--color-red);
|
|
}
|
|
|
|
.kga-clickable-error:active {
|
|
background: rgba(var(--color-red-rgb), 0.3);
|
|
}
|
|
|
|
.spell-corrected {
|
|
background: rgba(var(--color-green-rgb), 0.1);
|
|
color: var(--color-green);
|
|
padding: 2px 0;
|
|
border-bottom: 2px solid var(--color-green);
|
|
font-weight: 500;
|
|
}
|
|
|
|
.spell-corrected.kga-clickable-error {
|
|
cursor: pointer;
|
|
position: relative;
|
|
}
|
|
|
|
.spell-corrected.kga-clickable-error:hover {
|
|
background: rgba(var(--color-green-rgb), 0.25);
|
|
border-bottom: 2px solid var(--color-green);
|
|
}
|
|
|
|
.spell-corrected.kga-clickable-error:active {
|
|
background: rgba(var(--color-green-rgb), 0.3);
|
|
}
|
|
|
|
.spell-exception-processed {
|
|
background: rgba(var(--color-blue-rgb), 0.1);
|
|
color: var(--color-blue);
|
|
padding: 2px 0;
|
|
border-bottom: 2px solid var(--color-blue);
|
|
font-weight: 500;
|
|
}
|
|
|
|
.spell-exception-processed.kga-clickable-error {
|
|
cursor: pointer;
|
|
position: relative;
|
|
}
|
|
|
|
.spell-exception-processed.kga-clickable-error:hover {
|
|
background: rgba(var(--color-blue-rgb), 0.25);
|
|
border-bottom: 2px solid var(--color-blue);
|
|
}
|
|
|
|
.spell-exception-processed.kga-clickable-error:active {
|
|
background: rgba(var(--color-blue-rgb), 0.3);
|
|
}
|
|
|
|
.spell-original-kept {
|
|
background: rgba(255, 165, 0, 0.15); /* 주황색 배경 */
|
|
color: #e67e00; /* 진한 주황색 텍스트 */
|
|
padding: 2px 0;
|
|
border-bottom: 2px dotted #e67e00;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.spell-original-kept.kga-clickable-error {
|
|
cursor: pointer;
|
|
position: relative;
|
|
}
|
|
|
|
.spell-original-kept.kga-clickable-error:hover {
|
|
background: rgba(255, 165, 0, 0.25);
|
|
border-bottom: 2px solid #e67e00;
|
|
}
|
|
|
|
.spell-original-kept.kga-clickable-error:active {
|
|
background: rgba(255, 165, 0, 0.35);
|
|
}
|
|
|
|
.spell-user-edited {
|
|
background: rgba(139, 92, 246, 0.15); /* 보라색 배경 */
|
|
color: #8b5cf6; /* 진한 보라색 텍스트 */
|
|
padding: 2px 0;
|
|
border-bottom: 2px solid #8b5cf6;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.spell-user-edited.kga-clickable-error {
|
|
cursor: pointer;
|
|
position: relative;
|
|
}
|
|
|
|
.spell-user-edited.kga-clickable-error:hover {
|
|
background: rgba(139, 92, 246, 0.25);
|
|
border-bottom: 2px solid #8b5cf6;
|
|
}
|
|
|
|
.spell-user-edited.kga-clickable-error:active {
|
|
background: rgba(139, 92, 246, 0.35);
|
|
}
|
|
|
|
/* 🤖 인라인 모드 AI 분석 결과별 색상 스타일은 styles/inline-suggest.css에 정의됨 */
|
|
/* 🤖 corrected 상태는 이제 Replace Decoration + Widget으로 처리됨 */
|
|
|
|
/* AI Widget 포커스 상태 (base styles in styles/inline-mode.css) */
|
|
.korean-grammar-ai-widget:focus {
|
|
outline: 2px solid #10b981;
|
|
outline-offset: 1px;
|
|
}
|