openreader/src/types/user-state.ts
Richard R b679bf736c chore(config): remove smartSentenceSplitting option and related code paths
Eliminate the smartSentenceSplitting configuration flag from application state, UI, and all TTS and audiobook adapter logic. Consolidate TTS segment planning to always include context units, streamlining code and reducing conditional branches. Update tests and type definitions to reflect the removal of this feature toggle.
2026-05-20 04:51:10 -06:00

43 lines
1 KiB
TypeScript

import type { AppConfigValues } from '@/types/config';
export const SYNCED_PREFERENCE_KEYS = [
'viewType',
'voiceSpeed',
'audioPlayerSpeed',
'voice',
'skipBlank',
'epubTheme',
'segmentPreloadDepthPages',
'segmentPreloadSentenceLookahead',
'ttsSegmentMaxBlockLength',
'headerMargin',
'footerMargin',
'leftMargin',
'rightMargin',
'providerRef',
'providerType',
'ttsModel',
'ttsInstructions',
'savedVoices',
'pdfHighlightEnabled',
'pdfWordHighlightEnabled',
'epubHighlightEnabled',
'epubWordHighlightEnabled',
'htmlHighlightEnabled',
'htmlWordHighlightEnabled',
] as const;
export type SyncedPreferenceKey = (typeof SYNCED_PREFERENCE_KEYS)[number];
type SyncedPreferences = Pick<AppConfigValues, SyncedPreferenceKey>;
export type SyncedPreferencesPatch = Partial<SyncedPreferences>;
export type ReaderType = 'pdf' | 'epub' | 'html';
export interface DocumentProgressRecord {
documentId: string;
readerType: ReaderType;
location: string;
progress: number | null;
clientUpdatedAtMs: number;
updatedAtMs: number;
}