mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-07-27 16:49:51 -07:00
bc8dce870b
Color known-word subtitle highlights by Anki card maturity (new, learning, young, mature) like asbplayer (#171). Notes are classified server-side with Anki search filters (prop:ivl, is:learn) during the known-word cache refresh, so no per-card data is fetched. A word's tier is its most mature matching card/note, with the same reading-aware matching as boolean known-word lookups. - known-word cache v4 state persists per-note tiers; lifecycle key only gains the maturity field while enabled so existing caches survive - ankiConnect.knownWords.maturityEnabled + matureThresholdDays (21) - subtitleStyle.knownWordMaturityColors with catppuccin defaults - word-maturity-<tier> class rides on word-known so hover/selection rules keep applying; falls back to knownWordColor without tier data - runtime toggle subtitle.annotation.knownWords.maturityEnabled
97 lines
2.9 KiB
TypeScript
97 lines
2.9 KiB
TypeScript
import { ResolvedConfig } from '../../types/config';
|
|
|
|
export const SUBTITLE_DEFAULT_CONFIG: Pick<ResolvedConfig, 'subtitleStyle' | 'subtitleSidebar'> = {
|
|
subtitleStyle: {
|
|
primaryDefaultMode: 'visible',
|
|
css: {},
|
|
enableJlpt: false,
|
|
preserveLineBreaks: false,
|
|
autoPauseVideoOnHover: true,
|
|
autoPauseVideoOnYomitanPopup: true,
|
|
primaryVisibleOnYomitanPopup: true,
|
|
hoverTokenColor: '#f4dbd6',
|
|
hoverTokenBackgroundColor: 'transparent',
|
|
nameMatchEnabled: false,
|
|
nameMatchImagesEnabled: false,
|
|
nameMatchColor: '#f5bde6',
|
|
fontFamily: 'Hiragino Sans, M PLUS 1, Source Han Sans JP, Noto Sans CJK JP',
|
|
fontSize: 35,
|
|
fontColor: '#cad3f5',
|
|
fontWeight: '600',
|
|
lineHeight: 1.35,
|
|
letterSpacing: '-0.01em',
|
|
wordSpacing: 0,
|
|
fontKerning: 'normal',
|
|
textRendering: 'geometricPrecision',
|
|
textShadow:
|
|
'-1px -1px 2px rgba(0,0,0,0.95), 1px -1px 2px rgba(0,0,0,0.95), -1px 1px 2px rgba(0,0,0,0.95), 1px 1px 2px rgba(0,0,0,0.95), 0 0 8px rgba(0,0,0,0.5)',
|
|
paintOrder: '',
|
|
WebkitTextStroke: '',
|
|
fontStyle: 'normal',
|
|
backgroundColor: 'transparent',
|
|
backdropFilter: 'blur(6px)',
|
|
nPlusOneColor: '#c6a0f6',
|
|
knownWordColor: '#a6da95',
|
|
knownWordMaturityColors: {
|
|
new: '#ee99a0',
|
|
learning: '#b7bdf8',
|
|
young: '#91d7e3',
|
|
mature: '#a6da95',
|
|
},
|
|
jlptColors: {
|
|
N1: '#ed8796',
|
|
N2: '#f5a97f',
|
|
N3: '#f9e2af',
|
|
N4: '#8bd5ca',
|
|
N5: '#8aadf4',
|
|
},
|
|
frequencyDictionary: {
|
|
enabled: false,
|
|
sourcePath: '',
|
|
topX: 10000,
|
|
mode: 'single',
|
|
matchMode: 'headword',
|
|
singleColor: '#f5a97f',
|
|
bandedColors: ['#ed8796', '#f5a97f', '#f9e2af', '#8bd5ca', '#8aadf4'],
|
|
},
|
|
secondary: {
|
|
css: {},
|
|
fontFamily: 'Hiragino Sans, M PLUS 1, Source Han Sans JP, Noto Sans CJK JP',
|
|
fontSize: 24,
|
|
fontColor: '#cad3f5',
|
|
lineHeight: 1.35,
|
|
letterSpacing: '-0.01em',
|
|
wordSpacing: 0,
|
|
fontKerning: 'normal',
|
|
textRendering: 'geometricPrecision',
|
|
textShadow:
|
|
'-1px -1px 2px rgba(0,0,0,0.95), 1px -1px 2px rgba(0,0,0,0.95), -1px 1px 2px rgba(0,0,0,0.95), 1px 1px 2px rgba(0,0,0,0.95), 0 0 8px rgba(0,0,0,0.5)',
|
|
paintOrder: '',
|
|
WebkitTextStroke: '',
|
|
backgroundColor: 'transparent',
|
|
backdropFilter: 'blur(6px)',
|
|
fontWeight: '600',
|
|
fontStyle: 'normal',
|
|
},
|
|
},
|
|
subtitleSidebar: {
|
|
enabled: true,
|
|
autoOpen: false,
|
|
layout: 'overlay',
|
|
toggleKey: 'Backslash',
|
|
pauseVideoOnHover: true,
|
|
autoScroll: true,
|
|
css: {},
|
|
maxWidth: 420,
|
|
opacity: 0.95,
|
|
backgroundColor: 'rgba(73, 77, 100, 0.9)',
|
|
textColor: '#cad3f5',
|
|
fontFamily: 'Hiragino Sans, M PLUS 1, Source Han Sans JP, Noto Sans CJK JP',
|
|
fontSize: 16,
|
|
timestampColor: '#a5adcb',
|
|
activeLineColor: '#f5bde6',
|
|
activeLineBackgroundColor: 'rgba(138, 173, 244, 0.22)',
|
|
hoverLineBackgroundColor: 'rgba(54, 58, 79, 0.84)',
|
|
},
|
|
};
|