From dea1de5c579ac14aab0c1b1098d037f70f0cbeca Mon Sep 17 00:00:00 2001 From: mARTin-B78 Date: Fri, 4 Sep 2026 12:42:22 +0200 Subject: [PATCH] refactor: scope rehearser stage --- CHANGELOG.md | 2 ++ VERSION | 2 +- docs/ARCHITECTURE.md | 1 + static/index.html | 16 ++++++++-------- static/js/rehearser-stage.js | 14 +++++++++++--- 5 files changed, 23 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8903c44..102fc70 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 +- **Rehearser stage namespace migration.** Stage scaling, cast-sidebar controls, and strip rendering now use a private + scope with explicit compatibility exports and the existing stage namespace. - **Audiobook network namespace migration.** Timeout, streaming, and attribution transport helpers now use a private scope with explicit compatibility exports and the existing Audiobook namespace. - **Rehearser library namespace migration.** SQLite persistence and the IndexedDB migration adapter now use a private diff --git a/VERSION b/VERSION index 9e6baf7..c04d7d8 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.24.67 +1.24.68 diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index 29c8710..ac698a3 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -57,6 +57,7 @@ Done incrementally as global-scope ordered files (no ES-module change needed) - ✅ Reader uses a private scope with explicit document, playback, and search compatibility exports. - ✅ Rehearser library persistence uses a private scope with explicit SQLite/IndexedDB compatibility exports. - ✅ Audiobook network transport uses a private scope with explicit timeout/stream compatibility exports. +- ✅ Rehearser stage controls use a private scope with explicit scaling and cast-sidebar compatibility exports. - ✅ `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 79bd0bd..6c44c0d 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/rehearser-stage.js b/static/js/rehearser-stage.js index a084b31..2823b81 100644 --- a/static/js/rehearser-stage.js +++ b/static/js/rehearser-stage.js @@ -2,6 +2,8 @@ // These controls consume rehState only when invoked, so they can be loaded // after the core Rehearser module without changing the global compatibility API. +(function (root) { + const REH_STAGE_FONT_KEY = 'ttsvc_reh_stage_scale'; const REH_CAST_COLLAPSED_KEY = 'ttsvc_reh_cast_collapsed'; function rehStageScale() { @@ -100,6 +102,12 @@ $('reh-font-inc')?.addEventListener('click', () => rehStageFontStep(0.1)); $('reh-font-dec')?.addEventListener('click', () => rehStageFontStep(-0.1)); $('reh-cast-toggle')?.addEventListener('click', rehToggleCast); -window.TTVC = window.TTVC || {}; -window.TTVC.rehearser = window.TTVC.rehearser || {}; -window.TTVC.rehearser.stage = { renderCastStrip, rehApplyStageFont, rehApplyCastCollapsed }; +Object.assign(root, { + REH_STAGE_FONT_KEY, REH_CAST_COLLAPSED_KEY, + rehStageScale, rehApplyStageFont, rehStageFontStep, rehApplyCastCollapsed, + rehToggleCast, renderCastStrip, +}); +root.TTVC = root.TTVC || {}; +root.TTVC.rehearser = root.TTVC.rehearser || {}; +root.TTVC.rehearser.stage = { renderCastStrip, rehApplyStageFont, rehApplyCastCollapsed }; +})(window);