refactor: scope studio module

This commit is contained in:
mARTin-B78 2026-09-04 12:47:30 +02:00
parent ac55cd88a3
commit 0e615d52de
5 changed files with 32 additions and 9 deletions

View File

@ -8,6 +8,8 @@ Follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) · versioned wi
## [Unreleased] ## [Unreleased]
### Changed ### Changed
- **Studio namespace migration.** Four-phase navigation, DOM borrowing, resume state, and cast-footer coordination now
use a private scope with explicit compatibility exports and a tested `window.TTVC.studio` surface.
- **Rehearser cast namespace migration.** Cast view rendering, filtering, sorting, and delegated controls now use a - **Rehearser cast namespace migration.** Cast view rendering, filtering, sorting, and delegated controls now use a
private scope with explicit compatibility exports and the existing cast namespace. private scope with explicit compatibility exports and the existing cast namespace.
- **Rehearser voice-design namespace migration.** Character development and backend-refresh controls now use a private - **Rehearser voice-design namespace migration.** Character development and backend-refresh controls now use a private

View File

@ -1 +1 @@
1.24.71 1.24.72

View File

@ -61,6 +61,7 @@ Done incrementally as global-scope ordered files (no ES-module change needed)
- ✅ Rehearser voice-picker uses a private scope with explicit preview, search, and assignment compatibility exports. - ✅ Rehearser voice-picker uses a private scope with explicit preview, search, and assignment compatibility exports.
- ✅ Rehearser voice-design uses a private scope with explicit development and backend-refresh compatibility exports. - ✅ Rehearser voice-design uses a private scope with explicit development and backend-refresh compatibility exports.
- ✅ Rehearser cast rendering uses a private scope with explicit view/filter/sort compatibility exports. - ✅ 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.
- ✅ `static/css/resource-diagnostics.css` — isolated Performance/resource diagnostic panel styles. - ✅ `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/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. - ✅ `static/css/voice-design.css` — isolated Voice Design form, samples, and preview-match styles.

View File

@ -10,7 +10,7 @@
<meta name="format-detection" content="telephone=no"> <meta name="format-detection" content="telephone=no">
<meta name="color-scheme" content="light dark"> <meta name="color-scheme" content="light dark">
<meta name="theme-color" content="#2563EB"> <meta name="theme-color" content="#2563EB">
<meta name="app-version" content="1.24.71"> <meta name="app-version" content="1.24.72">
<link rel="manifest" href="/manifest.webmanifest"> <link rel="manifest" href="/manifest.webmanifest">
<link rel="icon" href="/static/icon.svg" type="image/svg+xml"> <link rel="icon" href="/static/icon.svg" type="image/svg+xml">
<link rel="apple-touch-icon" href="/static/icon.svg"> <link rel="apple-touch-icon" href="/static/icon.svg">
@ -27,12 +27,12 @@
<!-- ── Core styles (local — no CDN dependency for first paint) ────────── --> <!-- ── Core styles (local — no CDN dependency for first paint) ────────── -->
<link rel="stylesheet" href="/static/vendor/mdi/materialdesignicons.min.css"> <link rel="stylesheet" href="/static/vendor/mdi/materialdesignicons.min.css">
<link rel="stylesheet" href="/static/style.css?v=1.24.71"> <link rel="stylesheet" href="/static/style.css?v=1.24.72">
<link rel="stylesheet" href="/static/css/resource-diagnostics.css?v=1.24.71"> <link rel="stylesheet" href="/static/css/resource-diagnostics.css?v=1.24.72">
<link rel="stylesheet" href="/static/css/background-jobs.css?v=1.24.71"> <link rel="stylesheet" href="/static/css/background-jobs.css?v=1.24.72">
<link rel="stylesheet" href="/static/css/voice-design.css?v=1.24.71"> <link rel="stylesheet" href="/static/css/voice-design.css?v=1.24.72">
<link rel="stylesheet" href="/static/css/rehearser.css?v=1.24.71"> <link rel="stylesheet" href="/static/css/rehearser.css?v=1.24.72">
<link rel="stylesheet" href="/static/css/audiobook.css?v=1.24.71"> <link rel="stylesheet" href="/static/css/audiobook.css?v=1.24.72">
<!-- ── Flag icons — non-blocking (loaded async, icons appear after JS) ── --> <!-- ── Flag icons — non-blocking (loaded async, icons appear after JS) ── -->
@ -397,7 +397,7 @@ window.toggleNavTree = function(treeId, chevronId) {
</script> </script>
<!-- loader.js: fetches sections → loads JS modules → removes skeleton --> <!-- loader.js: fetches sections → loads JS modules → removes skeleton -->
<script src="/static/loader.js?v=1.24.71"></script> <script src="/static/loader.js?v=1.24.72"></script>
</body> </body>
</html> </html>

View File

@ -11,6 +11,8 @@
// the same element ids would collide; physically relocating the existing // the same element ids would collide; physically relocating the existing
// node (same id, same listeners) does not. // node (same id, same listeners) does not.
(function (root) {
const STUDIO_RESUME_KEY = 'ttsvc_studio_resume'; const STUDIO_RESUME_KEY = 'ttsvc_studio_resume';
let _stuActive = 1; let _stuActive = 1;
@ -595,3 +597,21 @@ function studioOnShow() {
showStudioPhase(_stuActive); showStudioPhase(_stuActive);
} }
window.studioOnShow = studioOnShow; window.studioOnShow = studioOnShow;
Object.assign(root, {
STUDIO_RESUME_KEY, _stuActive, _stuReadResume, _stuSaveResume, _stuHomes,
_stuBorrow, _stuReturnAll, _stuIsActive, _stuAllowNextNav, _STU_BORROWED_FROM,
_stuNavGuardInstalled, _stuInstallNavGuardOnce, _stuCallSuppressingNav,
_stuEnterPhase, _stuSyncModeToggle, _stuCastView, _stuShowCastView,
_stuCastFootObserver, _stuCastFootHealthTimer, _stuCastIsRunning,
_stuSyncCastFallbackControls, _stuRelocateCastFoot, _stuTryRelocateCastFoot,
_stuRestoreCastFoot, showStudioPhase, studioOnShow,
});
root.TTVC = root.TTVC || {};
root.TTVC.studio = root.TTVC.studio || {};
Object.assign(root.TTVC.studio, {
state: { get activePhase() { return _stuActive; }, get active() { return _stuIsActive; } },
showPhase: showStudioPhase,
onShow: studioOnShow,
});
})(window);