diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ae0b2f..f095e92 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ Follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) · versioned wi ## [Unreleased] ### Changed +- **Settings namespace migration.** Settings state, backend catalogs, help rendering, and provider configuration now use + a private scope with live compatibility accessors and a `window.TTVC.settings` API. - **Character library namespace migration.** SQLite-backed character persistence, identity merging, image updates, and rendering now use a private scope with explicit compatibility exports and a `window.TTVC.characters` API. - **Studio namespace migration.** Four-phase navigation, DOM borrowing, resume state, and cast-footer coordination now diff --git a/VERSION b/VERSION index 3dacc6b..01d9cc8 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.24.73 +1.24.74 diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index acbd066..107ef27 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -63,6 +63,7 @@ Done incrementally as global-scope ordered files (no ES-module change needed) - ✅ Rehearser cast rendering uses a private scope with explicit view/filter/sort compatibility exports. - ✅ Studio navigation and DOM-borrowing coordination use a private scope with explicit compatibility exports. - ✅ Character library persistence and rendering use a private scope with explicit identity/image compatibility exports. +- ✅ Settings state and backend configuration use a private scope with live compatibility accessors and a namespace API. - ✅ `static/css/resource-diagnostics.css` — isolated Performance/resource diagnostic panel styles. - ✅ `static/css/background-jobs.css` — isolated background-job history and retry-panel styles. - ✅ `static/css/voice-design.css` — isolated Voice Design form, samples, and preview-match styles. diff --git a/static/index.html b/static/index.html index f73127b..07e2654 100644 --- a/static/index.html +++ b/static/index.html @@ -10,7 +10,7 @@ - + @@ -27,12 +27,12 @@ - - - - - - + + + + + + @@ -397,7 +397,7 @@ window.toggleNavTree = function(treeId, chevronId) { - + diff --git a/static/js/settings.js b/static/js/settings.js index 1cdd030..54af47b 100644 --- a/static/js/settings.js +++ b/static/js/settings.js @@ -1,5 +1,7 @@ // ── Settings ────────────────────────────────────────────────────────────── +(function (root) { + const SETTINGS_SEEN_KEY = 'vcf-settings-seen'; let _appSettings = {}; let _ttsBackends = []; @@ -1059,3 +1061,28 @@ $('helper-apply-btn')?.addEventListener('click', () => { modal.hidden = true; }); })(); + +Object.assign(root, { + SETTINGS_SEEN_KEY, IMAGE_GEN_MODELS, IMAGE_GEN_MODEL_CUSTOM, + availableTtsBackends, ttsBackendOptions, styleBackendOptions, backendById, + backendComputeDevice, backendComputeDeviceClass, backendHelpHtml, sttBackendHelpHtml, + updateBackendHelp, updateStyleBackendHelp, updateBackendDependentTabs, + refreshTtsBackendAvailability, _patchSettings, _saveEngineLocalUrls, + _saveEngineContainerNames, ENGINE_API_KEY_SETTING_MAP, engineApiKeyValue, + saveEngineApiKey, restoreEngineApiKeyInputs, SETTINGS_PAGE_GUIDES, SETTINGS_FIELD_HELP, + enhanceSettingsHelp, loadSettings, markSettingsSeen, openSettings, closeSettings, + validateVoiceId, +}); +Object.defineProperty(root, '_appSettings', { configurable: true, get: () => _appSettings, set: v => { _appSettings = v; } }); +Object.defineProperty(root, '_ttsBackends', { configurable: true, get: () => _ttsBackends, set: v => { _ttsBackends = v; } }); +root.TTVC = root.TTVC || {}; +root.TTVC.settings = root.TTVC.settings || {}; +Object.assign(root.TTVC.settings, { + get appSettings() { return _appSettings; }, + get ttsBackends() { return _ttsBackends; }, + load: loadSettings, + open: openSettings, + close: closeSettings, + availableTtsBackends, +}); +})(window);