@hanzo/studio 0.1.11 → 0.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/app/director.d.ts +2 -5
- package/lib/app/director.js +268 -335
- package/lib/app/flow-run.d.ts +34 -0
- package/lib/app/flow-run.js +77 -0
- package/lib/app/flow.d.ts +2 -2
- package/lib/app/flow.js +546 -281
- package/lib/app/sections.d.ts +5 -0
- package/lib/app/sections.js +26 -0
- package/lib/attach.d.ts +2 -0
- package/lib/attach.js +7 -0
- package/lib/desk.d.ts +1 -1
- package/lib/desk.js +370 -14
- package/lib/download.d.ts +2 -0
- package/lib/download.js +11 -0
- package/lib/gpu.d.ts +13 -1
- package/lib/gpu.js +39 -16
- package/lib/handoff.d.ts +2 -0
- package/lib/handoff.js +2 -0
- package/lib/home.js +97 -8
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/places.js +184 -30
- package/lib/route.d.ts +6 -0
- package/lib/route.js +6 -0
- package/lib/talk.js +98 -33
- package/lib/ui.d.ts +18 -4
- package/lib/ui.js +50 -22
- package/lib/wire.d.ts +17 -0
- package/lib/wire.js +20 -0
- package/package.json +1 -1
package/lib/app/director.js
CHANGED
|
@@ -1,40 +1,61 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { SizableText, XStack, YStack } from '@hanzo/gui';
|
|
3
|
-
import { Box, Clapperboard, Cpu, Download, Film, Layers, Library, Music, Play, Plus, RefreshCw, Sparkles, ThumbsDown, ThumbsUp, Upload, Video, Wand2, } from '@hanzogui/lucide-icons-2';
|
|
2
|
+
import { SizableText, styled, XStack, YStack } from '@hanzo/gui';
|
|
3
|
+
import { ArrowRight, ArrowUpRight, Box, ChevronDown, Clapperboard, Cpu, Download, Film, Folder, Layers, Library, Music, Play, Plus, RefreshCw, Sparkles, ThumbsDown, ThumbsUp, Upload, Video, Wand2, Workflow, } from '@hanzogui/lucide-icons-2';
|
|
4
|
+
import { DropdownMenu } from '@hanzo/ui';
|
|
4
5
|
import { useEffect, useRef, useState } from 'react';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
6
|
+
import { download } from '../download.js';
|
|
7
|
+
import { reducedMotion, RING } from '../ui.js';
|
|
8
|
+
import { parseStudioSection } from './sections.js';
|
|
9
|
+
import { useWire } from '../live.js';
|
|
10
|
+
import { render } from '../gpu.js';
|
|
11
|
+
import { runs } from './flow-run.js';
|
|
12
|
+
import { ask, documents, gpus } from '../wire.js';
|
|
13
|
+
const StudioInput = styled(SizableText, {
|
|
14
|
+
name: 'DirectorFieldInput',
|
|
15
|
+
render: 'input',
|
|
16
|
+
size: '$2',
|
|
17
|
+
width: '100%',
|
|
18
|
+
minW: 0,
|
|
19
|
+
minH: 44,
|
|
20
|
+
$md: { minH: 34, height: 34 },
|
|
21
|
+
px: '$2.5',
|
|
22
|
+
rounded: '$3',
|
|
23
|
+
borderWidth: 1,
|
|
24
|
+
borderColor: 'var(--border-strong)',
|
|
25
|
+
bg: 'var(--background)',
|
|
26
|
+
color: '$ink',
|
|
27
|
+
focusVisibleStyle: RING,
|
|
28
|
+
});
|
|
29
|
+
const StudioTextarea = styled(SizableText, {
|
|
30
|
+
name: 'DirectorFieldTextarea',
|
|
31
|
+
render: 'textarea',
|
|
32
|
+
size: '$2',
|
|
33
|
+
width: '100%',
|
|
34
|
+
minW: 0,
|
|
35
|
+
p: '$2.5',
|
|
36
|
+
rounded: '$3',
|
|
37
|
+
borderWidth: 1,
|
|
38
|
+
borderColor: 'var(--border-strong)',
|
|
39
|
+
bg: 'var(--background)',
|
|
40
|
+
color: '$ink',
|
|
41
|
+
focusVisibleStyle: RING,
|
|
42
|
+
});
|
|
43
|
+
export { parseStudioSection };
|
|
23
44
|
export function directorNav(host, go) {
|
|
24
45
|
const active = parseStudioSection(host.path);
|
|
25
46
|
const to = (p) => () => go(p);
|
|
26
47
|
return [
|
|
27
48
|
{
|
|
28
49
|
id: 'make',
|
|
29
|
-
label: 'Studio
|
|
50
|
+
label: 'Studio production',
|
|
30
51
|
links: [
|
|
31
|
-
{ id: 'create', label: 'Create &
|
|
32
|
-
{ id: 'library', label: 'Assets,
|
|
33
|
-
{ id: 'documents', label: 'Documents &
|
|
34
|
-
{ id: 'video', label: 'Video &
|
|
35
|
-
{ id: 'music', label: 'Music,
|
|
36
|
-
{ id: 'model3d', label: '3D
|
|
37
|
-
{ id: 'queue', label: 'GPU
|
|
52
|
+
{ id: 'create', label: 'Create & refine', icon: _jsx(Wand2, { size: 16 }), onPress: to(''), active: active === 'create' },
|
|
53
|
+
{ id: 'library', label: 'Assets, stacks & QC', icon: _jsx(Library, { size: 16 }), onPress: to('library'), active: active === 'library' },
|
|
54
|
+
{ id: 'documents', label: 'Documents & frames', icon: _jsx(Layers, { size: 16 }), onPress: to('documents'), active: active === 'documents' },
|
|
55
|
+
{ id: 'video', label: 'Video & cinema rig', icon: _jsx(Clapperboard, { size: 16 }), onPress: to('video'), active: active === 'video' },
|
|
56
|
+
{ id: 'music', label: 'Music, voice & stems', icon: _jsx(Music, { size: 16 }), onPress: to('music'), active: active === 'music' },
|
|
57
|
+
{ id: 'model3d', label: '3D mesh & world', icon: _jsx(Box, { size: 16 }), onPress: to('model3d'), active: active === 'model3d' },
|
|
58
|
+
{ id: 'queue', label: 'GPU fleet & queue', icon: _jsx(Cpu, { size: 16 }), onPress: to('queue'), active: active === 'queue' },
|
|
38
59
|
],
|
|
39
60
|
},
|
|
40
61
|
];
|
|
@@ -42,56 +63,38 @@ export function directorNav(host, go) {
|
|
|
42
63
|
export const TRANSFORMATION_LANES = [
|
|
43
64
|
{
|
|
44
65
|
id: 'cad_ghost',
|
|
45
|
-
label: 'CAD → Ghost
|
|
46
|
-
|
|
47
|
-
denoise: 0.92,
|
|
48
|
-
model: 'z_image_turbo_bf16.safetensors',
|
|
49
|
-
description: 'High transformation distance (0.92): converts flat technical garment CAD sketches into photoreal 3D hollow ghost mannequin product shots.',
|
|
66
|
+
label: 'CAD → Ghost mannequin',
|
|
67
|
+
description: 'Words for a ghost mannequin product shot: invisible mannequin, crisp drape, neutral backdrop.',
|
|
50
68
|
promptSuffix: 'invisible ghost mannequin studio photography, crisp garment drape, natural interior collar shadow, 85mm studio strobe, pure neutral backdrop',
|
|
51
69
|
},
|
|
52
70
|
{
|
|
53
71
|
id: 'cad_mockup',
|
|
54
|
-
label: 'CAD → Model
|
|
55
|
-
|
|
56
|
-
denoise: 0.92,
|
|
57
|
-
model: 'z_image_turbo_bf16.safetensors',
|
|
58
|
-
description: 'High transformation distance (0.92): dresses an editorial fashion model in the uploaded technical flat CAD while locking seam geometry.',
|
|
72
|
+
label: 'CAD → Model lookbook',
|
|
73
|
+
description: 'Words for an editorial lookbook shot on a model, in natural daylight.',
|
|
59
74
|
promptSuffix: 'editorial fashion lookbook photography on model, natural fabric tension, 50mm Cooke prime, soft daylight studio',
|
|
60
75
|
},
|
|
61
76
|
{
|
|
62
77
|
id: 'product',
|
|
63
|
-
label: 'Product
|
|
64
|
-
|
|
65
|
-
denoise: 0.25,
|
|
66
|
-
model: 'Qwen-Image-Edit-2511',
|
|
67
|
-
description: 'Low denoise (0.25): preserves exact SKU silhouette, hardware, stitching, and label typography while upgrading studio lighting and surface micro-texture.',
|
|
78
|
+
label: 'Product look (identity lock)',
|
|
79
|
+
description: 'Words for a clean hero product shot that keeps the product shape and labels.',
|
|
68
80
|
promptSuffix: 'commercial hero product photography, preserve exact product geometry and labels, Phase One IQ4 150MP macro detail',
|
|
69
81
|
},
|
|
70
82
|
{
|
|
71
83
|
id: 'lifestyle',
|
|
72
|
-
label: 'Lifestyle
|
|
73
|
-
|
|
74
|
-
denoise: 0.25,
|
|
75
|
-
model: 'Qwen-Image-Edit-2511',
|
|
76
|
-
description: 'Low denoise (0.25) on subject + scene synthesis: places your locked product or garment into an architectural or outdoor campaign location.',
|
|
84
|
+
label: 'Lifestyle scene placement',
|
|
85
|
+
description: 'Words that place the product in an architectural or outdoor campaign setting.',
|
|
77
86
|
promptSuffix: 'architectural concrete and warm cedar interior, natural afternoon sunbeams, contact shadows grounded on surface',
|
|
78
87
|
},
|
|
79
88
|
{
|
|
80
89
|
id: 'outfit',
|
|
81
|
-
label: 'Outfit &
|
|
82
|
-
|
|
83
|
-
denoise: 0.45,
|
|
84
|
-
model: 'Qwen-Image-Edit-2511',
|
|
85
|
-
description: 'Medium denoise (0.45): swaps fabric, colorway, or trim material across 2–5 reference images while preserving pose and camera framing.',
|
|
90
|
+
label: 'Outfit & material swap',
|
|
91
|
+
description: 'Words for swapping a fabric, colour or trim while keeping the subject.',
|
|
86
92
|
promptSuffix: 'instruction-guided material and colorway swap, keep subject identity, pose, and key lighting identical',
|
|
87
93
|
},
|
|
88
94
|
{
|
|
89
95
|
id: 'inpaint_fix',
|
|
90
|
-
label: 'Region
|
|
91
|
-
|
|
92
|
-
denoise: 0.30,
|
|
93
|
-
model: 'Qwen-Image-Edit-2511',
|
|
94
|
-
description: 'Targeted surgical pass (0.30): repairs hands, collar drape, hardware, or typography inside a masked region (/v1/library/fix).',
|
|
96
|
+
label: 'Region fix / mask inpaint',
|
|
97
|
+
description: 'Words for a careful regional repair: hands, collar, hardware or type.',
|
|
95
98
|
promptSuffix: 'surgical regional inpaint refinement, seamless edge blending, match surrounding grain and specular highlights',
|
|
96
99
|
},
|
|
97
100
|
];
|
|
@@ -316,6 +319,7 @@ const INITIAL_LIBRARY = [
|
|
|
316
319
|
{ id: 'lib-4', path: 'edit/kael_trench_lookbook.png', title: 'Kael Vance — Wardrobe Lock v3', modality: 'image', stack: 'Character Continuity Vault', status: 'draft', vote: 0, critique: '', workflow: 'qwen-edit-inpaint', createdAt: '26m ago' },
|
|
317
320
|
];
|
|
318
321
|
export function DirectorStudio({ host }) {
|
|
322
|
+
const wire = useWire(host);
|
|
319
323
|
const [section, setSection] = useState(() => parseStudioSection(host.path));
|
|
320
324
|
useEffect(() => {
|
|
321
325
|
setSection(parseStudioSection(host.path));
|
|
@@ -323,7 +327,7 @@ export function DirectorStudio({ host }) {
|
|
|
323
327
|
const switchSection = (next) => {
|
|
324
328
|
setSection(next);
|
|
325
329
|
if (host.go) {
|
|
326
|
-
host.go(next === '
|
|
330
|
+
host.go(next === 'create' ? '' : next);
|
|
327
331
|
}
|
|
328
332
|
};
|
|
329
333
|
// GPU Fleet & Live Queue state
|
|
@@ -336,20 +340,12 @@ export function DirectorStudio({ host }) {
|
|
|
336
340
|
// Poll /v1/gpu-status when available
|
|
337
341
|
useEffect(() => {
|
|
338
342
|
let alive = true;
|
|
339
|
-
|
|
340
|
-
const token = host.token();
|
|
341
|
-
const headers = {};
|
|
342
|
-
if (token)
|
|
343
|
-
headers.Authorization = `Bearer ${token}`;
|
|
344
|
-
if (host.org)
|
|
345
|
-
headers['X-Org-Id'] = host.org;
|
|
346
|
-
fetch(`${apiBase}/v1/gpu-status`, { headers })
|
|
347
|
-
.then((r) => (r.ok ? r.json() : null))
|
|
343
|
+
gpus(wire)
|
|
348
344
|
.then((j) => {
|
|
349
|
-
if (!alive || !j
|
|
345
|
+
if (!alive || !j.nodes?.length)
|
|
350
346
|
return;
|
|
351
347
|
setGpuNodes(j.nodes.map((n) => ({
|
|
352
|
-
name: n.name || 'gpu-worker',
|
|
348
|
+
name: n.name || n.identity || 'gpu-worker',
|
|
353
349
|
online: n.online !== false,
|
|
354
350
|
depth: n.depth ?? 0,
|
|
355
351
|
vram: 'Cloud GPU',
|
|
@@ -360,7 +356,7 @@ export function DirectorStudio({ host }) {
|
|
|
360
356
|
return () => {
|
|
361
357
|
alive = false;
|
|
362
358
|
};
|
|
363
|
-
}, [
|
|
359
|
+
}, [wire]);
|
|
364
360
|
// ── 1. VIDEO & CINEMA STATE ──────────────────────────────────────────────────
|
|
365
361
|
const [shots, setShots] = useState(INITIAL_SHOTS);
|
|
366
362
|
const [activeShotId, setActiveShotId] = useState(INITIAL_SHOTS[0].id);
|
|
@@ -422,67 +418,83 @@ export function DirectorStudio({ host }) {
|
|
|
422
418
|
const [selectedDocTemplateId, setSelectedDocTemplateId] = useState(OFFICE_DOCUMENT_TEMPLATES[0].id);
|
|
423
419
|
const selectedDocTemplate = OFFICE_DOCUMENT_TEMPLATES.find((d) => d.id === selectedDocTemplateId) ?? OFFICE_DOCUMENT_TEMPLATES[0];
|
|
424
420
|
const [docBrief, setDocBrief] = useState(OFFICE_DOCUMENT_TEMPLATES[0].defaultBrief);
|
|
421
|
+
const [showAllLanes, setShowAllLanes] = useState(false);
|
|
422
|
+
const [showAllDocs, setShowAllDocs] = useState(false);
|
|
423
|
+
const [showAllCameras, setShowAllCameras] = useState(false);
|
|
424
|
+
const [showAllLenses, setShowAllLenses] = useState(false);
|
|
425
|
+
const [creatingAsset, setCreatingAsset] = useState(false);
|
|
426
|
+
const [generatingDoc, setGeneratingDoc] = useState(false);
|
|
427
|
+
// The pictures made here are object addresses; they and any render in flight end with the page.
|
|
428
|
+
const madeUrls = useRef([]);
|
|
429
|
+
// A render gets its own controller when it starts, so a StrictMode remount cannot leave a spent one behind.
|
|
430
|
+
const rendering = useRef(runs());
|
|
431
|
+
useEffect(() => {
|
|
432
|
+
const urls = madeUrls.current;
|
|
433
|
+
return () => {
|
|
434
|
+
rendering.current.stop();
|
|
435
|
+
urls.forEach((u) => URL.revokeObjectURL(u));
|
|
436
|
+
};
|
|
437
|
+
}, []);
|
|
425
438
|
const runCreateAndRefine = async () => {
|
|
439
|
+
if (creatingAsset)
|
|
440
|
+
return;
|
|
441
|
+
setCreatingAsset(true);
|
|
426
442
|
triggerCinemaAudio();
|
|
427
443
|
const newId = `lib-${Date.now().toString(36)}`;
|
|
428
|
-
const compiled = `${createPrompt} — [${selectedLane.label},
|
|
429
|
-
setStatusNote(`
|
|
430
|
-
const
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
createdAt: 'Just now',
|
|
461
|
-
},
|
|
462
|
-
...prev,
|
|
463
|
-
]);
|
|
444
|
+
const compiled = `${createPrompt} — [${selectedLane.label}, brand=${selectedBrand.name}: ${selectedBrand.directives}]`;
|
|
445
|
+
setStatusNote(`Sending ${selectedLane.label} to your GPU from words only: the lane and brand kit are written into the prompt, and no reference picture is sent.`);
|
|
446
|
+
const ctl = rendering.current.start();
|
|
447
|
+
try {
|
|
448
|
+
const [first] = await render(wire, 'image', { prompt: `${compiled}. ${selectedLane.promptSuffix}`, width: 1024, height: 1024 }, (line) => setStatusNote(`${selectedLane.label}: ${line}`), ctl.signal);
|
|
449
|
+
if (!first)
|
|
450
|
+
throw new Error('The render finished with no image.');
|
|
451
|
+
const resolvedPath = URL.createObjectURL(first.blob);
|
|
452
|
+
madeUrls.current.push(resolvedPath);
|
|
453
|
+
setLibraryItems((prev) => [
|
|
454
|
+
{
|
|
455
|
+
id: newId,
|
|
456
|
+
title: `${selectedLane.label} — ${createPrompt.slice(0, 42)}`,
|
|
457
|
+
modality: 'image',
|
|
458
|
+
stack: selectedBrand.name,
|
|
459
|
+
workflow: 'zen-image (image lane)',
|
|
460
|
+
path: resolvedPath,
|
|
461
|
+
vote: 0,
|
|
462
|
+
critique: '',
|
|
463
|
+
status: 'draft',
|
|
464
|
+
createdAt: 'Just now',
|
|
465
|
+
},
|
|
466
|
+
...prev,
|
|
467
|
+
]);
|
|
468
|
+
setStatusNote(`Generated ${selectedLane.label} (${selectedBrand.name}) on your GPU`);
|
|
469
|
+
}
|
|
470
|
+
catch (e) {
|
|
471
|
+
setStatusNote(`Could not generate ${selectedLane.label}: ${e instanceof Error ? e.message : String(e)}`);
|
|
472
|
+
}
|
|
473
|
+
finally {
|
|
474
|
+
setCreatingAsset(false);
|
|
475
|
+
}
|
|
464
476
|
};
|
|
465
477
|
const generateOfficeDocument = async (tpl) => {
|
|
478
|
+
if (generatingDoc)
|
|
479
|
+
return;
|
|
480
|
+
setGeneratingDoc(true);
|
|
466
481
|
triggerCinemaAudio();
|
|
467
|
-
setStatusNote(`Generating ${tpl.title} (${tpl.format}) with ${selectedBrand.name} design system → ${tpl.endpoint}
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
brief: docBrief,
|
|
484
|
-
}),
|
|
485
|
-
}).catch(() => null);
|
|
482
|
+
setStatusNote(`Generating ${tpl.title} (${tpl.format}) with ${selectedBrand.name} design system → ${tpl.endpoint}…`);
|
|
483
|
+
try {
|
|
484
|
+
const fields = { category: tpl.category, format: tpl.format, brand_system: selectedBrand.id };
|
|
485
|
+
const body = tpl.endpoint === '/v1/documents/generate'
|
|
486
|
+
? await documents.generate(wire, { templateId: tpl.id, description: docBrief, fields })
|
|
487
|
+
: await ask(wire, 'engine', tpl.endpoint, { body: { template_id: tpl.id, ...fields, brief: docBrief } });
|
|
488
|
+
setStatusNote(body?.id
|
|
489
|
+
? `Created ${tpl.title} (${tpl.format}) · ${body.id}`
|
|
490
|
+
: `${tpl.endpoint} answered with no document id for ${tpl.title}; nothing was created.`);
|
|
491
|
+
}
|
|
492
|
+
catch (e) {
|
|
493
|
+
setStatusNote(`Could not generate ${tpl.title}: ${e instanceof Error ? e.message : String(e)}`);
|
|
494
|
+
}
|
|
495
|
+
finally {
|
|
496
|
+
setGeneratingDoc(false);
|
|
497
|
+
}
|
|
486
498
|
};
|
|
487
499
|
// Real-time 60fps Anamorphic Cinema Canvas Preview
|
|
488
500
|
useEffect(() => {
|
|
@@ -622,7 +634,7 @@ export function DirectorStudio({ host }) {
|
|
|
622
634
|
ctx.stroke();
|
|
623
635
|
ctx.restore();
|
|
624
636
|
const barH = activeLens.aspect === '2.39:1' ? Math.round(h * 0.12) : Math.round(h * 0.04);
|
|
625
|
-
ctx.fillStyle = '#
|
|
637
|
+
ctx.fillStyle = '#050508';
|
|
626
638
|
ctx.fillRect(0, 0, w, barH);
|
|
627
639
|
ctx.fillRect(0, h - barH, w, barH);
|
|
628
640
|
ctx.strokeStyle = 'rgba(255,255,255,0.08)';
|
|
@@ -638,7 +650,7 @@ export function DirectorStudio({ host }) {
|
|
|
638
650
|
ctx.lineTo(w, barH + ((h - 2 * barH) * 2) / 3);
|
|
639
651
|
ctx.stroke();
|
|
640
652
|
ctx.fillStyle = 'rgba(255,255,255,0.78)';
|
|
641
|
-
ctx.font = '600
|
|
653
|
+
ctx.font = '600 12px ui-monospace, SFMono-Regular, Menlo, monospace';
|
|
642
654
|
ctx.fillText(`SHOT ${String(activeShot.number).padStart(2, '0')} · ${activeCamera.code} · ${activeLens.label.split(' ')[0]} · ${activeShot.aperture}`, 18, 22);
|
|
643
655
|
ctx.fillStyle = '#3ddc84';
|
|
644
656
|
ctx.fillText(`● ACTOR LOCK: ${activeCharacter.name.toUpperCase()} (#${activeCharacter.seed})`, w - 310, 22);
|
|
@@ -654,7 +666,8 @@ export function DirectorStudio({ host }) {
|
|
|
654
666
|
const tw = ctx.measureText(sub).width;
|
|
655
667
|
ctx.fillText(sub, Math.max(18, (w - tw) / 2), h - barH - 18);
|
|
656
668
|
}
|
|
657
|
-
|
|
669
|
+
if (!reducedMotion())
|
|
670
|
+
raf = requestAnimationFrame(render);
|
|
658
671
|
};
|
|
659
672
|
raf = requestAnimationFrame(render);
|
|
660
673
|
return () => cancelAnimationFrame(raf);
|
|
@@ -713,7 +726,8 @@ export function DirectorStudio({ host }) {
|
|
|
713
726
|
ctx.moveTo(playheadX, 0);
|
|
714
727
|
ctx.lineTo(playheadX, h);
|
|
715
728
|
ctx.stroke();
|
|
716
|
-
|
|
729
|
+
if (!reducedMotion())
|
|
730
|
+
raf = requestAnimationFrame(draw);
|
|
717
731
|
};
|
|
718
732
|
raf = requestAnimationFrame(draw);
|
|
719
733
|
return () => cancelAnimationFrame(raf);
|
|
@@ -884,11 +898,12 @@ export function DirectorStudio({ host }) {
|
|
|
884
898
|
ctx.stroke();
|
|
885
899
|
}
|
|
886
900
|
ctx.fillStyle = 'rgba(255,255,255,0.78)';
|
|
887
|
-
ctx.font = '600
|
|
901
|
+
ctx.font = '600 12px ui-monospace, SFMono-Regular, Menlo, monospace';
|
|
888
902
|
ctx.fillText(`HUNYUAN3D-2.1 · ${activeMesh.name.toUpperCase()} · SHADER: ${meshShader.toUpperCase()}`, 16, 24);
|
|
889
903
|
ctx.fillStyle = '#3ddc84';
|
|
890
904
|
ctx.fillText(`VERTICES: ${activeMesh.vertices.toLocaleString()} · FACES: ${activeMesh.faces.toLocaleString()} · OCTREE: ${meshOctree}`, 16, h - 14);
|
|
891
|
-
|
|
905
|
+
if (!reducedMotion())
|
|
906
|
+
raf = requestAnimationFrame(draw3D);
|
|
892
907
|
};
|
|
893
908
|
raf = requestAnimationFrame(draw3D);
|
|
894
909
|
return () => cancelAnimationFrame(raf);
|
|
@@ -932,36 +947,29 @@ export function DirectorStudio({ host }) {
|
|
|
932
947
|
].join(' ');
|
|
933
948
|
setStatusNote(`Dispatching Shot ${shot.number} (${activeCamera.code}) to Hanzo Studio Wan 2.2 / Koma lane…`);
|
|
934
949
|
try {
|
|
935
|
-
const
|
|
936
|
-
|
|
937
|
-
if (token)
|
|
938
|
-
headers.Authorization = `Bearer ${token}`;
|
|
939
|
-
if (host.org)
|
|
940
|
-
headers['X-Org-Id'] = host.org;
|
|
941
|
-
if (targetGpu !== 'any')
|
|
942
|
-
headers['X-Target-GPU'] = targetGpu;
|
|
943
|
-
const apiBase = host.api || 'https://api.hanzo.ai';
|
|
944
|
-
const res = await fetch(`${apiBase}/v1/videos`, {
|
|
945
|
-
method: 'POST',
|
|
946
|
-
headers,
|
|
947
|
-
body: JSON.stringify({
|
|
950
|
+
const body = await ask(wire, 'api', '/v1/videos', {
|
|
951
|
+
body: {
|
|
948
952
|
model: 'koma-cinema-v2',
|
|
949
953
|
prompt: compiledPrompt,
|
|
950
954
|
duration: shot.durationSec,
|
|
951
955
|
aspect_ratio: activeLens.aspect === '2.39:1' ? '21:9' : '16:9',
|
|
952
|
-
}
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
956
|
+
},
|
|
957
|
+
head: targetGpu !== 'any' ? { 'X-Target-GPU': targetGpu } : undefined,
|
|
958
|
+
});
|
|
959
|
+
const videoUrl = body?.url || body?.data?.[0]?.url;
|
|
960
|
+
if (videoUrl) {
|
|
957
961
|
updateShot({ status: 'done', videoUrl });
|
|
958
962
|
setStatusNote(`Shot ${shot.number} rendered on Cloud GPU · Locked to ${activeCharacter.name}`);
|
|
959
963
|
}
|
|
960
964
|
else {
|
|
961
|
-
updateShot({ status: '
|
|
962
|
-
setStatusNote(`Shot ${shot.number}
|
|
965
|
+
updateShot({ status: 'ready' });
|
|
966
|
+
setStatusNote(`Shot ${shot.number} did not render (/v1/videos answered with no video). The preview above is a sketch, not a render.`);
|
|
963
967
|
}
|
|
964
968
|
}
|
|
969
|
+
catch (e) {
|
|
970
|
+
updateShot({ status: 'ready' });
|
|
971
|
+
setStatusNote(`Shot ${shot.number} did not render (${e instanceof Error ? e.message : String(e)}). The preview above is a sketch, not a render.`);
|
|
972
|
+
}
|
|
965
973
|
finally {
|
|
966
974
|
setRenderingId(null);
|
|
967
975
|
}
|
|
@@ -980,10 +988,7 @@ export function DirectorStudio({ host }) {
|
|
|
980
988
|
})),
|
|
981
989
|
};
|
|
982
990
|
const blob = new Blob([JSON.stringify(payload, null, 2)], { type: 'application/json' });
|
|
983
|
-
|
|
984
|
-
a.href = URL.createObjectURL(blob);
|
|
985
|
-
a.download = 'hanzo-studio-sequence.otio.json';
|
|
986
|
-
a.click();
|
|
991
|
+
download('hanzo-studio-sequence.otio.json', blob);
|
|
987
992
|
};
|
|
988
993
|
const exportMeshObj = () => {
|
|
989
994
|
const lines = [
|
|
@@ -1004,10 +1009,7 @@ export function DirectorStudio({ host }) {
|
|
|
1004
1009
|
'f 7 8 2 1',
|
|
1005
1010
|
];
|
|
1006
1011
|
const blob = new Blob([lines.join('\n')], { type: 'text/plain' });
|
|
1007
|
-
|
|
1008
|
-
a.href = URL.createObjectURL(blob);
|
|
1009
|
-
a.download = `${activeMesh.id}.obj`;
|
|
1010
|
-
a.click();
|
|
1012
|
+
download(`${activeMesh.id}.obj`, blob);
|
|
1011
1013
|
setStatusNote(`Exported 3D Mesh "${activeMesh.name}" (.obj / .glb ready)`);
|
|
1012
1014
|
};
|
|
1013
1015
|
const addShot = () => {
|
|
@@ -1059,205 +1061,136 @@ export function DirectorStudio({ host }) {
|
|
|
1059
1061
|
input.click();
|
|
1060
1062
|
};
|
|
1061
1063
|
const SECTION_TABS = [
|
|
1062
|
-
{ id: 'create', label: 'Create
|
|
1063
|
-
{ id: 'library', label: 'Assets
|
|
1064
|
-
{ id: 'documents', label: 'Documents
|
|
1065
|
-
{ id: 'video', label: 'Video
|
|
1066
|
-
{ id: 'music', label: 'Music
|
|
1067
|
-
{ id: 'model3d', label: '3D
|
|
1068
|
-
{ id: 'queue', label: '
|
|
1064
|
+
{ id: 'create', label: 'Create' },
|
|
1065
|
+
{ id: 'library', label: 'Assets & QC' },
|
|
1066
|
+
{ id: 'documents', label: 'Documents' },
|
|
1067
|
+
{ id: 'video', label: 'Video' },
|
|
1068
|
+
{ id: 'music', label: 'Music' },
|
|
1069
|
+
{ id: 'model3d', label: '3D mesh' },
|
|
1070
|
+
{ id: 'queue', label: 'GPUs' },
|
|
1069
1071
|
];
|
|
1070
|
-
|
|
1072
|
+
const visibleLanes = showAllLanes
|
|
1073
|
+
? TRANSFORMATION_LANES
|
|
1074
|
+
: TRANSFORMATION_LANES.slice(0, 4).some((l) => l.id === selectedLane.id)
|
|
1075
|
+
? TRANSFORMATION_LANES.slice(0, 4)
|
|
1076
|
+
: [...TRANSFORMATION_LANES.slice(0, 3), selectedLane];
|
|
1077
|
+
const filteredDocs = OFFICE_DOCUMENT_TEMPLATES.filter((t) => docCategoryFilter === 'All' || t.category === docCategoryFilter);
|
|
1078
|
+
const visibleDocs = showAllDocs || filteredDocs.length <= 4 ? filteredDocs : filteredDocs.slice(0, 4);
|
|
1079
|
+
const visibleCameras = showAllCameras
|
|
1080
|
+
? CAMERA_MOVES
|
|
1081
|
+
: CAMERA_MOVES.slice(0, 4).some((c) => c.id === activeShot.cameraId)
|
|
1082
|
+
? CAMERA_MOVES.slice(0, 4)
|
|
1083
|
+
: [...CAMERA_MOVES.slice(0, 3), activeCamera];
|
|
1084
|
+
const visibleLenses = showAllLenses
|
|
1085
|
+
? LENSES
|
|
1086
|
+
: LENSES.slice(0, 4).some((l) => l.id === activeShot.lensId)
|
|
1087
|
+
? LENSES.slice(0, 4)
|
|
1088
|
+
: [...LENSES.slice(0, 3), activeLens];
|
|
1089
|
+
return (_jsxs(YStack, { flex: 1, minH: 0, minW: 0, width: "100%", bg: "var(--background)", p: "$3", $md: { p: '$4' }, gap: "$3", overflowY: "auto", overflowX: "hidden", "data-slot": "director-studio", children: [_jsxs(YStack, { gap: "$2.5", p: "$3", rounded: "$4", borderWidth: 1, borderColor: "var(--border)", bg: "var(--surface-card)", minW: 0, children: [_jsxs(XStack, { items: "center", justify: "space-between", flexWrap: "wrap", gap: "$2.5", minW: 0, children: [_jsxs(YStack, { gap: 2, flex: 1, minW: 200, children: [_jsxs(XStack, { items: "center", gap: "$2", children: [_jsx(Clapperboard, { size: 16, color: "$ink" }), _jsx(SizableText, { render: "h1", size: "$4", fontWeight: "600", color: "$ink", letterSpacing: -0.25, numberOfLines: 1, children: "Hanzo Studio \u2014 Production suite" })] }), _jsx(SizableText, { size: "$1", color: "$soft", numberOfLines: 2, children: statusNote })] }), _jsxs(XStack, { items: "center", gap: "$1.5", flexWrap: "wrap", shrink: 0, maxW: "100%", children: [_jsx(DropdownMenu, { minWidth: 228, trigger: _jsxs(XStack, { render: _jsx("button", { type: "button" }), "aria-label": "Studio file and sequence actions", items: "center", gap: "$1.5", px: "$3", minH: 44, "$max-sm": { minH: 44 }, $md: { minH: 32, height: 32 }, rounded: 999, borderWidth: 1, borderColor: "var(--border-strong)", bg: "transparent", cursor: "pointer", hoverStyle: { bg: '$hover' }, focusVisibleStyle: RING, shrink: 0, children: [_jsx(Upload, { size: 13, color: "$ink" }), _jsx(SizableText, { size: "$1", fontWeight: "500", color: "$ink", children: "Files & export" }), _jsx(ChevronDown, { size: 12, color: "$soft" })] }), items: [
|
|
1090
|
+
{
|
|
1091
|
+
key: 'attach',
|
|
1092
|
+
label: 'Attach reference',
|
|
1093
|
+
description: 'Lock CAD, photo, or GLB into workspace',
|
|
1094
|
+
icon: _jsx(Upload, { size: 13, color: "$soft" }),
|
|
1095
|
+
onSelect: uploadReference,
|
|
1096
|
+
},
|
|
1097
|
+
{
|
|
1098
|
+
key: 'edl',
|
|
1099
|
+
label: 'Export EDL / OTIO',
|
|
1100
|
+
description: 'Download multi-shot cinema sequence JSON',
|
|
1101
|
+
icon: _jsx(Download, { size: 13, color: "$soft" }),
|
|
1102
|
+
onSelect: exportSequenceJson,
|
|
1103
|
+
},
|
|
1104
|
+
] }), _jsxs(XStack, { render: _jsx("button", { type: "button" }), "aria-label": "Open in Hanzo Flow", onClick: () => host.open('/flow'), items: "center", gap: "$1.5", px: "$3", minH: 44, "$max-sm": { minH: 44 }, $md: { minH: 32, height: 32 }, rounded: 999, borderWidth: 1, borderColor: "var(--border-strong)", bg: "transparent", cursor: "pointer", hoverStyle: { bg: '$hover' }, focusVisibleStyle: RING, shrink: 0, children: [_jsx(Workflow, { size: 13, color: "$ink" }), _jsx(SizableText, { size: "$1", color: "$ink", fontWeight: "500", children: "Open in Hanzo Flow" }), _jsx(ArrowUpRight, { size: 12, color: "$soft" })] })] })] }), _jsx(XStack, { role: "tablist", "aria-label": "Studio sections", gap: "$1.5", pt: "$1", pb: "$0.5", overflowX: "auto", flexWrap: "nowrap", width: "100%", display: "flex", $md: { display: 'none' }, style: { scrollbarWidth: 'none' }, children: SECTION_TABS.map((t) => {
|
|
1071
1105
|
const on = section === t.id;
|
|
1072
|
-
return (
|
|
1073
|
-
}) })] }), section === 'create' ? (
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
const active = lane.id === selectedLane.id;
|
|
1084
|
-
return (_jsxs(YStack, { render: "button", onPress: () => setSelectedLaneId(lane.id), width: "calc(33.333% - 6px)", minW: 210, grow: 1, p: "$2.5", rounded: "$3", borderWidth: active ? 2 : 1, borderColor: active ? '$ink' : '$borderColor', bg: active ? '$hover' : 'rgba(255,255,255,0.02)', gap: 4, cursor: "pointer", style: { textAlign: 'left' }, children: [_jsxs(XStack, { justify: "space-between", items: "center", gap: "$1", children: [_jsx(SizableText, { size: "$2", fontWeight: "600", numberOfLines: 1, children: lane.label }), _jsx(SizableText, { size: "$1", color: active ? '$green10' : '$soft', style: { fontFamily: 'ui-monospace, monospace' }, children: lane.badge })] }), _jsx(SizableText, { size: "$1", color: "$soft", numberOfLines: 2, children: lane.description })] }, lane.id));
|
|
1085
|
-
}) })] })] }), _jsxs(YStack, { width: 330, grow: 1, maxW: 380, gap: "$3", p: "$3.5", rounded: "$4", borderWidth: 1, borderColor: "$borderColor", bg: "var(--pane-fill, var(--sheet-1))", children: [_jsxs(YStack, { gap: 2, children: [_jsx(SizableText, { size: "$2", fontWeight: "600", children: "2. Design System & Brand Kit" }), _jsx(SizableText, { size: "$1", color: "$soft", children: "Locks palette, typography, and studio lighting directives across images, video, and office docs." })] }), _jsx(YStack, { gap: "$2", children: BRAND_DESIGN_SYSTEMS.map((brand) => {
|
|
1086
|
-
const active = brand.id === selectedBrand.id;
|
|
1087
|
-
return (_jsxs(YStack, { render: "button", onPress: () => setSelectedBrandId(brand.id), p: "$2.5", rounded: "$3", borderWidth: active ? 2 : 1, borderColor: active ? '$ink' : '$borderColor', bg: active ? '$hover' : 'rgba(255,255,255,0.02)', gap: 4, cursor: "pointer", style: { textAlign: 'left' }, children: [_jsxs(XStack, { justify: "space-between", items: "center", children: [_jsx(SizableText, { size: "$2", fontWeight: "600", children: brand.name }), _jsx(XStack, { gap: 4, children: brand.palette.map((hex) => (_jsx("span", { style: {
|
|
1088
|
-
width: 12,
|
|
1089
|
-
height: 12,
|
|
1090
|
-
borderRadius: 99,
|
|
1091
|
-
background: hex,
|
|
1092
|
-
border: '1px solid rgba(255,255,255,0.22)',
|
|
1093
|
-
display: 'inline-block',
|
|
1094
|
-
} }, hex))) })] }), _jsx(SizableText, { size: "$1", color: "$soft", children: brand.tagline }), _jsx(SizableText, { size: "$1", color: "$soft", style: { fontFamily: 'ui-monospace, monospace' }, children: brand.fonts })] }, brand.id));
|
|
1095
|
-
}) }), _jsxs(XStack, { render: "button", onPress: () => switchSection('library'), height: 34, rounded: 999, borderWidth: 1, borderColor: "$borderColor", items: "center", justify: "center", gap: "$1.5", cursor: "pointer", children: [_jsx(Library, { size: 13 }), _jsx(SizableText, { size: "$1", fontWeight: "600", children: "Open Assets, Stacks & Critique Flywheel \u2192" })] })] })] }) })) : null, section === 'documents' ? (_jsxs(XStack, { gap: "$3", flex: 1, minH: 460, flexWrap: "wrap", children: [_jsxs(YStack, { flex: 2, minW: 380, gap: "$3", p: "$3.5", rounded: "$4", borderWidth: 1, borderColor: "$borderColor", bg: "var(--pane-fill, var(--sheet-1))", children: [_jsxs(XStack, { items: "center", justify: "space-between", flexWrap: "wrap", gap: "$2", children: [_jsxs(YStack, { children: [_jsx(SizableText, { size: "$3", fontWeight: "600", children: "Brand-Conditioned Documents, Line Sheets, Pitch Decks & Frames" }), _jsx(SizableText, { size: "$1", color: "$soft", children: "Generate production PDF/DOCX tech packs, XLSX wholesale matrices, PPTX lookbooks, and 60fps HTML/MP4 Frames (/v1/documents/generate)." })] }), _jsx(XStack, { gap: "$1.5", flexWrap: "wrap", children: ['All', 'Documents', 'Spreadsheets', 'Presentations', 'Frames'].map((cat) => (_jsx(XStack, { render: "button", onPress: () => setDocCategoryFilter(cat), px: "$2.5", height: 28, items: "center", rounded: 999, borderWidth: 1, borderColor: docCategoryFilter === cat ? '$ink' : '$borderColor', bg: docCategoryFilter === cat ? '$ink' : 'transparent', cursor: "pointer", children: _jsx(SizableText, { size: "$1", color: docCategoryFilter === cat ? '$background' : '$ink', children: cat }) }, cat))) })] }), _jsx(XStack, { gap: "$2.5", flexWrap: "wrap", role: "list", "aria-label": "Starters", children: OFFICE_DOCUMENT_TEMPLATES.filter((t) => docCategoryFilter === 'All' || t.category === docCategoryFilter).map((tpl) => {
|
|
1106
|
+
return (_jsx(XStack, { render: _jsx("button", { type: "button" }), role: "tab", "aria-selected": on, onClick: () => switchSection(t.id), px: "$3", minH: 44, "$max-sm": { minH: 44 }, items: "center", rounded: 999, borderWidth: 1, borderColor: on ? '$ink' : 'var(--border-strong)', bg: on ? 'var(--surface-card-emphasis)' : 'transparent', cursor: "pointer", hoverStyle: { bg: '$hover' }, focusVisibleStyle: RING, shrink: 0, children: _jsx(SizableText, { size: "$1", fontWeight: on ? '600' : '500', color: on ? '$ink' : '$soft', children: t.label }) }, t.id));
|
|
1107
|
+
}) })] }), section === 'create' ? (_jsxs(YStack, { gap: "$3", width: "100%", minW: 0, $lg: { flexDirection: 'row', items: 'flex-start' }, children: [_jsxs(YStack, { width: "100%", minW: 0, $lg: { flex: 1 }, gap: "$3", p: "$3.5", rounded: "$4", borderWidth: 1, borderColor: "var(--border)", bg: "var(--surface-card)", children: [_jsxs(XStack, { items: "center", justify: "space-between", flexWrap: "wrap", gap: "$2.5", minW: 0, children: [_jsxs(YStack, { gap: 2, flex: 1, minW: 200, children: [_jsx(SizableText, { render: "h2", size: "$3", fontWeight: "600", color: "$ink", children: "What should we create or refine?" }), _jsx(SizableText, { size: "$1", color: "$soft", children: "A lane only shapes the prompt. It sends words, no reference picture and no denoise setting." })] }), _jsxs(XStack, { render: _jsx("button", { type: "button" }), disabled: creatingAsset, onClick: () => void runCreateAndRefine(), px: "$4", minH: 44, "$max-sm": { minH: 44 }, $md: { minH: 34, height: 34 }, rounded: 999, bg: "$ink", items: "center", gap: "$1.5", opacity: creatingAsset ? 0.65 : 1, cursor: creatingAsset ? 'default' : 'pointer', hoverStyle: creatingAsset ? undefined : { opacity: 0.9 }, focusVisibleStyle: RING, shrink: 0, children: [_jsx(Sparkles, { size: 14, color: "$background" }), _jsx(SizableText, { size: "$2", color: "$background", fontWeight: "600", children: creatingAsset ? 'Generating…' : 'Generate' })] })] }), _jsx(StudioTextarea, { "aria-label": "What should we create or refine", p: "$3", rounded: "$3", style: { resize: 'none' }, ...{ value: createPrompt, rows: 3 }, onChange: (e) => setCreatePrompt(e.currentTarget.value) }), _jsx(XStack, { items: "center", justify: "space-between", flexWrap: "wrap", gap: "$2", minW: 0, children: _jsxs(XStack, { items: "center", gap: "$1.5", flexWrap: "wrap", minW: 0, children: [_jsx(SizableText, { size: "$1", color: "$soft", children: `References (${referenceFiles.length}):` }), referenceFiles.map((refName) => (_jsx(XStack, { px: "$2.5", height: 26, items: "center", gap: "$1.5", rounded: 999, borderWidth: 1, borderColor: "var(--border)", bg: "var(--background)", children: _jsx(SizableText, { size: "$1", fontFamily: "$mono", color: "$ink", numberOfLines: 1, children: refName }) }, refName))), _jsxs(XStack, { render: _jsx("button", { type: "button" }), onClick: uploadReference, px: "$2.5", minH: 44, "$max-sm": { minH: 44 }, $md: { minH: 26, height: 26 }, items: "center", gap: "$1", rounded: 999, borderWidth: 1, borderColor: "var(--border-strong)", bg: "transparent", cursor: "pointer", hoverStyle: { bg: '$hover' }, focusVisibleStyle: RING, shrink: 0, children: [_jsx(Plus, { size: 12, color: "$ink" }), _jsx(SizableText, { size: "$1", color: "$ink", children: "Add CAD / photo / swatch" })] })] }) }), _jsxs(YStack, { gap: "$2", pt: "$1", minW: 0, children: [_jsxs(XStack, { items: "center", justify: "space-between", gap: "$2", children: [_jsx(SizableText, { render: "h2", size: "$3", fontWeight: "600", color: "$ink", children: "1. Lane (shapes the prompt)" }), _jsx(XStack, { render: _jsx("button", { type: "button" }), onClick: () => setShowAllLanes((v) => !v), px: "$2.5", minH: 44, "$max-sm": { minH: 44 }, $md: { minH: 28, height: 28 }, items: "center", rounded: 999, borderWidth: 1, borderColor: "var(--border-strong)", bg: "transparent", cursor: "pointer", hoverStyle: { bg: '$hover' }, focusVisibleStyle: RING, children: _jsx(SizableText, { size: "$1", color: "$soft", children: showAllLanes ? 'Show fewer' : `All ${TRANSFORMATION_LANES.length} lanes` }) })] }), _jsx(XStack, { gap: "$2.5", flexWrap: "wrap", role: "list", "aria-label": "Transformation lanes", width: "100%", minW: 0, children: visibleLanes.map((lane) => {
|
|
1108
|
+
const active = lane.id === selectedLane.id;
|
|
1109
|
+
return (_jsx(YStack, { role: "listitem", width: "100%", $lg: { width: 'calc(50% - 5px)' }, minW: 0, children: _jsxs(YStack, { render: _jsx("button", { type: "button" }), onClick: () => setSelectedLaneId(lane.id), width: "100%", minW: 0, minH: 44, "$max-sm": { minH: 44 }, p: "$3", rounded: "$3", "aria-pressed": active, borderWidth: active ? 1.5 : 1, borderColor: active ? 'var(--foreground)' : 'var(--border-strong)', bg: active ? 'var(--surface-card)' : 'var(--background)', boxShadow: active ? 'var(--shadow-sheet-2)' : undefined, hoverStyle: { bg: active ? 'var(--surface-card)' : '$hover', borderColor: active ? 'var(--foreground)' : 'var(--border-strong)' }, focusVisibleStyle: RING, gap: "$1.5", items: "flex-start", cursor: "pointer", children: [_jsx(SizableText, { size: "$2", fontWeight: "600", color: "$ink", text: "left", children: lane.label }), _jsx(SizableText, { size: "$1", color: "$soft", text: "left", numberOfLines: 2, children: lane.description })] }) }, lane.id));
|
|
1110
|
+
}) })] })] }), _jsxs(YStack, { width: "100%", minW: 0, $lg: { width: 272, shrink: 0 }, $xl: { width: 280 }, gap: "$3", p: "$3.5", rounded: "$4", borderWidth: 1, borderColor: "var(--border)", bg: "var(--surface-card)", children: [_jsxs(YStack, { gap: 2, children: [_jsx(SizableText, { render: "h2", size: "$3", fontWeight: "600", color: "$ink", children: "2. Design system & brand kit" }), _jsx(SizableText, { size: "$1", color: "$soft", children: "Locks palette, typography, and studio lighting directives across images, video, and office docs." })] }), _jsx(YStack, { gap: "$2", minW: 0, children: BRAND_DESIGN_SYSTEMS.map((brand) => {
|
|
1111
|
+
const active = brand.id === selectedBrand.id;
|
|
1112
|
+
return (_jsxs(YStack, { render: _jsx("button", { type: "button" }), onClick: () => setSelectedBrandId(brand.id), width: "100%", minW: 0, minH: 44, "$max-sm": { minH: 44 }, p: "$2.5", rounded: "$3", "aria-pressed": active, borderWidth: active ? 1.5 : 1, borderColor: active ? 'var(--foreground)' : 'var(--border-strong)', bg: active ? 'var(--surface-card)' : 'var(--background)', boxShadow: active ? 'var(--shadow-sheet-2)' : undefined, hoverStyle: { bg: active ? 'var(--surface-card)' : '$hover', borderColor: active ? 'var(--foreground)' : 'var(--border-strong)' }, focusVisibleStyle: RING, gap: "$1", items: "flex-start", cursor: "pointer", children: [_jsxs(XStack, { justify: "space-between", items: "center", width: "100%", gap: "$2", children: [_jsx(SizableText, { size: "$2", fontWeight: "600", color: "$ink", text: "left", children: brand.name }), _jsx(XStack, { gap: "$1", shrink: 0, children: brand.palette.map((hex) => (_jsx(XStack, { width: 11, height: 11, rounded: 99, borderWidth: 1, borderColor: "var(--border-strong)", style: { backgroundColor: hex, border: '1px solid var(--border-strong)', boxShadow: 'inset 0 0 0 1px color-mix(in srgb, var(--foreground) 20%, transparent)' } }, hex))) })] }), _jsx(SizableText, { size: "$1", color: "$soft", text: "left", children: brand.tagline }), _jsx(SizableText, { size: "$1", color: "$soft", fontFamily: "$mono", text: "left", children: brand.fonts })] }, brand.id));
|
|
1113
|
+
}) }), _jsxs(XStack, { render: _jsx("button", { type: "button" }), onClick: () => switchSection('library'), minH: 44, "$max-sm": { minH: 44 }, $md: { minH: 34, height: 34 }, px: "$3", rounded: 999, borderWidth: 1, borderColor: "var(--border-strong)", bg: "transparent", items: "center", justify: "center", gap: "$1.5", cursor: "pointer", hoverStyle: { bg: '$hover' }, focusVisibleStyle: RING, children: [_jsx(Library, { size: 13, color: "$ink" }), _jsx(SizableText, { size: "$1", fontWeight: "500", color: "$ink", children: "Open assets, stacks & QC" }), _jsx(ArrowRight, { size: 12, color: "$soft" })] })] })] })) : null, section === 'documents' ? (_jsxs(YStack, { gap: "$3", flex: 1, width: "100%", minW: 0, $lg: { flexDirection: 'row', items: 'flex-start' }, children: [_jsxs(YStack, { width: "100%", minW: 0, $lg: { flex: 1 }, gap: "$3", p: "$3.5", rounded: "$4", borderWidth: 1, borderColor: "var(--border)", bg: "var(--surface-card)", children: [_jsxs(XStack, { items: "center", justify: "space-between", flexWrap: "wrap", gap: "$2", children: [_jsxs(YStack, { gap: 2, flex: 1, minW: 200, children: [_jsx(SizableText, { render: "h2", size: "$3", fontWeight: "600", color: "$ink", children: "Brand-conditioned documents, line sheets, pitch decks & frames" }), _jsx(SizableText, { size: "$1", color: "$soft", children: "Generate production PDF/DOCX tech packs, XLSX wholesale matrices, PPTX lookbooks, and 60fps HTML/MP4 frames (/v1/documents/generate)." })] }), _jsx(XStack, { gap: "$1.5", flexWrap: "wrap", children: ['All', 'Documents', 'Spreadsheets', 'Presentations', 'Frames'].map((cat) => {
|
|
1114
|
+
const on = docCategoryFilter === cat;
|
|
1115
|
+
return (_jsx(XStack, { render: _jsx("button", { type: "button" }), "aria-pressed": on, onClick: () => setDocCategoryFilter(cat), px: "$2.5", minH: 44, "$max-sm": { minH: 44 }, $md: { minH: 28, height: 28 }, items: "center", rounded: 999, borderWidth: 1, borderColor: on ? '$ink' : 'var(--border-strong)', bg: on ? 'var(--surface-card-emphasis)' : 'transparent', hoverStyle: { bg: '$hover' }, focusVisibleStyle: RING, cursor: "pointer", children: _jsx(SizableText, { size: "$1", fontWeight: on ? '600' : '500', color: on ? '$ink' : '$soft', children: cat }) }, cat));
|
|
1116
|
+
}) })] }), _jsx(XStack, { gap: "$2.5", flexWrap: "wrap", role: "list", "aria-label": "Document templates", width: "100%", minW: 0, children: visibleDocs.map((tpl) => {
|
|
1096
1117
|
const active = tpl.id === selectedDocTemplate.id;
|
|
1097
|
-
return (_jsxs(YStack, { render: "button",
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
}) })] }), _jsxs(YStack, { width:
|
|
1102
|
-
width: '100%',
|
|
1103
|
-
borderRadius: 10,
|
|
1104
|
-
padding: '10px 12px',
|
|
1105
|
-
background: 'rgba(255,255,255,0.04)',
|
|
1106
|
-
border: '1px solid rgba(255,255,255,0.14)',
|
|
1107
|
-
color: 'inherit',
|
|
1108
|
-
font: 'inherit',
|
|
1109
|
-
} })] }), _jsxs(XStack, { render: "button", onPress: () => void generateOfficeDocument(selectedDocTemplate), height: 36, rounded: 999, bg: "$ink", items: "center", justify: "center", gap: "$2", cursor: "pointer", children: [_jsx(Sparkles, { size: 14 }), _jsx(SizableText, { size: "$2", color: "$background", fontWeight: "600", children: `Generate ${selectedDocTemplate.format}` })] })] })] })) : null, section === 'video' ? (_jsxs(_Fragment, { children: [_jsxs(XStack, { gap: "$3", flex: 1, minH: 440, flexWrap: "wrap", children: [_jsxs(YStack, { width: 310, grow: 1, maxW: 360, gap: "$3", p: "$3", rounded: "$4", borderWidth: 1, borderColor: "$borderColor", bg: "var(--pane-fill, var(--sheet-1))", children: [_jsx(SizableText, { size: "$2", fontWeight: "600", children: "1. Cinema Camera Motion Rig" }), _jsx(XStack, { flexWrap: "wrap", gap: 6, role: "list", "aria-label": "Starters", children: CAMERA_MOVES.map((cam) => {
|
|
1118
|
+
return (_jsx(YStack, { role: "listitem", width: "100%", $md: { width: 'calc(50% - 5px)' }, minW: 0, children: _jsxs(YStack, { render: _jsx("button", { type: "button" }), onClick: () => {
|
|
1119
|
+
setSelectedDocTemplateId(tpl.id);
|
|
1120
|
+
setDocBrief(tpl.defaultBrief);
|
|
1121
|
+
}, width: "100%", minW: 0, minH: 44, "$max-sm": { minH: 44 }, p: "$3", rounded: "$3", "aria-pressed": active, borderWidth: active ? 1.5 : 1, borderColor: active ? 'var(--foreground)' : 'var(--border-strong)', bg: active ? 'var(--surface-card)' : 'var(--background)', boxShadow: active ? 'var(--shadow-sheet-2)' : undefined, hoverStyle: { bg: active ? 'var(--surface-card)' : '$hover', borderColor: active ? 'var(--foreground)' : 'var(--border-strong)' }, focusVisibleStyle: RING, gap: "$1.5", items: "flex-start", cursor: "pointer", children: [_jsxs(XStack, { justify: "space-between", items: "center", width: "100%", gap: "$2", children: [_jsx(SizableText, { size: "$1", color: "$soft", children: tpl.category }), _jsx(SizableText, { size: "$1", color: "$soft", fontFamily: "$mono", children: tpl.format })] }), _jsx(SizableText, { size: "$2", fontWeight: "600", color: "$ink", text: "left", children: tpl.title }), _jsx(SizableText, { size: "$1", color: "$soft", text: "left", numberOfLines: 2, children: tpl.description })] }) }, tpl.id));
|
|
1122
|
+
}) }), filteredDocs.length > 4 ? (_jsx(XStack, { justify: "center", children: _jsx(XStack, { render: _jsx("button", { type: "button" }), onClick: () => setShowAllDocs((v) => !v), px: "$3", minH: 44, "$max-sm": { minH: 44 }, $md: { minH: 28, height: 28 }, items: "center", rounded: 999, borderWidth: 1, borderColor: "var(--border-strong)", bg: "transparent", cursor: "pointer", hoverStyle: { bg: '$hover' }, focusVisibleStyle: RING, children: _jsx(SizableText, { size: "$1", color: "$soft", children: showAllDocs ? 'Show fewer templates' : `Show all ${filteredDocs.length} templates` }) }) })) : null] }), _jsxs(YStack, { width: "100%", minW: 0, $lg: { width: 276, shrink: 0 }, $xl: { width: 280 }, gap: "$3", p: "$3.5", rounded: "$4", borderWidth: 1, borderColor: "var(--border)", bg: "var(--surface-card)", children: [_jsx(SizableText, { render: "h2", size: "$3", fontWeight: "600", color: "$ink", children: selectedDocTemplate.title }), _jsx(SizableText, { size: "$1", color: "$soft", fontFamily: "$mono", children: `${selectedDocTemplate.format} · ${selectedBrand.name} · ${selectedDocTemplate.endpoint}` }), _jsxs(YStack, { gap: "$1.5", children: [_jsx(SizableText, { size: "$1", color: "$soft", children: "Document, deck, or frame brief" }), _jsx(StudioTextarea, { "aria-label": "Document brief", style: { resize: 'none' }, ...{ value: docBrief, rows: 4 }, onChange: (e) => setDocBrief(e.currentTarget.value) })] }), _jsxs(XStack, { render: _jsx("button", { type: "button" }), disabled: generatingDoc, onClick: () => void generateOfficeDocument(selectedDocTemplate), minH: 44, "$max-sm": { minH: 44 }, $md: { minH: 34, height: 34 }, rounded: 999, bg: "$ink", items: "center", justify: "center", gap: "$1.5", opacity: generatingDoc ? 0.65 : 1, cursor: generatingDoc ? 'default' : 'pointer', hoverStyle: generatingDoc ? undefined : { opacity: 0.9 }, focusVisibleStyle: RING, children: [_jsx(Sparkles, { size: 14, color: "$background" }), _jsx(SizableText, { size: "$2", color: "$background", fontWeight: "600", children: generatingDoc ? 'Generating…' : `Generate ${selectedDocTemplate.format}` })] })] })] })) : null, section === 'video' ? (_jsxs(_Fragment, { children: [_jsxs(YStack, { gap: "$3", flex: 1, width: "100%", minW: 0, $xl: { flexDirection: 'row', items: 'flex-start' }, children: [_jsxs(YStack, { width: "100%", minW: 0, $xl: { width: 276, shrink: 0 }, $xxl: { width: 288 }, gap: "$3", p: "$3", rounded: "$4", borderWidth: 1, borderColor: "var(--border)", bg: "var(--surface-card)", children: [_jsxs(XStack, { items: "center", justify: "space-between", gap: "$2", children: [_jsx(SizableText, { render: "h2", size: "$3", fontWeight: "600", color: "$ink", children: "1. Cinema camera motion rig" }), _jsx(XStack, { render: _jsx("button", { type: "button" }), onClick: () => setShowAllCameras((v) => !v), px: "$2", minH: 44, "$max-sm": { minH: 44 }, $md: { minH: 26, height: 26 }, items: "center", rounded: 999, borderWidth: 1, borderColor: "var(--border-strong)", bg: "transparent", cursor: "pointer", hoverStyle: { bg: '$hover' }, focusVisibleStyle: RING, children: _jsx(SizableText, { size: "$1", color: "$soft", children: showAllCameras ? 'Fewer' : `All ${CAMERA_MOVES.length}` }) })] }), _jsx(XStack, { flexWrap: "wrap", gap: "$1.5", role: "list", "aria-label": "Camera motion rigs", width: "100%", children: visibleCameras.map((cam) => {
|
|
1110
1123
|
const active = cam.id === activeShot.cameraId;
|
|
1111
|
-
return (_jsxs(YStack, { render: "button",
|
|
1112
|
-
}) }), _jsx(SizableText, { size: "$
|
|
1124
|
+
return (_jsx(YStack, { role: "listitem", width: "100%", $xs: { width: 'calc(50% - 3px)' }, minW: 0, children: _jsxs(YStack, { render: _jsx("button", { type: "button" }), onClick: () => updateShot({ cameraId: cam.id }), width: "100%", minW: 0, minH: 44, "$max-sm": { minH: 44 }, p: "$2", rounded: "$3", "aria-pressed": active, borderWidth: active ? 1.5 : 1, borderColor: active ? 'var(--foreground)' : 'var(--border-strong)', bg: active ? 'var(--surface-card)' : 'var(--background)', boxShadow: active ? 'var(--shadow-sheet-2)' : undefined, hoverStyle: { bg: active ? 'var(--surface-card)' : '$hover', borderColor: active ? 'var(--foreground)' : 'var(--border-strong)' }, focusVisibleStyle: RING, cursor: "pointer", gap: 2, items: "flex-start", children: [_jsx(SizableText, { size: "$2", fontWeight: "600", color: "$ink", text: "left", numberOfLines: 1, children: cam.name }), _jsx(SizableText, { size: "$1", color: "$soft", fontFamily: "$mono", text: "left", children: cam.code }), _jsx(SizableText, { size: "$1", color: "$soft", text: "left", numberOfLines: 2, children: cam.description })] }) }, cam.id));
|
|
1125
|
+
}) }), _jsxs(XStack, { items: "center", justify: "space-between", gap: "$2", pt: "$1", children: [_jsx(SizableText, { render: "h2", size: "$3", fontWeight: "600", color: "$ink", children: "2. Cinema lens & gate" }), _jsx(XStack, { render: _jsx("button", { type: "button" }), onClick: () => setShowAllLenses((v) => !v), px: "$2", minH: 44, "$max-sm": { minH: 44 }, $md: { minH: 26, height: 26 }, items: "center", rounded: 999, borderWidth: 1, borderColor: "var(--border-strong)", bg: "transparent", cursor: "pointer", hoverStyle: { bg: '$hover' }, focusVisibleStyle: RING, children: _jsx(SizableText, { size: "$1", color: "$soft", children: showAllLenses ? 'Fewer' : `All ${LENSES.length}` }) })] }), _jsx(YStack, { gap: "$1.5", children: visibleLenses.map((lens) => {
|
|
1113
1126
|
const on = lens.id === activeShot.lensId;
|
|
1114
|
-
return (_jsxs(XStack, { render: "button",
|
|
1115
|
-
}) }), _jsx(SizableText, { size: "$
|
|
1127
|
+
return (_jsxs(XStack, { render: _jsx("button", { type: "button" }), onClick: () => updateShot({ lensId: lens.id }), px: "$2.5", minH: 44, "$max-sm": { minH: 44 }, $md: { minH: 32 }, py: "$1.5", rounded: "$3", "aria-pressed": on, borderWidth: on ? 1.5 : 1, borderColor: on ? 'var(--foreground)' : 'var(--border-strong)', bg: on ? 'var(--surface-card)' : 'var(--background)', boxShadow: on ? 'var(--shadow-sheet-2)' : undefined, hoverStyle: { bg: on ? 'var(--surface-card)' : '$hover', borderColor: on ? 'var(--foreground)' : 'var(--border-strong)' }, focusVisibleStyle: RING, justify: "space-between", items: "center", gap: "$2", cursor: "pointer", children: [_jsx(SizableText, { size: "$2", fontWeight: on ? '600' : '500', color: "$ink", numberOfLines: 1, children: lens.label }), _jsx(SizableText, { size: "$1", color: "$soft", fontFamily: "$mono", shrink: 0, children: lens.aspect })] }, lens.id));
|
|
1128
|
+
}) }), _jsx(SizableText, { render: "h2", size: "$3", fontWeight: "600", color: "$ink", pt: "$1", children: "3. T-stop aperture & lighting rig" }), _jsx(XStack, { gap: "$1.5", flexWrap: "wrap", children: APERTURES.map((ap) => {
|
|
1129
|
+
const on = activeShot.aperture === ap;
|
|
1130
|
+
return (_jsx(XStack, { render: _jsx("button", { type: "button" }), "aria-pressed": on, onClick: () => updateShot({ aperture: ap }), px: "$2.5", minH: 44, "$max-sm": { minH: 44 }, $md: { minH: 26, height: 26 }, items: "center", rounded: 999, borderWidth: 1, borderColor: on ? '$ink' : 'var(--border-strong)', bg: on ? 'var(--surface-card-emphasis)' : 'transparent', hoverStyle: { bg: '$hover' }, focusVisibleStyle: RING, cursor: "pointer", children: _jsx(SizableText, { size: "$1", fontFamily: "$mono", fontWeight: on ? '600' : '500', color: on ? '$ink' : '$soft', children: ap }) }, ap));
|
|
1131
|
+
}) }), _jsx(YStack, { gap: "$1.5", children: LIGHTING_RIGS.map((rig) => {
|
|
1116
1132
|
const on = rig.id === activeShot.lightingId;
|
|
1117
|
-
return (_jsxs(XStack, { render: "button",
|
|
1118
|
-
}) })] }), _jsxs(YStack, {
|
|
1119
|
-
width: '100%',
|
|
1120
|
-
borderRadius: 10,
|
|
1121
|
-
padding: '10px 12px',
|
|
1122
|
-
background: 'rgba(255,255,255,0.04)',
|
|
1123
|
-
border: '1px solid rgba(255,255,255,0.12)',
|
|
1124
|
-
color: 'inherit',
|
|
1125
|
-
font: 'inherit',
|
|
1126
|
-
resize: 'vertical',
|
|
1127
|
-
} }), _jsxs(XStack, { gap: "$2", flexWrap: "wrap", children: [_jsxs(YStack, { flex: 1, minW: 220, gap: "$1", children: [_jsx(SizableText, { size: "$1", color: "$soft", children: "Lip-Sync Dialogue Line (Koe Performance)" }), _jsx("input", { "aria-label": "Lip-sync dialogue line", value: activeShot.dialogue, onChange: (e) => updateShot({ dialogue: e.currentTarget.value }), placeholder: "Spoken line for lip-sync & voice stem\u2026", style: {
|
|
1128
|
-
width: '100%',
|
|
1129
|
-
height: 34,
|
|
1130
|
-
borderRadius: 8,
|
|
1131
|
-
padding: '0 10px',
|
|
1132
|
-
background: 'rgba(255,255,255,0.04)',
|
|
1133
|
-
border: '1px solid rgba(255,255,255,0.12)',
|
|
1134
|
-
color: 'inherit',
|
|
1135
|
-
font: 'inherit',
|
|
1136
|
-
} })] }), _jsxs(YStack, { width: 130, gap: "$1", children: [_jsx(SizableText, { size: "$1", color: "$soft", children: "Shot Duration (s)" }), _jsx("input", { "aria-label": "Shot duration in seconds", type: "number", min: 1, max: 15, step: 0.5, value: activeShot.durationSec, onChange: (e) => updateShot({ durationSec: Math.max(1, Number(e.currentTarget.value) || 4) }), style: {
|
|
1137
|
-
width: '100%',
|
|
1138
|
-
height: 34,
|
|
1139
|
-
borderRadius: 8,
|
|
1140
|
-
padding: '0 10px',
|
|
1141
|
-
background: 'rgba(255,255,255,0.04)',
|
|
1142
|
-
border: '1px solid rgba(255,255,255,0.12)',
|
|
1143
|
-
color: 'inherit',
|
|
1144
|
-
font: 'inherit',
|
|
1145
|
-
} })] })] })] })] }), _jsxs(YStack, { width: 290, grow: 1, maxW: 340, gap: "$3", p: "$3", rounded: "$4", borderWidth: 1, borderColor: "$borderColor", bg: "var(--pane-fill, var(--sheet-1))", children: [_jsx(SizableText, { size: "$2", fontWeight: "600", children: "4. Character & World Continuity Lock" }), _jsx(SizableText, { size: "$1", color: "$soft", children: "Lock face geometry, wardrobe, and voice identity across every shot in the sequence." }), _jsx(YStack, { gap: "$2", children: characters.map((char) => {
|
|
1133
|
+
return (_jsxs(XStack, { render: _jsx("button", { type: "button" }), onClick: () => updateShot({ lightingId: rig.id }), px: "$2.5", minH: 44, "$max-sm": { minH: 44 }, $md: { minH: 32 }, py: "$1.5", rounded: "$3", "aria-pressed": on, borderWidth: on ? 1.5 : 1, borderColor: on ? 'var(--foreground)' : 'var(--border-strong)', bg: on ? 'var(--surface-card)' : 'var(--background)', boxShadow: on ? 'var(--shadow-sheet-2)' : undefined, hoverStyle: { bg: on ? 'var(--surface-card)' : '$hover', borderColor: on ? 'var(--foreground)' : 'var(--border-strong)' }, focusVisibleStyle: RING, items: "center", gap: "$2", cursor: "pointer", children: [_jsx(XStack, { gap: 3, shrink: 0, children: rig.colors.map((hex) => (_jsx(XStack, { width: 10, height: 10, rounded: 99, style: { backgroundColor: hex, border: '1px solid var(--border-strong)', boxShadow: 'inset 0 0 0 1px color-mix(in srgb, var(--foreground) 20%, transparent)' }, borderWidth: 1, borderColor: "var(--border-strong)" }, hex))) }), _jsx(SizableText, { size: "$2", fontWeight: on ? '600' : '500', color: "$ink", numberOfLines: 1, children: rig.label })] }, rig.id));
|
|
1134
|
+
}) })] }), _jsxs(YStack, { width: "100%", minW: 0, $xl: { flex: 1 }, gap: "$3", p: "$3.5", rounded: "$4", borderWidth: 1, borderColor: "var(--border)", bg: "var(--surface-card)", children: [_jsxs(YStack, { gap: "$2", minW: 0, children: [_jsxs(YStack, { gap: 2, minW: 0, children: [_jsx(SizableText, { render: "h2", size: "$3", fontWeight: "600", color: "$ink", children: `Shot ${activeShot.number}: ${activeShot.title}` }), _jsx(SizableText, { size: "$1", color: "$soft", fontFamily: "$mono", children: `${activeCamera.name} · ${activeLens.label} · ${activeShot.aperture} · Cast: ${activeCharacter.name}` })] }), _jsxs(XStack, { gap: "$1.5", items: "center", flexWrap: "wrap", width: "100%", children: [_jsxs(XStack, { render: _jsx("button", { type: "button" }), "aria-pressed": sequenceMode, onClick: () => setSequenceMode((m) => !m), items: "center", gap: "$1.5", px: "$3", minH: 44, "$max-sm": { minH: 44 }, $md: { minH: 32, height: 32 }, rounded: 999, borderWidth: 1, borderColor: sequenceMode ? '$ink' : 'var(--border-strong)', bg: sequenceMode ? 'var(--surface-card-emphasis)' : 'transparent', hoverStyle: { bg: '$hover' }, focusVisibleStyle: RING, cursor: "pointer", shrink: 0, children: [_jsx(Film, { size: 13, color: "$ink" }), _jsx(SizableText, { size: "$1", fontWeight: sequenceMode ? '600' : '500', color: "$ink", children: sequenceMode ? 'Chain shots: on' : 'Chain all shots' })] }), _jsxs(XStack, { render: _jsx("button", { type: "button" }), onClick: () => setPlaying((p) => !p), px: "$3", minH: 44, "$max-sm": { minH: 44 }, $md: { minH: 32, height: 32 }, items: "center", gap: "$1.5", rounded: 999, borderWidth: 1, borderColor: "var(--border-strong)", bg: "transparent", hoverStyle: { bg: '$hover' }, focusVisibleStyle: RING, cursor: "pointer", shrink: 0, children: [_jsx(Play, { size: 13, color: "$ink" }), _jsx(SizableText, { size: "$1", color: "$ink", children: playing ? 'Pause monitor' : 'Play monitor' })] }), _jsxs(XStack, { render: _jsx("button", { type: "button" }), onClick: () => void renderShotOnCloud(activeShot), px: "$4", minH: 44, "$max-sm": { minH: 44 }, $md: { minH: 32, height: 32 }, items: "center", gap: "$1.5", rounded: 999, bg: "$ink", hoverStyle: { opacity: 0.9 }, focusVisibleStyle: RING, cursor: "pointer", shrink: 0, children: [_jsx(Sparkles, { size: 13, color: "$background" }), _jsx(SizableText, { size: "$2", color: "$background", fontWeight: "600", children: renderingId === activeShot.id ? 'Rendering shot…' : 'Render shot (Wan 2.2)' })] })] })] }), _jsx(YStack, { rounded: "$4", overflow: "hidden", borderWidth: 1, borderColor: "var(--border-strong)", bg: "var(--surface-card)", items: "center", justify: "center", children: _jsx("canvas", { ref: canvasRef, width: 860, height: 420, style: { width: '100%', height: 'auto', display: 'block' } }) }), _jsxs(YStack, { gap: "$2", minW: 0, children: [_jsx(SizableText, { size: "$1", color: "$soft", children: "Scene action & blocking prompt" }), _jsx(StudioTextarea, { "aria-label": "Scene action and blocking prompt", style: { resize: 'none' }, ...{ value: activeShot.prompt, rows: 2 }, onChange: (e) => updateShot({ prompt: e.currentTarget.value }) }), _jsxs(XStack, { gap: "$2", flexWrap: "wrap", minW: 0, children: [_jsxs(YStack, { flex: 1, minW: 180, gap: "$1", children: [_jsx(SizableText, { size: "$1", color: "$soft", children: "Lip-sync dialogue line (Koe performance)" }), _jsx(StudioInput, { "aria-label": "Lip-sync dialogue line", ...{ value: activeShot.dialogue, placeholder: 'Spoken line for lip-sync & voice stem…' }, onChange: (e) => updateShot({ dialogue: e.currentTarget.value }) })] }), _jsxs(YStack, { width: 130, gap: "$1", children: [_jsx(SizableText, { size: "$1", color: "$soft", children: "Shot duration (s)" }), _jsx(StudioInput, { "aria-label": "Shot duration in seconds", ...{ type: 'number', min: 1, max: 15, step: 0.5, value: String(activeShot.durationSec) }, onChange: (e) => updateShot({ durationSec: Math.max(1, Number(e.currentTarget.value) || 4) }) })] })] })] })] }), _jsxs(YStack, { width: "100%", minW: 0, $xl: { width: 268, shrink: 0 }, $xxl: { width: 280 }, gap: "$3", p: "$3", rounded: "$4", borderWidth: 1, borderColor: "var(--border)", bg: "var(--surface-card)", children: [_jsx(SizableText, { render: "h2", size: "$3", fontWeight: "600", color: "$ink", children: "4. Character & world continuity lock" }), _jsx(SizableText, { size: "$1", color: "$soft", children: "Lock face geometry, wardrobe, and voice identity across every shot in the sequence." }), _jsx(YStack, { gap: "$2", children: characters.map((char) => {
|
|
1146
1135
|
const locked = char.id === activeShot.characterId;
|
|
1147
|
-
return (_jsxs(YStack, { render: "button",
|
|
1148
|
-
}) }), _jsxs(YStack, { gap: "$2", pt: "$2", borderTopWidth: 1, borderColor: "
|
|
1149
|
-
width: '100%',
|
|
1150
|
-
height: 32,
|
|
1151
|
-
borderRadius: 8,
|
|
1152
|
-
padding: '0 10px',
|
|
1153
|
-
background: 'rgba(255,255,255,0.04)',
|
|
1154
|
-
border: '1px solid rgba(255,255,255,0.12)',
|
|
1155
|
-
color: 'inherit',
|
|
1156
|
-
font: 'inherit',
|
|
1157
|
-
} }), _jsx("input", { "aria-label": "New character wardrobe and look", placeholder: "Wardrobe, face & look traits\u2026", value: newCharWardrobe, onChange: (e) => setNewCharWardrobe(e.currentTarget.value), style: {
|
|
1158
|
-
width: '100%',
|
|
1159
|
-
height: 32,
|
|
1160
|
-
borderRadius: 8,
|
|
1161
|
-
padding: '0 10px',
|
|
1162
|
-
background: 'rgba(255,255,255,0.04)',
|
|
1163
|
-
border: '1px solid rgba(255,255,255,0.12)',
|
|
1164
|
-
color: 'inherit',
|
|
1165
|
-
font: 'inherit',
|
|
1166
|
-
} }), _jsxs(XStack, { render: "button", onPress: addCharacter, items: "center", justify: "center", gap: "$1.5", height: 32, rounded: "$3", borderWidth: 1, borderColor: "$borderColor", cursor: "pointer", hoverStyle: { bg: '$hover' }, children: [_jsx(Plus, { size: 13 }), _jsx(SizableText, { size: "$1", fontWeight: "600", children: "Add & Lock Character ID" })] })] })] })] }), _jsxs(YStack, { gap: "$2.5", p: "$3", rounded: "$4", borderWidth: 1, borderColor: "$borderColor", bg: "var(--pane-fill, var(--sheet-1))", children: [_jsxs(XStack, { items: "center", justify: "space-between", flexWrap: "wrap", gap: "$2", children: [_jsxs(XStack, { items: "center", gap: "$2", children: [_jsx(Video, { size: 15 }), _jsx(SizableText, { size: "$2", fontWeight: "600", children: "Multi-Shot Storyboard & NLE Timeline (Frame-Chained ConcatVideo)" }), _jsx(SizableText, { size: "$1", color: "$soft", children: `${shots.length} shots · ${shots.reduce((acc, s) => acc + s.durationSec, 0).toFixed(1)}s master cut` })] }), _jsxs(XStack, { render: "button", onPress: addShot, items: "center", gap: "$1.5", px: "$3", height: 28, rounded: 999, borderWidth: 1, borderColor: "$borderColor", cursor: "pointer", hoverStyle: { bg: '$hover' }, children: [_jsx(Plus, { size: 13 }), _jsx(SizableText, { size: "$1", fontWeight: "600", children: "Append Shot to Timeline" })] })] }), _jsx(XStack, { gap: "$2.5", overflowX: "auto", pb: "$1", children: shots.map((s) => {
|
|
1136
|
+
return (_jsxs(YStack, { render: _jsx("button", { type: "button" }), onClick: () => updateShot({ characterId: char.id }), width: "100%", minW: 0, minH: 44, "$max-sm": { minH: 44 }, p: "$2.5", rounded: "$3", "aria-pressed": locked, borderWidth: locked ? 1.5 : 1, borderColor: locked ? 'var(--foreground)' : 'var(--border-strong)', bg: locked ? 'var(--surface-card)' : 'var(--background)', boxShadow: locked ? 'var(--shadow-sheet-2)' : undefined, hoverStyle: { bg: locked ? 'var(--surface-card)' : '$hover', borderColor: locked ? 'var(--foreground)' : 'var(--border-strong)' }, focusVisibleStyle: RING, gap: "$1", items: "flex-start", cursor: "pointer", children: [_jsxs(XStack, { justify: "space-between", items: "center", width: "100%", gap: "$2", children: [_jsx(SizableText, { size: "$2", fontWeight: "600", color: "$ink", text: "left", children: char.name }), _jsxs(XStack, { items: "center", gap: "$1", shrink: 0, children: [locked ? _jsx(XStack, { width: 6, height: 6, rounded: 99, bg: "var(--state-success)" }) : null, _jsx(SizableText, { size: "$1", fontFamily: "$mono", color: locked ? 'var(--state-success)' : '$soft', children: locked ? `Locked #${char.seed}` : `#${char.seed}` })] })] }), _jsx(SizableText, { size: "$1", color: "$soft", text: "left", numberOfLines: 2, children: char.wardrobe }), _jsx(SizableText, { size: "$1", color: "$soft", text: "left", children: char.voice })] }, char.id));
|
|
1137
|
+
}) }), _jsxs(YStack, { gap: "$2", pt: "$2", borderTopWidth: 1, borderColor: "var(--border)", children: [_jsx(SizableText, { size: "$2", fontWeight: "600", color: "$ink", children: "Lock new character / actor ID" }), _jsx(StudioInput, { "aria-label": "New character name", ...{ placeholder: 'Character name (e.g. Mira Solis)', value: newCharName }, onChange: (e) => setNewCharName(e.currentTarget.value) }), _jsx(StudioInput, { "aria-label": "New character wardrobe and look", ...{ placeholder: 'Wardrobe, face & look traits…', value: newCharWardrobe }, onChange: (e) => setNewCharWardrobe(e.currentTarget.value) }), _jsxs(XStack, { render: _jsx("button", { type: "button" }), onClick: addCharacter, items: "center", justify: "center", gap: "$1.5", minH: 44, "$max-sm": { minH: 44 }, $md: { minH: 32, height: 32 }, rounded: "$3", borderWidth: 1, borderColor: "var(--border-strong)", bg: "transparent", cursor: "pointer", hoverStyle: { bg: '$hover' }, focusVisibleStyle: RING, children: [_jsx(Plus, { size: 13, color: "$ink" }), _jsx(SizableText, { size: "$1", fontWeight: "600", color: "$ink", children: "Add & lock character ID" })] })] })] })] }), _jsxs(YStack, { gap: "$2.5", p: "$3", rounded: "$4", borderWidth: 1, borderColor: "var(--border)", bg: "var(--surface-card)", minW: 0, children: [_jsxs(XStack, { items: "center", justify: "space-between", flexWrap: "wrap", gap: "$2", children: [_jsxs(XStack, { items: "center", gap: "$2", flexWrap: "wrap", children: [_jsx(Video, { size: 15, color: "$ink" }), _jsx(SizableText, { render: "h2", size: "$3", fontWeight: "600", color: "$ink", children: "Multi-shot storyboard & NLE timeline" }), _jsx(SizableText, { size: "$1", color: "$soft", fontFamily: "$mono", children: `${shots.length} shots · ${shots.reduce((acc, s) => acc + s.durationSec, 0).toFixed(1)}s master cut` })] }), _jsxs(XStack, { render: _jsx("button", { type: "button" }), onClick: addShot, items: "center", gap: "$1.5", px: "$3", minH: 44, "$max-sm": { minH: 44 }, $md: { minH: 28, height: 28 }, rounded: 999, borderWidth: 1, borderColor: "var(--border-strong)", bg: "transparent", cursor: "pointer", hoverStyle: { bg: '$hover' }, focusVisibleStyle: RING, children: [_jsx(Plus, { size: 13, color: "$ink" }), _jsx(SizableText, { size: "$1", fontWeight: "600", color: "$ink", children: "Append shot to timeline" })] })] }), _jsx(XStack, { gap: "$2.5", overflowX: "auto", pb: "$1", width: "100%", children: shots.map((s) => {
|
|
1167
1138
|
const cam = CAMERA_MOVES.find((c) => c.id === s.cameraId) ?? CAMERA_MOVES[0];
|
|
1168
1139
|
const char = characters.find((c) => c.id === s.characterId) ?? characters[0];
|
|
1169
1140
|
const selected = s.id === activeShot.id;
|
|
1170
|
-
return (_jsxs(YStack, { render: "button",
|
|
1171
|
-
}) })] })] })) : null, section === 'music' ? (_jsxs(
|
|
1172
|
-
width: '100%',
|
|
1173
|
-
borderRadius: 8,
|
|
1174
|
-
padding: '8px 10px',
|
|
1175
|
-
background: 'rgba(255,255,255,0.04)',
|
|
1176
|
-
border: '1px solid rgba(255,255,255,0.12)',
|
|
1177
|
-
color: 'inherit',
|
|
1178
|
-
font: 'inherit',
|
|
1179
|
-
} })] }), _jsxs(XStack, { gap: "$2", children: [_jsxs(YStack, { flex: 1, gap: "$1", children: [_jsx(SizableText, { size: "$1", color: "$soft", children: "Tempo (BPM)" }), _jsx("input", { "aria-label": "Music BPM", type: "number", min: 60, max: 200, value: musicBpm, onChange: (e) => setMusicBpm(Number(e.currentTarget.value) || 120), style: {
|
|
1180
|
-
width: '100%',
|
|
1181
|
-
height: 32,
|
|
1182
|
-
borderRadius: 8,
|
|
1183
|
-
padding: '0 10px',
|
|
1184
|
-
background: 'rgba(255,255,255,0.04)',
|
|
1185
|
-
border: '1px solid rgba(255,255,255,0.12)',
|
|
1186
|
-
color: 'inherit',
|
|
1187
|
-
font: 'inherit',
|
|
1188
|
-
} })] }), _jsxs(YStack, { flex: 1, gap: "$1", children: [_jsx(SizableText, { size: "$1", color: "$soft", children: "Key Signature" }), _jsx("input", { "aria-label": "Key signature", value: musicKey, onChange: (e) => setMusicKey(e.currentTarget.value), style: {
|
|
1189
|
-
width: '100%',
|
|
1190
|
-
height: 32,
|
|
1191
|
-
borderRadius: 8,
|
|
1192
|
-
padding: '0 10px',
|
|
1193
|
-
background: 'rgba(255,255,255,0.04)',
|
|
1194
|
-
border: '1px solid rgba(255,255,255,0.12)',
|
|
1195
|
-
color: 'inherit',
|
|
1196
|
-
font: 'inherit',
|
|
1197
|
-
} })] })] }), _jsxs(YStack, { gap: "$1.5", children: [_jsx(SizableText, { size: "$1", color: "$soft", children: "Lyrics & Song Structure ([Verse], [Chorus], [Bridge])" }), _jsx("textarea", { "aria-label": "Song lyrics and structure", value: musicLyrics, onChange: (e) => setMusicLyrics(e.currentTarget.value), rows: 4, style: {
|
|
1198
|
-
width: '100%',
|
|
1199
|
-
borderRadius: 8,
|
|
1200
|
-
padding: '8px 10px',
|
|
1201
|
-
background: 'rgba(255,255,255,0.04)',
|
|
1202
|
-
border: '1px solid rgba(255,255,255,0.12)',
|
|
1203
|
-
color: 'inherit',
|
|
1204
|
-
font: 'inherit',
|
|
1205
|
-
} })] }), _jsxs(XStack, { render: "button", onPress: () => {
|
|
1141
|
+
return (_jsxs(YStack, { render: _jsx("button", { type: "button" }), onClick: () => setActiveShotId(s.id), width: 248, shrink: 0, p: "$2.5", rounded: "$3", "aria-pressed": selected, borderWidth: selected ? 1.5 : 1, borderColor: selected ? 'var(--foreground)' : 'var(--border-strong)', bg: selected ? 'var(--surface-card)' : 'var(--background)', boxShadow: selected ? 'var(--shadow-sheet-2)' : undefined, hoverStyle: { bg: selected ? 'var(--surface-card)' : '$hover', borderColor: selected ? 'var(--foreground)' : 'var(--border-strong)' }, focusVisibleStyle: RING, gap: "$1", items: "flex-start", cursor: "pointer", children: [_jsxs(XStack, { justify: "space-between", items: "center", width: "100%", gap: "$2", children: [_jsx(SizableText, { size: "$1", fontWeight: "600", fontFamily: "$mono", color: "$ink", children: `Shot ${String(s.number).padStart(2, '0')} · ${cam.code}` }), _jsx(SizableText, { size: "$1", fontFamily: "$mono", color: s.status === 'done' ? 'var(--state-success)' : '$soft', children: `${s.durationSec.toFixed(1)}s · ${s.status}` })] }), _jsx(SizableText, { size: "$2", fontWeight: "600", color: "$ink", text: "left", numberOfLines: 1, children: s.title }), _jsx(SizableText, { size: "$1", color: "$soft", text: "left", numberOfLines: 2, children: s.prompt }), _jsxs(XStack, { items: "center", justify: "space-between", pt: "$1", width: "100%", children: [_jsx(SizableText, { size: "$1", color: "$soft", children: char.name }), _jsxs(XStack, { items: "center", gap: "$1", children: [_jsx(Music, { size: 11, color: "$soft" }), _jsx(SizableText, { size: "$1", color: "$soft", children: "Oto + Uta stems" })] })] })] }, s.id));
|
|
1142
|
+
}) })] })] })) : null, section === 'music' ? (_jsxs(YStack, { gap: "$3", flex: 1, width: "100%", minW: 0, $xl: { flexDirection: 'row', items: 'flex-start' }, children: [_jsxs(YStack, { width: "100%", minW: 0, $xl: { width: 276, shrink: 0 }, $xxl: { width: 288 }, gap: "$3", p: "$3", rounded: "$4", borderWidth: 1, borderColor: "var(--border)", bg: "var(--surface-card)", children: [_jsx(SizableText, { render: "h2", size: "$3", fontWeight: "600", color: "$ink", children: "ACE-Step 3.5B song & stem synthesis" }), _jsxs(YStack, { gap: "$1.5", children: [_jsx(SizableText, { size: "$1", color: "$soft", children: "Musical style, instruments & production tags" }), _jsx(StudioTextarea, { "aria-label": "Music style and production prompt", style: { resize: 'none' }, ...{ value: musicPrompt, rows: 3 }, onChange: (e) => setMusicPrompt(e.currentTarget.value) })] }), _jsxs(XStack, { gap: "$2", children: [_jsxs(YStack, { flex: 1, minW: 0, gap: "$1", children: [_jsx(SizableText, { size: "$1", color: "$soft", children: "Tempo (BPM)" }), _jsx(StudioInput, { "aria-label": "Music BPM", ...{ type: 'number', min: 60, max: 200, value: String(musicBpm) }, onChange: (e) => setMusicBpm(Number(e.currentTarget.value) || 120) })] }), _jsxs(YStack, { flex: 1, minW: 0, gap: "$1", children: [_jsx(SizableText, { size: "$1", color: "$soft", children: "Key signature" }), _jsx(StudioInput, { "aria-label": "Key signature", ...{ value: musicKey }, onChange: (e) => setMusicKey(e.currentTarget.value) })] })] }), _jsxs(YStack, { gap: "$1.5", children: [_jsx(SizableText, { size: "$1", color: "$soft", children: "Lyrics & song structure" }), _jsx(StudioTextarea, { "aria-label": "Song lyrics and structure", style: { resize: 'none' }, ...{ value: musicLyrics, rows: 4 }, onChange: (e) => setMusicLyrics(e.currentTarget.value) })] }), _jsxs(XStack, { render: "button", onPress: () => {
|
|
1206
1143
|
setDawPlaying(true);
|
|
1207
1144
|
setStatusNote(`Synthesizing ACE-Step 3.5B Master (${musicBpm} BPM · ${musicKey})…`);
|
|
1208
|
-
}, height: 36, rounded: 999, bg: "$ink", items: "center", justify: "center", gap: "$1.5", cursor: "pointer", children: [_jsx(Sparkles, { size: 14 }), _jsx(SizableText, { size: "$2", color: "$background", fontWeight: "600", children: "Generate Song & Stems (ACE-Step)" })] })] }), _jsxs(YStack, {
|
|
1145
|
+
}, height: 36, rounded: 999, bg: "$ink", items: "center", justify: "center", gap: "$1.5", cursor: "pointer", children: [_jsx(Sparkles, { size: 14 }), _jsx(SizableText, { size: "$2", color: "$background", fontWeight: "600", children: "Generate Song & Stems (ACE-Step)" })] })] }), _jsxs(YStack, { width: "100%", minW: 0, $xl: { flex: 1 }, gap: "$3", p: "$3.5", rounded: "$4", borderWidth: 1, borderColor: "var(--border)", bg: "var(--surface-card)", children: [_jsxs(XStack, { items: "center", justify: "space-between", flexWrap: "wrap", gap: "$2", children: [_jsxs(YStack, { gap: 2, minW: 0, children: [_jsx(SizableText, { render: "h2", size: "$3", fontWeight: "600", color: "$ink", children: "Multi-stem DAW & waveform sequencer" }), _jsx(SizableText, { size: "$1", color: "$soft", fontFamily: "$mono", children: `${musicBpm} BPM · ${musicKey} · 48kHz 24-bit stems` })] }), _jsx(XStack, { gap: "$2", children: _jsxs(XStack, { render: _jsx("button", { type: "button" }), "aria-pressed": dawPlaying, onClick: () => setDawPlaying((p) => !p), px: "$3.5", minH: 44, "$max-sm": { minH: 44 }, $md: { minH: 32, height: 32 }, rounded: 999, bg: dawPlaying ? 'var(--surface-card-emphasis)' : 'transparent', borderWidth: 1, borderColor: dawPlaying ? '$ink' : 'var(--border-strong)', hoverStyle: { bg: '$hover' }, focusVisibleStyle: RING, items: "center", gap: "$1.5", cursor: "pointer", children: [_jsx(Play, { size: 13, color: "$ink" }), _jsx(SizableText, { size: "$1", color: "$ink", fontWeight: "600", children: dawPlaying ? 'Stop synth engine' : 'Play live stems' })] }) })] }), _jsx(YStack, { rounded: "$4", overflow: "hidden", borderWidth: 1, borderColor: "var(--border-strong)", bg: "var(--surface-card)", children: _jsx("canvas", { ref: audioWaveCanvasRef, width: 780, height: 220, style: { width: '100%', height: 'auto', display: 'block' } }) }), _jsx(YStack, { gap: "$2", role: "list", "aria-label": "Audio stems", minW: 0, children: stems.map((stem) => (_jsxs(XStack, { role: "listitem", items: "center", justify: "space-between", flexWrap: "wrap", gap: "$2.5", p: "$2.5", rounded: "$3", borderWidth: 1, borderColor: "var(--border-strong)", bg: "var(--background)", minW: 0, children: [_jsxs(XStack, { items: "center", gap: "$2", width: 180, minW: 0, children: [_jsx(XStack, { width: 9, height: 9, rounded: 99, shrink: 0, borderWidth: 1, borderColor: "var(--border-strong)", style: { backgroundColor: stem.color, border: '1px solid var(--border-strong)' } }), _jsxs(YStack, { minW: 0, children: [_jsx(SizableText, { size: "$2", fontWeight: "600", color: "$ink", numberOfLines: 1, children: stem.name }), _jsx(SizableText, { size: "$1", color: "$soft", numberOfLines: 1, children: stem.role })] })] }), _jsx("input", { "aria-label": `${stem.name} volume`, type: "range", min: 0, max: 100, value: stem.volume, onChange: (e) => {
|
|
1209
1146
|
const v = Number(e.currentTarget.value);
|
|
1210
1147
|
setStems((prev) => prev.map((s) => (s.id === stem.id ? { ...s, volume: v } : s)));
|
|
1211
|
-
}, style: { flex: 1 } }), _jsxs(XStack, { gap: "$1.5", children: [_jsx(XStack, { render: "button",
|
|
1212
|
-
width: '100%',
|
|
1213
|
-
borderRadius: 8,
|
|
1214
|
-
padding: '8px 10px',
|
|
1215
|
-
background: 'rgba(255,255,255,0.04)',
|
|
1216
|
-
border: '1px solid rgba(255,255,255,0.12)',
|
|
1217
|
-
color: 'inherit',
|
|
1218
|
-
font: 'inherit',
|
|
1219
|
-
} }), _jsxs(XStack, { render: "button", onPress: () => {
|
|
1148
|
+
}, style: { flex: 1, minWidth: 100 } }), _jsxs(XStack, { gap: "$1.5", shrink: 0, children: [_jsx(XStack, { render: _jsx("button", { type: "button" }), "aria-label": `Mute ${stem.name}`, "aria-pressed": stem.muted, onClick: () => setStems((prev) => prev.map((s) => (s.id === stem.id ? { ...s, muted: !s.muted } : s))), px: "$2.5", minW: 44, minH: 44, "$max-sm": { minW: 44, minH: 44 }, $md: { minW: 30, minH: 26, height: 26 }, items: "center", justify: "center", rounded: "$2", borderWidth: 1, borderColor: stem.muted ? '$ink' : 'var(--border-strong)', bg: stem.muted ? 'var(--surface-card-emphasis)' : 'transparent', hoverStyle: { bg: '$hover' }, focusVisibleStyle: RING, cursor: "pointer", children: _jsx(SizableText, { size: "$1", fontWeight: stem.muted ? '600' : '500', color: stem.muted ? '$ink' : '$soft', children: "M" }) }), _jsx(XStack, { render: _jsx("button", { type: "button" }), "aria-label": `Solo ${stem.name}`, "aria-pressed": stem.solo, onClick: () => setStems((prev) => prev.map((s) => (s.id === stem.id ? { ...s, solo: !s.solo } : s))), px: "$2.5", minW: 44, minH: 44, "$max-sm": { minW: 44, minH: 44 }, $md: { minW: 30, minH: 26, height: 26 }, items: "center", justify: "center", rounded: "$2", borderWidth: 1, borderColor: stem.solo ? '$ink' : 'var(--border-strong)', bg: stem.solo ? 'var(--surface-card-emphasis)' : 'transparent', hoverStyle: { bg: '$hover' }, focusVisibleStyle: RING, cursor: "pointer", children: _jsx(SizableText, { size: "$1", fontWeight: stem.solo ? '600' : '500', color: stem.solo ? '$ink' : '$soft', children: "S" }) })] })] }, stem.id))) })] }), _jsxs(YStack, { width: "100%", minW: 0, $xl: { width: 268, shrink: 0 }, $xxl: { width: 280 }, gap: "$3", p: "$3", rounded: "$4", borderWidth: 1, borderColor: "var(--border)", bg: "var(--surface-card)", children: [_jsx(SizableText, { render: "h2", size: "$3", fontWeight: "600", color: "$ink", children: "Koe voice & dialogue studio" }), _jsx(SizableText, { size: "$1", color: "$soft", children: "Zero-shot voice cloning & emotional speech synthesis (/v1/audio/speech)." }), _jsx(YStack, { gap: "$1.5", children: ['koe-baritone', 'koe-alto', 'koe-narrator', 'oto-cyber'].map((vp) => (_jsxs(XStack, { render: _jsx("button", { type: "button" }), onClick: () => setVoicePreset(vp), px: "$2.5", minH: 44, "$max-sm": { minH: 44 }, $md: { minH: 32 }, py: "$1.5", rounded: "$3", "aria-pressed": voicePreset === vp, borderWidth: voicePreset === vp ? 1.5 : 1, borderColor: voicePreset === vp ? 'var(--foreground)' : 'var(--border-strong)', bg: voicePreset === vp ? 'var(--surface-card)' : 'var(--background)', boxShadow: voicePreset === vp ? 'var(--shadow-sheet-2)' : undefined, hoverStyle: { bg: voicePreset === vp ? 'var(--surface-card)' : '$hover', borderColor: voicePreset === vp ? 'var(--foreground)' : 'var(--border-strong)' }, focusVisibleStyle: RING, justify: "space-between", items: "center", cursor: "pointer", children: [_jsx(SizableText, { size: "$2", fontWeight: "600", fontFamily: "$mono", color: "$ink", children: vp }), _jsx(SizableText, { size: "$1", color: "$soft", children: "24kHz neural" })] }, vp))) }), _jsx(StudioTextarea, { "aria-label": "Voice narration script", ...{ value: voiceLine, rows: 4 }, onChange: (e) => setVoiceLine(e.currentTarget.value) }), _jsxs(XStack, { render: "button", onPress: () => {
|
|
1220
1149
|
triggerCinemaAudio();
|
|
1221
1150
|
setStatusNote(`Synthesized Koe voice stem (${voicePreset}) → added to Vocal Stem`);
|
|
1222
|
-
}, height: 34, rounded: 999, borderWidth: 1, borderColor: "$borderColor", items: "center", justify: "center", gap: "$1.5", cursor: "pointer", hoverStyle: { bg: '$hover' }, children: [_jsx(Wand2, { size: 13 }), _jsx(SizableText, { size: "$1", fontWeight: "600", children: "Synthesize Voice Stem" })] })] })] })) : null, section === 'model3d' ? (_jsxs(
|
|
1151
|
+
}, height: 34, rounded: 999, borderWidth: 1, borderColor: "$borderColor", items: "center", justify: "center", gap: "$1.5", cursor: "pointer", hoverStyle: { bg: '$hover' }, children: [_jsx(Wand2, { size: 13 }), _jsx(SizableText, { size: "$1", fontWeight: "600", children: "Synthesize Voice Stem" })] })] })] })) : null, section === 'model3d' ? (_jsxs(YStack, { gap: "$3", flex: 1, width: "100%", minW: 0, $lg: { flexDirection: 'row', items: 'flex-start' }, children: [_jsxs(YStack, { width: "100%", minW: 0, $lg: { width: 276, shrink: 0 }, $xl: { width: 288 }, gap: "$3", p: "$3", rounded: "$4", borderWidth: 1, borderColor: "var(--border)", bg: "var(--surface-card)", children: [_jsx(SizableText, { render: "h2", size: "$3", fontWeight: "600", color: "$ink", children: "Hunyuan3D-2.1 mesh generator" }), _jsx(SizableText, { size: "$1", color: "$soft", children: "Convert a reference photo or prompt into a watertight textured .glb mesh on GB10 / H100 GPUs." }), _jsx(YStack, { gap: "$2", role: "list", "aria-label": "3D mesh presets", children: MESH_PRESETS.map((m) => {
|
|
1223
1152
|
const on = m.id === activeMesh.id;
|
|
1224
|
-
return (_jsxs(YStack, { render: "button",
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
}) }), _jsxs(YStack, { gap: "$1.5", children: [_jsx(SizableText, { size: "$1", color: "$soft", children: "Octree
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
background: 'rgba(255,255,255,0.04)',
|
|
1234
|
-
border: '1px solid rgba(255,255,255,0.12)',
|
|
1235
|
-
color: 'inherit',
|
|
1236
|
-
font: 'inherit',
|
|
1237
|
-
} }), _jsxs(XStack, { render: "button", onPress: () => {
|
|
1153
|
+
return (_jsx(YStack, { role: "listitem", width: "100%", minW: 0, children: _jsxs(YStack, { render: _jsx("button", { type: "button" }), onClick: () => {
|
|
1154
|
+
setActiveMeshId(m.id);
|
|
1155
|
+
setMeshPrompt(m.prompt);
|
|
1156
|
+
setMeshOctree(m.octree);
|
|
1157
|
+
}, width: "100%", minW: 0, minH: 44, "$max-sm": { minH: 44 }, p: "$2.5", rounded: "$3", "aria-pressed": on, borderWidth: on ? 1.5 : 1, borderColor: on ? 'var(--foreground)' : 'var(--border-strong)', bg: on ? 'var(--surface-card)' : 'var(--background)', boxShadow: on ? 'var(--shadow-sheet-2)' : undefined, hoverStyle: { bg: on ? 'var(--surface-card)' : '$hover', borderColor: on ? 'var(--foreground)' : 'var(--border-strong)' }, focusVisibleStyle: RING, gap: "$1", items: "flex-start", cursor: "pointer", children: [_jsxs(XStack, { justify: "space-between", items: "center", width: "100%", gap: "$2", children: [_jsx(SizableText, { size: "$2", fontWeight: "600", color: "$ink", text: "left", flex: 1, minW: 0, children: m.name }), _jsx(SizableText, { size: "$1", color: "$soft", fontFamily: "$mono", shrink: 0, children: `${(m.faces / 1000).toFixed(0)}k tris` })] }), _jsx(SizableText, { size: "$1", color: "$soft", text: "left", children: m.category })] }) }, m.id));
|
|
1158
|
+
}) }), _jsxs(YStack, { gap: "$1.5", children: [_jsx(SizableText, { size: "$1", color: "$soft", children: "Octree marching-cubes resolution" }), _jsx(XStack, { gap: "$2", children: [256, 384, 512].map((res) => {
|
|
1159
|
+
const on = meshOctree === res;
|
|
1160
|
+
return (_jsx(XStack, { render: _jsx("button", { type: "button" }), "aria-pressed": on, onClick: () => setMeshOctree(res), px: "$3", minH: 44, "$max-sm": { minH: 44 }, $md: { minH: 28, height: 28 }, items: "center", rounded: 999, borderWidth: 1, borderColor: on ? '$ink' : 'var(--border-strong)', bg: on ? 'var(--surface-card-emphasis)' : 'transparent', hoverStyle: { bg: '$hover' }, focusVisibleStyle: RING, cursor: "pointer", children: _jsx(SizableText, { size: "$1", fontFamily: "$mono", fontWeight: on ? '600' : '500', color: on ? '$ink' : '$soft', children: `${res}³` }) }, res));
|
|
1161
|
+
}) })] }), _jsx(StudioTextarea, { "aria-label": "3D mesh conditioning prompt", style: { resize: 'none' }, ...{ value: meshPrompt, rows: 3 }, onChange: (e) => setMeshPrompt(e.currentTarget.value) }), _jsxs(XStack, { render: "button", onPress: () => {
|
|
1238
1162
|
triggerCinemaAudio();
|
|
1239
1163
|
setStatusNote(`Dispatched Hunyuan3D-2.1 mesh job (${meshOctree}³ octree) → /v1/library/model3d`);
|
|
1240
|
-
}, height: 36, rounded: 999, bg: "$ink", items: "center", justify: "center", gap: "$1.5", cursor: "pointer", children: [_jsx(Box, { size: 14 }), _jsx(SizableText, { size: "$2", color: "$background", fontWeight: "600", children: "Generate 3D Mesh (.GLB)" })] })] }), _jsxs(YStack, {
|
|
1164
|
+
}, height: 36, rounded: 999, bg: "$ink", items: "center", justify: "center", gap: "$1.5", cursor: "pointer", children: [_jsx(Box, { size: 14 }), _jsx(SizableText, { size: "$2", color: "$background", fontWeight: "600", children: "Generate 3D Mesh (.GLB)" })] })] }), _jsxs(YStack, { width: "100%", minW: 0, $lg: { flex: 1 }, gap: "$3", p: "$3.5", rounded: "$4", borderWidth: 1, borderColor: "var(--border)", bg: "var(--surface-card)", children: [_jsxs(YStack, { gap: "$2", minW: 0, children: [_jsxs(YStack, { gap: 2, minW: 0, children: [_jsx(SizableText, { render: "h2", size: "$3", fontWeight: "600", color: "$ink", children: activeMesh.name }), _jsx(SizableText, { size: "$1", color: "$soft", fontFamily: "$mono", children: `${activeMesh.vertices.toLocaleString()} vertices · ${activeMesh.faces.toLocaleString()} triangles · Watertight PBR GLB` })] }), _jsxs(XStack, { gap: "$1.5", flexWrap: "wrap", items: "center", children: [[
|
|
1165
|
+
{ id: 'pbr', label: 'PBR' },
|
|
1166
|
+
{ id: 'wireframe', label: 'Wireframe' },
|
|
1167
|
+
{ id: 'normal', label: 'Normal' },
|
|
1168
|
+
{ id: 'clay', label: 'Clay' },
|
|
1169
|
+
].map((sh) => {
|
|
1170
|
+
const on = meshShader === sh.id;
|
|
1171
|
+
return (_jsx(XStack, { render: _jsx("button", { type: "button" }), "aria-pressed": on, onClick: () => setMeshShader(sh.id), px: "$2.5", minH: 44, "$max-sm": { minH: 44 }, $md: { minH: 28, height: 28 }, items: "center", rounded: 999, borderWidth: 1, borderColor: on ? '$ink' : 'var(--border-strong)', bg: on ? 'var(--surface-card-emphasis)' : 'transparent', hoverStyle: { bg: '$hover' }, focusVisibleStyle: RING, cursor: "pointer", children: _jsx(SizableText, { size: "$1", fontWeight: on ? '600' : '500', color: on ? '$ink' : '$soft', children: sh.label }) }, sh.id));
|
|
1172
|
+
}), _jsx(XStack, { render: _jsx("button", { type: "button" }), onClick: () => setMeshAutoRotate((r) => !r), px: "$2.5", minH: 44, "$max-sm": { minH: 44 }, $md: { minH: 28, height: 28 }, items: "center", rounded: 999, borderWidth: 1, borderColor: "var(--border-strong)", bg: "transparent", hoverStyle: { bg: '$hover' }, focusVisibleStyle: RING, cursor: "pointer", children: _jsx(SizableText, { size: "$1", color: "$ink", children: meshAutoRotate ? 'Turntable: on' : 'Turntable: off' }) }), _jsxs(XStack, { render: _jsx("button", { type: "button" }), onClick: exportMeshObj, px: "$3", minH: 44, "$max-sm": { minH: 44 }, $md: { minH: 28, height: 28 }, items: "center", gap: "$1.5", rounded: 999, borderWidth: 1, borderColor: "var(--border-strong)", bg: "transparent", hoverStyle: { bg: '$hover' }, focusVisibleStyle: RING, cursor: "pointer", children: [_jsx(Download, { size: 12, color: "$ink" }), _jsx(SizableText, { size: "$1", color: "$ink", fontWeight: "600", children: "Export .OBJ / .GLB" })] })] })] }), _jsx(YStack, { rounded: "$4", overflow: "hidden", borderWidth: 1, borderColor: "var(--border-strong)", bg: "var(--surface-card)", children: _jsx("canvas", { ref: meshCanvasRef, width: 820, height: 420, style: { width: '100%', height: 'auto', display: 'block' } }) }), _jsxs(XStack, { items: "center", gap: "$3", flexWrap: "wrap", children: [_jsx(SizableText, { size: "$1", color: "$soft", fontFamily: "$mono", children: `Key light azimuth (${meshLightAngle}°)` }), _jsx("input", { "aria-label": "Key light azimuth angle", type: "range", min: 0, max: 360, value: meshLightAngle, onChange: (e) => setMeshLightAngle(Number(e.currentTarget.value)), style: { flex: 1, minWidth: 140 } })] })] })] })) : null, section === 'library' ? (_jsxs(YStack, { gap: "$3", flex: 1, width: "100%", minW: 0, $lg: { flexDirection: 'row', items: 'flex-start' }, children: [_jsxs(YStack, { width: "100%", minW: 0, $lg: { flex: 1 }, gap: "$3", p: "$3.5", rounded: "$4", borderWidth: 1, borderColor: "var(--border)", bg: "var(--surface-card)", children: [_jsxs(XStack, { items: "center", justify: "space-between", flexWrap: "wrap", gap: "$2", children: [_jsxs(YStack, { gap: 2, flex: 1, minW: 200, children: [_jsx(SizableText, { render: "h2", size: "$3", fontWeight: "600", color: "$ink", children: "Org asset library, stacks & quality gate flywheel" }), _jsx(SizableText, { size: "$1", color: "$soft", children: "Every asset embeds its ComfyUI workflow graph and seed. Ratings and critiques condition future renders." })] }), _jsx(XStack, { gap: "$1.5", flexWrap: "wrap", children: [
|
|
1173
|
+
{ id: 'all', label: 'All' },
|
|
1174
|
+
{ id: 'video', label: 'Video' },
|
|
1175
|
+
{ id: 'model3d', label: '3D' },
|
|
1176
|
+
{ id: 'music', label: 'Music' },
|
|
1177
|
+
{ id: 'image', label: 'Image' },
|
|
1178
|
+
].map((f) => {
|
|
1179
|
+
const on = libraryFilter === f.id;
|
|
1180
|
+
return (_jsx(XStack, { render: _jsx("button", { type: "button" }), "aria-pressed": on, onClick: () => setLibraryFilter(f.id), px: "$2.5", minH: 44, "$max-sm": { minH: 44 }, $md: { minH: 28, height: 28 }, items: "center", rounded: 999, borderWidth: 1, borderColor: on ? '$ink' : 'var(--border-strong)', bg: on ? 'var(--surface-card-emphasis)' : 'transparent', hoverStyle: { bg: '$hover' }, focusVisibleStyle: RING, cursor: "pointer", children: _jsx(SizableText, { size: "$1", fontWeight: on ? '600' : '500', color: on ? '$ink' : '$soft', children: f.label }) }, f.id));
|
|
1181
|
+
}) })] }), _jsx(XStack, { gap: "$2.5", flexWrap: "wrap", role: "list", "aria-label": "Library assets", width: "100%", minW: 0, children: libraryItems
|
|
1241
1182
|
.filter((it) => libraryFilter === 'all' || it.modality === libraryFilter)
|
|
1242
|
-
.map((it) => (_jsxs(YStack, { width:
|
|
1183
|
+
.map((it) => (_jsxs(YStack, { role: "listitem", width: "100%", $sm: { width: 'calc(50% - 5px)' }, minW: 0, p: "$3", rounded: "$3", borderWidth: 1, borderColor: "var(--border-strong)", bg: "var(--background)", gap: "$2", children: [_jsxs(XStack, { justify: "space-between", items: "center", gap: "$2", children: [_jsxs(XStack, { items: "center", gap: "$1.5", flex: 1, minW: 0, children: [_jsx(Folder, { size: 12, color: "$soft" }), _jsx(SizableText, { size: "$1", color: "$soft", numberOfLines: 1, children: it.stack })] }), _jsx(SizableText, { size: "$1", fontFamily: "$mono", color: it.status === 'published' || it.status === 'approved' ? 'var(--state-success)' : '$soft', shrink: 0, children: it.status === 'published' ? 'Published' : it.status === 'approved' ? 'Approved' : 'Draft' })] }), _jsx(SizableText, { size: "$2", fontWeight: "600", color: "$ink", children: it.title }), it.modality === 'image' && /^(blob:|data:image\/|https?:)/.test(it.path) ? (_jsx("img", { src: it.path, alt: it.title, style: { width: '100%', borderRadius: 8, display: 'block' } })) : null, _jsx(SizableText, { size: "$1", color: "$soft", fontFamily: "$mono", numberOfLines: 2, children: `${/^(blob|data):/.test(it.path) ? 'Generated image' : it.path} · graph: ${it.workflow}` }), it.critique ? (_jsx(SizableText, { size: "$1", color: "$soft", children: `Conditioning note: “${it.critique}”` })) : null, _jsxs(XStack, { justify: "space-between", items: "center", flexWrap: "wrap", gap: "$1.5", pt: "$1", children: [_jsxs(XStack, { gap: "$1.5", children: [_jsxs(XStack, { render: _jsx("button", { type: "button" }), "aria-pressed": it.vote === 1, onClick: () => setLibraryItems((prev) => prev.map((x) => (x.id === it.id ? { ...x, vote: x.vote === 1 ? 0 : 1 } : x))), px: "$2", minH: 44, "$max-sm": { minH: 44 }, $md: { minH: 26, height: 26 }, items: "center", gap: "$1", rounded: "$2", borderWidth: 1, borderColor: it.vote === 1 ? 'var(--state-success)' : 'var(--border-strong)', bg: it.vote === 1 ? 'var(--state-success-bg)' : 'transparent', hoverStyle: { bg: '$hover' }, focusVisibleStyle: RING, cursor: "pointer", children: [_jsx(ThumbsUp, { size: 12, color: it.vote === 1 ? 'var(--state-success)' : '$ink' }), _jsx(SizableText, { size: "$1", color: it.vote === 1 ? 'var(--state-success)' : '$ink', children: "Good" })] }), _jsxs(XStack, { render: _jsx("button", { type: "button" }), "aria-pressed": it.vote === -1, onClick: () => setLibraryItems((prev) => prev.map((x) => (x.id === it.id ? { ...x, vote: x.vote === -1 ? 0 : -1 } : x))), px: "$2", minH: 44, "$max-sm": { minH: 44 }, $md: { minH: 26, height: 26 }, items: "center", gap: "$1", rounded: "$2", borderWidth: 1, borderColor: it.vote === -1 ? 'var(--state-error)' : 'var(--border-strong)', bg: it.vote === -1 ? 'var(--state-error-bg)' : 'transparent', hoverStyle: { bg: '$hover' }, focusVisibleStyle: RING, cursor: "pointer", children: [_jsx(ThumbsDown, { size: 12, color: it.vote === -1 ? 'var(--state-error)' : '$ink' }), _jsx(SizableText, { size: "$1", color: it.vote === -1 ? 'var(--state-error)' : '$ink', children: "Fix" })] })] }), _jsx(XStack, { render: "button", onPress: () => {
|
|
1243
1184
|
setLibraryItems((prev) => prev.map((x) => (x.id === it.id ? { ...x, status: 'published' } : x)));
|
|
1244
1185
|
setStatusNote(`Published "${it.title}" to Gallery & cms.hanzo.ai`);
|
|
1245
|
-
}, px: "$2.5", height: 26, items: "center", rounded: "$2", borderWidth: 1, borderColor: "$borderColor", cursor: "pointer", children: _jsx(SizableText, { size: "$1", children: "\u2601 Publish CMS" }) })] })] }, it.id))) })] }), _jsxs(YStack, { width:
|
|
1246
|
-
width: '100%',
|
|
1247
|
-
borderRadius: 8,
|
|
1248
|
-
padding: '8px 10px',
|
|
1249
|
-
background: 'rgba(255,255,255,0.04)',
|
|
1250
|
-
border: '1px solid rgba(255,255,255,0.12)',
|
|
1251
|
-
color: 'inherit',
|
|
1252
|
-
font: 'inherit',
|
|
1253
|
-
} })] }), _jsxs(YStack, { gap: "$1", children: [_jsx(SizableText, { size: "$1", color: "$soft", children: `Denoise / Edit Strength: ${inpaintStrength}%` }), _jsx("input", { "aria-label": "Edit strength percentage", type: "range", min: 10, max: 95, step: 5, value: inpaintStrength, onChange: (e) => setInpaintStrength(Number(e.currentTarget.value)) })] }), _jsx("canvas", { ref: inpaintCanvasRef, width: 280, height: 4, style: { display: 'none' } }), _jsxs(XStack, { render: "button", onPress: () => {
|
|
1186
|
+
}, px: "$2.5", height: 26, items: "center", rounded: "$2", borderWidth: 1, borderColor: "$borderColor", cursor: "pointer", children: _jsx(SizableText, { size: "$1", children: "\u2601 Publish CMS" }) })] })] }, it.id))) })] }), _jsxs(YStack, { width: "100%", minW: 0, $lg: { width: 272, shrink: 0 }, $xl: { width: 280 }, gap: "$3", p: "$3", rounded: "$4", borderWidth: 1, borderColor: "var(--border)", bg: "var(--surface-card)", children: [_jsx(SizableText, { render: "h2", size: "$3", fontWeight: "600", color: "$ink", children: "Qwen-Image-Edit 2511 mask inpaint" }), _jsx(SizableText, { size: "$1", color: "$soft", children: "Paint a mask region or attach 2\u20135 references to edit only the selected area while preserving subject identity and lighting (/v1/library/fix)." }), _jsxs(YStack, { gap: "$1", children: [_jsx(SizableText, { size: "$1", color: "$soft", children: "Edit instruction" }), _jsx(StudioTextarea, { "aria-label": "Inpaint edit instruction", style: { resize: 'none' }, ...{ value: inpaintInstruction, rows: 3 }, onChange: (e) => setInpaintInstruction(e.currentTarget.value) })] }), _jsxs(YStack, { gap: "$1", children: [_jsx(SizableText, { size: "$1", color: "$soft", fontFamily: "$mono", children: `Denoise / edit strength: ${inpaintStrength}%` }), _jsx("input", { "aria-label": "Edit strength percentage", type: "range", min: 10, max: 95, step: 5, value: inpaintStrength, onChange: (e) => setInpaintStrength(Number(e.currentTarget.value)) })] }), _jsx("canvas", { ref: inpaintCanvasRef, width: 280, height: 4, style: { display: 'none' } }), _jsxs(XStack, { render: "button", onPress: () => {
|
|
1254
1187
|
triggerCinemaAudio();
|
|
1255
1188
|
setStatusNote(`Queued Qwen-Image-Edit 2511 pass (${inpaintStrength}% denoise) → /v1/library/fix`);
|
|
1256
|
-
}, height: 34, rounded: 999, bg: "$ink", items: "center", justify: "center", gap: "$1.5", cursor: "pointer", children: [_jsx(Wand2, { size: 13 }), _jsx(SizableText, { size: "$1", color: "$background", fontWeight: "600", children: "Run Region Edit (/v1/library/fix)" })] })] })] })) : null, section === 'queue' ? (_jsxs(YStack, { gap: "$3", p: "$3", rounded: "$4", borderWidth: 1, borderColor: "
|
|
1189
|
+
}, height: 34, rounded: 999, bg: "$ink", items: "center", justify: "center", gap: "$1.5", cursor: "pointer", children: [_jsx(Wand2, { size: 13 }), _jsx(SizableText, { size: "$1", color: "$background", fontWeight: "600", children: "Run Region Edit (/v1/library/fix)" })] })] })] })) : null, section === 'queue' ? (_jsxs(YStack, { gap: "$3", p: "$3.5", rounded: "$4", borderWidth: 1, borderColor: "var(--border)", bg: "var(--surface-card)", minW: 0, children: [_jsxs(XStack, { items: "center", justify: "space-between", flexWrap: "wrap", gap: "$2", children: [_jsxs(YStack, { gap: 2, flex: 1, minW: 200, children: [_jsx(SizableText, { render: "h2", size: "$3", fontWeight: "600", color: "$ink", children: "GPU federation fleet & durable render queue (tasks.hanzo.ai)" }), _jsx(SizableText, { size: "$1", color: "$soft", children: "Select a target GPU node (X-Target-GPU) or route jobs across the shared gpu-jobs cluster." })] }), _jsxs(XStack, { render: "button", onPress: () => setStatusNote('Refreshed /v1/gpu-status & /v1/queue/status'), px: "$3", height: 30, items: "center", gap: "$1.5", rounded: 999, borderWidth: 1, borderColor: "$borderColor", cursor: "pointer", children: [_jsx(RefreshCw, { size: 12 }), _jsx(SizableText, { size: "$1", children: "Refresh Fleet" })] })] }), _jsx(XStack, { gap: "$2.5", flexWrap: "wrap", role: "list", "aria-label": "GPU nodes", width: "100%", minW: 0, children: gpuNodes.map((n) => {
|
|
1257
1190
|
const selected = targetGpu === n.name;
|
|
1258
|
-
return (_jsxs(YStack, { render: "button",
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1191
|
+
return (_jsx(YStack, { role: "listitem", width: "100%", $sm: { width: 'calc(50% - 5px)' }, minW: 0, children: _jsxs(YStack, { render: _jsx("button", { type: "button" }), onClick: () => {
|
|
1192
|
+
setTargetGpu(selected ? 'any' : n.name);
|
|
1193
|
+
setStatusNote(selected ? 'Routing renders to any available GPU' : `Pinned next render to GPU node: ${n.name}`);
|
|
1194
|
+
}, width: "100%", minW: 0, minH: 44, "$max-sm": { minH: 44 }, p: "$3", rounded: "$3", "aria-pressed": selected, borderWidth: selected ? 1.5 : 1, borderColor: selected ? 'var(--foreground)' : 'var(--border-strong)', bg: selected ? 'var(--surface-card)' : 'var(--background)', boxShadow: selected ? 'var(--shadow-sheet-2)' : undefined, hoverStyle: { bg: selected ? 'var(--surface-card)' : '$hover', borderColor: selected ? 'var(--foreground)' : 'var(--border-strong)' }, focusVisibleStyle: RING, gap: "$1.5", items: "flex-start", cursor: "pointer", children: [_jsxs(XStack, { justify: "space-between", items: "center", width: "100%", gap: "$2", children: [_jsxs(XStack, { items: "center", gap: "$2", minW: 0, children: [_jsx(Cpu, { size: 15, color: "$ink" }), _jsx(SizableText, { size: "$2", fontWeight: "600", color: "$ink", fontFamily: "$mono", numberOfLines: 1, children: n.name })] }), _jsxs(XStack, { items: "center", gap: "$1.5", shrink: 0, children: [_jsx(XStack, { width: 7, height: 7, rounded: 99, bg: n.online ? 'var(--state-success)' : 'var(--state-error)' }), _jsx(SizableText, { size: "$1", fontFamily: "$mono", color: n.online ? 'var(--state-success)' : 'var(--state-error)', children: n.online ? `Online · ${n.depth} queued` : 'Offline' })] })] }), _jsx(SizableText, { size: "$1", color: "$soft", children: `Memory: ${n.vram}` }), _jsx(SizableText, { size: "$1", color: "$soft", fontFamily: "$mono", text: "left", children: `Lanes: ${n.lanes.join(' · ')}` })] }) }, n.name));
|
|
1262
1195
|
}) })] })) : null] }));
|
|
1263
1196
|
}
|