Spaces:
Paused
Paused
P9.1: Space-Paket Doppelanzeige-Fix, v135
Browse files- app.js +3 -3
- avatar.js +1 -1
- index.html +2 -2
- master.js +1 -1
- registry.js +1 -1
- studios5.js +3 -3
- studios6.js +3 -3
- studios7.js +4 -4
- video.js +2 -2
- workspace.js +2 -2
app.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
| 1 |
import * as THREE from './vendor/three.module.min.js';
|
| 2 |
import { STUDIOS, stopLoops } from './widgets.js?v=50';
|
| 3 |
-
import { icon } from './icons.js?v=
|
| 4 |
-
import { CATS as CAT5, loadAll, prefetch, getConfig } from './registry.js?v=
|
| 5 |
import { GTAOPass } from './vendor/addons/postprocessing/GTAOPass.js';
|
| 6 |
import { BokehPass } from './vendor/addons/postprocessing/BokehPass.js';
|
| 7 |
-
import { buildWorld, makeBee, landH, MC } from './world.js?v=
|
| 8 |
import { EffectComposer } from './vendor/addons/postprocessing/EffectComposer.js';
|
| 9 |
import { RenderPass } from './vendor/addons/postprocessing/RenderPass.js';
|
| 10 |
import { UnrealBloomPass } from './vendor/addons/postprocessing/UnrealBloomPass.js';
|
|
|
|
| 1 |
import * as THREE from './vendor/three.module.min.js';
|
| 2 |
import { STUDIOS, stopLoops } from './widgets.js?v=50';
|
| 3 |
+
import { icon } from './icons.js?v=135';
|
| 4 |
+
import { CATS as CAT5, loadAll, prefetch, getConfig } from './registry.js?v=135';
|
| 5 |
import { GTAOPass } from './vendor/addons/postprocessing/GTAOPass.js';
|
| 6 |
import { BokehPass } from './vendor/addons/postprocessing/BokehPass.js';
|
| 7 |
+
import { buildWorld, makeBee, landH, MC } from './world.js?v=135';
|
| 8 |
import { EffectComposer } from './vendor/addons/postprocessing/EffectComposer.js';
|
| 9 |
import { RenderPass } from './vendor/addons/postprocessing/RenderPass.js';
|
| 10 |
import { UnrealBloomPass } from './vendor/addons/postprocessing/UnrealBloomPass.js';
|
avatar.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
// Avatar / Persona studio (DoD): persistent avatars as workspace asset type `avatar`
|
| 2 |
// avatars/<slug>/avatar.json + ref.webp + voice.wav · reused by Chat, Image (Kontext), agents.
|
| 3 |
import { STUDIOS, onStop } from './widgets.js?v=50';
|
| 4 |
-
import { run, result, MODULES, esc, hf, stTxt, url, badge, setS, keep, LS, FLUX, KONTEXT, TTS, CHAT, signedIn } from './real.js?v=
|
| 5 |
|
| 6 |
export const MODA = 'multimodalart/MoDA-fast-talking-head', W2L = 'pragnakalp/Wav2lip-ZeroGPU';
|
| 7 |
const LANGS = ['German', 'English', 'French', 'Spanish', 'Auto'];
|
|
|
|
| 1 |
// Avatar / Persona studio (DoD): persistent avatars as workspace asset type `avatar`
|
| 2 |
// avatars/<slug>/avatar.json + ref.webp + voice.wav · reused by Chat, Image (Kontext), agents.
|
| 3 |
import { STUDIOS, onStop } from './widgets.js?v=50';
|
| 4 |
+
import { run, result, MODULES, esc, hf, stTxt, url, badge, setS, keep, LS, FLUX, KONTEXT, TTS, CHAT, signedIn } from './real.js?v=135';
|
| 5 |
|
| 6 |
export const MODA = 'multimodalart/MoDA-fast-talking-head', W2L = 'pragnakalp/Wav2lip-ZeroGPU';
|
| 7 |
const LANGS = ['German', 'English', 'French', 'Spanish', 'Auto'];
|
index.html
CHANGED
|
@@ -8,7 +8,7 @@
|
|
| 8 |
<title>STUDIUS · DAS Studio — Einswarm</title>
|
| 9 |
<link rel="icon" href="assets/einswarm-mascot.webp">
|
| 10 |
<link rel="preload" href="fonts/outfit-latin-wght.woff2" as="font" type="font/woff2" crossorigin>
|
| 11 |
-
<link rel="stylesheet" href="style.css?v=
|
| 12 |
</head>
|
| 13 |
<body>
|
| 14 |
<canvas id="gl"></canvas>
|
|
@@ -50,6 +50,6 @@
|
|
| 50 |
|
| 51 |
<a id="bmc" href="https://www.buymeacoffee.com/2btainment" target="_blank" rel="noopener noreferrer">Buy me a coffee</a>
|
| 52 |
<noscript><p style="color:#f2c94c;padding:2em">STUDIUS braucht JavaScript.</p></noscript>
|
| 53 |
-
<script type="module" src="app.js?v=
|
| 54 |
</body>
|
| 55 |
</html>
|
|
|
|
| 8 |
<title>STUDIUS · DAS Studio — Einswarm</title>
|
| 9 |
<link rel="icon" href="assets/einswarm-mascot.webp">
|
| 10 |
<link rel="preload" href="fonts/outfit-latin-wght.woff2" as="font" type="font/woff2" crossorigin>
|
| 11 |
+
<link rel="stylesheet" href="style.css?v=135">
|
| 12 |
</head>
|
| 13 |
<body>
|
| 14 |
<canvas id="gl"></canvas>
|
|
|
|
| 50 |
|
| 51 |
<a id="bmc" href="https://www.buymeacoffee.com/2btainment" target="_blank" rel="noopener noreferrer">Buy me a coffee</a>
|
| 52 |
<noscript><p style="color:#f2c94c;padding:2em">STUDIUS braucht JavaScript.</p></noscript>
|
| 53 |
+
<script type="module" src="app.js?v=135"></script>
|
| 54 |
</body>
|
| 55 |
</html>
|
master.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
// Mastering studio (DoD): client-side WebAudio chain EQ → compressor → limiter, loudness normalisation to target LUFS
|
| 2 |
// (ITU-R BS.1770-4 K-weighting + gating, measured offline), live meter, A/B, WAV/MP3 export, save to workspace.
|
| 3 |
import { STUDIOS, onStop, loop, cv } from './widgets.js?v=50';
|
| 4 |
-
import { result, MODULES, esc, setS, keep } from './real.js?v=
|
| 5 |
|
| 6 |
/* ---------- BS.1770 loudness ---------- */
|
| 7 |
function biquad(x, b0, b1, b2, a0, a1, a2) { const y = new Float32Array(x.length); b0 /= a0; b1 /= a0; b2 /= a0; a1 /= a0; a2 /= a0; let x1 = 0, x2 = 0, y1 = 0, y2 = 0;
|
|
|
|
| 1 |
// Mastering studio (DoD): client-side WebAudio chain EQ → compressor → limiter, loudness normalisation to target LUFS
|
| 2 |
// (ITU-R BS.1770-4 K-weighting + gating, measured offline), live meter, A/B, WAV/MP3 export, save to workspace.
|
| 3 |
import { STUDIOS, onStop, loop, cv } from './widgets.js?v=50';
|
| 4 |
+
import { result, MODULES, esc, setS, keep } from './real.js?v=135';
|
| 5 |
|
| 6 |
/* ---------- BS.1770 loudness ---------- */
|
| 7 |
function biquad(x, b0, b1, b2, a0, a1, a2) { const y = new Float32Array(x.length); b0 /= a0; b1 /= a0; b2 /= a0; a1 /= a0; a2 /= a0; let x1 = 0, x2 = 0, y1 = 0, y2 = 0;
|
registry.js
CHANGED
|
@@ -41,7 +41,7 @@ STUDIOS.find = function (f) { return find0.call(this, f) ?? find0.call([...ALL.v
|
|
| 41 |
STUDIOS.push = function (...xs) { xs.forEach(x => { const s = ALL.get(x.id); if (s) { const c = s.cat; Object.assign(s, x, { cat: c, stub: false }); } else { x.cat = CAT[x.id] || x.cat; ALL.set(x.id, x); push0.call(this, x); } }); return this.length; };
|
| 42 |
// lazy module loading (one chain, shared module URLs)
|
| 43 |
let P = null; export let loaded = false;
|
| 44 |
-
export function loadAll() { return P ||= (async () => { for (const m of ['./real.js?v=
|
| 45 |
export const prefetch = () => (window.requestIdleCallback || setTimeout)(() => loadAll(), { timeout: 2500 });
|
| 46 |
if (document.readyState === 'complete') setTimeout(prefetch, 1200); else addEventListener('load', () => setTimeout(prefetch, 1200), { once: true });
|
| 47 |
/* ---------- command palette (Strg/⌘+K or /) ---------- */
|
|
|
|
| 41 |
STUDIOS.push = function (...xs) { xs.forEach(x => { const s = ALL.get(x.id); if (s) { const c = s.cat; Object.assign(s, x, { cat: c, stub: false }); } else { x.cat = CAT[x.id] || x.cat; ALL.set(x.id, x); push0.call(this, x); } }); return this.length; };
|
| 42 |
// lazy module loading (one chain, shared module URLs)
|
| 43 |
let P = null; export let loaded = false;
|
| 44 |
+
export function loadAll() { return P ||= (async () => { for (const m of ['./real.js?v=135', './avatar.js?v=135', './master.js?v=135', './video.js?v=135', './workspace.js?v=135', './studios5.js?v=135', './studios6.js?v=135', './studios7.js?v=135']) await import(m); loaded = true; })(); }
|
| 45 |
export const prefetch = () => (window.requestIdleCallback || setTimeout)(() => loadAll(), { timeout: 2500 });
|
| 46 |
if (document.readyState === 'complete') setTimeout(prefetch, 1200); else addEventListener('load', () => setTimeout(prefetch, 1200), { once: true });
|
| 47 |
/* ---------- command palette (Strg/⌘+K or /) ---------- */
|
studios5.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
// STUDIUS P5: Radio Studio · Social/Marketing Studio · Shop Studio (JDT link-shop) + video reframe helper.
|
| 2 |
// Every result goes on the asset bus (save to workspace / send to studio). Nothing is ever posted or published externally.
|
| 3 |
import { STUDIOS } from './widgets.js?v=50';
|
| 4 |
-
import { run, result, MODULES, esc, hf, stTxt, url, badge, setS, keep, signedIn, TF, CHAT, FLUX } from './real.js?v=
|
| 5 |
-
import { Avatars } from './avatar.js?v=
|
| 6 |
-
import { toWav, toMp3 } from './master.js?v=
|
| 7 |
|
| 8 |
const bucket = () => signedIn() && window.__ws?.bucket;
|
| 9 |
const wsFile = (p) => '/api/ws/file?bucket=' + encodeURIComponent(window.__ws.bucket) + '&path=' + encodeURIComponent(p);
|
|
|
|
| 1 |
// STUDIUS P5: Radio Studio · Social/Marketing Studio · Shop Studio (JDT link-shop) + video reframe helper.
|
| 2 |
// Every result goes on the asset bus (save to workspace / send to studio). Nothing is ever posted or published externally.
|
| 3 |
import { STUDIOS } from './widgets.js?v=50';
|
| 4 |
+
import { run, result, MODULES, esc, hf, stTxt, url, badge, setS, keep, signedIn, TF, CHAT, FLUX } from './real.js?v=135';
|
| 5 |
+
import { Avatars } from './avatar.js?v=135';
|
| 6 |
+
import { toWav, toMp3 } from './master.js?v=135';
|
| 7 |
|
| 8 |
const bucket = () => signedIn() && window.__ws?.bucket;
|
| 9 |
const wsFile = (p) => '/api/ws/file?bucket=' + encodeURIComponent(window.__ws.bucket) + '&path=' + encodeURIComponent(p);
|
studios6.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
// STUDIUS P6: Branding-Kit (shared) · Docs (Markdown → DOCX/PDF) · Telefon-Assistent (Avatar + IVR + Testanruf)
|
| 2 |
// + Module API: brand.get, docs.write, phone.answer, shop.draft. Nothing is posted, published or dialled externally.
|
| 3 |
import { STUDIOS } from './widgets.js?v=50';
|
| 4 |
-
import { MODULES, esc, hf, stTxt, result, badge, setS, keep, CHAT, FLUX } from './real.js?v=
|
| 5 |
-
import { Avatars } from './avatar.js?v=
|
| 6 |
-
import { bucket, wsFile, toBlob, slug, ts, upload, wsList, wsJson, saveJson, llm, dl, canvasBlob, loadImg, avOptions, PT, LINES, slugCode, eur, SOC, suggestPrice } from './studios5.js?v=
|
| 7 |
|
| 8 |
/* =================== BRANDING-KIT (one source of truth for Social, Whiteboard, Docs, Telefon) =================== */
|
| 9 |
const BK = 'projects/brand/brand.json';
|
|
|
|
| 1 |
// STUDIUS P6: Branding-Kit (shared) · Docs (Markdown → DOCX/PDF) · Telefon-Assistent (Avatar + IVR + Testanruf)
|
| 2 |
// + Module API: brand.get, docs.write, phone.answer, shop.draft. Nothing is posted, published or dialled externally.
|
| 3 |
import { STUDIOS } from './widgets.js?v=50';
|
| 4 |
+
import { MODULES, esc, hf, stTxt, result, badge, setS, keep, CHAT, FLUX } from './real.js?v=135';
|
| 5 |
+
import { Avatars } from './avatar.js?v=135';
|
| 6 |
+
import { bucket, wsFile, toBlob, slug, ts, upload, wsList, wsJson, saveJson, llm, dl, canvasBlob, loadImg, avOptions, PT, LINES, slugCode, eur, SOC, suggestPrice } from './studios5.js?v=135';
|
| 7 |
|
| 8 |
/* =================== BRANDING-KIT (one source of truth for Social, Whiteboard, Docs, Telefon) =================== */
|
| 9 |
const BK = 'projects/brand/brand.json';
|
studios7.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
// STUDIUS P7: Dev-Baukasten (Stratum-Port), Repo-Vorschau (RepoSpace-API), Admin, 2B-Vorlagen (Musik), Veloura-Stile (Bild)
|
| 2 |
import { STUDIOS } from './widgets.js?v=50';
|
| 3 |
-
import { MODULES, esc, setS, keep, result, badge } from './real.js?v=
|
| 4 |
-
import { ALL, CATS, PRESETS, DEFAULT, ME, getConfig, applyTheme, visibleFor } from './registry.js?v=
|
| 5 |
const $ = (el, s) => el.querySelector(s);
|
| 6 |
const post = async (u, f) => { const fd = new FormData(); Object.entries(f).forEach(([k, v]) => fd.append(k, v)); const r = await fetch(u, { method: 'POST', body: fd, credentials: 'include' }); const j = await r.json().catch(() => ({})); if (!r.ok) throw new Error(j.detail || 'HTTP ' + r.status); return j; };
|
| 7 |
export const llm = (prompt, system = '', max_tokens = 1200) => post('/api/llm', { prompt, system, max_tokens });
|
|
@@ -74,10 +74,10 @@ STUDIOS.push({ id: 'forge', icon: '📦', name: 'Space-Paket', like: 'Space →
|
|
| 74 |
$(el, '.go').onclick = async (e) => { const space = $(el, '.u').value.trim() || sel.value, tg = [...el.querySelectorAll('.ft input:checked')].map(i => i.value);
|
| 75 |
if (!space || !tg.length) return setS(el, '⚠ Space und mindestens ein Ziel wählen', true);
|
| 76 |
e.target.disabled = true; clearInterval(t); $(el, '.out').innerHTML = ''; setS(el, 'Starte Build…');
|
| 77 |
-
try { const b = await post('/api/forge/build', { space, targets: tg.join(',') }); const poll = async () => { if (!el.isConnected) return clearInterval(t);
|
| 78 |
const r = await (await fetch('/api/forge/build/' + b.build_id)).json(); const lg = $(el, '.lg'); lg.hidden = !r.logs; lg.textContent = r.logs || ''; lg.scrollTop = 1e6;
|
| 79 |
const n = Object.keys(r.artifacts || {}).length + Object.keys(r.errors || {}).length; setS(el, `Status: ${r.status} · ${n}/${tg.length} Ziele`);
|
| 80 |
-
if (r.status === 'done' || r.status === 'failed' || r.status === 'error') { clearInterval(t); e.target.disabled = false; const out = $(el, '.out');
|
| 81 |
for (const [k, a] of Object.entries(r.artifacts || {})) { const row = document.createElement('div'); row.className = 'row'; row.innerHTML = `<span class="badge real">${esc(FT.find(f => f[0] === k)?.[1] || k)}</span> <b>${esc(a.filename)}</b> <small class="muted">${(a.size / 1024).toFixed(1)} KB · ${esc(a.notes || '')}</small>`; out.append(row);
|
| 82 |
const blob = await (await fetch(`/api/forge/build/${b.build_id}/download?target=${k}`)).blob(), u = URL.createObjectURL(blob); const d = document.createElement('a'); d.className = 'btn alt'; d.href = u; d.download = a.filename; d.textContent = '⬇ Download'; row.append(d);
|
| 83 |
result(row, { kind: 'file', mime: a.media_type || 'application/zip', blob, url: u, name: a.filename, path: `projects/forge/${a.filename}`, studio: 'forge', prompt: space + ' → ' + k }); }
|
|
|
|
| 1 |
// STUDIUS P7: Dev-Baukasten (Stratum-Port), Repo-Vorschau (RepoSpace-API), Admin, 2B-Vorlagen (Musik), Veloura-Stile (Bild)
|
| 2 |
import { STUDIOS } from './widgets.js?v=50';
|
| 3 |
+
import { MODULES, esc, setS, keep, result, badge } from './real.js?v=135';
|
| 4 |
+
import { ALL, CATS, PRESETS, DEFAULT, ME, getConfig, applyTheme, visibleFor } from './registry.js?v=135';
|
| 5 |
const $ = (el, s) => el.querySelector(s);
|
| 6 |
const post = async (u, f) => { const fd = new FormData(); Object.entries(f).forEach(([k, v]) => fd.append(k, v)); const r = await fetch(u, { method: 'POST', body: fd, credentials: 'include' }); const j = await r.json().catch(() => ({})); if (!r.ok) throw new Error(j.detail || 'HTTP ' + r.status); return j; };
|
| 7 |
export const llm = (prompt, system = '', max_tokens = 1200) => post('/api/llm', { prompt, system, max_tokens });
|
|
|
|
| 74 |
$(el, '.go').onclick = async (e) => { const space = $(el, '.u').value.trim() || sel.value, tg = [...el.querySelectorAll('.ft input:checked')].map(i => i.value);
|
| 75 |
if (!space || !tg.length) return setS(el, '⚠ Space und mindestens ein Ziel wählen', true);
|
| 76 |
e.target.disabled = true; clearInterval(t); $(el, '.out').innerHTML = ''; setS(el, 'Starte Build…');
|
| 77 |
+
try { const b = await post('/api/forge/build', { space, targets: tg.join(',') }); let fin = false; const poll = async () => { if (!el.isConnected || fin) return clearInterval(t);
|
| 78 |
const r = await (await fetch('/api/forge/build/' + b.build_id)).json(); const lg = $(el, '.lg'); lg.hidden = !r.logs; lg.textContent = r.logs || ''; lg.scrollTop = 1e6;
|
| 79 |
const n = Object.keys(r.artifacts || {}).length + Object.keys(r.errors || {}).length; setS(el, `Status: ${r.status} · ${n}/${tg.length} Ziele`);
|
| 80 |
+
if (!fin && (r.status === 'done' || r.status === 'failed' || r.status === 'error')) { fin = true; clearInterval(t); e.target.disabled = false; const out = $(el, '.out');
|
| 81 |
for (const [k, a] of Object.entries(r.artifacts || {})) { const row = document.createElement('div'); row.className = 'row'; row.innerHTML = `<span class="badge real">${esc(FT.find(f => f[0] === k)?.[1] || k)}</span> <b>${esc(a.filename)}</b> <small class="muted">${(a.size / 1024).toFixed(1)} KB · ${esc(a.notes || '')}</small>`; out.append(row);
|
| 82 |
const blob = await (await fetch(`/api/forge/build/${b.build_id}/download?target=${k}`)).blob(), u = URL.createObjectURL(blob); const d = document.createElement('a'); d.className = 'btn alt'; d.href = u; d.download = a.filename; d.textContent = '⬇ Download'; row.append(d);
|
| 83 |
result(row, { kind: 'file', mime: a.media_type || 'application/zip', blob, url: u, name: a.filename, path: `projects/forge/${a.filename}`, studio: 'forge', prompt: space + ' → ' + k }); }
|
video.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
// STUDIUS P3.4: Video Gen (LTX-Video, text→video + image→video), Video Edit (trim, soundtrack, title, fades → MP4/WebM export)
|
| 2 |
// and Stems (Demucs split → synced mixer with gain/mute/solo → WAV mixdown). All results go on the asset bus (save / send).
|
| 3 |
-
import { run, result, MODULES, esc, hf, stTxt, url, badge, timer, setS, S, keep } from './real.js?v=
|
| 4 |
-
import { toWav } from './master.js?v=
|
| 5 |
import { onStop } from './widgets.js?v=50';
|
| 6 |
|
| 7 |
export const LTX = 'Lightricks/ltx-video-distilled';
|
|
|
|
| 1 |
// STUDIUS P3.4: Video Gen (LTX-Video, text→video + image→video), Video Edit (trim, soundtrack, title, fades → MP4/WebM export)
|
| 2 |
// and Stems (Demucs split → synced mixer with gain/mute/solo → WAV mixdown). All results go on the asset bus (save / send).
|
| 3 |
+
import { run, result, MODULES, esc, hf, stTxt, url, badge, timer, setS, S, keep } from './real.js?v=135';
|
| 4 |
+
import { toWav } from './master.js?v=135';
|
| 5 |
import { onStop } from './widgets.js?v=50';
|
| 6 |
|
| 7 |
export const LTX = 'Lightricks/ltx-video-distilled';
|
workspace.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
// STUDIUS empire backbone (frontend): HF sign-in, Workspace (user's HF Bucket), asset bus hand-off, bee agent dock.
|
| 2 |
-
import { MODULES, refreshQuota } from './real.js?v=
|
| 3 |
-
import { Avatars } from './avatar.js?v=
|
| 4 |
const $ = (s, r = document) => r.querySelector(s);
|
| 5 |
const esc = (t) => String(t ?? '').replace(/[&<>"']/g, c => ({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }[c]));
|
| 6 |
const ST = () => window.__studius.STUDIOS;
|
|
|
|
| 1 |
// STUDIUS empire backbone (frontend): HF sign-in, Workspace (user's HF Bucket), asset bus hand-off, bee agent dock.
|
| 2 |
+
import { MODULES, refreshQuota } from './real.js?v=135';
|
| 3 |
+
import { Avatars } from './avatar.js?v=135';
|
| 4 |
const $ = (s, r = document) => r.querySelector(s);
|
| 5 |
const esc = (t) => String(t ?? '').replace(/[&<>"']/g, c => ({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }[c]));
|
| 6 |
const ST = () => window.__studius.STUDIOS;
|