create-aura3d 1.3.0 → 1.3.2

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.
Files changed (50) hide show
  1. package/dist/cli.js +0 -0
  2. package/dist/index.js +1 -1
  3. package/dist/index.js.map +1 -1
  4. package/package.json +2 -3
  5. package/templates/animation-channel/package.json +1 -1
  6. package/templates/animation-studio/dist/episodes/scene/episode-3d.webm +0 -0
  7. package/templates/animation-studio/dist/episodes/scene/frames/action.png +0 -0
  8. package/templates/animation-studio/dist/episodes/scene/frames/dialogue.png +0 -0
  9. package/templates/animation-studio/dist/episodes/scene/frames/final.png +0 -0
  10. package/templates/animation-studio/dist/episodes/scene/frames/first.png +0 -0
  11. package/templates/animation-studio/dist/episodes/scene/frames/mouth-closed.png +0 -0
  12. package/templates/animation-studio/dist/episodes/scene/frames/mouth-open.png +0 -0
  13. package/templates/animation-studio/dist/episodes/scene/render-live-summary.json +2086 -6754
  14. package/templates/animation-studio/dist/episodes/scene/skeleton-overlays/broken.png +0 -0
  15. package/templates/animation-studio/dist/episodes/scene/skeleton-overlays/chefs.png +0 -0
  16. package/templates/animation-studio/dist/episodes/scene/skeleton-overlays/customer.png +0 -0
  17. package/templates/animation-studio/dist/episodes/scene/skeleton-overlays/worker-1.png +0 -0
  18. package/templates/animation-studio/dist/episodes/scene/skeleton-overlays/worker-2.png +0 -0
  19. package/templates/animation-studio/dist/scene/working.document.json +219 -348
  20. package/templates/animation-studio/package-lock.json +1307 -55
  21. package/templates/animation-studio/package.json +11 -5
  22. package/templates/animation-studio/studio/dist/assets/index-i8URxOOt.css +1 -0
  23. package/templates/animation-studio/studio/dist/assets/index-pC9hdZ-B.js +11 -0
  24. package/templates/animation-studio/studio/dist/index.html +19 -0
  25. package/templates/animation-studio/studio/index.html +18 -0
  26. package/templates/animation-studio/studio/src/App.tsx +430 -0
  27. package/templates/animation-studio/studio/src/components/Console.tsx +366 -0
  28. package/templates/animation-studio/studio/src/components/Icon.tsx +90 -0
  29. package/templates/animation-studio/studio/src/components/Inspector.tsx +209 -0
  30. package/templates/animation-studio/studio/src/components/Outliner.tsx +210 -0
  31. package/templates/animation-studio/studio/src/components/Palette.tsx +204 -0
  32. package/templates/animation-studio/studio/src/components/Stage.tsx +339 -0
  33. package/templates/animation-studio/studio/src/components/Timeline.tsx +183 -0
  34. package/templates/animation-studio/studio/src/components/Topbar.tsx +66 -0
  35. package/templates/animation-studio/studio/src/main.tsx +10 -0
  36. package/templates/animation-studio/studio/src/state/backend.ts +108 -0
  37. package/templates/animation-studio/studio/src/state/fidelity.ts +110 -0
  38. package/templates/animation-studio/studio/src/state/mapDocument.ts +419 -0
  39. package/templates/animation-studio/studio/src/state/sceneTool.ts +55 -0
  40. package/templates/animation-studio/studio/src/state/types.ts +165 -0
  41. package/templates/animation-studio/studio/src/state/util.ts +46 -0
  42. package/templates/animation-studio/studio/src/styles.css +528 -0
  43. package/templates/animation-studio/studio/vite.config.ts +175 -0
  44. package/templates/character-controller/package.json +3 -3
  45. package/templates/cinematic-scene/package.json +1 -1
  46. package/templates/episode-builder/package.json +1 -1
  47. package/templates/fighting-game/package.json +1 -1
  48. package/templates/mini-game/package.json +1 -1
  49. package/templates/product-viewer/package.json +1 -1
  50. package/templates/prompt-animation-channel/package.json +1 -1
