refactor: scope integrations module
This commit is contained in:
parent
3fffae9015
commit
716e601fac
@ -8,6 +8,8 @@ Follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) · versioned wi
|
|||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
- **Integrations namespace migration.** Endpoint helpers, active-voice listings, virtual design IDs, and API snippet
|
||||||
|
rendering now use a private scope with explicit compatibility exports and a `window.TTVC.integrations` API.
|
||||||
- **Combined-library namespace migration.** Production books/plays, Rehearser and Reader handoffs, and cast integration
|
- **Combined-library namespace migration.** Production books/plays, Rehearser and Reader handoffs, and cast integration
|
||||||
now use a private scope with explicit compatibility exports and a `window.TTVC.library` API.
|
now use a private scope with explicit compatibility exports and a `window.TTVC.library` API.
|
||||||
- **Engine support namespace migration.** ElevenLabs browser state, custom engine cards, and local-container discovery
|
- **Engine support namespace migration.** ElevenLabs browser state, custom engine cards, and local-container discovery
|
||||||
|
|||||||
@ -70,6 +70,7 @@ Done incrementally as global-scope ordered files (no ES-module change needed)
|
|||||||
- ✅ TTS routing configuration and routing-log UI use a private scope with live route/sound compatibility accessors.
|
- ✅ TTS routing configuration and routing-log UI use a private scope with live route/sound compatibility accessors.
|
||||||
- ✅ Engine browser, custom-card, and local-container helpers use a private scope with an explicit namespace API.
|
- ✅ Engine browser, custom-card, and local-container helpers use a private scope with an explicit namespace API.
|
||||||
- ✅ Combined library production rendering and Reader/Rehearser handoffs use a private scope with an explicit namespace API.
|
- ✅ Combined library production rendering and Reader/Rehearser handoffs use a private scope with an explicit namespace API.
|
||||||
|
- ✅ Integration endpoint and API-snippet helpers use a private scope with explicit voice/endpoint 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.
|
||||||
|
|||||||
@ -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.80">
|
<meta name="app-version" content="1.24.81">
|
||||||
<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.80">
|
<link rel="stylesheet" href="/static/style.css?v=1.24.81">
|
||||||
<link rel="stylesheet" href="/static/css/resource-diagnostics.css?v=1.24.80">
|
<link rel="stylesheet" href="/static/css/resource-diagnostics.css?v=1.24.81">
|
||||||
<link rel="stylesheet" href="/static/css/background-jobs.css?v=1.24.80">
|
<link rel="stylesheet" href="/static/css/background-jobs.css?v=1.24.81">
|
||||||
<link rel="stylesheet" href="/static/css/voice-design.css?v=1.24.80">
|
<link rel="stylesheet" href="/static/css/voice-design.css?v=1.24.81">
|
||||||
<link rel="stylesheet" href="/static/css/rehearser.css?v=1.24.80">
|
<link rel="stylesheet" href="/static/css/rehearser.css?v=1.24.81">
|
||||||
<link rel="stylesheet" href="/static/css/audiobook.css?v=1.24.80">
|
<link rel="stylesheet" href="/static/css/audiobook.css?v=1.24.81">
|
||||||
|
|
||||||
|
|
||||||
<!-- ── 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.80"></script>
|
<script src="/static/loader.js?v=1.24.81"></script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
// ── Integration samples ──────────────────────────────────────────────────
|
// ── Integration samples ──────────────────────────────────────────────────
|
||||||
|
|
||||||
|
(function (root) {
|
||||||
|
|
||||||
function cleanBaseUrl(url) {
|
function cleanBaseUrl(url) {
|
||||||
return String(url || '').trim().replace(/\/+$/, '');
|
return String(url || '').trim().replace(/\/+$/, '');
|
||||||
}
|
}
|
||||||
@ -213,3 +215,16 @@ $('copy-active-voices-btn-integrations')?.addEventListener('click', async () =>
|
|||||||
status('Copied active voices to clipboard');
|
status('Copied active voices to clipboard');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Object.assign(root, {
|
||||||
|
cleanBaseUrl, getTtsBaseUrl, getTtsV1Url, getTtsStreamBaseUrl, getTtsStreamV1Url,
|
||||||
|
getCreatorV1Url, updateCreatorUrlHints, activeVoiceIds, integrationVoiceExample,
|
||||||
|
integrationVoiceList, virtualDesignVoiceIds, renderIntegrationSnippets,
|
||||||
|
});
|
||||||
|
root.TTVC = root.TTVC || {};
|
||||||
|
root.TTVC.integrations = root.TTVC.integrations || {};
|
||||||
|
Object.assign(root.TTVC.integrations, {
|
||||||
|
endpoints: { tts: getTtsV1Url, stream: getTtsStreamV1Url, creator: getCreatorV1Url },
|
||||||
|
voices: { active: activeVoiceIds, list: integrationVoiceList },
|
||||||
|
render: renderIntegrationSnippets,
|
||||||
|
});
|
||||||
|
})(window);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user