@@ -0,0 +1,165 @@
1
+ /**
2
+ * UI-side view model for the Animation Studio shell.
3
+ *
4
+ * The single source of truth is the REAL runtime EpisodeDocument fetched from
5
+ * `GET /api/document`; it is mapped into the types below by `mapDocument.ts`.
6
+ * There is no seed / fixture — when no document exists the UI renders empty.
7
+ */
8
+
9
+ import type { CharacterFidelity, SceneFidelity } from "./fidelity";
10
+
11
+ export type SelectionType = "shot" | "cast" | "set" | "prop";
12
+ export type ViewMode = "Render" | "Wireframe" | "Storyboard";
13
+ export type ComposerMode = "Prompt" | "Command";
14
+ export type IconName = string;
15
+
16
+ export interface Selection {
17
+ type: SelectionType;
18
+ id: string;
19
+ }
20
+
21
+ /**
22
+ * Where a cast member came from — kept honest and visible (Phase E3):
23
+ * - `authored-fallback` — a built-in authored/placeholder character (NOT catalog evidence).
24
+ * - `catalog-resolved` — resolved from the federated catalog (carries source/license/url).
25
+ * - `user-uploaded` — a GLB the user dropped in (`cast add --file`).
26
+ */
27
+ export type CastSource = "authored-fallback" | "catalog-resolved" | "user-uploaded";
28
+
29
+ export interface CastMember {
30
+ id: string;
31
+ name: string;
32
+ kind: string;
33
+ color: string;
34
+ glyph: string;
35
+ lines: number;
36
+ /** Provenance class — drives the Outliner source label so fallback is never sold as catalog. */
37
+ source: CastSource;
38
+ /** Short human label for the source (e.g. catalog title / "authored" / "uploaded"). */
39
+ sourceLabel: string;
40
+ /** M7 — honest fidelity tier (A/B/C). C is "previz" — never presented as finished. */
41
+ fidelity: CharacterFidelity;
42
+ }
43
+
44
+ export interface SetEntity {
45
+ id: string;
46
+ name: string;
47
+ meta: string;
48
+ icon: IconName;
49
+ }
50
+
51
+ export interface PropEntity {
52
+ id: string;
53
+ name: string;
54
+ meta: string;
55
+ icon: IconName;
56
+ }
57
+
58
+ export interface Shot {
59
+ id: string;
60
+ name: string;
61
+ start: number;
62
+ dur: number;
63
+ /** Real render thumbnail (/preview/frames/*.png) once a render exists, else "". */
64
+ frame: string;
65
+ cam: string;
66
+ who: string[];
67
+ color: string;
68
+ }
69
+
70
+ export interface Beat {
71
+ id: string;
72
+ shot: string;
73
+ who: string;
74
+ start: number;
75
+ dur: number;
76
+ text: string;
77
+ /* ---- Director per-beat acting plan (F1) — inspectable in the UI ---- */
78
+ /** Who the speaker is addressing (the other party), or "" when solo. */
79
+ listener: string;
80
+ /** What the speaker DOES (talk / gesture / point / nod / walk / run) — the real director clip. */
81
+ speakingIntent: string;
82
+ /** What the listener DOES in response (react / nod / idle) — never frozen. */
83
+ listenerIntent: string;
84
+ /** The camera framing for this beat (establishing / two-shot / medium / close-up). */
85
+ camera: string;
86
+ }
87
+
88
+ export interface TimelineSpan {
89
+ id: string;
90
+ start: number;
91
+ dur: number;
92
+ text: string;
93
+ color: string;
94
+ }
95
+
96
+ /** The UI view model derived from the real working document. */
97
+ export interface EpisodeDocument {
98
+ title: string;
99
+ cast: CastMember[];
100
+ sets: SetEntity[];
101
+ props: PropEntity[];
102
+ shots: Shot[];
103
+ beats: Beat[];
104
+ camera: TimelineSpan[];
105
+ /** Per-character gesture/reaction windows (gesture/point/nod/react/wave) for the timeline. */
106
+ gestures: TimelineSpan[];
107
+ fx: TimelineSpan[];
108
+ DUR: number;
109
+ /** M7 — scene-level fidelity tier (floor of the cast). C scene is labeled "previz". */
110
+ fidelity: SceneFidelity;
111
+ }
112
+
113
+ /* ---- Director Console transcript model ---- */
114
+
115
+ export type DiffOp = "+" | "~" | "!";
116
+ export type DiffKind = "add" | "mod" | "del";
117
+
118
+ export interface Diff {
119
+ op: DiffOp;
120
+ k: DiffKind;
121
+ /** May contain <b>…</b> emphasis (rendered as bold). */
122
+ t: string;
123
+ }
124
+
125
+ export type CmdState = "run" | "ok" | "bad";
126
+
127
+ export interface YouTurn {
128
+ type: "you";
129
+ id: string;
130
+ text: string;
131
+ }
132
+
133
+ export interface DirTurn {
134
+ type: "dir";
135
+ id: string;
136
+ /** Markdown-ish: **bold** emphasis is supported. */
137
+ think: string;
138
+ }
139
+
140
+ export interface CmdTurn {
141
+ type: "cmd";
142
+ id: string;
143
+ verb: string;
144
+ args: string;
145
+ state: CmdState;
146
+ diffs?: Diff[];
147
+ dur?: string;
148
+ hash?: string;
149
+ }
150
+
151
+ export interface RenderTurn {
152
+ type: "render";
153
+ id: string;
154
+ frame: string;
155
+ label: string;
156
+ shot: string;
157
+ meta: string;
158
+ }
159
+
160
+ export type Turn = YouTurn | DirTurn | CmdTurn | RenderTurn;
161
+
162
+ export interface Toast {
163
+ msg: string;
164
+ kind: "ok" | "tip";
165
+ }
@@ -0,0 +1,46 @@
1
+ /* Shared formatting + small text helpers (ported from the design source). */
2
+
3
+ /** mm:ss from seconds. */
4
+ export function fmt(s: number): string {
5
+ const m = Math.floor(s / 60);
6
+ const ss = Math.floor(s % 60);
7
+ return m + ":" + String(ss).padStart(2, "0");
8
+ }
9
+
10
+ /** Capitalise first letter. */
11
+ export function cap(s: string): string {
12
+ return s ? s.charAt(0).toUpperCase() + s.slice(1) : s;
13
+ }
14
+
15
+ /** **bold** -> <span class="hl"> for AURA reasoning. */
16
+ export function boldHtml(s: string): string {
17
+ return (s || "").replace(/\*\*([^*]+)\*\*/g, '<span class="hl">$1</span>');
18
+ }
19
+
20
+ /** Highlight command args: --flags (blue) and "quoted strings" (green). */
21
+ export function highlightArgs(s: string): string {
22
+ // Sentinels guard quoted strings from the --flag pass, then become .str spans.
23
+ const OPEN = String.fromCharCode(1);
24
+ const CLOSE = String.fromCharCode(2);
25
+ return s
26
+ .replace(/("[^"]*")/g, OPEN + '$1' + CLOSE)
27
+ .replace(/(--[a-z]+)/g, '<span class="flag">$1</span>')
28
+ .replace(new RegExp(OPEN + '([^' + CLOSE + ']*)' + CLOSE, 'g'), '<span class="str">$1</span>');
29
+ }
30
+
31
+ /** Short hex revision hash. */
32
+ export function hash(): string {
33
+ return Math.random().toString(16).slice(2, 8);
34
+ }
35
+
36
+ /** Darken a hex color (for avatar gradients). */
37
+ export function shade(hex: string): string {
38
+ const n = parseInt(hex.slice(1), 16);
39
+ let r = (n >> 16) & 255;
40
+ let g = (n >> 8) & 255;
41
+ let b = n & 255;
42
+ r = Math.round(r * 0.55);
43
+ g = Math.round(g * 0.55);
44
+ b = Math.round(b * 0.62);
45
+ return "#" + ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1);
46
+ }