Skip to content

A lightweight Clip Studio Paint alternative with real-time multiplayer collaborative drawing. Built with Tauri and React.

Delete

Sora7562e9fbc3f9
diff --git a/promo/create_midi.py b/promo/create_midi.py
deleted file mode 100644
index d69e666..0000000
--- a/promo/create_midi.py
+++ /dev/null
@@ -1,717 +0,0 @@
-"""
-Generates two studio-grade, frame-synced MIDI soundtracks for the 28.00s
-Ink Studio "Themes & Workspaces" promo video:
-
- 1. promo/out/ink-studio-promo-soundtrack.mid (5-track chamber ensemble)
- 2. promo/out/ink-studio-promo-solo-piano.mid (1-track intimate felt piano)
-
-Tempo: 120 BPM (500,000 us/quarter), PPQ = 480 => 960 ticks/second (~1.04 ms resolution).
-Key: D Major (warm, golden, luminous, with poetic Bm9 / Em9 chiaroscuro shadows).
-Every transition, wipe, dial scrub, 10-beat climax cut, 23.40-23.80s silence drop,
-and Act 5 cotton-paper end card lands with millisecond precision.
-"""
-
-from __future__ import annotations
-
-import math
-import os
-import struct
-from dataclasses import dataclass, field
-from typing import List, Tuple
-
-PPQ = 480
-BPM = 120.0
-TICKS_PER_SEC = PPQ * (BPM / 60.0) # 960.0 ticks/sec
-DURATION_SEC = 28.0
-END_TICK = int(round(DURATION_SEC * TICKS_PER_SEC)) # 26880
-
-
-def sec_to_tick(sec: float) -> int:
- return max(0, min(END_TICK, int(round(sec * TICKS_PER_SEC))))
-
-
-def encode_vlq(value: int) -> bytes:
- if value < 0:
- raise ValueError(f"VLQ value must be >= 0, got {value}")
- out = [value & 0x7F]
- value >>= 7
- while value > 0:
- out.append((value & 0x7F) | 0x80)
- value >>= 7
- out.reverse()
- return bytes(out)
-
-
-def note_name_to_midi(name: str) -> int:
- """Convert e.g. 'D2', 'F#5', 'Bb3', 'C#4' to MIDI note number (C4 = 60)."""
- base = {'C': 0, 'D': 2, 'E': 4, 'F': 5, 'G': 7, 'A': 9, 'B': 11}[name[0].upper()]
- idx = 1
- acc = 0
- if idx < len(name) and name[idx] in ('#', 'b'):
- acc = 1 if name[idx] == '#' else -1
- idx += 1
- octave = int(name[idx:])
- return (octave + 1) * 12 + base + acc
-
-
-def N(name: str) -> int:
- return note_name_to_midi(name)
-
-
-@dataclass
-class MidiEvent:
- tick: int
- order: int # sorting priority at identical ticks: 0=meta/cc, 1=note_off, 2=pedal_down, 3=note_on
- data: bytes
-
-
-@dataclass
-class NoteSpan:
- tk0: int
- tk1: int
- pitch: int
- vel: int
-
-
-@dataclass
-class MidiTrackBuilder:
- name: str
- channel: int
- program: int
- volume: int = 100
- pan: int = 64
- reverb: int = 42
- events: List[MidiEvent] = field(default_factory=list)
- notes: List[NoteSpan] = field(default_factory=list)
- _seed: int = 17
-
- def __post_init__(self):
- # Track Name meta event
- name_bytes = self.name.encode('ascii', errors='replace')
- self.events.append(MidiEvent(0, -10, b'\xFF\x03' + encode_vlq(len(name_bytes)) + name_bytes))
- # Program Change
- self.events.append(MidiEvent(0, -8, bytes([0xC0 | self.channel, self.program & 0x7F])))
- # Channel Volume (CC7), Pan (CC10), Reverb Send (CC91), Expression (CC11)
- self.cc(0.0, 7, self.volume)
- self.cc(0.0, 10, self.pan)
- self.cc(0.0, 91, self.reverb)
- self.cc(0.0, 11, 105)
-
- def _jitter_ms(self, max_ms: float) -> float:
- """Deterministic subtle organic micro-timing jitter (zero randomness across runs)."""
- self._seed = (self._seed * 1103515245 + 12345) & 0x7FFFFFFF
- u = (self._seed / 0x7FFFFFFF) * 2.0 - 1.0
- return u * max_ms / 1000.0
-
- def cc(self, sec: float, controller: int, value: int, order: int = 0):
- tick = sec_to_tick(sec)
- val = max(0, min(127, int(round(value))))
- self.events.append(MidiEvent(tick, order, bytes([0xB0 | self.channel, controller & 0x7F, val])))
-
- def pedal(self, start_sec: float, end_sec: float):
- """Clean sustain pedal lift slightly before chord change and press right after."""
- self.cc(max(0.0, start_sec - 0.012), 64, 0, order=0)
- self.cc(start_sec + 0.012, 64, 127, order=2)
- self.cc(max(start_sec + 0.02, end_sec - 0.012), 64, 0, order=0)
-
- def expr_ramp(self, start_sec: float, end_sec: float, v0: int, v1: int, steps: int = 10):
- for i in range(steps + 1):
- u = i / steps
- # Smooth cosine ease for organic bow / breath swell
- eased = 0.5 - 0.5 * math.cos(math.pi * u)
- sec = start_sec + (end_sec - start_sec) * u
- val = v0 + (v1 - v0) * eased
- self.cc(sec, 11, int(round(val)), order=0)
-
- def note(
- self,
- pitch: int | str,
- start_sec: float,
- dur_sec: float,
- vel: int = 72,
- humanize_ms: float = 0.0,
- ):
- midi_num = N(pitch) if isinstance(pitch, str) else int(pitch)
- midi_num = max(21, min(108, midi_num))
- v = max(1, min(127, int(round(vel))))
- jitter = self._jitter_ms(humanize_ms) if humanize_ms > 0 else 0.0
- t0 = max(0.0, start_sec + jitter)
- t1 = min(DURATION_SEC - 0.04, t0 + max(0.04, dur_sec))
- if t1 <= t0:
- return
- tk0 = sec_to_tick(t0)
- tk1 = sec_to_tick(t1)
- if tk1 <= tk0:
- tk1 = tk0 + 10
- self.notes.append(NoteSpan(tk0, tk1, midi_num, v))
-
- def chord(
- self,
- pitches: List[str],
- start_sec: float,
- dur_sec: float,
- vel: int = 66,
- roll_sec: float = 0.018,
- vel_curve: float = 0.0,
- humanize_ms: float = 3.0,
- ):
- """Play a softly rolled pianist chord with natural velocity shaping."""
- n = max(1, len(pitches))
- for i, p in enumerate(pitches):
- offset = i * roll_sec
- v = vel + int(round((i / max(1, n - 1) - 0.5) * vel_curve))
- self.note(p, start_sec + offset, max(0.08, dur_sec - offset), v, humanize_ms=humanize_ms)
-
- def arpeggio(
- self,
- pitches: List[str],
- start_sec: float,
- step_sec: float,
- note_dur_sec: float,
- vel_start: int,
- vel_end: int,
- humanize_ms: float = 2.0,
- ):
- n = max(1, len(pitches))
- for i, p in enumerate(pitches):
- u = i / max(1, n - 1)
- v = int(round(vel_start + (vel_end - vel_start) * u))
- self.note(p, start_sec + i * step_sec, note_dur_sec, v, humanize_ms=humanize_ms)
-
- def to_track_bytes(self) -> bytes:
- # Resolve any same-pitch overlaps cleanly (realistic re-articulation with pedal)
- by_pitch: dict[int, List[NoteSpan]] = {}
- for ns in self.notes:
- by_pitch.setdefault(ns.pitch, []).append(ns)
-
- all_events = list(self.events)
- for pitch, spans in by_pitch.items():
- spans.sort(key=lambda s: (s.tk0, s.tk1))
- for i, s in enumerate(spans):
- tk0 = s.tk0
- tk1 = s.tk1
- if i + 1 < len(spans):
- next_tk0 = spans[i + 1].tk0
- if tk1 >= next_tk0:
- tk1 = max(tk0 + 8, next_tk0 - 8)
- if tk1 > tk0:
- all_events.append(MidiEvent(tk0, 3, bytes([0x90 | self.channel, pitch, s.vel])))
- all_events.append(MidiEvent(tk1, 1, bytes([0x80 | self.channel, pitch, 0])))
-
- # Sort by tick, then order (CC/Meta -> Note Off -> Pedal Down -> Note On)
- ordered = sorted(all_events, key=lambda e: (e.tick, e.order))
- body = bytearray()
- prev_tick = 0
- for ev in ordered:
- delta = max(0, ev.tick - prev_tick)
- body.extend(encode_vlq(delta))
- body.extend(ev.data)
- prev_tick = ev.tick
- # End of track at exact 28.00s
- tail_delta = max(0, END_TICK - prev_tick)
- body.extend(encode_vlq(tail_delta))
- body.extend(b'\xFF\x2F\x00')
- return b'MTrk' + struct.pack('>I', len(body)) + bytes(body)
-
-
-def build_conductor_track() -> bytes:
- """Track 0: Tempo (120 BPM), 4/4 Time Signature, Key of D Major (+2 sharps), Section Markers."""
- events: List[MidiEvent] = []
-
- def add_meta(sec: float, meta_type: int, payload: bytes, order: int = 0):
- events.append(MidiEvent(sec_to_tick(sec), order, bytes([0xFF, meta_type]) + encode_vlq(len(payload)) + payload))
-
- add_meta(0.0, 0x03, b'Ink Studio - One Canvas (Atelier in D)', -10)
- # 120 BPM = 500,000 microseconds per quarter note
- add_meta(0.0, 0x51, struct.pack('>I', 500000)[1:], -9)
- # 4/4 time signature
- add_meta(0.0, 0x58, bytes([4, 2, 24, 8]), -8)
- # Key signature: D major (2 sharps, major=0)
- add_meta(0.0, 0x59, bytes([2, 0]), -7)
-
- # Video sync markers (visible inside BandLab, FL Studio, Ableton, Logic, MuseScore!)
- markers = [
- (0.00, 'Act 1: Cold Open'),
- (2.02, 'Act 1: Pure Canvas Reveal'),
- (3.50, 'Act 2.1: Focus Atelier HUD'),
- (5.20, 'Act 2.2: Default Illustration'),
- (7.20, 'Act 2.3: Warm Paper Islands (Wipe)'),
- (9.40, 'Act 2.4: Manga 18% Cockpit'),
- (11.40, 'Act 2.5: Left-Handed Sumi + 3D Sphere'),
- (13.50, 'Act 2.6: Minimalist Tablet Daylight'),
- (15.50, 'Act 3: Appearance Studio Live Engine'),
- (18.50, 'Act 4: 10 Studios Climax'),
- (23.40, 'Silence Drop'),
- (23.80, 'Act 5: Cotton Paper End Card'),
- ]
- for ts, label in markers:
- add_meta(ts, 0x06, label.encode('ascii'), 0)
-
- ordered = sorted(events, key=lambda e: (e.tick, e.order))
- body = bytearray()
- prev_tick = 0
- for ev in ordered:
- delta = max(0, ev.tick - prev_tick)
- body.extend(encode_vlq(delta))
- body.extend(ev.data)
- prev_tick = ev.tick
- body.extend(encode_vlq(max(0, END_TICK - prev_tick)))
- body.extend(b'\xFF\x2F\x00')
- return b'MTrk' + struct.pack('>I', len(body)) + bytes(body)
-
-
-def compose_tracks() -> Tuple[MidiTrackBuilder, List[MidiTrackBuilder]]:
- # 1. Warm Felt Piano (Acoustic Grand Piano, Program 0)
- piano = MidiTrackBuilder('Warm Felt Piano', channel=0, program=0, volume=114, pan=62, reverb=54)
- # 2. Intimate Cello (Cello, Program 42)
- cello = MidiTrackBuilder('Intimate Cello', channel=1, program=42, volume=92, pan=50, reverb=62)
- # 3. Warm Chamber Strings (String Ensemble 1, Program 48)
- strings = MidiTrackBuilder('Warm Chamber Strings', channel=2, program=48, volume=74, pan=74, reverb=78)
- # 4. Delicate Atelier Harp (Orchestral Harp, Program 46)
- harp = MidiTrackBuilder('Atelier Harp', channel=3, program=46, volume=86, pan=84, reverb=68)
- # 5. Soft Acoustic Pizzicato (Pizzicato Strings, Program 45)
- pizz = MidiTrackBuilder('Acoustic Pizzicato', channel=4, program=45, volume=84, pan=44, reverb=42)
-
- # =========================================================================
- # ACT 1 (0.00 - 3.50): Intimate Felt Atelier Opening & Pure Canvas Reveal
- # =========================================================================
- # 0.00 - 2.02: Dadd9 (warm golden dawn)
- piano.pedal(0.12, 2.00)
- piano.chord(['D2', 'A2', 'E3', 'F#3'], 0.14, 1.82, vel=52, roll_sec=0.032, vel_curve=-4)
- # Signature 4-note "Canvas Motif": A4 - B4 - F#5 - E5
- piano.note('A4', 0.46, 0.42, vel=56, humanize_ms=3)
- piano.note('B4', 0.86, 0.38, vel=60, humanize_ms=3)
- piano.note('F#5', 1.24, 0.46, vel=67, humanize_ms=2)
- piano.note('E5', 1.68, 0.32, vel=58, humanize_ms=2) # lands on 1.72 hairline
-
- # Subtle cello breath entering under the headline
- cello.expr_ramp(0.20, 1.85, 36, 68, steps=8)
- cello.note('D3', 0.22, 1.75, vel=54)
-
- # 2.02 - 3.50: Curtain splits -> meri_ink.png appears on Obsidian OLED -> poetic Bm9
- piano.pedal(2.02, 3.48)
- piano.chord(['B1', 'F#2', 'A2', 'C#3', 'D3'], 2.02, 1.44, vel=56, roll_sec=0.026)
- piano.note('D5', 2.04, 0.78, vel=64, humanize_ms=2)
- piano.note('C#5', 2.82, 0.34, vel=54, humanize_ms=3)
- piano.note('D5', 3.16, 0.32, vel=58, humanize_ms=2)
-
- cello.expr_ramp(2.02, 3.42, 58, 76, steps=8)
- cello.note('B2', 2.02, 1.44, vel=64)
-
- strings.expr_ramp(2.05, 3.45, 22, 52, steps=8)
- strings.chord(['F#3', 'A3', 'D4'], 2.05, 1.40, vel=46, roll_sec=0.01)
-
- # =========================================================================
- # ACT 2 (3.50 - 15.50): Six Radical Full-Workspace Transformations
- # =========================================================================
-
- # --- 2.1 (3.50 - 5.20): Focus Mode Atelier HUD (Gmaj9 warm expansion) ---
- piano.pedal(3.50, 5.18)
- piano.chord(['G1', 'D2', 'A2', 'B2', 'F#3'], 3.50, 1.64, vel=60, roll_sec=0.024)
- # Soft inner piano motion
- piano.note('D3', 4.10, 0.52, vel=46, humanize_ms=4)
- piano.note('A3', 4.46, 0.56, vel=48, humanize_ms=4)
- # Melody
- piano.note('F#5', 3.50, 0.52, vel=70, humanize_ms=1)
- piano.note('E5', 4.02, 0.38, vel=62, humanize_ms=3)
- piano.note('D5', 4.40, 0.40, vel=60, humanize_ms=3)
- piano.note('B4', 4.80, 0.38, vel=58, humanize_ms=2)
-
- cello.expr_ramp(3.50, 5.15, 68, 78, steps=6)
- cello.note('G2', 3.50, 1.66, vel=66)
- harp.arpeggio(['D4', 'A4', 'B4', 'F#5'], 3.52, 0.065, 0.72, 46, 58)
-
- # --- 2.2 (5.20 - 7.20): Default Illustration (Dmaj9/F# -> A6/9, machined motion) ---
- piano.pedal(5.20, 6.18)
- piano.chord(['F#2', 'D3', 'E3', 'A3'], 5.20, 0.96, vel=64, roll_sec=0.018)
- piano.note('A3', 5.56, 0.36, vel=50, humanize_ms=3)
- piano.note('D4', 5.88, 0.32, vel=54, humanize_ms=2)
-
- piano.pedal(6.20, 7.18)
- piano.chord(['A1', 'E2', 'B2', 'C#3', 'F#3'], 6.20, 0.96, vel=66, roll_sec=0.018)
- piano.note('E3', 6.56, 0.36, vel=52, humanize_ms=3)
- piano.note('A3', 6.88, 0.30, vel=56, humanize_ms=2)
-
- # Melody rises cleanly into the 7.20 light wipe!
- piano.note('A4', 5.22, 0.34, vel=64)
- piano.note('D5', 5.56, 0.32, vel=68)
- piano.note('E5', 5.88, 0.32, vel=72)
- piano.note('F#5', 6.20, 0.50, vel=76)
- piano.note('E5', 6.72, 0.24, vel=70)
- piano.note('F#5', 6.96, 0.24, vel=76)
-
- cello.note('F#2', 5.20, 0.98, vel=68)
- cello.note('A2', 6.20, 0.98, vel=72)
- strings.expr_ramp(5.20, 7.15, 48, 74, steps=8)
- strings.chord(['A3', 'D4', 'F#4'], 5.20, 0.98, vel=54)
- strings.chord(['A3', 'C#4', 'E4'], 6.20, 0.98, vel=58)
-
- # --- 2.3 (7.20 - 9.40): WARM PAPER LIGHT ISLANDS (First Big Sunlit Bloom!) ---
- # Harp sweeps upward cleanly behind the vertical curtain wipe (7.20 - 7.75)
- harp.arpeggio(['G3', 'D4', 'A4', 'B4', 'D5', 'F#5', 'A5'], 7.20, 0.068, 0.85, 56, 80)
-
- piano.pedal(7.20, 8.28)
- piano.chord(['G2', 'D3', 'F#3', 'A3', 'B3'], 7.20, 1.06, vel=76, roll_sec=0.016)
- piano.arpeggio(['D3', 'A3', 'B3', 'D4'], 7.48, 0.19, 0.45, 54, 62)
-
- piano.pedal(8.30, 9.38)
- piano.chord(['D2', 'A2', 'E3', 'F#3', 'A3'], 8.30, 1.06, vel=74, roll_sec=0.016)
- piano.arpeggio(['A2', 'E3', 'F#3', 'A3'], 8.58, 0.19, 0.45, 54, 60)
-
- # Radiant sunlit melody
- piano.note('A5', 7.20, 0.62, vel=84)
- piano.note('F#5', 7.82, 0.26, vel=74)
- piano.note('E5', 8.08, 0.22, vel=70)
- piano.note('F#5', 8.30, 0.54, vel=78)
- piano.note('D5', 8.84, 0.28, vel=68)
- piano.note('E5', 9.12, 0.26, vel=72)
-
- cello.expr_ramp(7.20, 9.35, 76, 86, steps=8)
- cello.note('G2', 7.20, 1.08, vel=76)
- cello.note('D3', 8.30, 0.55, vel=78)
- cello.note('F#3', 8.85, 0.52, vel=74)
-
- strings.expr_ramp(7.20, 9.35, 68, 86, steps=8)
- strings.chord(['B3', 'D4', 'F#4', 'A4'], 7.20, 1.08, vel=64)
- strings.chord(['A3', 'D4', 'E4', 'F#4'], 8.30, 1.08, vel=64)
-
- # --- 2.4 (9.40 - 11.40): MANGA 18% COCKPIT (Crisp Rhythmic Precision: Em9 -> A13sus4) ---
- piano.pedal(9.40, 10.38)
- piano.chord(['E2', 'B2', 'F#3', 'G3'], 9.40, 0.96, vel=74, roll_sec=0.010)
- piano.pedal(10.40, 11.38)
- piano.chord(['A1', 'E2', 'G2', 'B2', 'D3'], 10.40, 0.56, vel=74, roll_sec=0.010)
- piano.chord(['A1', 'E2', 'G2', 'B2', 'C#3'], 10.98, 0.40, vel=72, roll_sec=0.010)
-
- # Crisp acoustic pizzicato pulse (every 0.25s = 8th-note precision clockwork!)
- pizz_notes_24 = [
- (9.40, 'E3', 78), (9.65, 'B3', 62), (9.90, 'G3', 68), (10.15, 'F#3', 64),
- (10.40, 'A2', 78), (10.65, 'E3', 64), (10.90, 'B3', 70), (11.15, 'C#4', 66),
- ]
- for ts, pn, pv in pizz_notes_24:
- pizz.note(pn, ts, 0.16, vel=pv, humanize_ms=2)
-
- # Focused crisp melody
- piano.note('G5', 9.40, 0.32, vel=80)
- piano.note('F#5', 9.72, 0.32, vel=74)
- piano.note('E5', 10.04, 0.34, vel=72)
- piano.note('D5', 10.40, 0.34, vel=76)
- piano.note('E5', 10.74, 0.34, vel=74)
- piano.note('F#5', 11.08, 0.30, vel=78)
-
- cello.note('E2', 9.40, 0.98, vel=74)
- cello.note('A2', 10.40, 0.98, vel=76)
-
- # --- 2.5 (11.40 - 13.50): LEFT-HANDED SUMI ATELIER + 3D SPHERE (Japanese Warmth: Bm9 -> Em9) ---
- piano.pedal(11.40, 12.43)
- piano.chord(['B1', 'F#2', 'C#3', 'D3', 'A3'], 11.40, 1.02, vel=68, roll_sec=0.022)
- piano.arpeggio(['F#3', 'A3', 'C#4', 'D4'], 11.72, 0.17, 0.48, 52, 60)
-
- piano.pedal(12.45, 13.48)
- piano.chord(['E2', 'B2', 'F#3', 'G3', 'D4'], 12.45, 1.02, vel=68, roll_sec=0.022)
- piano.arpeggio(['B3', 'D4', 'F#4', 'A4'], 12.75, 0.17, 0.48, 52, 62)
-
- # Contemplative Sakamoto/Hisaishi-inspired pentatonic piano answer
- piano.note('A5', 11.40, 0.56, vel=74)
- piano.note('F#5', 11.96, 0.48, vel=68)
- piano.note('E5', 12.45, 0.52, vel=72)
- piano.note('D5', 12.98, 0.50, vel=68)
-
- # Expressive singing cello lead counter-melody
- cello.expr_ramp(11.40, 13.45, 74, 92, steps=10)
- cello.note('F#3', 11.42, 0.54, vel=78)
- cello.note('E3', 11.96, 0.48, vel=74)
- cello.note('D3', 12.45, 0.52, vel=76)
- cello.note('B2', 12.98, 0.50, vel=72)
-
- strings.expr_ramp(11.40, 13.45, 60, 74, steps=8)
- strings.chord(['F#3', 'C#4', 'D4'], 11.40, 1.04, vel=56)
- strings.chord(['G3', 'B3', 'F#4'], 12.45, 1.02, vel=58)
-
- # --- 2.6 (13.50 - 15.50): MINIMALIST TABLET DAYLIGHT (Open Airy Space: Gmaj9 -> A6/9) ---
- # Diagonal daylight wipe crystalline harp bloom
- harp.arpeggio(['G4', 'A4', 'D5', 'E5', 'A5', 'D6'], 13.50, 0.072, 0.92, 54, 76)
-
- piano.pedal(13.50, 14.48)
- piano.chord(['G2', 'D3', 'A3', 'B3'], 13.50, 0.96, vel=64, roll_sec=0.022)
- piano.pedal(14.50, 15.48)
- piano.chord(['A2', 'E3', 'F#3', 'B3', 'C#4'], 14.50, 0.96, vel=64, roll_sec=0.022)
-
- # Airy high-register crystalline breath
- piano.note('B5', 13.52, 0.52, vel=70)
- piano.note('A5', 14.04, 0.44, vel=66)
- piano.note('F#5', 14.50, 0.50, vel=68)
- piano.note('E5', 15.00, 0.48, vel=62)
-
- cello.expr_ramp(13.50, 15.45, 64, 56, steps=8)
- cello.note('G2', 13.50, 0.98, vel=62)
- cello.note('A2', 14.50, 0.98, vel=62)
-
- strings.expr_ramp(13.50, 15.45, 68, 58, steps=8)
- strings.chord(['D4', 'F#4', 'A4'], 13.50, 0.98, vel=56)
- strings.chord(['E4', 'A4', 'C#5'], 14.50, 0.98, vel=56)
-
- # =========================================================================
- # ACT 3 (15.50 - 18.50): Appearance Studio Live Engine Micro-Craft
- # =========================================================================
- # 15.50 - 16.72: Continuous OKLCH Warmth scrub (-45 Cool Slate -> +60 Warm Sumi)
- # Flowing liquid piano + harp arpeggios shifting from cool F#m7(11) to warm amber Gmaj9!
- piano.pedal(15.50, 16.10)
- piano.chord(['F#2', 'C#3', 'A3'], 15.50, 0.58, vel=64, roll_sec=0.012)
- piano.arpeggio(['C#4', 'E4', 'F#4', 'A4', 'B4', 'C#5'], 15.52, 0.095, 0.34, 56, 68)
-
- piano.pedal(16.12, 16.70)
- piano.chord(['G2', 'D3', 'B3'], 16.12, 0.58, vel=68, roll_sec=0.012)
- piano.arpeggio(['D4', 'F#4', 'A4', 'B4', 'D5', 'F#5'], 16.14, 0.092, 0.34, 62, 74)
-
- cello.expr_ramp(15.50, 16.70, 62, 76, steps=6)
- cello.note('F#2', 15.50, 0.60, vel=68)
- cello.note('G2', 16.12, 0.58, vel=72)
-
- # 16.72, 17.04, 17.34: Exact 3-step Chrome Architecture morph (FLAT -> HAIRLINE -> ISLANDS)
- chrome_steps = [
- (16.72, 0.31, ['E2', 'B2', 'G3'], 'E5', 'E3'),
- (17.04, 0.29, ['F#2', 'D3', 'A3'], 'F#5', 'F#3'),
- (17.34, 0.27, ['G2', 'D3', 'B3'], 'G5', 'G3'),
- ]
- for ts, dur, ch_notes, mel_n, pz_n in chrome_steps:
- piano.pedal(ts, ts + dur)
- piano.chord(ch_notes, ts, dur, vel=72, roll_sec=0.010)
- piano.note(mel_n, ts, dur, vel=78)
- pizz.note(pz_n, ts, 0.15, vel=74)
- cello.note(ch_notes[0], ts, dur, vel=74)
-
- # 17.62 - 18.50: 5 Mineral Pigment Swatches rising into Act 4 climax!
- piano.pedal(17.62, 18.48)
- piano.chord(['A1', 'E2', 'B2', 'D3', 'G3'], 17.62, 0.86, vel=76, roll_sec=0.012)
- cello.expr_ramp(17.62, 18.48, 76, 98, steps=6)
- cello.note('A2', 17.62, 0.86, vel=82)
- strings.expr_ramp(16.72, 18.48, 56, 94, steps=10)
- strings.chord(['E4', 'A4', 'B4', 'D5'], 17.62, 0.86, vel=74)
-
- pigment_times = [17.62, 17.80, 17.97, 18.15, 18.32]
- pigment_mel = ['A4', 'B4', 'C#5', 'D5', 'E5']
- pigment_harp = ['A5', 'B5', 'C#6', 'D6', 'E6']
- for i, (ts, mn, hn) in enumerate(zip(pigment_times, pigment_mel, pigment_harp)):
- piano.note(mn, ts, 0.19, vel=74 + i * 4)
- harp.note(hn, ts, 0.36, vel=60 + i * 5)
- pizz.note(mn, ts, 0.12, vel=68 + i * 4)
-
- # =========================================================================
- # ACT 4 (18.50 - 23.40): 10 RADICAL STUDIO PERMUTATIONS — WARM ACCELERANDO CLIMAX!
- # Exact frame-locked timestamps matching PromoScene.tsx ACT4_PERMUTATIONS
- # =========================================================================
- act4_score = [
- # (start, end, is_wipe, bass, left_chord, mel1, mel2, string_chord, harp_arp)
- (18.50, 19.12, False, 'B1', ['B1', 'F#2', 'C#3', 'D3'], 'F#5', 'A5', ['F#3', 'D4', 'A4'], None),
- (19.12, 19.70, True, 'G1', ['G1', 'D2', 'A2', 'B2'], 'B5', 'A5', ['G3', 'D4', 'B4'], ['G4', 'B4', 'D5', 'F#5']),
- (19.70, 20.24, False, 'F#2',['F#2', 'D3', 'E3', 'A3'], 'A5', 'F#5', ['F#3', 'D4', 'A4'], None),
- (20.24, 20.76, False, 'E2', ['E2', 'B2', 'F#3', 'G3'], 'G5', 'A5', ['G3', 'B3', 'F#4'], None),
- (20.76, 21.26, True, 'A1', ['A1', 'E2', 'B2', 'C#3'], 'B5', 'A5', ['A3', 'E4', 'C#5'], ['A4', 'C#5', 'E5', 'A5']),
- (21.26, 21.74, False, 'F#2',['F#2', 'C#3', 'A3', 'B3'], 'A5', 'C#6', ['A3', 'C#4', 'F#4'], None),
- (21.74, 22.20, False, 'G1', ['G1', 'D2', 'B2', 'F#3'], 'B5', 'D6', ['B3', 'D4', 'F#4'], None),
- (22.20, 22.62, True, 'A1', ['A1', 'E2', 'C#3', 'G3'], 'C#6', 'E6', ['C#4', 'E4', 'A4'], ['A4', 'E5', 'A5', 'C#6']),
- (22.62, 23.02, False, 'B1', ['B1', 'F#2', 'D3', 'A3'], 'D6', 'E6', ['D4', 'F#4', 'B4'], None),
- (23.02, 23.39, False, 'A1', ['A1', 'G2', 'B2', 'D3'], 'F#6', None, ['D4', 'G4', 'B4', 'F#5'], ['D5', 'A5', 'D6', 'F#6']),
- ]
-
- strings.expr_ramp(18.50, 23.36, 86, 118, steps=16)
- cello.expr_ramp(18.50, 23.36, 86, 114, steps=16)
-
- for idx, (s0, s1, is_wipe, bass, lch, m1, m2, sch, harp_notes) in enumerate(act4_score):
- dur = max(0.20, s1 - s0 - 0.015)
- dyn = int(round(78 + idx * 2.4)) # gentle warm crescendo 78 -> 100
-
- # Piano harmonic block + uplifting melody
- piano.pedal(s0, s1 - 0.012)
- piano.chord(lch, s0, dur, vel=dyn - 4, roll_sec=0.010, humanize_ms=1.5)
- if m2 is not None:
- half = dur * 0.52
- piano.note(m1, s0, half, vel=min(108, dyn + 6))
- piano.note(m2, s0 + half, dur - half, vel=min(106, dyn + 2))
- # Subtle inner 8th-note momentum on piano mid-voice
- piano.note(lch[-1], s0 + half, dur - half, vel=dyn - 14)
- else:
- # Final peak beat 10: soaring F#6 right up to the silence cut!
- piano.note(m1, s0, dur, vel=106)
- piano.note('A5', s0, dur, vel=88)
-
- # Warm Cello bass anchor + octave energy
- cello.note(bass, s0, dur, vel=min(104, dyn + 2))
-
- # Chamber strings soaring swell
- strings.chord(sch, s0, dur, vel=min(92, dyn - 10), roll_sec=0.005)
-
- # Crisp wooden pizzicato driving each cut + syncopated upbeat
- pizz.note(lch[1], s0, 0.14, vel=min(104, dyn + 4))
- if dur >= 0.36:
- pizz.note(lch[-1], s0 + dur * 0.5, 0.12, vel=min(94, dyn - 8))
-
- # Harp glissando sparkle on light/paper polarity wipes!
- if harp_notes:
- for hi, hn in enumerate(harp_notes):
- hs = s0 + hi * 0.042
- hdur = min(0.42, max(0.06, 23.38 - hs))
- u = hi / max(1, len(harp_notes) - 1)
- hv = int(round(min(92, dyn - 6) + (min(102, dyn + 4) - min(92, dyn - 6)) * u))
- harp.note(hn, hs, hdur, vel=hv, humanize_ms=1.5)
-
- # =========================================================================
- # 23.40 - 23.80: ABSOLUTE DRAMATIC SILENCE!
- # Lift sustain & cut expression cleanly at 23.395s so the silence hits hard.
- # =========================================================================
- for tr in (piano, cello, strings, harp, pizz):
- tr.cc(23.395, 64, 0, order=0)
- tr.cc(23.395, 11, 0, order=0)
-
- # Restore expression cleanly right at 23.79s for Act 5 cotton rag paper entry
- piano.cc(23.79, 11, 102, order=0)
- harp.cc(23.79, 11, 96, order=0)
- cello.cc(24.30, 11, 78, order=0)
- strings.cc(24.30, 11, 52, order=0)
-
- # =========================================================================
- # ACT 5 (23.80 - 28.00): Warm Cotton Rag Paper End Card — Timeless Dmaj9 Home
- # =========================================================================
- # 23.80 - 24.34: Gentle luminous rising arpeggio riding the horizontal paper curtain wipe
- piano.pedal(23.80, 27.78)
- harp.arpeggio(['D4', 'A4', 'E5', 'F#5'], 23.82, 0.125, 1.35, 46, 66)
- piano.note('D4', 23.84, 0.55, vel=46, humanize_ms=2)
- piano.note('A4', 24.02, 0.55, vel=50, humanize_ms=2)
- piano.note('E5', 24.18, 0.55, vel=56, humanize_ms=2)
-
- # 24.34: THE WARM RESONANT ATELIER CHORD (Dmaj9) as Ink Studio logo settles!
- piano.chord(['D2', 'A2', 'E3', 'F#3', 'A3', 'D4'], 24.34, 3.35, vel=68, roll_sec=0.028, vel_curve=-6)
- piano.note('F#5', 24.46, 0.66, vel=66, humanize_ms=2)
-
- # 25.12 & 25.64: Intimate 2-note closing "signature" on piano as tagline appears
- piano.note('E5', 25.12, 0.54, vel=54, humanize_ms=3)
- piano.note('F#5', 25.64, 2.08, vel=50, humanize_ms=3)
-
- # Cello warm embrace fading gracefully with the end card
- cello.expr_ramp(24.34, 27.82, 78, 12, steps=16)
- cello.note('D2', 24.34, 3.38, vel=66)
- cello.note('A2', 24.38, 3.32, vel=56)
-
- # Chamber strings soft golden halo fading into warm stillness
- strings.expr_ramp(24.34, 25.40, 44, 72, steps=6)
- strings.expr_ramp(25.40, 27.85, 72, 8, steps=14)
- strings.chord(['D4', 'E4', 'F#4', 'A4'], 24.36, 3.36, vel=54, roll_sec=0.015)
-
- # Final tiny delicate harp harmonic bell on logo settle
- harp.note('A5', 24.52, 2.20, vel=52)
- harp.note('D6', 25.66, 1.95, vel=44)
-
- return piano, [piano, cello, strings, harp, pizz]
-
-
-def write_smf_type1(out_path: str, track_chunks: List[bytes]):
- os.makedirs(os.path.dirname(out_path), exist_ok=True)
- header = b'MThd' + struct.pack('>IHHH', 6, 1, len(track_chunks), PPQ)
- with open(out_path, 'wb') as f:
- f.write(header)
- for chunk in track_chunks:
- f.write(chunk)
-
-
-def verify_midi_file(path: str):
- """Parse SMF Type 1 binary back to verify header, track integrity, zero stuck notes, and silence gap."""
- data = open(path, 'rb').read()
- assert data[:4] == b'MThd', 'Invalid MThd header'
- hdr_len, fmt, ntrks, division = struct.unpack('>IHHH', data[4:14])
- assert hdr_len == 6 and fmt == 1 and division == PPQ
-
- pos = 14
- total_notes = 0
- silence_violations = 0
- max_tick_seen = 0
- s_lo = sec_to_tick(23.42)
- s_hi = sec_to_tick(23.78)
-
- for trk_idx in range(ntrks):
- assert data[pos:pos + 4] == b'MTrk', f'Track {trk_idx} missing MTrk'
- trk_len = struct.unpack('>I', data[pos + 4:pos + 8])[0]
- pos += 8
- end_pos = pos + trk_len
- cur_tick = 0
- active_notes: dict[tuple[int, int], int] = {}
-
- while pos < end_pos:
- # Read VLQ delta
- delta = 0
- while True:
- b = data[pos]
- pos += 1
- delta = (delta << 7) | (b & 0x7F)
- if not (b & 0x80):
- break
- cur_tick += delta
- if cur_tick > max_tick_seen:
- max_tick_seen = cur_tick
-
- status = data[pos]
- pos += 1
- if status == 0xFF:
- _meta_type = data[pos]
- pos += 1
- mlen = 0
- while True:
- b = data[pos]
- pos += 1
- mlen = (mlen << 7) | (b & 0x7F)
- if not (b & 0x80):
- break
- pos += mlen
- elif status in (0xF0, 0xF7):
- slen = 0
- while True:
- b = data[pos]
- pos += 1
- slen = (slen << 7) | (b & 0x7F)
- if not (b & 0x80):
- break
- pos += slen
- else:
- kind = status & 0xF0
- ch = status & 0x0F
- if kind in (0xC0, 0xD0):
- pos += 1
- else:
- d1, d2 = data[pos], data[pos + 1]
- pos += 2
- if kind == 0x90 and d2 > 0:
- total_notes += 1
- active_notes[(ch, d1)] = cur_tick
- if s_lo <= cur_tick <= s_hi:
- silence_violations += 1
- elif kind == 0x80 or (kind == 0x90 and d2 == 0):
- start_tk = active_notes.pop((ch, d1), None)
- if start_tk is not None and start_tk < s_hi and cur_tick > s_lo:
- silence_violations += 1
-
- assert len(active_notes) == 0, f'Track {trk_idx} has {len(active_notes)} stuck notes!'
- assert pos == end_pos
-
- print(
- f'VERIFIED {os.path.basename(path)} | format=SMF1 | tracks={ntrks} | '
- f'notes={total_notes} | duration={max_tick_seen / TICKS_PER_SEC:.2f}s | '
- f'stuck_notes=0 | silence_gap_violations={silence_violations}'
- )
-
-
-def main():
- out_dir = os.path.join(os.path.dirname(__file__), 'out')
- conductor = build_conductor_track()
- piano_solo, ensemble = compose_tracks()
-
- full_path = os.path.join(out_dir, 'ink-studio-promo-soundtrack.mid')
- solo_path = os.path.join(out_dir, 'ink-studio-promo-solo-piano.mid')
-
- write_smf_type1(full_path, [conductor] + [tr.to_track_bytes() for tr in ensemble])
- write_smf_type1(solo_path, [conductor, piano_solo.to_track_bytes()])
-
- verify_midi_file(full_path)
- verify_midi_file(solo_path)
-
-
-if __name__ == '__main__':
- main()
diff --git a/promo/index.html b/promo/index.html
deleted file mode 100644
index 1781ae4..0000000
--- a/promo/index.html
+++ /dev/null
@@ -1,12 +0,0 @@
-<!doctype html>
-<html lang="en">
- <head>
- <meta charset="UTF-8" />
- <meta name="viewport" content="width=1920, initial-scale=1.0" />
- <title>Ink Studio — Themes &amp; Workspaces Promo</title>
- </head>
- <body>
- <div id="root"></div>
- <script type="module" src="/src/main.tsx"></script>
- </body>
-</html>
diff --git a/promo/out/ink-studio-promo-solo-piano.mid b/promo/out/ink-studio-promo-solo-piano.mid
deleted file mode 100644
index 6aa3500..0000000
Binary files a/promo/out/ink-studio-promo-solo-piano.mid and /dev/null differ
diff --git a/promo/out/ink-studio-promo-soundtrack.mid b/promo/out/ink-studio-promo-soundtrack.mid
deleted file mode 100644
index bfb6dff..0000000
Binary files a/promo/out/ink-studio-promo-soundtrack.mid and /dev/null differ
diff --git a/promo/out/ink-studio-themes-workspaces-promo.mp4 b/promo/out/ink-studio-themes-workspaces-promo.mp4
deleted file mode 100644
index 56e7024..0000000
Binary files a/promo/out/ink-studio-themes-workspaces-promo.mp4 and /dev/null differ
diff --git a/promo/out/keyframes/01_act1_title.png b/promo/out/keyframes/01_act1_title.png
deleted file mode 100644
index 0c9d455..0000000
Binary files a/promo/out/keyframes/01_act1_title.png and /dev/null differ
diff --git a/promo/out/keyframes/02_act1_split.png b/promo/out/keyframes/02_act1_split.png
deleted file mode 100644
index 28ec0a9..0000000
Binary files a/promo/out/keyframes/02_act1_split.png and /dev/null differ
diff --git a/promo/out/keyframes/03_act1_pure_canvas.png b/promo/out/keyframes/03_act1_pure_canvas.png
deleted file mode 100644
index 5791c8f..0000000
Binary files a/promo/out/keyframes/03_act1_pure_canvas.png and /dev/null differ
diff --git a/promo/out/keyframes/04_act2_focus_hud.png b/promo/out/keyframes/04_act2_focus_hud.png
deleted file mode 100644
index 4d80e49..0000000
Binary files a/promo/out/keyframes/04_act2_focus_hud.png and /dev/null differ
diff --git a/promo/out/keyframes/05_act2_default_illus.png b/promo/out/keyframes/05_act2_default_illus.png
deleted file mode 100644
index 999b977..0000000
Binary files a/promo/out/keyframes/05_act2_default_illus.png and /dev/null differ
diff --git a/promo/out/keyframes/06_act2_wipe_mid.png b/promo/out/keyframes/06_act2_wipe_mid.png
deleted file mode 100644
index d6b218c..0000000
Binary files a/promo/out/keyframes/06_act2_wipe_mid.png and /dev/null differ
diff --git a/promo/out/keyframes/07_act2_photoshop_paper.png b/promo/out/keyframes/07_act2_photoshop_paper.png
deleted file mode 100644
index 834a5b7..0000000
Binary files a/promo/out/keyframes/07_act2_photoshop_paper.png and /dev/null differ
diff --git a/promo/out/keyframes/08_act2_manga_cockpit.png b/promo/out/keyframes/08_act2_manga_cockpit.png
deleted file mode 100644
index 78bca01..0000000
Binary files a/promo/out/keyframes/08_act2_manga_cockpit.png and /dev/null differ
diff --git a/promo/out/keyframes/09_act2_lefthanded_sumi.png b/promo/out/keyframes/09_act2_lefthanded_sumi.png
deleted file mode 100644
index 26d1611..0000000
Binary files a/promo/out/keyframes/09_act2_lefthanded_sumi.png and /dev/null differ
diff --git a/promo/out/keyframes/10_act2_diag_wipe_mid.png b/promo/out/keyframes/10_act2_diag_wipe_mid.png
deleted file mode 100644
index 91ea91f..0000000
Binary files a/promo/out/keyframes/10_act2_diag_wipe_mid.png and /dev/null differ
diff --git a/promo/out/keyframes/11_act2_tablet_bottom.png b/promo/out/keyframes/11_act2_tablet_bottom.png
deleted file mode 100644
index bdc98ba..0000000
Binary files a/promo/out/keyframes/11_act2_tablet_bottom.png and /dev/null differ
diff --git a/promo/out/keyframes/12_act3_warmth_cool.png b/promo/out/keyframes/12_act3_warmth_cool.png
deleted file mode 100644
index a8f5854..0000000
Binary files a/promo/out/keyframes/12_act3_warmth_cool.png and /dev/null differ
diff --git a/promo/out/keyframes/13_act3_warmth_sumi.png b/promo/out/keyframes/13_act3_warmth_sumi.png
deleted file mode 100644
index 08ec37e..0000000
Binary files a/promo/out/keyframes/13_act3_warmth_sumi.png and /dev/null differ
diff --git a/promo/out/keyframes/14_act3_islands_pigment.png b/promo/out/keyframes/14_act3_islands_pigment.png
deleted file mode 100644
index 85ba750..0000000
Binary files a/promo/out/keyframes/14_act3_islands_pigment.png and /dev/null differ
diff --git a/promo/out/keyframes/15_act4_01_kyoto.png b/promo/out/keyframes/15_act4_01_kyoto.png
deleted file mode 100644
index 6be9df2..0000000
Binary files a/promo/out/keyframes/15_act4_01_kyoto.png and /dev/null differ
diff --git a/promo/out/keyframes/16_act4_02_botanical.png b/promo/out/keyframes/16_act4_02_botanical.png
deleted file mode 100644
index 63e914f..0000000
Binary files a/promo/out/keyframes/16_act4_02_botanical.png and /dev/null differ
diff --git a/promo/out/keyframes/17_act4_03_architect.png b/promo/out/keyframes/17_act4_03_architect.png
deleted file mode 100644
index 7bad851..0000000
Binary files a/promo/out/keyframes/17_act4_03_architect.png and /dev/null differ
diff --git a/promo/out/keyframes/18_act4_04_nocturne.png b/promo/out/keyframes/18_act4_04_nocturne.png
deleted file mode 100644
index 82331fc..0000000
Binary files a/promo/out/keyframes/18_act4_04_nocturne.png and /dev/null differ
diff --git a/promo/out/keyframes/19_act4_05_washi.png b/promo/out/keyframes/19_act4_05_washi.png
deleted file mode 100644
index 43766d3..0000000
Binary files a/promo/out/keyframes/19_act4_05_washi.png and /dev/null differ
diff --git a/promo/out/keyframes/20_act4_06_celadon.png b/promo/out/keyframes/20_act4_06_celadon.png
deleted file mode 100644
index 984b5fb..0000000
Binary files a/promo/out/keyframes/20_act4_06_celadon.png and /dev/null differ
diff --git a/promo/out/keyframes/21_act4_07_smoked.png b/promo/out/keyframes/21_act4_07_smoked.png
deleted file mode 100644
index 7a41537..0000000
Binary files a/promo/out/keyframes/21_act4_07_smoked.png and /dev/null differ
diff --git a/promo/out/keyframes/22_act4_08_daylight.png b/promo/out/keyframes/22_act4_08_daylight.png
deleted file mode 100644
index 742d570..0000000
Binary files a/promo/out/keyframes/22_act4_08_daylight.png and /dev/null differ
diff --git a/promo/out/keyframes/23_act4_09_drafting.png b/promo/out/keyframes/23_act4_09_drafting.png
deleted file mode 100644
index 2e3696e..0000000
Binary files a/promo/out/keyframes/23_act4_09_drafting.png and /dev/null differ
diff --git a/promo/out/keyframes/24_act4_10_printmaker.png b/promo/out/keyframes/24_act4_10_printmaker.png
deleted file mode 100644
index 2d837df..0000000
Binary files a/promo/out/keyframes/24_act4_10_printmaker.png and /dev/null differ
diff --git a/promo/out/keyframes/25_act4_silence.png b/promo/out/keyframes/25_act4_silence.png
deleted file mode 100644
index ae8e3cb..0000000
Binary files a/promo/out/keyframes/25_act4_silence.png and /dev/null differ
diff --git a/promo/out/keyframes/26_act5_wipe_mid.png b/promo/out/keyframes/26_act5_wipe_mid.png
deleted file mode 100644
index b5228d3..0000000
Binary files a/promo/out/keyframes/26_act5_wipe_mid.png and /dev/null differ
diff --git a/promo/out/keyframes/27_act5_end_card.png b/promo/out/keyframes/27_act5_end_card.png
deleted file mode 100644
index a21cde0..0000000
Binary files a/promo/out/keyframes/27_act5_end_card.png and /dev/null differ
diff --git a/promo/out/keyframes/contact_act4.png b/promo/out/keyframes/contact_act4.png
deleted file mode 100644
index 8a6c3fa..0000000
Binary files a/promo/out/keyframes/contact_act4.png and /dev/null differ
diff --git a/promo/out/soundtrack.wav b/promo/out/soundtrack.wav
deleted file mode 100644
index 0e9f8d8..0000000
Binary files a/promo/out/soundtrack.wav and /dev/null differ
diff --git a/promo/public/assets/app-icon.png b/promo/public/assets/app-icon.png
deleted file mode 100644
index 3a92606..0000000
Binary files a/promo/public/assets/app-icon.png and /dev/null differ
diff --git a/promo/public/assets/fonts/dm-sans-italic-latin.woff2 b/promo/public/assets/fonts/dm-sans-italic-latin.woff2
deleted file mode 100644
index c12ab0d..0000000
Binary files a/promo/public/assets/fonts/dm-sans-italic-latin.woff2 and /dev/null differ
diff --git a/promo/public/assets/fonts/dm-sans-latin-ext.woff2 b/promo/public/assets/fonts/dm-sans-latin-ext.woff2
deleted file mode 100644
index 6e84cba..0000000
Binary files a/promo/public/assets/fonts/dm-sans-latin-ext.woff2 and /dev/null differ
diff --git a/promo/public/assets/fonts/dm-sans-latin.woff2 b/promo/public/assets/fonts/dm-sans-latin.woff2
deleted file mode 100644
index c75f7bf..0000000
Binary files a/promo/public/assets/fonts/dm-sans-latin.woff2 and /dev/null differ
diff --git a/promo/public/assets/fonts/fraunces-italic-latin-ext.woff2 b/promo/public/assets/fonts/fraunces-italic-latin-ext.woff2
deleted file mode 100644
index 182cbe9..0000000
Binary files a/promo/public/assets/fonts/fraunces-italic-latin-ext.woff2 and /dev/null differ
diff --git a/promo/public/assets/fonts/fraunces-italic-latin.woff2 b/promo/public/assets/fonts/fraunces-italic-latin.woff2
deleted file mode 100644
index c4f91f8..0000000
Binary files a/promo/public/assets/fonts/fraunces-italic-latin.woff2 and /dev/null differ
diff --git a/promo/public/assets/fonts/fraunces-latin-ext.woff2 b/promo/public/assets/fonts/fraunces-latin-ext.woff2
deleted file mode 100644
index 567423f..0000000
Binary files a/promo/public/assets/fonts/fraunces-latin-ext.woff2 and /dev/null differ
diff --git a/promo/public/assets/fonts/fraunces-latin.woff2 b/promo/public/assets/fonts/fraunces-latin.woff2
deleted file mode 100644
index 45be2c9..0000000
Binary files a/promo/public/assets/fonts/fraunces-latin.woff2 and /dev/null differ
diff --git a/promo/public/assets/meri_ink.png b/promo/public/assets/meri_ink.png
deleted file mode 100644
index dc8815a..0000000
Binary files a/promo/public/assets/meri_ink.png and /dev/null differ
diff --git a/promo/public/assets/meri_ink_2x.png b/promo/public/assets/meri_ink_2x.png
deleted file mode 100644
index 99ccb75..0000000
Binary files a/promo/public/assets/meri_ink_2x.png and /dev/null differ
diff --git a/promo/render.mjs b/promo/render.mjs
deleted file mode 100644
index fd67158..0000000
--- a/promo/render.mjs
+++ /dev/null
@@ -1,302 +0,0 @@
-import fs from 'node:fs';
-import http from 'node:http';
-import path from 'node:path';
-import os from 'node:os';
-import { spawn, execFileSync } from 'node:child_process';
-import { fileURLToPath } from 'node:url';
-
-const __dirname = path.dirname(fileURLToPath(import.meta.url));
-const DIST_DIR = path.join(__dirname, 'dist');
-const OUT_DIR = path.join(__dirname, 'out');
-const FRAMES_DIR = path.join(OUT_DIR, 'frames');
-const KEYFRAMES_DIR = path.join(OUT_DIR, 'keyframes');
-const CHROME_PATH = 'C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe';
-
-const TOTAL_FRAMES = 1680; // 28.0s @ 60fps
-const WIDTH = 1920;
-const HEIGHT = 1080;
-
-const MIME = {
- '.html': 'text/html; charset=utf-8',
- '.js': 'application/javascript; charset=utf-8',
- '.css': 'text/css; charset=utf-8',
- '.png': 'image/png',
- '.jpg': 'image/jpeg',
- '.webp': 'image/webp',
- '.svg': 'image/svg+xml',
- '.woff2': 'font/woff2',
- '.json': 'application/json',
-};
-
-function startStaticServer(rootDir) {
- return new Promise((resolve, reject) => {
- const server = http.createServer((req, res) => {
- const urlPath = (req.url || '/').split('?')[0];
- const rel = urlPath === '/' ? 'index.html' : urlPath.replace(/^\/+/, '');
- const fullPath = path.join(rootDir, rel);
- if (!fullPath.startsWith(rootDir) || !fs.existsSync(fullPath)) {
- res.writeHead(404);
- res.end('Not found');
- return;
- }
- const ext = path.extname(fullPath).toLowerCase();
- res.writeHead(200, {
- 'Content-Type': MIME[ext] || 'application/octet-stream',
- 'Cache-Control': 'public, max-age=3600',
- });
- fs.createReadStream(fullPath).pipe(res);
- });
- server.on('error', reject);
- server.listen(0, '127.0.0.1', () => {
- const addr = server.address();
- resolve({ server, url: `http://127.0.0.1:${addr.port}` });
- });
- });
-}
-
-class CdpClient {
- constructor(wsUrl) {
- this.wsUrl = wsUrl;
- this.nextId = 1;
- this.pending = new Map();
- }
-
- async connect() {
- this.ws = new WebSocket(this.wsUrl);
- await new Promise((resolve, reject) => {
- this.ws.addEventListener('open', resolve, { once: true });
- this.ws.addEventListener('error', reject, { once: true });
- });
- this.ws.addEventListener('message', (evt) => {
- const msg = JSON.parse(evt.data);
- if (msg.id && this.pending.has(msg.id)) {
- const { resolve, reject } = this.pending.get(msg.id);
- this.pending.delete(msg.id);
- if (msg.error) reject(new Error(msg.error.message || JSON.stringify(msg.error)));
- else resolve(msg.result);
- }
- });
- }
-
- send(method, params = {}) {
- const id = this.nextId++;
- return new Promise((resolve, reject) => {
- this.pending.set(id, { resolve, reject });
- this.ws.send(JSON.stringify({ id, method, params }));
- });
- }
-
- close() {
- try {
- this.ws?.close();
- } catch {}
- }
-}
-
-async function waitForDebuggerTarget(port, timeoutMs = 15000) {
- const start = Date.now();
- while (Date.now() - start < timeoutMs) {
- try {
- const res = await fetch(`http://127.0.0.1:${port}/json/list`);
- if (res.ok) {
- const targets = await res.json();
- const page = targets.find((t) => t.type === 'page' && t.webSocketDebuggerUrl);
- if (page) return page.webSocketDebuggerUrl;
- }
- } catch {}
- await new Promise((r) => setTimeout(r, 100));
- }
- throw new Error(`Timed out waiting for Chrome DevTools on port ${port}`);
-}
-
-async function launchWorker(workerId, port, baseUrl, tasks) {
- const userDataDir = fs.mkdtempSync(path.join(os.tmpdir(), `ink-promo-chrome-${workerId}-`));
- const chrome = spawn(
- CHROME_PATH,
- [
- '--headless=new',
- `--remote-debugging-port=${port}`,
- `--user-data-dir=${userDataDir}`,
- '--no-first-run',
- '--no-default-browser-check',
- '--disable-background-networking',
- '--disable-extensions',
- '--disable-sync',
- '--disable-translate',
- '--metrics-recording-only',
- '--mute-audio',
- '--hide-scrollbars',
- '--force-device-scale-factor=1',
- '--force-color-profile=srgb',
- `--window-size=${WIDTH},${HEIGHT}`,
- 'about:blank',
- ],
- { stdio: 'ignore' }
- );
-
- let cdp = null;
- try {
- const wsUrl = await waitForDebuggerTarget(port);
- cdp = new CdpClient(wsUrl);
- await cdp.connect();
-
- await cdp.send('Page.enable');
- await cdp.send('Runtime.enable');
- cdp.ws.addEventListener('message', (evt) => {
- const msg = JSON.parse(evt.data);
- if (msg.method === 'Runtime.exceptionThrown') {
- const desc = msg.params?.exceptionDetails?.exception?.description || msg.params?.exceptionDetails?.text;
- console.error(`[W${workerId}] PAGE EXCEPTION:`, desc);
- }
- });
- await cdp.send('Emulation.setDeviceMetricsOverride', {
- width: WIDTH,
- height: HEIGHT,
- deviceScaleFactor: 1,
- mobile: false,
- });
-
- await cdp.send('Page.navigate', { url: `${baseUrl}/?frame=0` });
-
- // Wait for fonts, images, and window.__ready
- for (let i = 0; i < 150; i++) {
- const check = await cdp.send('Runtime.evaluate', {
- expression: `(() => {
- const imgs = Array.from(document.images);
- const imgsOk = imgs.length > 0 && imgs.every(im => im.complete && im.naturalWidth > 0);
- return Boolean(window.__ready && window.__setFrame && imgsOk);
- })()`,
- returnByValue: true,
- });
- if (check?.result?.value === true) break;
- await new Promise((r) => setTimeout(r, 80));
- }
-
- // Preload app-icon.png too so Act 5 is instant
- await cdp.send('Runtime.evaluate', {
- expression: `new Promise((resolve) => {
- const im = new Image();
- im.onload = () => resolve(true);
- im.onerror = () => resolve(false);
- im.src = '/assets/app-icon.png';
- })`,
- awaitPromise: true,
- returnByValue: true,
- });
-
- let completed = 0;
- for (const task of tasks) {
- await cdp.send('Runtime.evaluate', {
- expression: `new Promise((resolve) => {
- window.__setFrame(${task.frame});
- requestAnimationFrame(() => requestAnimationFrame(() => resolve(true)));
- })`,
- awaitPromise: true,
- returnByValue: true,
- });
-
- const shot = await cdp.send('Page.captureScreenshot', {
- format: 'png',
- fromSurface: true,
- });
- fs.writeFileSync(task.outPath, Buffer.from(shot.data, 'base64'));
- completed++;
- if (completed % 50 === 0 || completed === tasks.length) {
- process.stdout.write(`[W${workerId}] ${completed}/${tasks.length}\n`);
- }
- }
- } finally {
- cdp?.close();
- try {
- chrome.kill('SIGKILL');
- } catch {}
- setTimeout(() => {
- try {
- fs.rmSync(userDataDir, { recursive: true, force: true });
- } catch {}
- }, 300);
- }
-}
-
-async function main() {
- const args = process.argv.slice(2);
- const modeIdx = args.indexOf('--mode');
- const mode = modeIdx >= 0 ? args[modeIdx + 1] : 'keyframes';
- const workersIdx = args.indexOf('--workers');
- const numWorkers = workersIdx >= 0 ? Math.max(1, Number(args[workersIdx + 1]) || 4) : 6;
-
- if (!fs.existsSync(DIST_DIR)) {
- throw new Error('promo/dist not found. Run Vite build first.');
- }
-
- fs.mkdirSync(OUT_DIR, { recursive: true });
- const { server, url } = await startStaticServer(DIST_DIR);
- const t0 = Date.now();
-
- try {
- let tasks = [];
- if (mode === 'keyframes') {
- fs.mkdirSync(KEYFRAMES_DIR, { recursive: true });
- const keyTimes = [
- ['01_act1_title', 1.1],
- ['02_act1_split', 2.24],
- ['03_act1_pure_canvas', 3.0],
- ['04_act2_focus_hud', 4.5],
- ['05_act2_default_illus', 6.4],
- ['06_act2_wipe_mid', 7.52],
- ['07_act2_photoshop_paper', 8.5],
- ['08_act2_manga_cockpit', 10.4],
- ['09_act2_lefthanded_sumi', 12.6],
- ['10_act2_diag_wipe_mid', 13.78],
- ['11_act2_tablet_bottom', 14.8],
- ['12_act3_warmth_cool', 15.9],
- ['13_act3_warmth_sumi', 16.65],
- ['14_act3_islands_pigment', 17.95],
- ['15_act4_01_kyoto', 18.8],
- ['16_act4_02_botanical', 19.4],
- ['17_act4_03_architect', 19.95],
- ['18_act4_04_nocturne', 20.5],
- ['19_act4_05_washi', 21.05],
- ['20_act4_06_celadon', 21.5],
- ['21_act4_07_smoked', 21.95],
- ['22_act4_08_daylight', 22.45],
- ['23_act4_09_drafting', 22.8],
- ['24_act4_10_printmaker', 23.22],
- ['25_act4_silence', 23.68],
- ['26_act5_wipe_mid', 24.14],
- ['27_act5_end_card', 26.2],
- ];
- tasks = keyTimes.map(([name, sec]) => ({
- frame: Math.min(TOTAL_FRAMES - 1, Math.round(sec * 60)),
- outPath: path.join(KEYFRAMES_DIR, `${name}.png`),
- }));
- } else {
- fs.mkdirSync(FRAMES_DIR, { recursive: true });
- for (let f = 0; f < TOTAL_FRAMES; f++) {
- tasks.push({
- frame: f,
- outPath: path.join(FRAMES_DIR, `frame_${String(f).padStart(4, '0')}.png`),
- });
- }
- }
-
- const actualWorkers = Math.min(numWorkers, tasks.length);
- const buckets = Array.from({ length: actualWorkers }, () => []);
- tasks.forEach((t, i) => buckets[i % actualWorkers].push(t));
-
- console.log(`Rendering ${tasks.length} frames in '${mode}' mode across ${actualWorkers} headless Chrome workers...`);
- await Promise.all(
- buckets.map((bucket, idx) => launchWorker(idx + 1, 9321 + idx, url, bucket))
- );
-
- const elapsed = ((Date.now() - t0) / 1000).toFixed(1);
- console.log(`Rendered ${tasks.length} frames in ${elapsed}s.`);
- } finally {
- server.close();
- }
-}
-
-main().catch((err) => {
- console.error(err);
- process.exit(1);
-});
diff --git a/promo/src/PromoScene.tsx b/promo/src/PromoScene.tsx
deleted file mode 100644
index f36d4dc..0000000
--- a/promo/src/PromoScene.tsx
+++ /dev/null
@@ -1,1045 +0,0 @@
-import React, { useMemo } from 'react';
-import {
- BuiltInAccentPigmentId,
- ChromeStyle,
- CornerRadiusPreset,
-} from '@ink/types/appearance';
-import {
- CANVAS_RECT,
- FPS,
- FRAME_H,
- FRAME_W,
- clamp,
- easeArch,
- easeSineInOut,
- easeSnap,
- invLerp,
- lerp,
- rangeProgress,
-} from './math';
-import {
- ACT4_PERMUTATIONS,
- STUDIO_DEFAULT_ILLUSTRATION,
- STUDIO_FOCUS_HUD,
- STUDIO_LEFT_HANDED_SUMI,
- STUDIO_MANGA_COCKPIT,
- STUDIO_MINIMALIST_TABLET,
- STUDIO_PHOTOSHOP_PAPER,
- STUDIO_PURE_CANVAS,
- buildAct3LiveStudio,
- resolveStudio,
-} from './studioConfigs';
-import { Act3LiveControls, StudioMotionOffsets, StudioShell } from './components/StudioShell';
-
-const MERI_ART_URL = '/assets/meri_ink_2x.png';
-const APP_ICON_URL = '/assets/app-icon.png';
-
-/** Subtle 1px architectural corner registration crop marks (+) */
-const RegistrationMarks: React.FC<{ color: string; opacity?: number }> = ({ color, opacity = 1 }) => {
- const inset = 44;
- const arm = 8;
- const corners = [
- { x: inset, y: inset },
- { x: FRAME_W - inset, y: inset },
- { x: inset, y: FRAME_H - inset },
- { x: FRAME_W - inset, y: FRAME_H - inset },
- ];
- return (
- <svg
- width={FRAME_W}
- height={FRAME_H}
- viewBox={`0 0 ${FRAME_W} ${FRAME_H}`}
- style={{ position: 'absolute', inset: 0, pointerEvents: 'none', opacity }}
- >
- {corners.map((c, idx) => (
- <g key={idx} stroke={color} strokeWidth="1" shapeRendering="crispEdges">
- <line x1={c.x - arm} y1={c.y} x2={c.x + arm} y2={c.y} />
- <line x1={c.x} y1={c.y - arm} x2={c.x} y2={c.y + arm} />
- </g>
- ))}
- </svg>
- );
-};
-
-/** Subtle procedural fine paper tooth / matte grain SVG overlay (zero digital noise slop) */
-const SubtlePaperGrain: React.FC<{ opacity: number; id: string }> = ({ opacity, id }) => (
- <svg
- width={FRAME_W}
- height={FRAME_H}
- style={{ position: 'absolute', inset: 0, pointerEvents: 'none', opacity }}
- >
- <filter id={id}>
- <feTurbulence type="fractalNoise" baseFrequency="0.82" numOctaves="3" stitchTiles="stitch" />
- <feColorMatrix type="saturate" values="0" />
- </filter>
- <rect width={FRAME_W} height={FRAME_H} filter={`url(#${id})`} />
- </svg>
-);
-
-export const PromoScene: React.FC<{ frame: number }> = ({ frame }) => {
- const t = frame / FPS;
-
- // Pre-resolve static studio archetypes once
- const studios = useMemo(
- () => ({
- pure: resolveStudio(STUDIO_PURE_CANVAS),
- focus: resolveStudio(STUDIO_FOCUS_HUD),
- defaultIllus: resolveStudio(STUDIO_DEFAULT_ILLUSTRATION),
- photoshopPaper: resolveStudio(STUDIO_PHOTOSHOP_PAPER),
- mangaCockpit: resolveStudio(STUDIO_MANGA_COCKPIT),
- leftSumi: resolveStudio(STUDIO_LEFT_HANDED_SUMI),
- minimalistTablet: resolveStudio(STUDIO_MINIMALIST_TABLET),
- act4: ACT4_PERMUTATIONS.map((p) => ({ ...p, resolved: resolveStudio(p.studio) })),
- }),
- []
- );
-
- // ============================================================================
- // DETERMINE ACTIVE WORKSPACE LAYERS AROUND THE LOCKED MERI PORTRAIT
- // ============================================================================
-
- const renderWorkspaceStage = () => {
- // --------------------------------------------------------------------------
- // 0.00 – 3.50: Pure Canvas Mode underneath Act 1 parting curtain
- // --------------------------------------------------------------------------
- if (t < 3.5) {
- const telOp = rangeProgress(t, 2.55, 3.05, easeArch);
- return <StudioShell studio={studios.pure} telemetryOpacity={telOp} />;
- }
-
- // --------------------------------------------------------------------------
- // 3.50 – 5.20: ACT 2 #01 — Focus Mode: Atelier HUD
- // --------------------------------------------------------------------------
- if (t < 5.2) {
- const enter = rangeProgress(t, 3.5, 4.04, easeArch);
- return <StudioShell studio={studios.focus} motion={{ focusEnter: enter }} telemetryOpacity={enter} />;
- }
-
- // --------------------------------------------------------------------------
- // 5.20 – 7.20: ACT 2 #02 — Atelier Default Illustration (4-edge Drawer Slide)
- // --------------------------------------------------------------------------
- if (t < 7.2) {
- const hudRetract = 1 - rangeProgress(t, 5.2, 5.46, easeSnap);
- const dockSlide = rangeProgress(t, 5.26, 5.92, easeArch);
- const inv = 1 - dockSlide;
- const matteLift = rangeProgress(t, 5.2, 5.68, easeArch);
- const motion: StudioMotionOffsets = {
- topY: -inv * 72,
- bottomY: inv * 38,
- leftX: -inv * 290,
- rightX: inv * 280,
- };
- return (
- <>
- <div style={{ position: 'absolute', inset: 0, background: '#020202' }} />
- <div style={{ position: 'absolute', inset: 0, opacity: matteLift }}>
- <StudioShell studio={studios.defaultIllus} motion={motion} telemetryOpacity={dockSlide} />
- </div>
- {hudRetract > 0.005 && (
- <StudioShell
- studio={studios.focus}
- motion={{ focusEnter: hudRetract }}
- showTelemetry={false}
- hideMatte
- />
- )}
- </>
- );
- }
-
- // --------------------------------------------------------------------------
- // 7.20 – 9.40: ACT 2 #03 — Photoshop Studio · Warm Paper Islands (Vertical Polarity Wipe!)
- // --------------------------------------------------------------------------
- if (t < 9.4) {
- const wipe = rangeProgress(t, 7.2, 7.84, easeSnap);
- const wipeX = wipe * FRAME_W;
- return (
- <>
- {wipe < 0.999 && (
- <div style={{ position: 'absolute', inset: 0, zIndex: 10, isolation: 'isolate' }}>
- <StudioShell studio={studios.defaultIllus} />
- </div>
- )}
- <div
- style={{
- position: 'absolute',
- inset: 0,
- zIndex: 20,
- isolation: 'isolate',
- clipPath: `inset(0 ${(1 - wipe) * 100}% 0 0)`,
- }}
- >
- <StudioShell studio={studios.photoshopPaper} />
- </div>
- {/* Razor-sharp 1px vertical polarity wipe blade (passes cleanly behind locked portrait) */}
- {wipe > 0.003 && wipe < 0.997 && (
- <div
- style={{
- position: 'absolute',
- left: wipeX - 0.5,
- top: 0,
- bottom: 0,
- width: 1.5,
- background: 'rgba(255, 252, 245, 0.85)',
- boxShadow: '0 0 0 0.5px rgba(20,18,16,0.35)',
- zIndex: 45,
- pointerEvents: 'none',
- }}
- />
- )}
- </>
- );
- }
-
- // --------------------------------------------------------------------------
- // 9.40 – 11.40: ACT 2 #04 — Manga & Value-Calibration Cockpit (Hard Architectural Snap)
- // --------------------------------------------------------------------------
- if (t < 11.4) {
- const settle = rangeProgress(t, 9.4, 9.66, easeArch);
- const inv = 1 - settle;
- return (
- <StudioShell
- studio={studios.mangaCockpit}
- motion={{
- leftX: -inv * 22,
- rightX: inv * 34,
- }}
- />
- );
- }
-
- // --------------------------------------------------------------------------
- // 11.40 – 13.50: ACT 2 #05 — Left-Handed Sumi Atelier + 3D Sphere (Horizontal Mirror Snap)
- // --------------------------------------------------------------------------
- if (t < 13.5) {
- const swap = rangeProgress(t, 11.4, 11.9, easeSnap);
- const inv = 1 - swap;
- const floatEnter = rangeProgress(t, 11.58, 12.12, easeArch);
- const axisFlash = swap > 0.02 && swap < 0.88 ? Math.sin(clamp((swap - 0.02) / 0.86) * Math.PI) : 0;
-
- return (
- <>
- <StudioShell
- studio={studios.leftSumi}
- motion={{
- leftX: inv * 120,
- rightX: -inv * 120,
- floatingOpacity: floatEnter,
- floatingY: (1 - floatEnter) * 26,
- }}
- />
- {/* Brief architectural vertical centerline mirror axis (passes behind portrait) */}
- {axisFlash > 0.01 && (
- <div
- style={{
- position: 'absolute',
- left: CANVAS_RECT.cx - 0.5,
- top: 32,
- bottom: 28,
- width: 1,
- background: `rgba(217, 162, 85, ${axisFlash * 0.72})`,
- zIndex: 44,
- pointerEvents: 'none',
- }}
- />
- )}
- </>
- );
- }
-
- // --------------------------------------------------------------------------
- // 13.50 – 15.50: ACT 2 #06 — Minimalist Tablet + Bottom Dock (Diagonal Curtain Wipe)
- // --------------------------------------------------------------------------
- if (t < 15.5) {
- const wipe = rangeProgress(t, 13.5, 14.08, easeSnap);
- const bottomGlide = rangeProgress(t, 13.68, 14.24, easeArch);
- // Sweeping diagonal wipe polygon from top-left to bottom-right
- const k = lerp(-0.18, 1.32, wipe);
- const xTop = clamp(k + 0.18, 0, 1) * 100;
- const xBot = clamp(k - 0.18, 0, 1) * 100;
-
- return (
- <>
- {wipe < 0.999 && (
- <div style={{ position: 'absolute', inset: 0, zIndex: 10, isolation: 'isolate' }}>
- <StudioShell studio={studios.leftSumi} />
- </div>
- )}
- <div
- style={{
- position: 'absolute',
- inset: 0,
- zIndex: 20,
- isolation: 'isolate',
- clipPath: `polygon(0% 0%, ${xTop}% 0%, ${xBot}% 100%, 0% 100%)`,
- }}
- >
- <StudioShell
- studio={studios.minimalistTablet}
- motion={{
- bottomDockY: (1 - bottomGlide) * 136,
- }}
- />
- </div>
- {/* Crisp 1px diagonal wipe hairline */}
- {wipe > 0.005 && wipe < 0.995 && (
- <svg
- width={FRAME_W}
- height={FRAME_H}
- style={{ position: 'absolute', inset: 0, pointerEvents: 'none', zIndex: 45 }}
- >
- <line
- x1={(xTop / 100) * FRAME_W}
- y1={0}
- x2={(xBot / 100) * FRAME_W}
- y2={FRAME_H}
- stroke="rgba(10, 90, 154, 0.75)"
- strokeWidth="1.5"
- />
- </svg>
- )}
- </>
- );
- }
-
- // --------------------------------------------------------------------------
- // 15.50 – 18.50: ACT 3 — Live Engine Micro-Craft Beat (Appearance Studio Drawer)
- // --------------------------------------------------------------------------
- if (t < 18.5) {
- const drawerEnter = rangeProgress(t, 15.5, 15.9, easeArch);
- const leftEnter = rangeProgress(t, 15.5, 15.86, easeArch);
-
- // 1. Surface Warmth continuous live scrub (-45 Cool Slate -> +60 Warm Sumi)
- let warmth = -45;
- if (t < 16.75) {
- const wProg = rangeProgress(t, 15.72, 16.72, easeSineInOut);
- warmth = lerp(-45, 60, wProg);
- } else {
- // Gently settle back to refined subtle warm-neutral +14 while morphing chrome & pigments
- const wBack = rangeProgress(t, 16.75, 17.35, easeArch);
- warmth = lerp(60, 14, wBack);
- }
-
- // 2. Chrome & Geometry live morph (16.75 -> 17.65): FLAT -> HAIRLINE -> ISLANDS & SHARP -> MACHINED -> SOFT
- let chromeStyle: ChromeStyle = 'hairline';
- let cornerRadius: CornerRadiusPreset = 'machined';
- let panelGapPx = 1;
- let radiusMdPx = 5;
- let radiusLgPx = 8;
-
- if (t >= 16.72 && t < 17.04) {
- chromeStyle = 'flat';
- cornerRadius = 'sharp';
- const p = rangeProgress(t, 16.72, 16.92, easeArch);
- panelGapPx = lerp(1, 0, p);
- radiusMdPx = lerp(5, 2, p);
- radiusLgPx = lerp(8, 2, p);
- } else if (t >= 17.04 && t < 17.34) {
- chromeStyle = 'hairline';
- cornerRadius = 'machined';
- const p = rangeProgress(t, 17.04, 17.24, easeArch);
- panelGapPx = lerp(0, 1, p);
- radiusMdPx = lerp(2, 5, p);
- radiusLgPx = lerp(2, 8, p);
- } else if (t >= 17.34) {
- chromeStyle = 'islands';
- cornerRadius = 'soft';
- const p = rangeProgress(t, 17.34, 17.62, easeArch);
- panelGapPx = lerp(1, 9, p);
- radiusMdPx = lerp(5, 10, p);
- radiusLgPx = lerp(8, 13, p);
- }
-
- // 3. Mineral Pigment Ripple (17.62 -> 18.50)
- let activeAccent: BuiltInAccentPigmentId = 'prussian';
- if (t < 16.75) {
- activeAccent = warmth < -10 ? 'prussian' : warmth > 20 ? 'ochre' : 'neutral';
- } else if (t < 17.62) {
- activeAccent = 'prussian';
- } else {
- const pigments: BuiltInAccentPigmentId[] = ['vermilion', 'prussian', 'matcha', 'ochre', 'plum'];
- const idx = Math.min(pigments.length - 1, Math.floor((t - 17.62) / 0.175));
- activeAccent = pigments[idx];
- }
-
- const activeTab: 'surface' | 'chrome' = t >= 16.72 && t < 17.62 ? 'chrome' : 'surface';
-
- const liveSpec = buildAct3LiveStudio({
- warmth,
- chromeStyle,
- cornerRadius,
- accent: activeAccent,
- panelGapPx,
- radiusMdPx,
- radiusLgPx,
- });
- const liveStudio = resolveStudio(liveSpec);
- const act3Controls: Act3LiveControls = {
- activeTab,
- warmth,
- chromeStyle,
- cornerRadius,
- activeAccent,
- };
-
- // Editorial headline in clean top matte margin above locked portrait (y=58..154)
- const headlineReveal = rangeProgress(t, 16.05, 16.65, easeArch);
- const headlineOut = 1 - rangeProgress(t, 18.3, 18.5, easeSnap);
- const warmthReadout = warmth > 0 ? `+${Math.round(warmth)}` : `${Math.round(warmth)}`;
- const contrastStr = liveStudio.theme.contrast.primaryOnPanel.toFixed(1);
-
- return (
- <>
- <StudioShell
- studio={liveStudio}
- act3Controls={act3Controls}
- showTelemetry={false}
- motion={{
- leftX: -(1 - leftEnter) * 48,
- drawerX: (1 - drawerEnter) * 356,
- }}
- />
-
- {/* Clean Editorial Micro-Craft Beat in unobstructed upper gallery headroom */}
- <div
- style={{
- position: 'absolute',
- left: CANVAS_RECT.x,
- width: CANVAS_RECT.w,
- top: 56,
- display: 'flex',
- flexDirection: 'column',
- alignItems: 'center',
- gap: 8,
- opacity: headlineOut,
- pointerEvents: 'none',
- zIndex: 42,
- }}
- >
- {/* Live Engine Monospace Readout */}
- <div
- className="font-mono-ui"
- style={{
- display: 'flex',
- alignItems: 'center',
- gap: 14,
- fontSize: 10.5,
- letterSpacing: '0.13em',
- textTransform: 'uppercase',
- color: liveStudio.theme.tokens['--ui-text-muted'],
- opacity: headlineReveal,
- }}
- >
- <span>
- WARMTH <strong style={{ color: liveStudio.theme.tokens['--ui-text-primary'] }}>{warmthReadout}</strong>
- </span>
- <span>·</span>
- <span>
- CHROME{' '}
- <strong style={{ color: liveStudio.theme.tokens['--ui-accent'] }}>
- {chromeStyle.toUpperCase()}
- </strong>
- </span>
- <span>·</span>
- <span>
- WCAG <strong style={{ color: liveStudio.theme.tokens['--ui-success'] }}>{contrastStr}:1 AAA</strong>
- </span>
- </div>
-
- {/* Masked Baseline Display Headline */}
- <div style={{ overflow: 'hidden', paddingBottom: 4 }}>
- <div
- className="font-editorial"
- style={{
- fontSize: 44,
- fontWeight: 450,
- letterSpacing: '-0.025em',
- lineHeight: 1.08,
- color: liveStudio.theme.tokens['--ui-text-primary'],
- transform: `translate3d(0, ${(1 - headlineReveal) * 115}%, 0)`,
- }}
- >
- Every panel. Every seam.{' '}
- <em style={{ fontStyle: 'italic', color: liveStudio.theme.tokens['--ui-accent'] }}>Every</em> surface.
- </div>
- </div>
- </div>
- </>
- );
- }
-
- // --------------------------------------------------------------------------
- // 18.50 – 23.40: ACT 4 — 10 Radical Studio Permutations Cascade
- // --------------------------------------------------------------------------
- if (t < 23.4) {
- let idx = studios.act4.findIndex((b) => t >= b.startSec && t < b.endSec);
- if (idx === -1) idx = studios.act4.length - 1;
- const cur = studios.act4[idx];
- const prev = idx > 0 ? studios.act4[idx - 1] : null;
- const localT = t - cur.startSec;
-
- const renderCurrentBeat = () => {
- if (prev && cur.transition === 'wipe-h' && localT < 0.19) {
- const w = rangeProgress(localT, 0, 0.19, easeSnap);
- return (
- <>
- <div style={{ position: 'absolute', inset: 0, zIndex: 10, isolation: 'isolate' }}>
- <StudioShell studio={prev.resolved} />
- </div>
- <div
- style={{
- position: 'absolute',
- inset: 0,
- zIndex: 20,
- isolation: 'isolate',
- clipPath: `inset(0 ${(1 - w) * 100}% 0 0)`,
- }}
- >
- <StudioShell studio={cur.resolved} />
- </div>
- <div
- style={{
- position: 'absolute',
- left: w * FRAME_W - 0.75,
- top: 0,
- bottom: 0,
- width: 1.5,
- background: cur.resolved.theme.tokens['--ui-accent'],
- zIndex: 45,
- }}
- />
- </>
- );
- }
-
- if (prev && cur.transition === 'wipe-diag' && localT < 0.2) {
- const w = rangeProgress(localT, 0, 0.2, easeSnap);
- const k = lerp(-0.16, 1.3, w);
- const xTop = clamp(k + 0.16, 0, 1) * 100;
- const xBot = clamp(k - 0.16, 0, 1) * 100;
- return (
- <>
- <div style={{ position: 'absolute', inset: 0, zIndex: 10, isolation: 'isolate' }}>
- <StudioShell studio={prev.resolved} />
- </div>
- <div
- style={{
- position: 'absolute',
- inset: 0,
- zIndex: 20,
- isolation: 'isolate',
- clipPath: `polygon(0% 0%, ${xTop}% 0%, ${xBot}% 100%, 0% 100%)`,
- }}
- >
- <StudioShell studio={cur.resolved} />
- </div>
- </>
- );
- }
-
- return (
- <div style={{ position: 'absolute', inset: 0, zIndex: 10, isolation: 'isolate' }}>
- <StudioShell studio={cur.resolved} />
- </div>
- );
- };
-
- const tok = cur.resolved.theme.tokens;
- const showPeakSpec = idx >= 7; // Beats 08, 09, 10 peak spec banner
-
- return (
- <>
- {renderCurrentBeat()}
-
- {/* Crisp Unobstructed Gallery-Margin Rapid Ticker (01 -> 10) aligned dead-flush beneath locked canvas */}
- <div
- className="font-mono-ui"
- style={{
- position: 'absolute',
- left: CANVAS_RECT.x,
- width: CANVAS_RECT.w,
- top: CANVAS_RECT.bottom + 10,
- zIndex: 60,
- display: 'flex',
- alignItems: 'center',
- justifyContent: 'space-between',
- pointerEvents: 'none',
- }}
- >
- <div
- style={{
- display: 'flex',
- alignItems: 'center',
- gap: 10,
- padding: '4px 10px',
- background: tok['--ui-bg-elevated'],
- border: `1px solid ${tok['--ui-border-strong']}`,
- borderRadius: `${cur.resolved.radiusSmPx}px`,
- boxShadow: tok['--ui-shadow-floating'],
- fontSize: 10.5,
- letterSpacing: '0.1em',
- }}
- >
- <span style={{ color: tok['--ui-accent'], fontWeight: 700, fontSize: 12.5 }}>{cur.num}</span>
- <span style={{ color: tok['--ui-text-muted'] }}>/ 10</span>
- <span style={{ width: 1, height: 11, background: tok['--ui-border-default'] }} />
- <span style={{ color: tok['--ui-text-primary'], fontWeight: 600, textTransform: 'uppercase' }}>
- {cur.studio.name}
- </span>
- </div>
-
- {showPeakSpec && (
- <div
- style={{
- padding: '4px 10px',
- background: tok['--ui-bg-elevated'],
- border: `1px solid ${tok['--ui-accent-border']}`,
- borderRadius: `${cur.resolved.radiusSmPx}px`,
- boxShadow: tok['--ui-shadow-floating'],
- fontSize: 10,
- letterSpacing: '0.1em',
- color: tok['--ui-text-primary'],
- fontWeight: 600,
- }}
- >
- CUSTOM THEMES · SAVED WORKSPACES ·{' '}
- <span style={{ color: tok['--ui-accent'] }}>.INKTHEME / .INKWORKSPACE</span>
- </div>
- )}
- </div>
- </>
- );
- }
-
- // --------------------------------------------------------------------------
- // 23.40 – 24.50: SUDDEN SILENCE (All panels snap outward off 4 edges simultaneously!)
- // --------------------------------------------------------------------------
- const eject = rangeProgress(t, 23.4, 23.56, easeSnap);
- const lastStudio = studios.act4[studios.act4.length - 1].resolved;
- return (
- <>
- <div style={{ position: 'absolute', inset: 0, background: '#020202' }} />
- {eject < 0.995 && (
- <div style={{ position: 'absolute', inset: 0, opacity: 1 - eject }}>
- <StudioShell
- studio={lastStudio}
- showTelemetry={false}
- hideMatte
- motion={{
- topY: -eject * 130,
- bottomY: eject * 110,
- leftX: -eject * 320,
- rightX: eject * 480,
- }}
- />
- </div>
- )}
- </>
- );
- };
-
- // ============================================================================
- // ACT 1 — COLD OPEN PARTING CURTAIN (0.00 – 2.75)
- // ============================================================================
- const renderAct1ColdOpen = () => {
- if (t >= 2.75) return null;
-
- const kickerWipe = rangeProgress(t, 0.12, 0.56, easeArch);
- const titleRise = rangeProgress(t, 0.22, 1.05, easeArch);
- const lineDraw = rangeProgress(t, 1.72, 2.02, easeSnap);
- const part = rangeProgress(t, 2.02, 2.68, easeSnap);
- const halfShift = part * (FRAME_H / 2 + 8);
- const metaFade = 1 - rangeProgress(t, 1.95, 2.25, easeSnap);
-
- const renderHeadline = () => (
- <div
- className="font-editorial"
- style={{
- fontSize: 84,
- fontWeight: 450,
- letterSpacing: '-0.028em',
- lineHeight: 1.05,
- color: '#f2ece2',
- whiteSpace: 'nowrap',
- transform: `translate3d(0, ${(1 - titleRise) * 115}%, 0)`,
- }}
- >
- One canvas. <em style={{ fontStyle: 'italic', color: '#e1ba7b' }}>Every</em> studio.
- </div>
- );
-
- return (
- <div style={{ position: 'absolute', inset: 0, zIndex: 80, pointerEvents: 'none' }}>
- {/* Upper Half Curtain */}
- <div
- style={{
- position: 'absolute',
- left: 0,
- top: 0,
- width: FRAME_W,
- height: FRAME_H / 2,
- background: '#11100f',
- overflow: 'hidden',
- transform: `translate3d(0, ${-halfShift}px, 0)`,
- borderBottom: lineDraw > 0.01 ? '1px solid rgba(242,236,226,0.22)' : 'none',
- }}
- >
- <SubtlePaperGrain opacity={0.032} id="grain-act1-top" />
- <RegistrationMarks color="rgba(242, 236, 226, 0.24)" opacity={metaFade} />
-
- {/* Top-Left Monospace Kicker */}
- <div
- className="font-mono-ui"
- style={{
- position: 'absolute',
- left: 68,
- top: 46,
- fontSize: 11.5,
- letterSpacing: '0.18em',
- textTransform: 'uppercase',
- color: '#9c9388',
- clipPath: `inset(0 ${(1 - kickerWipe) * 100}% 0 0)`,
- opacity: metaFade,
- }}
- >
- INK STUDIO · APPEARANCE &amp; WORKSPACES
- </div>
-
- {/* Top-Right Monospace Edition Tag */}
- <div
- className="font-mono-ui"
- style={{
- position: 'absolute',
- right: 68,
- top: 46,
- fontSize: 11,
- letterSpacing: '0.16em',
- color: '#6b645c',
- opacity: kickerWipe * metaFade,
- }}
- >
- OKLCH ENGINE · CUSTOM WORKSPACES
- </div>
-
- {/* Upper Half of Masked Center Headline (mathematically aligned at y=540 seam) */}
- <div
- style={{
- position: 'absolute',
- left: 0,
- top: 0,
- width: FRAME_W,
- height: FRAME_H,
- display: 'flex',
- alignItems: 'center',
- justifyContent: 'center',
- }}
- >
- <div style={{ overflow: 'hidden', padding: '10px 0' }}>{renderHeadline()}</div>
- </div>
- </div>
-
- {/* Lower Half Curtain */}
- <div
- style={{
- position: 'absolute',
- left: 0,
- top: FRAME_H / 2,
- width: FRAME_W,
- height: FRAME_H / 2,
- background: '#11100f',
- overflow: 'hidden',
- transform: `translate3d(0, ${halfShift}px, 0)`,
- borderTop: lineDraw > 0.01 ? '1px solid rgba(242,236,226,0.22)' : 'none',
- }}
- >
- <SubtlePaperGrain opacity={0.032} id="grain-act1-bot" />
- <div style={{ position: 'absolute', top: -FRAME_H / 2, left: 0, width: FRAME_W, height: FRAME_H }}>
- <RegistrationMarks color="rgba(242, 236, 226, 0.24)" opacity={metaFade} />
- </div>
-
- {/* Lower Half of Masked Center Headline (mathematically aligned at y=540 seam) */}
- <div
- style={{
- position: 'absolute',
- left: 0,
- top: -FRAME_H / 2,
- width: FRAME_W,
- height: FRAME_H,
- display: 'flex',
- alignItems: 'center',
- justifyContent: 'center',
- }}
- >
- <div style={{ overflow: 'hidden', padding: '10px 0' }}>{renderHeadline()}</div>
- </div>
-
- {/* Bottom-Left Subtle Index */}
- <div
- className="font-mono-ui"
- style={{
- position: 'absolute',
- left: 68,
- bottom: 46,
- fontSize: 10.5,
- letterSpacing: '0.16em',
- color: '#6b645c',
- opacity: kickerWipe * metaFade,
- }}
- >
- 01 — LOCKED CANVAS STUDY · 3800×2800PX
- </div>
- </div>
-
- {/* Horizontal Parting Hairline drawn cleanly across center before split */}
- {part < 0.04 && lineDraw > 0.005 && (
- <div
- style={{
- position: 'absolute',
- left: '50%',
- top: FRAME_H / 2 - 0.5,
- width: FRAME_W * lineDraw,
- height: 1,
- background: 'rgba(225, 186, 123, 0.55)',
- transform: 'translateX(-50%)',
- }}
- />
- )}
- </div>
- );
- };
-
- // ============================================================================
- // ACT 5 — MINIMALIST ATELIER END CARD (23.80 – 28.00)
- // ============================================================================
- const renderAct5EndCard = () => {
- if (t < 23.8) return null;
-
- const curtainWipe = rangeProgress(t, 23.8, 24.48, easeSnap);
- const logoEnter = rangeProgress(t, 24.3, 24.9, easeArch);
- const wordmarkEnter = rangeProgress(t, 24.52, 25.1, easeArch);
- const ruleDraw = rangeProgress(t, 24.84, 25.26, easeArch);
- const line1Enter = rangeProgress(t, 24.96, 25.44, easeArch);
- const line2Enter = rangeProgress(t, 25.12, 25.56, easeArch);
- const finalFadeOut = rangeProgress(t, 27.55, 28.0, easeSineInOut);
-
- return (
- <div style={{ position: 'absolute', inset: 0, zIndex: 90, pointerEvents: 'none' }}>
- <div
- style={{
- position: 'absolute',
- inset: 0,
- background: '#ede6d9',
- clipPath: `inset(0 ${(1 - curtainWipe) * 100}% 0 0)`,
- display: 'flex',
- flexDirection: 'column',
- alignItems: 'center',
- justifyContent: 'center',
- }}
- >
- {/* Ultra-subtle physical cotton rag paper tooth */}
- <SubtlePaperGrain opacity={0.042} id="grain-act5-paper" />
- <RegistrationMarks color="rgba(20, 18, 16, 0.22)" opacity={curtainWipe} />
-
- {/* Subtle Architectural Corner Metadata */}
- <div
- className="font-mono-ui"
- style={{
- position: 'absolute',
- left: 68,
- top: 46,
- fontSize: 10.5,
- letterSpacing: '0.16em',
- color: 'rgba(20, 18, 16, 0.45)',
- opacity: line2Enter,
- }}
- >
- INK STUDIO · DESKTOP DIGITAL PAINTING
- </div>
- <div
- className="font-mono-ui"
- style={{
- position: 'absolute',
- right: 68,
- top: 46,
- fontSize: 10.5,
- letterSpacing: '0.16em',
- color: 'rgba(20, 18, 16, 0.45)',
- opacity: line2Enter,
- }}
- >
- THEMES &amp; WORKSPACES UPDATE
- </div>
-
- {/* Centered Timeless Editorial Lockup */}
- <div
- style={{
- display: 'flex',
- flexDirection: 'column',
- alignItems: 'center',
- gap: 0,
- marginTop: -8,
- }}
- >
- {/* 1. Real Ink Studio Logo — printed directly onto cotton rag paper (zero box, zero glow) */}
- <div
- style={{
- width: 130,
- height: 130,
- marginBottom: 20,
- opacity: logoEnter,
- transform: `scale(${lerp(0.96, 1.0, logoEnter)})`,
- mixBlendMode: 'multiply',
- }}
- >
- <img
- src={APP_ICON_URL}
- alt="Ink Studio"
- style={{
- width: '100%',
- height: '100%',
- objectFit: 'contain',
- display: 'block',
- }}
- />
- </div>
-
- {/* 2. Wordmark: Ink Studio */}
- <div style={{ overflow: 'hidden', paddingBottom: 6 }}>
- <div
- className="font-editorial"
- style={{
- fontSize: 66,
- fontWeight: 500,
- letterSpacing: '-0.025em',
- lineHeight: 1.04,
- color: '#141210',
- transform: `translate3d(0, ${(1 - wordmarkEnter) * 112}%, 0)`,
- }}
- >
- Ink Studio
- </div>
- </div>
-
- {/* 3. 1px Thin Divider Rule drawing outward from center */}
- <div
- style={{
- width: 76,
- height: 1,
- background: 'rgba(20, 18, 16, 0.30)',
- marginTop: 22,
- marginBottom: 22,
- transform: `scaleX(${ruleDraw})`,
- transformOrigin: 'center',
- }}
- />
-
- {/* 4. Closing Copy */}
- <div style={{ overflow: 'hidden', paddingBottom: 3 }}>
- <div
- className="font-sans-ui"
- style={{
- fontSize: 22,
- fontWeight: 500,
- letterSpacing: '-0.01em',
- color: '#2c2824',
- transform: `translate3d(0, ${(1 - line1Enter) * 115}%, 0)`,
- }}
- >
- New Themes &amp; Custom Workspaces — Out Now.
- </div>
- </div>
-
- <div
- className="font-mono-ui"
- style={{
- marginTop: 12,
- fontSize: 13.5,
- letterSpacing: '0.07em',
- color: '#635c53',
- opacity: line2Enter,
- transform: `translate3d(0, ${(1 - line2Enter) * 8}px, 0)`,
- }}
- >
- Free &amp; open source · praisesora.github.io/inkstudio
- </div>
- </div>
- </div>
-
- {/* Crisp Lead Hairline on Weighted Horizontal Curtain Wipe */}
- {curtainWipe > 0.003 && curtainWipe < 0.997 && (
- <div
- style={{
- position: 'absolute',
- left: curtainWipe * FRAME_W - 0.5,
- top: 0,
- bottom: 0,
- width: 1.5,
- background: 'rgba(20, 18, 16, 0.55)',
- }}
- />
- )}
-
- {/* Restrained Final Fade Out (27.55 -> 28.00) */}
- {finalFadeOut > 0.001 && (
- <div
- style={{
- position: 'absolute',
- inset: 0,
- background: '#11100f',
- opacity: finalFadeOut,
- }}
- />
- )}
- </div>
- );
- };
-
- return (
- <div
- style={{
- position: 'relative',
- width: FRAME_W,
- height: FRAME_H,
- overflow: 'hidden',
- background: '#020202',
- }}
- >
- {/* Dynamic Ink Studio Workspaces surrounding the locked center artwork */}
- {renderWorkspaceStage()}
-
- {/* ====================================================================== */}
- {/* THE SACRED PIXEL-LOCKED CENTER ARTWORK — NEVER MOVES, NEVER TINTS! */}
- {/* Exact coordinates: (478, 185, 964, 710) centered at (960, 540). */}
- {/* ====================================================================== */}
- <div
- style={{
- position: 'absolute',
- left: CANVAS_RECT.x,
- top: CANVAS_RECT.y,
- width: CANVAS_RECT.w,
- height: CANVAS_RECT.h,
- zIndex: 50,
- pointerEvents: 'none',
- background: '#020202',
- }}
- >
- <img
- src={MERI_ART_URL}
- alt="Locked Portrait Canvas"
- style={{
- width: '100%',
- height: '100%',
- display: 'block',
- objectFit: 'fill',
- }}
- />
- </div>
-
- {/* Act 1 Cold Open Curtain */}
- {renderAct1ColdOpen()}
-
- {/* Act 5 Minimalist Atelier End Card */}
- {renderAct5EndCard()}
- </div>
- );
-};
diff --git a/promo/src/components/AtelierPanels.tsx b/promo/src/components/AtelierPanels.tsx
deleted file mode 100644
index 05511ca..0000000
--- a/promo/src/components/AtelierPanels.tsx
+++ /dev/null
@@ -1,1986 +0,0 @@
-import React, { useEffect, useRef } from 'react';
-import {
- Check,
- ChevronDown,
- Columns2,
- Contrast,
- Droplet,
- Eraser,
- Eye,
- FlipHorizontal,
- FolderPlus,
- History,
- Layers,
- Lock,
- Maximize2,
- Moon,
- Paintbrush,
- Palette,
- Pin,
- Pipette,
- Plus,
- Redo2,
- RotateCcw,
- Save,
- Shuffle,
- SlidersHorizontal,
- Sparkles,
- SquareDashed,
- Sun,
- Trash2,
- Undo2,
- X,
-} from 'lucide-react';
-import {
- ACCENT_PIGMENTS,
- BUILT_IN_ACCENT_PIGMENT_IDS,
- BUILT_IN_LOOK_PRESET_IDS,
- BuiltInAccentPigmentId,
- BuiltInLookPresetId,
- ChromeStyle,
- CornerRadiusPreset,
- LOOK_PRESETS,
- createAppearanceFromPreset,
-} from '@ink/types/appearance';
-import { oklchToHex, resolveAppearanceTokens } from '@ink/utils/themeEngine';
-import {
- DEFAULT_SPHERE_LIGHTING,
- buildSphereGeometryLut,
- renderSphereFromLut,
- updateSphereLightingLut,
-} from '@ink/utils/sphereColorMath';
-import { hexToHsv } from '@ink/utils/colorUtils';
-import { ResolvedStudio } from '../studioConfigs';
-import { PanelChrome, ScrubOrTrackSlider } from './CorePanels';
-
-const MERI_THUMB_URL = '/assets/meri_ink_2x.png';
-
-/** High-DPI authentic HSV Color Wheel (conic hue ring + SV square + crisp reticles) */
-export const ColorWheelWidget: React.FC<{
- studio: ResolvedStudio;
- size?: number;
- hex?: string;
-}> = ({ studio, size = 148, hex }) => {
- const activeHex = hex ?? studio.spec.activeColorHex;
- const hsv = hexToHsv(activeHex);
- const ringThickness = Math.max(12, Math.round(size * 0.115));
- const innerSize = size - ringThickness * 2;
- const svBox = Math.round(innerSize * 0.66);
- const hueRad = ((hsv.h - 90) * Math.PI) / 180;
- const ringR = size / 2 - ringThickness / 2;
- const hueX = size / 2 + Math.cos(hueRad) * ringR;
- const hueY = size / 2 + Math.sin(hueRad) * ringR;
- const svX = hsv.s * svBox;
- const svY = (1 - hsv.v) * svBox;
-
- return (
- <div style={{ position: 'relative', width: size, height: size, flexShrink: 0 }}>
- {/* Hue Ring */}
- <div
- style={{
- position: 'absolute',
- inset: 0,
- borderRadius: '50%',
- background:
- 'conic-gradient(from 0deg, #ff2a2a, #ffae00, #d4ff00, #00e640, #00d9ff, #1a66ff, #9b26ff, #ff1a9b, #ff2a2a)',
- WebkitMask: `radial-gradient(farthest-side, transparent calc(100% - ${ringThickness}px), #000 calc(100% - ${ringThickness - 0.5}px))`,
- mask: `radial-gradient(farthest-side, transparent calc(100% - ${ringThickness}px), #000 calc(100% - ${ringThickness - 0.5}px))`,
- }}
- />
- {/* Hue Reticle */}
- <div
- style={{
- position: 'absolute',
- left: hueX - 6,
- top: hueY - 6,
- width: 12,
- height: 12,
- borderRadius: '50%',
- border: '2px solid #ffffff',
- boxShadow: '0 0 0 1px rgba(0,0,0,0.65)',
- }}
- />
- {/* Inner SV Square */}
- <div
- style={{
- position: 'absolute',
- left: (size - svBox) / 2,
- top: (size - svBox) / 2,
- width: svBox,
- height: svBox,
- borderRadius: 2,
- backgroundColor: `hsl(${hsv.h}, 100%, 50%)`,
- backgroundImage:
- 'linear-gradient(to top, #000000, transparent), linear-gradient(to right, #ffffff, transparent)',
- boxShadow: '0 0 0 1px rgba(0,0,0,0.45)',
- }}
- >
- <div
- style={{
- position: 'absolute',
- left: svX - 5,
- top: svY - 5,
- width: 10,
- height: 10,
- borderRadius: '50%',
- border: '2px solid #ffffff',
- boxShadow: '0 0 0 1px rgba(0,0,0,0.75)',
- }}
- />
- </div>
- </div>
- );
-};
-
-/** Real Ink Studio 3D Color Sphere rendered live using `@ink/utils/sphereColorMath` */
-export const Real3DSphereCanvas: React.FC<{ hex: string; size?: number }> = ({ hex, size = 152 }) => {
- const canvasRef = useRef<HTMLCanvasElement>(null);
-
- useEffect(() => {
- const canvas = canvasRef.current;
- if (!canvas) return;
- const dpr = 2;
- const px = size * dpr;
- canvas.width = px;
- canvas.height = px;
- const ctx = canvas.getContext('2d');
- if (!ctx) return;
-
- const lut = buildSphereGeometryLut(px, px, 0.465);
- const lighting = {
- ...DEFAULT_SPHERE_LIGHTING,
- lightAzimuth: -38,
- lightElevation: 38,
- lightIntensity: 1.08,
- saturation: 1.0,
- contrast: 1.15,
- roughness: 0.48,
- specularStrength: 0.42,
- bounceIntensity: 0.30,
- shadowDepth: 0.86,
- ambientIntensity: 0.10,
- lightTint: 0.28,
- rimIntensity: 0.16,
- subsurface: 0.18,
- };
- updateSphereLightingLut(lut, lighting);
-
- const baseHsv = hexToHsv(hex);
- const slots = {
- base: { h: baseHsv.h, s: Math.max(0.28, baseHsv.s), v: Math.max(0.72, baseHsv.v) },
- shadow: { h: (baseHsv.h + 185) % 360, s: 0.36, v: 0.34 },
- light: { h: (baseHsv.h + 14) % 360, s: 0.18, v: 0.98 },
- rim: { h: (baseHsv.h + 205) % 360, s: 0.25, v: 0.82 },
- };
-
- renderSphereFromLut(ctx, lut, slots, lighting);
-
- // Draw crisp sample reticle on the lit face of the sphere
- ctx.beginPath();
- ctx.arc(px * 0.38, px * 0.37, 13, 0, Math.PI * 2);
- ctx.fillStyle = hex;
- ctx.fill();
- ctx.lineWidth = 3;
- ctx.strokeStyle = '#ffffff';
- ctx.stroke();
- ctx.lineWidth = 1.2;
- ctx.strokeStyle = 'rgba(0,0,0,0.55)';
- ctx.stroke();
- }, [hex, size]);
-
- return <canvas ref={canvasRef} style={{ width: size, height: size, display: 'block' }} />;
-};
-
-export const NavigatorPanel: React.FC<{ studio: ResolvedStudio; flex?: number }> = ({
- studio,
- flex = 0.85,
-}) => {
- const t = studio.theme.tokens;
- const mode = studio.spec.navigatorMode ?? 'color';
- const sw = studio.spec.appearance.iconStrokeWidth;
-
- return (
- <PanelChrome
- studio={studio}
- tabs={[
- { label: 'Nav', active: true },
- { label: 'SubView', active: false },
- { label: 'Info', active: false },
- ]}
- style={{ flex }}
- >
- <div style={{ padding: 7, display: 'flex', flexDirection: 'column', gap: 6, flex: 1 }}>
- {/* Live Mini Canvas Preview (supports Color / Split CLR|B/W / B/W) */}
- <div
- style={{
- position: 'relative',
- flex: 1,
- minHeight: 96,
- background: '#050505',
- borderRadius: `${studio.radiusSmPx}px`,
- border: `1px solid ${t['--ui-border-default']}`,
- overflow: 'hidden',
- display: 'flex',
- alignItems: 'center',
- justifyContent: 'center',
- }}
- >
- {/* Full Color Base */}
- <img
- src={MERI_THUMB_URL}
- alt=""
- style={{
- width: '100%',
- height: '100%',
- objectFit: 'contain',
- filter: mode === 'bw' ? 'grayscale(1) contrast(1.06)' : 'none',
- }}
- />
-
- {/* Split Right Half Grayscale Overlay */}
- {mode === 'split' && (
- <>
- <img
- src={MERI_THUMB_URL}
- alt=""
- style={{
- position: 'absolute',
- inset: 0,
- width: '100%',
- height: '100%',
- objectFit: 'contain',
- filter: 'grayscale(1) contrast(1.05)',
- clipPath: 'inset(0 0 0 50%)',
- }}
- />
- {/* Crisp Vertical Split Divider + Handle */}
- <div
- style={{
- position: 'absolute',
- top: 0,
- bottom: 0,
- left: '50%',
- width: 1.5,
- background: t['--ui-accent'],
- transform: 'translateX(-50%)',
- }}
- />
- <div
- style={{
- position: 'absolute',
- top: '50%',
- left: '50%',
- transform: 'translate(-50%, -50%)',
- width: 14,
- height: 14,
- borderRadius: '50%',
- background: t['--ui-bg-panel'],
- border: `1.5px solid ${t['--ui-accent']}`,
- display: 'flex',
- alignItems: 'center',
- justifyContent: 'center',
- fontSize: 7,
- color: t['--ui-text-primary'],
- fontWeight: 700,
- }}
- >
- ||
- </div>
- <span
- className="font-mono-ui"
- style={{
- position: 'absolute',
- top: 5,
- left: 5,
- padding: '1px 4px',
- fontSize: 8.5,
- fontWeight: 700,
- background: 'rgba(10,10,12,0.78)',
- color: '#f2ece2',
- borderRadius: 2,
- }}
- >
- CLR
- </span>
- <span
- className="font-mono-ui"
- style={{
- position: 'absolute',
- top: 5,
- right: 5,
- padding: '1px 4px',
- fontSize: 8.5,
- fontWeight: 700,
- background: 'rgba(10,10,12,0.78)',
- color: '#f2ece2',
- borderRadius: 2,
- }}
- >
- B/W
- </span>
- </>
- )}
-
- {/* Red Active Viewport Indicator Frame */}
- <div
- style={{
- position: 'absolute',
- inset: 4,
- border: `1px solid ${mode === 'split' ? t['--ui-accent'] : 'rgba(228,114,97,0.7)'}`,
- pointerEvents: 'none',
- }}
- />
- </div>
-
- {/* Zoom + Mode Bar */}
- <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: 6 }}>
- <div
- style={{
- display: 'flex',
- background: t['--ui-bg-input'],
- border: `1px solid ${t['--ui-border-subtle']}`,
- borderRadius: `${studio.radiusSmPx}px`,
- padding: 1.5,
- gap: 2,
- fontSize: 9.5,
- }}
- >
- {(['color', 'split', 'bw'] as const).map((m) => {
- const active = mode === m;
- return (
- <span
- key={m}
- style={{
- padding: '1px 6px',
- borderRadius: `${Math.max(1, studio.radiusSmPx - 1)}px`,
- background: active ? t['--ui-accent-subtle'] : 'transparent',
- color: active ? t['--ui-accent'] : t['--ui-text-muted'],
- fontWeight: active ? 600 : 400,
- }}
- >
- {m === 'color' ? 'Color' : m === 'split' ? 'Split' : 'B/W'}
- </span>
- );
- })}
- </div>
- <div
- style={{
- display: 'flex',
- alignItems: 'center',
- gap: 4,
- fontSize: 9.5,
- color: t['--ui-text-secondary'],
- }}
- >
- <Contrast size={10} strokeWidth={sw} />
- <span className="font-mono-ui">27.5%</span>
- </div>
- </div>
- </div>
- </PanelChrome>
- );
-};
-
-export const ColorWheelPanel: React.FC<{ studio: ResolvedStudio; flex?: number }> = ({
- studio,
- flex = 1.0,
-}) => {
- const t = studio.theme.tokens;
- const swatches = ['#C89B62', '#8B4A3A', '#3D4732', '#262320', '#E6D9C3', '#5EA1DF'];
- return (
- <PanelChrome
- studio={studio}
- tabs={[
- { label: 'Color', active: true },
- { label: 'Sliders', active: false },
- { label: 'Sets', active: false },
- ]}
- style={{ flex }}
- >
- <div
- style={{
- padding: 8,
- display: 'flex',
- flexDirection: 'column',
- alignItems: 'center',
- justifyContent: 'space-between',
- gap: 7,
- flex: 1,
- }}
- >
- <div
- style={{
- width: '100%',
- display: 'flex',
- alignItems: 'center',
- justifyContent: 'space-between',
- gap: 6,
- }}
- >
- <span className="font-mono-ui" style={{ fontSize: 10, color: t['--ui-text-primary'], fontWeight: 600 }}>
- {studio.spec.activeColorHex.toUpperCase()}
- </span>
- <div style={{ display: 'flex', gap: 3 }}>
- {swatches.map((hex) => (
- <div
- key={hex}
- style={{
- width: 12,
- height: 12,
- borderRadius: `${Math.min(3, studio.radiusSmPx)}px`,
- background: hex,
- border: `1px solid ${t['--ui-border-default']}`,
- }}
- />
- ))}
- </div>
- </div>
-
- <ColorWheelWidget studio={studio} size={146} />
- </div>
- </PanelChrome>
- );
-};
-
-export const ColorSlidersPanel: React.FC<{ studio: ResolvedStudio; flex?: number }> = ({
- studio,
- flex = 0.72,
-}) => {
- const t = studio.theme.tokens;
- const channels = [
- { label: 'H', val: '34°', pct: 18, grad: 'linear-gradient(90deg, #e44, #dd0, #0c4, #0bd, #35f, #d3d, #e44)' },
- { label: 'S', val: '51%', pct: 51, grad: 'linear-gradient(90deg, #9a9690, #d99b4e)' },
- { label: 'V', val: '78%', pct: 78, grad: 'linear-gradient(90deg, #111111, #c89b62)' },
- { label: 'R', val: '200', pct: 78, grad: 'linear-gradient(90deg, #221a16, #e45c4c)' },
- { label: 'G', val: '155', pct: 61, grad: 'linear-gradient(90deg, #162218, #78c47e)' },
- { label: 'B', val: '98', pct: 38, grad: 'linear-gradient(90deg, #141926, #5c9ce6)' },
- ];
-
- return (
- <PanelChrome
- studio={studio}
- tabs={[
- { label: 'Sliders', active: true },
- { label: 'Wheel', active: false },
- ]}
- style={{ flex }}
- >
- <div style={{ padding: 7, display: 'flex', flexDirection: 'column', gap: 7, flex: 1 }}>
- {channels.map((ch) => (
- <div key={ch.label} style={{ display: 'flex', alignItems: 'center', gap: 6 }}>
- <span
- className="font-mono-ui"
- style={{ width: 12, fontSize: 9.5, color: t['--ui-text-muted'], fontWeight: 600 }}
- >
- {ch.label}
- </span>
- <div style={{ position: 'relative', flex: 1, height: 8, display: 'flex', alignItems: 'center' }}>
- <div
- style={{
- width: '100%',
- height: 4,
- borderRadius: studio.radiusSmPx,
- background: ch.grad,
- border: `1px solid ${t['--ui-border-subtle']}`,
- }}
- />
- <div
- style={{
- position: 'absolute',
- left: `calc(${ch.pct}% - 4px)`,
- width: 8,
- height: 10,
- borderRadius: studio.spec.appearance.cornerRadius === 'sharp' ? 1 : 3,
- background: t['--ui-text-primary'],
- border: `1.5px solid ${t['--ui-accent']}`,
- }}
- />
- </div>
- <span
- className="font-mono-ui"
- style={{ width: 26, textAlign: 'right', fontSize: 9.5, color: t['--ui-text-primary'] }}
- >
- {ch.val}
- </span>
- </div>
- ))}
- </div>
- </PanelChrome>
- );
-};
-
-export const LayersPanel: React.FC<{ studio: ResolvedStudio; flex?: number }> = ({
- studio,
- flex = 1.2,
-}) => {
- const t = studio.theme.tokens;
- const thumbSize =
- studio.spec.appearance.layerThumbSize === 'large'
- ? 44
- : studio.spec.appearance.layerThumbSize === 'compact'
- ? 24
- : 32;
- const sw = studio.spec.appearance.iconStrokeWidth;
-
- const layers = [
- { name: 'Ribbon Highlights', mode: 'Screen 64%', active: false, thumb: 'glaze' },
- { name: 'meri_portrait', mode: 'Normal 100%', active: true, thumb: 'meri' },
- { name: 'Chiaroscuro Ground', mode: 'Multiply', active: false, thumb: 'dark' },
- { name: 'Background', mode: 'Locked', active: false, thumb: 'bg', locked: true },
- ];
-
- return (
- <PanelChrome
- studio={studio}
- tabs={[
- { label: 'Layer', active: true },
- { label: 'Hist', active: false },
- { label: 'Action', active: false },
- ]}
- style={{ flex }}
- >
- <div style={{ padding: 7, display: 'flex', flexDirection: 'column', gap: 6, flex: 1 }}>
- {/* Blend Mode + Opacity */}
- <div style={{ display: 'flex', gap: 5, alignItems: 'center' }}>
- <div
- style={{
- width: 86,
- height: 22,
- padding: '0 6px',
- background: t['--ui-bg-input'],
- border: `1px solid ${t['--ui-border-default']}`,
- borderRadius: `${studio.radiusSmPx}px`,
- display: 'flex',
- alignItems: 'center',
- justifyContent: 'space-between',
- fontSize: 10,
- }}
- >
- <span>Normal</span>
- <ChevronDown size={10} />
- </div>
- <div style={{ flex: 1 }}>
- <ScrubOrTrackSlider studio={studio} label="" valueText="100%" percent={100} checker compact />
- </div>
- </div>
-
- {/* Layer Rows */}
- <div style={{ display: 'flex', flexDirection: 'column', gap: 3, flex: 1 }}>
- {layers.map((lyr) => (
- <div
- key={lyr.name}
- style={{
- padding: '4px 6px',
- borderRadius: `${studio.radiusSmPx}px`,
- background: lyr.active ? t['--ui-accent-subtle'] : 'transparent',
- border: `1px solid ${lyr.active ? t['--ui-accent-border'] : t['--ui-border-subtle']}`,
- borderLeft: lyr.active ? `2px solid ${t['--ui-accent']}` : `1px solid ${t['--ui-border-subtle']}`,
- display: 'flex',
- alignItems: 'center',
- gap: 7,
- }}
- >
- <Eye size={11} strokeWidth={sw} color={lyr.active ? t['--ui-accent'] : t['--ui-icon-muted']} />
- <div
- style={{
- width: Math.round(thumbSize * 1.25),
- height: thumbSize,
- borderRadius: `${Math.min(3, studio.radiusSmPx)}px`,
- border: `1px solid ${t['--ui-border-default']}`,
- overflow: 'hidden',
- background: lyr.thumb === 'bg' ? '#090909' : '#141414',
- flexShrink: 0,
- display: 'flex',
- alignItems: 'center',
- justifyContent: 'center',
- }}
- >
- {lyr.thumb === 'meri' && (
- <img src={MERI_THUMB_URL} alt="" style={{ width: '100%', height: '100%', objectFit: 'cover' }} />
- )}
- {lyr.thumb === 'glaze' && (
- <div
- style={{
- width: '100%',
- height: '100%',
- background:
- 'radial-gradient(circle at 55% 42%, rgba(235,212,174,0.45), transparent 68%)',
- }}
- />
- )}
- {lyr.thumb === 'dark' && (
- <div
- style={{
- width: '100%',
- height: '100%',
- background: 'linear-gradient(135deg, #2a2118, #080706)',
- }}
- />
- )}
- </div>
- <div style={{ flex: 1, minWidth: 0 }}>
- <div
- style={{
- fontSize: 10.5,
- fontWeight: lyr.active ? 600 : 400,
- color: lyr.active ? t['--ui-text-primary'] : t['--ui-text-secondary'],
- whiteSpace: 'nowrap',
- overflow: 'hidden',
- textOverflow: 'ellipsis',
- }}
- >
- {lyr.name}
- </div>
- <div className="font-mono-ui" style={{ fontSize: 8.5, color: t['--ui-text-muted'] }}>
- {lyr.mode}
- </div>
- </div>
- {lyr.locked && <Lock size={10} color={t['--ui-icon-muted']} />}
- {studio.spec.mangaScreentone && lyr.active && (
- <span className="font-mono-ui" style={{ fontSize: 8.5, color: t['--ui-accent'], fontWeight: 700 }}>
- 60L
- </span>
- )}
- </div>
- ))}
- </div>
-
- {/* Manga Screentone / Expression Footer */}
- <div
- style={{
- borderTop: `1px solid ${t['--ui-border-subtle']}`,
- paddingTop: 5,
- display: 'flex',
- alignItems: 'center',
- justifyContent: 'space-between',
- color: t['--ui-icon-muted'],
- fontSize: 9.5,
- }}
- >
- <div style={{ display: 'flex', gap: 9, alignItems: 'center' }}>
- <Plus size={12} strokeWidth={sw} />
- <FolderPlus size={12} strokeWidth={sw} />
- <Layers size={12} strokeWidth={sw} />
- <Trash2 size={11} strokeWidth={sw} />
- </div>
- <span className="font-mono-ui" style={{ color: studio.spec.mangaScreentone ? t['--ui-accent'] : t['--ui-text-muted'] }}>
- {studio.spec.mangaScreentone ? 'Tone · 60 LPI' : 'RGB · 16-bit'}
- </span>
- </div>
- </div>
- </PanelChrome>
- );
-};
-
-export const QuickAccessPanel: React.FC<{ studio: ResolvedStudio; flex?: number }> = ({
- studio,
- flex = 1.0,
-}) => {
- const t = studio.theme.tokens;
- const sw = studio.spec.appearance.iconStrokeWidth;
- const actions = [
- { label: 'Flip H', icon: FlipHorizontal },
- { label: 'Clear', icon: Trash2 },
- { label: 'Merge', icon: Layers },
- { label: 'Save', icon: Save },
- { label: 'Undo', icon: Undo2 },
- { label: 'Redo', icon: Redo2 },
- { label: 'New Lyr', icon: Plus },
- { label: 'Reset', icon: RotateCcw },
- { label: 'Brush', icon: Paintbrush, active: true },
- { label: 'Eraser', icon: Eraser },
- { label: 'Ink Blk', swatch: '#111111' },
- { label: 'Paper', swatch: '#f3efe7' },
- ];
-
- return (
- <PanelChrome studio={studio} title="Quick Access" style={{ flex }}>
- <div
- style={{
- padding: 6,
- display: 'grid',
- gridTemplateColumns: 'repeat(3, 1fr)',
- gap: 4,
- flex: 1,
- }}
- >
- {actions.map((a) => {
- const Icon = a.icon;
- return (
- <div
- key={a.label}
- style={{
- borderRadius: `${studio.radiusSmPx}px`,
- background: a.active ? t['--ui-accent-subtle'] : t['--ui-bg-control'],
- border: `1px solid ${a.active ? t['--ui-accent-border'] : t['--ui-border-subtle']}`,
- display: 'flex',
- flexDirection: 'column',
- alignItems: 'center',
- justifyContent: 'center',
- gap: 4,
- padding: '6px 2px',
- }}
- >
- {Icon ? (
- <Icon
- size={13}
- strokeWidth={sw}
- color={a.active ? t['--ui-accent'] : t['--ui-icon-default']}
- />
- ) : (
- <div
- style={{
- width: 13,
- height: 13,
- borderRadius: 2,
- background: a.swatch,
- border: `1px solid ${t['--ui-border-strong']}`,
- }}
- />
- )}
- <span
- style={{
- fontSize: 8.5,
- color: a.active ? t['--ui-text-primary'] : t['--ui-text-secondary'],
- fontWeight: a.active ? 600 : 400,
- }}
- >
- {a.label}
- </span>
- </div>
- );
- })}
- </div>
- </PanelChrome>
- );
-};
-
-export const HistoryPanel: React.FC<{ studio: ResolvedStudio; flex?: number }> = ({
- studio,
- flex = 0.52,
-}) => {
- const t = studio.theme.tokens;
- const steps = [
- { name: 'Oil Impasto Glaze', time: '03:24:11', active: false },
- { name: 'Split Value Check', time: '03:26:48', active: false },
- { name: 'Ribbon Highlights', time: '03:27:25', active: true },
- ];
- return (
- <PanelChrome studio={studio} title="History" style={{ flex }}>
- <div style={{ padding: 6, display: 'flex', flexDirection: 'column', gap: 3 }}>
- {steps.map((s) => (
- <div
- key={s.name}
- style={{
- padding: '3px 6px',
- borderRadius: `${studio.radiusSmPx}px`,
- background: s.active ? t['--ui-accent-subtle'] : 'transparent',
- borderLeft: s.active ? `2px solid ${t['--ui-accent']}` : '2px solid transparent',
- display: 'flex',
- justifyContent: 'space-between',
- alignItems: 'center',
- fontSize: 9.5,
- }}
- >
- <span style={{ color: s.active ? t['--ui-text-primary'] : t['--ui-text-secondary'], fontWeight: s.active ? 600 : 400 }}>
- {s.name}
- </span>
- <span className="font-mono-ui" style={{ fontSize: 8.5, color: t['--ui-text-muted'] }}>
- {s.time}
- </span>
- </div>
- ))}
- </div>
- </PanelChrome>
- );
-};
-
-/** Detached Floating 3D Color Sphere Palette Window (Left-Handed Sumi & Nocturne Ochre) */
-export const FloatingSphereWindow: React.FC<{
- studio: ResolvedStudio;
- left?: number;
- right?: number;
- top?: number;
-}> = ({ studio, left = 250, right, top = 212 }) => {
- const t = studio.theme.tokens;
- const sw = studio.spec.appearance.iconStrokeWidth;
- return (
- <div
- style={{
- position: 'absolute',
- left: right === undefined ? left : undefined,
- right,
- top,
- width: 214,
- background: t['--ui-bg-floating'],
- border: `1px solid ${t['--ui-border-default']}`,
- borderRadius: `${studio.radiusLgPx}px`,
- boxShadow: t['--ui-shadow-popover'],
- overflow: 'hidden',
- zIndex: 25,
- fontFamily: studio.fontSans,
- color: t['--ui-text-primary'],
- }}
- >
- {/* Floating Header */}
- <div
- style={{
- height: 26,
- padding: '0 8px',
- background: t['--ui-bg-header'],
- borderBottom: `1px solid ${t['--ui-border-subtle']}`,
- display: 'flex',
- alignItems: 'center',
- justifyContent: 'space-between',
- fontSize: 10.5,
- fontWeight: 600,
- }}
- >
- <div style={{ display: 'flex', alignItems: 'center', gap: 5 }}>
- <span
- style={{
- width: 7,
- height: 7,
- borderRadius: '50%',
- background: t['--ui-accent'],
- }}
- />
- <span>Color Sphere</span>
- </div>
- <div style={{ display: 'flex', gap: 6, color: t['--ui-icon-muted'] }}>
- <Pin size={10} strokeWidth={sw} />
- <X size={11} strokeWidth={sw} />
- </div>
- </div>
-
- <div style={{ padding: 10, display: 'flex', flexDirection: 'column', alignItems: 'center', gap: 8 }}>
- {/* Current vs Previous Swatch Bar */}
- <div style={{ width: '100%', display: 'flex', alignItems: 'center', gap: 6 }}>
- <div
- style={{
- flex: 1,
- height: 14,
- borderRadius: 3,
- overflow: 'hidden',
- display: 'flex',
- border: `1px solid ${t['--ui-border-default']}`,
- }}
- >
- <div style={{ flex: 1, background: '#8E6D43' }} />
- <div style={{ flex: 1, background: studio.spec.activeColorHex }} />
- </div>
- <Pipette size={11} strokeWidth={sw} color={t['--ui-icon-muted']} />
- </div>
-
- {/* Real 3D Lit Sphere */}
- <Real3DSphereCanvas hex={studio.spec.activeColorHex} size={146} />
-
- {/* Lighting Slot Pills */}
- <div style={{ display: 'flex', alignItems: 'center', gap: 10, color: t['--ui-icon-muted'] }}>
- <Moon size={11} strokeWidth={sw} />
- <Droplet size={11} strokeWidth={sw} color={t['--ui-accent']} />
- <Sun size={11} strokeWidth={sw} />
- <Sparkles size={11} strokeWidth={sw} />
- </div>
-
- {/* Compact Chroma / Value / Light bars */}
- <div style={{ width: '100%', display: 'flex', flexDirection: 'column', gap: 5 }}>
- <ScrubOrTrackSlider studio={studio} label="Chroma" valueText="44%" percent={44} compact />
- <ScrubOrTrackSlider studio={studio} label="Value" valueText="78%" percent={78} compact />
- <ScrubOrTrackSlider studio={studio} label="Light" valueText="100%" percent={84} compact />
- </div>
-
- <div
- className="font-mono-ui"
- style={{
- width: '100%',
- display: 'flex',
- justifyContent: 'space-between',
- fontSize: 9.5,
- color: t['--ui-text-muted'],
- paddingTop: 3,
- borderTop: `1px solid ${t['--ui-border-subtle']}`,
- }}
- >
- <span style={{ color: t['--ui-text-primary'], fontWeight: 600 }}>
- {studio.spec.activeColorHex.toUpperCase()}
- </span>
- <span>217, 162, 85</span>
- </div>
- </div>
- </div>
- );
-};
-
-/** Detached Floating Quick Brush Favorites Strip */
-export const FloatingQuickFavoritesWindow: React.FC<{
- studio: ResolvedStudio;
- right?: number;
- top?: number;
-}> = ({ studio, right = 266, top = 264 }) => {
- const t = studio.theme.tokens;
- const favs = [
- { name: 'Impasto Oil', tag: 'OIL', active: true, color: '#d9a255' },
- { name: 'Dry Bristle', tag: 'TEX', active: false, color: '#a88356' },
- { name: '2B Graphite', tag: 'SKT', active: false, color: '#8f8980' },
- { name: 'Soft Glaze', tag: 'BLD', active: false, color: '#7bb583' },
- { name: 'G-Pen Ink', tag: 'INK', active: false, color: '#e47261' },
- { name: 'Filbert Rake', tag: 'OIL', active: false, color: '#d9a255' },
- ];
-
- return (
- <div
- style={{
- position: 'absolute',
- right,
- top,
- width: 186,
- background: t['--ui-bg-floating'],
- border: `1px solid ${t['--ui-border-default']}`,
- borderRadius: `${studio.radiusLgPx}px`,
- boxShadow: t['--ui-shadow-popover'],
- overflow: 'hidden',
- zIndex: 24,
- fontFamily: studio.fontSans,
- }}
- >
- <div
- style={{
- height: 24,
- padding: '0 8px',
- background: t['--ui-bg-header'],
- borderBottom: `1px solid ${t['--ui-border-subtle']}`,
- display: 'flex',
- alignItems: 'center',
- justifyContent: 'space-between',
- fontSize: 10,
- fontWeight: 600,
- color: t['--ui-text-secondary'],
- }}
- >
- <span>Quick Favorites</span>
- <span className="font-mono-ui" style={{ fontSize: 9, color: t['--ui-accent'] }}>
- 6 PINNED
- </span>
- </div>
- <div style={{ padding: 6, display: 'flex', flexDirection: 'column', gap: 4 }}>
- {favs.map((f) => (
- <div
- key={f.name}
- style={{
- height: 28,
- padding: '0 7px',
- borderRadius: `${studio.radiusSmPx}px`,
- background: f.active ? t['--ui-accent-subtle'] : t['--ui-bg-control'],
- border: `1px solid ${f.active ? t['--ui-accent-border'] : t['--ui-border-subtle']}`,
- display: 'flex',
- alignItems: 'center',
- justifyContent: 'space-between',
- gap: 6,
- }}
- >
- <div style={{ display: 'flex', alignItems: 'center', gap: 6 }}>
- <div style={{ width: 3, height: 14, borderRadius: 2, background: f.color }} />
- <span
- style={{
- fontSize: 10.5,
- fontWeight: f.active ? 600 : 400,
- color: f.active ? t['--ui-text-primary'] : t['--ui-text-secondary'],
- }}
- >
- {f.name}
- </span>
- </div>
- <span className="font-mono-ui" style={{ fontSize: 8.5, color: t['--ui-text-muted'] }}>
- {f.tag}
- </span>
- </div>
- ))}
- </div>
- </div>
- );
-};
-
-/** Detached Floating SubView Reference Window (Act 4 #07 Smoked Atelier) */
-export const FloatingSubViewWindow: React.FC<{ studio: ResolvedStudio }> = ({ studio }) => {
- const t = studio.theme.tokens;
- return (
- <div
- style={{
- position: 'absolute',
- left: 112,
- top: 230,
- width: 248,
- background: t['--ui-bg-floating'],
- border: `1px solid ${t['--ui-border-default']}`,
- borderRadius: `${studio.radiusLgPx}px`,
- boxShadow: t['--ui-shadow-popover'],
- overflow: 'hidden',
- zIndex: 25,
- fontFamily: studio.fontSans,
- }}
- >
- <div
- style={{
- height: 26,
- padding: '0 9px',
- background: t['--ui-bg-header'],
- borderBottom: `1px solid ${t['--ui-border-subtle']}`,
- display: 'flex',
- alignItems: 'center',
- justifyContent: 'space-between',
- fontSize: 10.5,
- fontWeight: 600,
- color: t['--ui-text-primary'],
- }}
- >
- <span>SubView · Value Reference</span>
- <X size={11} color={t['--ui-icon-muted']} />
- </div>
- <div style={{ padding: 8, display: 'flex', flexDirection: 'column', gap: 6 }}>
- <div
- style={{
- height: 204,
- borderRadius: `${studio.radiusSmPx}px`,
- overflow: 'hidden',
- border: `1px solid ${t['--ui-border-default']}`,
- background: '#050505',
- position: 'relative',
- }}
- >
- <img
- src={MERI_THUMB_URL}
- alt=""
- style={{
- width: '100%',
- height: '100%',
- objectFit: 'cover',
- transform: 'scale(1.38)',
- filter: 'grayscale(1) contrast(1.12)',
- }}
- />
- <span
- className="font-mono-ui"
- style={{
- position: 'absolute',
- bottom: 6,
- right: 6,
- padding: '2px 5px',
- background: 'rgba(10,10,14,0.8)',
- color: t['--ui-accent'],
- fontSize: 8.5,
- borderRadius: 3,
- }}
- >
- VALUE LOCK · 140%
- </span>
- </div>
- <div style={{ display: 'flex', justifyContent: 'space-between', fontSize: 9.5, color: t['--ui-text-muted'] }}>
- <span>Eyedropper Auto</span>
- <span className="font-mono-ui">1 / 3 Refs</span>
- </div>
- </div>
- </div>
- );
-};
-
-/** Detached Floating Color Card (Act 4 #07 Smoked Atelier) */
-export const FloatingColorWindow: React.FC<{ studio: ResolvedStudio }> = ({ studio }) => {
- const t = studio.theme.tokens;
- return (
- <div
- style={{
- position: 'absolute',
- right: 112,
- top: 230,
- width: 232,
- background: t['--ui-bg-floating'],
- border: `1px solid ${t['--ui-border-default']}`,
- borderRadius: `${studio.radiusLgPx}px`,
- boxShadow: t['--ui-shadow-popover'],
- overflow: 'hidden',
- zIndex: 25,
- fontFamily: studio.fontSans,
- }}
- >
- <div
- style={{
- height: 26,
- padding: '0 9px',
- background: t['--ui-bg-header'],
- borderBottom: `1px solid ${t['--ui-border-subtle']}`,
- display: 'flex',
- alignItems: 'center',
- justifyContent: 'space-between',
- fontSize: 10.5,
- fontWeight: 600,
- color: t['--ui-text-primary'],
- }}
- >
- <span>Color Palette · Floating</span>
- <X size={11} color={t['--ui-icon-muted']} />
- </div>
- <div style={{ padding: 12, display: 'flex', flexDirection: 'column', alignItems: 'center', gap: 10 }}>
- <ColorWheelWidget studio={studio} size={162} />
- <div style={{ width: '100%', display: 'flex', gap: 4 }}>
- {['#B88ED1', '#D9A255', '#E47261', '#7BB583', '#5EA1DF', '#EDE6D9'].map((hex) => (
- <div
- key={hex}
- style={{
- flex: 1,
- height: 16,
- borderRadius: 3,
- background: hex,
- border: `1px solid ${t['--ui-border-default']}`,
- }}
- />
- ))}
- </div>
- </div>
- </div>
- );
-};
-
-/** Horizontal Bottom Dock: Color Swatch Sets + Layer / Animation Timeline Strip */
-export const BottomDockStrip: React.FC<{ studio: ResolvedStudio; height?: number }> = ({
- studio,
- height = 122,
-}) => {
- const t = studio.theme.tokens;
- const swatchSets = [
- '#151311', '#2B2219', '#4A3625', '#6E4C31', '#956940', '#BA8B57', '#D9B17B', '#EDE0C7',
- '#3B1E1B', '#6A2D25', '#964336', '#BA624F', '#C78A75', '#444A34', '#6E744F', '#9CA17A',
- '#1A222B', '#2F465E', '#4F7191', '#7A9BB8', '#B8C8D4', '#262328', '#524B59', '#998AA3',
- ];
-
- const tracks = [
- { name: 'Ribbon Highlights', cells: [1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0] },
- { name: 'meri_portrait', cells: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], active: true },
- { name: 'Oil Underpaint', cells: [1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0] },
- ];
-
- return (
- <div
- style={{
- height,
- display: 'flex',
- gap: studio.panelGapPx,
- flexShrink: 0,
- }}
- >
- {/* Left Cell: Curated Color Swatch Sets */}
- <PanelChrome
- studio={studio}
- tabs={[
- { label: 'Color Sets', active: true },
- { label: 'Oil Earths', active: false },
- { label: 'History', active: false },
- ]}
- style={{ flex: 0.44 }}
- >
- <div
- style={{
- padding: 8,
- display: 'grid',
- gridTemplateColumns: 'repeat(12, 1fr)',
- gap: 4,
- flex: 1,
- alignContent: 'center',
- }}
- >
- {swatchSets.map((hex, i) => (
- <div
- key={hex}
- style={{
- height: 24,
- borderRadius: `${studio.radiusSmPx}px`,
- background: hex,
- border:
- i === 6
- ? `2px solid ${t['--ui-accent']}`
- : `1px solid ${t['--ui-border-default']}`,
- boxShadow: i === 6 ? `0 0 0 1px ${t['--ui-bg-panel']}` : 'none',
- }}
- />
- ))}
- </div>
- </PanelChrome>
-
- {/* Right Cell: Animation & Layer Timeline Strip */}
- <PanelChrome
- studio={studio}
- tabs={[
- { label: 'Timeline · 24fps', active: true },
- { label: 'Cel Exposure', active: false },
- ]}
- rightSlot={
- <span className="font-mono-ui" style={{ fontSize: 9.5, color: t['--ui-accent'], fontWeight: 600 }}>
- F 012 / 024
- </span>
- }
- style={{ flex: 0.56 }}
- >
- <div style={{ padding: '5px 8px', display: 'flex', flexDirection: 'column', gap: 4, flex: 1 }}>
- {/* Ruler */}
- <div style={{ display: 'flex', alignItems: 'center', gap: 8 }}>
- <div style={{ width: 112, fontSize: 9, color: t['--ui-text-muted'] }}>TRACK</div>
- <div
- className="font-mono-ui"
- style={{
- flex: 1,
- display: 'grid',
- gridTemplateColumns: 'repeat(12, 1fr)',
- fontSize: 8.5,
- color: t['--ui-text-muted'],
- }}
- >
- {['01', '03', '05', '07', '09', '11', '13', '15', '17', '19', '21', '23'].map((f, idx) => (
- <span
- key={f}
- style={{
- color: idx === 5 ? t['--ui-accent'] : t['--ui-text-muted'],
- fontWeight: idx === 5 ? 700 : 400,
- }}
- >
- {f}
- </span>
- ))}
- </div>
- </div>
-
- {/* Tracks */}
- <div style={{ position: 'relative', display: 'flex', flexDirection: 'column', gap: 3, flex: 1 }}>
- {tracks.map((tr) => (
- <div key={tr.name} style={{ display: 'flex', alignItems: 'center', gap: 8, flex: 1 }}>
- <div
- style={{
- width: 112,
- fontSize: 10,
- fontWeight: tr.active ? 600 : 400,
- color: tr.active ? t['--ui-text-primary'] : t['--ui-text-secondary'],
- whiteSpace: 'nowrap',
- overflow: 'hidden',
- textOverflow: 'ellipsis',
- }}
- >
- {tr.name}
- </div>
- <div
- style={{
- flex: 1,
- display: 'grid',
- gridTemplateColumns: 'repeat(12, 1fr)',
- gap: 2,
- height: 16,
- }}
- >
- {tr.cells.map((filled, idx) => (
- <div
- key={idx}
- style={{
- borderRadius: `${Math.min(3, studio.radiusSmPx)}px`,
- background: filled
- ? tr.active
- ? t['--ui-accent-subtle']
- : t['--ui-bg-control']
- : t['--ui-bg-input'],
- border: `1px solid ${filled && tr.active ? t['--ui-accent-border'] : t['--ui-border-subtle']}`,
- }}
- />
- ))}
- </div>
- </div>
- ))}
- {/* Vertical Playhead */}
- <div
- style={{
- position: 'absolute',
- top: -2,
- bottom: 0,
- left: 'calc(120px + (100% - 120px) * 0.458)',
- width: 1.5,
- background: t['--ui-accent'],
- pointerEvents: 'none',
- }}
- />
- </div>
- </div>
- </PanelChrome>
- </div>
- );
-};
-
-/** Focus Mode: Atelier HUD (Act 2 #01 & Act 4 #04) — Zero sidebars, zero header, pure floating micro-HUDs */
-export const FocusHudOverlay: React.FC<{
- studio: ResolvedStudio;
- enterProgress: number; // 0 = retracted off-edges, 1 = settled
-}> = ({ studio, enterProgress }) => {
- const t = studio.theme.tokens;
- const sw = studio.spec.appearance.iconStrokeWidth;
- const inv = 1 - enterProgress;
-
- return (
- <div style={{ position: 'absolute', inset: 0, pointerEvents: 'none', zIndex: 30, fontFamily: studio.fontSans }}>
- {/* Top-Right Exit Focus Chip + Floating Color Wheel Card */}
- <div
- style={{
- position: 'absolute',
- top: 22,
- right: 22,
- display: 'flex',
- flexDirection: 'column',
- alignItems: 'flex-end',
- gap: 8,
- transform: `translate3d(${inv * 64}px, ${-inv * 20}px, 0)`,
- opacity: enterProgress,
- }}
- >
- <div
- style={{
- padding: '5px 11px',
- borderRadius: 99,
- background: t['--ui-bg-floating'],
- border: `1px solid ${t['--ui-border-default']}`,
- color: t['--ui-text-secondary'],
- fontSize: 10.5,
- display: 'flex',
- alignItems: 'center',
- gap: 6,
- boxShadow: t['--ui-shadow-floating'],
- }}
- >
- <Eye size={12} strokeWidth={sw} color={t['--ui-accent']} />
- <span style={{ color: t['--ui-text-primary'], fontWeight: 500 }}>Exit Focus</span>
- <span className="font-mono-ui" style={{ fontSize: 9.5, color: t['--ui-text-muted'] }}>
- (Tab)
- </span>
- </div>
-
- <div
- style={{
- width: 222,
- background: t['--ui-bg-floating'],
- border: `1px solid ${t['--ui-border-default']}`,
- borderRadius: `${studio.radiusLgPx}px`,
- boxShadow: t['--ui-shadow-popover'],
- overflow: 'hidden',
- }}
- >
- <div
- style={{
- height: 26,
- padding: '0 9px',
- borderBottom: `1px solid ${t['--ui-border-subtle']}`,
- display: 'flex',
- alignItems: 'center',
- justifyContent: 'space-between',
- fontSize: 10.5,
- }}
- >
- <div style={{ display: 'flex', alignItems: 'center', gap: 6 }}>
- <div
- style={{
- width: 11,
- height: 11,
- borderRadius: 3,
- background: studio.spec.activeColorHex,
- border: `1px solid ${t['--ui-border-strong']}`,
- }}
- />
- <span className="font-mono-ui" style={{ color: t['--ui-text-primary'], fontWeight: 600 }}>
- {studio.spec.activeColorHex.toUpperCase()}
- </span>
- </div>
- <X size={11} color={t['--ui-icon-muted']} />
- </div>
- <div style={{ padding: 12, display: 'flex', flexDirection: 'column', alignItems: 'center', gap: 10 }}>
- <ColorWheelWidget studio={studio} size={166} />
- <div style={{ width: '100%', display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
- <div style={{ display: 'flex', gap: 4 }}>
- <div style={{ width: 15, height: 15, borderRadius: 3, background: studio.spec.activeColorHex }} />
- <div style={{ width: 15, height: 15, borderRadius: 3, background: '#f4f0e8' }} />
- </div>
- <div style={{ display: 'flex', gap: 4 }}>
- {['#D9A255', '#8C593B', '#5EA1DF', '#E47261', '#7BB583'].map((hex) => (
- <div key={hex} style={{ width: 12, height: 12, borderRadius: 3, background: hex }} />
- ))}
- </div>
- </div>
- </div>
- </div>
- </div>
-
- {/* Optional Floating 3D Color Sphere (Act 4 #04 Nocturne Ochre) */}
- {studio.spec.showFloatingSphere && (
- <div
- style={{
- position: 'absolute',
- left: 22,
- top: 22,
- transform: `translate3d(${-inv * 64}px, ${-inv * 20}px, 0)`,
- opacity: enterProgress,
- }}
- >
- <FloatingSphereWindow studio={studio} left={0} top={0} />
- </div>
- )}
-
- {/* Bottom-Left Compact Brush Sliders HUD */}
- <div
- style={{
- position: 'absolute',
- left: 22,
- bottom: 22,
- width: 224,
- background: t['--ui-bg-floating'],
- border: `1px solid ${t['--ui-border-default']}`,
- borderRadius: `${studio.radiusLgPx}px`,
- boxShadow: t['--ui-shadow-popover'],
- overflow: 'hidden',
- transform: `translate3d(${-inv * 64}px, ${inv * 28}px, 0)`,
- opacity: enterProgress,
- }}
- >
- <div
- style={{
- height: 26,
- padding: '0 9px',
- borderBottom: `1px solid ${t['--ui-border-subtle']}`,
- display: 'flex',
- alignItems: 'center',
- justifyContent: 'space-between',
- fontSize: 10.5,
- fontWeight: 600,
- color: t['--ui-text-secondary'],
- }}
- >
- <span>Loaded Impasto Oil</span>
- <ChevronDown size={11} color={t['--ui-icon-muted']} />
- </div>
- <div style={{ padding: 9, display: 'flex', flexDirection: 'column', gap: 6 }}>
- <ScrubOrTrackSlider studio={studio} label="Size" valueText="42px" percent={56} compact />
- <ScrubOrTrackSlider studio={studio} label="Opacity" valueText="100%" percent={100} checker compact />
- <ScrubOrTrackSlider studio={studio} label="Flow / Ink" valueText="96%" percent={96} compact />
- <div style={{ display: 'grid', gridTemplateColumns: 'repeat(4, 1fr)', gap: 4, marginTop: 2 }}>
- {[
- { icon: Undo2, active: false },
- { icon: Redo2, active: false },
- { icon: Paintbrush, active: true },
- { icon: Eraser, active: false },
- ].map((b, idx) => {
- const Icon = b.icon;
- return (
- <div
- key={idx}
- style={{
- height: 26,
- borderRadius: `${studio.radiusSmPx}px`,
- background: b.active ? t['--ui-accent-subtle'] : t['--ui-bg-control'],
- border: `1px solid ${b.active ? t['--ui-accent-border'] : t['--ui-border-subtle']}`,
- display: 'flex',
- alignItems: 'center',
- justifyContent: 'center',
- color: b.active ? t['--ui-accent'] : t['--ui-icon-default'],
- }}
- >
- <Icon size={13} strokeWidth={sw} />
- </div>
- );
- })}
- </div>
- </div>
- </div>
-
- {/* Bottom-Center Quick Action Dock Pill */}
- <div
- style={{
- position: 'absolute',
- left: '50%',
- bottom: 22,
- transform: `translate3d(-50%, ${inv * 46}px, 0)`,
- opacity: enterProgress,
- height: 38,
- padding: '0 12px',
- borderRadius: 99,
- background: t['--ui-bg-floating'],
- border: `1px solid ${t['--ui-border-default']}`,
- boxShadow: t['--ui-shadow-popover'],
- display: 'flex',
- alignItems: 'center',
- gap: 11,
- color: t['--ui-icon-default'],
- }}
- >
- <Pipette size={14} strokeWidth={sw} />
- <SquareDashed size={14} strokeWidth={sw} />
- <FlipHorizontal size={14} strokeWidth={sw} />
- <Contrast size={14} strokeWidth={sw} color={t['--ui-accent']} />
- <Plus size={14} strokeWidth={sw} />
- <RotateCcw size={13} strokeWidth={sw} />
- <Maximize2 size={13} strokeWidth={sw} />
- </div>
- </div>
- );
-};
-
-/** Authentic Appearance Studio Drawer for Act 3 Live Engine Beat */
-export const AppearanceStudioDrawerPanel: React.FC<{
- studio: ResolvedStudio;
- activeTab: 'surface' | 'chrome';
- warmth: number;
- chromeStyle: ChromeStyle;
- cornerRadius: CornerRadiusPreset;
- activeAccent: BuiltInAccentPigmentId;
-}> = ({ studio, activeTab, warmth, chromeStyle, cornerRadius, activeAccent }) => {
- const t = studio.theme.tokens;
- const sw = studio.spec.appearance.iconStrokeWidth;
- const warmthPct = ((warmth + 100) / 200) * 100;
- const warmthLabel =
- warmth < -12 ? `Cool ${Math.round(warmth)}` : warmth > 12 ? `Warm +${Math.round(warmth)}` : 'Neutral 0';
- const contrastRatio = studio.theme.contrast.primaryOnPanel.toFixed(1);
-
- const presetNames: Record<BuiltInLookPresetId, string> = {
- 'graphite-atelier': 'Graphite Atelier',
- 'obsidian-oled': 'Obsidian OLED',
- 'studio-neutral-18': 'Studio Neutral 18%',
- 'warm-paper-light': 'Warm Paper Light',
- 'daylight-crisp': 'Daylight Crisp',
- 'sumi-sepia': 'Sumi Sepia',
- };
-
- return (
- <aside
- style={{
- width: 344,
- height: '100%',
- background: t['--ui-bg-panel'],
- borderLeft: `1px solid ${t['--ui-border-default']}`,
- borderRadius: studio.spec.appearance.chromeStyle === 'islands' ? `${studio.radiusLgPx}px` : 0,
- boxShadow: studio.isDark ? '-10px 0 32px rgba(0,0,0,0.42)' : '-8px 0 24px rgba(0,0,0,0.12)',
- display: 'flex',
- flexDirection: 'column',
- fontFamily: studio.fontSans,
- color: t['--ui-text-primary'],
- overflow: 'hidden',
- flexShrink: 0,
- }}
- >
- {/* Header */}
- <div
- style={{
- height: 38,
- padding: '0 12px',
- background: t['--ui-bg-header'],
- borderBottom: `1px solid ${t['--ui-border-subtle']}`,
- display: 'flex',
- alignItems: 'center',
- justifyContent: 'space-between',
- }}
- >
- <div style={{ display: 'flex', alignItems: 'center', gap: 7, fontSize: 12, fontWeight: 600 }}>
- <Palette size={14} strokeWidth={sw} color={t['--ui-accent']} />
- <span>Appearance Studio</span>
- </div>
- <div style={{ display: 'flex', alignItems: 'center', gap: 8 }}>
- <span
- style={{
- padding: '3px 8px',
- borderRadius: `${studio.radiusSmPx}px`,
- background: t['--ui-bg-control'],
- border: `1px solid ${t['--ui-border-default']}`,
- fontSize: 10,
- color: t['--ui-text-secondary'],
- display: 'flex',
- alignItems: 'center',
- gap: 4,
- }}
- >
- <Eye size={11} />
- Compare
- </span>
- <X size={13} color={t['--ui-icon-muted']} />
- </div>
- </div>
-
- {/* 2x3 Curated Look Preset Miniatures */}
- <div style={{ padding: '12px 12px 10px', display: 'flex', flexDirection: 'column', gap: 10 }}>
- <div style={{ display: 'grid', gridTemplateColumns: 'repeat(3, 1fr)', gap: 6 }}>
- {BUILT_IN_LOOK_PRESET_IDS.map((pid) => {
- const preview = resolveAppearanceTokens(createAppearanceFromPreset(pid, { accent: activeAccent }));
- const active = warmth > 36 ? pid === 'sumi-sepia' : pid === 'graphite-atelier';
- return (
- <div
- key={pid}
- style={{
- borderRadius: `${studio.radiusMdPx}px`,
- border: `1px solid ${active ? t['--ui-accent'] : t['--ui-border-default']}`,
- background: t['--ui-bg-input'],
- padding: 4,
- display: 'flex',
- flexDirection: 'column',
- gap: 4,
- }}
- >
- <div
- style={{
- height: 30,
- borderRadius: `${Math.max(1, studio.radiusSmPx - 1)}px`,
- background: preview.tokens['--ui-canvas-matte'],
- border: `1px solid ${preview.tokens['--ui-border-default']}`,
- display: 'flex',
- overflow: 'hidden',
- }}
- >
- <div style={{ width: 12, background: preview.tokens['--ui-bg-panel'], borderRight: `1px solid ${preview.tokens['--ui-border-subtle']}` }} />
- <div style={{ flex: 1, display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
- <div style={{ width: 18, height: 13, background: '#111111', border: `1px solid ${preview.tokens['--ui-accent']}` }} />
- </div>
- <div style={{ width: 14, background: preview.tokens['--ui-bg-panel'], borderLeft: `1px solid ${preview.tokens['--ui-border-subtle']}` }} />
- </div>
- <div
- style={{
- fontSize: 8.8,
- color: active ? t['--ui-text-primary'] : t['--ui-text-secondary'],
- fontWeight: active ? 600 : 400,
- whiteSpace: 'nowrap',
- overflow: 'hidden',
- textOverflow: 'ellipsis',
- display: 'flex',
- alignItems: 'center',
- justifyContent: 'space-between',
- }}
- >
- <span>{presetNames[pid]}</span>
- {active && <Check size={9} color={t['--ui-accent']} />}
- </div>
- </div>
- );
- })}
- </div>
-
- {/* Mix / Undo / Reset */}
- <div style={{ display: 'grid', gridTemplateColumns: 'repeat(3, 1fr)', gap: 6 }}>
- {[
- { label: 'Mix', icon: Shuffle },
- { label: 'Undo', icon: Undo2 },
- { label: 'Reset', icon: RotateCcw },
- ].map((btn) => {
- const Icon = btn.icon;
- return (
- <div
- key={btn.label}
- style={{
- height: 26,
- borderRadius: `${studio.radiusSmPx}px`,
- background: t['--ui-bg-control'],
- border: `1px solid ${t['--ui-border-subtle']}`,
- display: 'flex',
- alignItems: 'center',
- justifyContent: 'center',
- gap: 5,
- fontSize: 10.5,
- color: t['--ui-text-secondary'],
- }}
- >
- <Icon size={11} strokeWidth={sw} />
- <span>{btn.label}</span>
- </div>
- );
- })}
- </div>
- </div>
-
- {/* Axis Hairline Tabs */}
- <div
- style={{
- display: 'flex',
- padding: '0 12px',
- gap: 14,
- borderBottom: `1px solid ${t['--ui-border-default']}`,
- fontSize: 11,
- }}
- >
- {[
- { id: 'surface', label: 'Surface' },
- { id: 'chrome', label: 'Chrome' },
- { id: 'density', label: 'Density' },
- { id: 'controls', label: 'Controls' },
- { id: 'workspace', label: 'Workspace' },
- ].map((tab) => {
- const isAct = tab.id === activeTab;
- return (
- <div
- key={tab.id}
- style={{
- paddingBottom: 7,
- fontWeight: isAct ? 600 : 400,
- color: isAct ? t['--ui-text-primary'] : t['--ui-text-muted'],
- borderBottom: isAct ? `2px solid ${t['--ui-accent']}` : '2px solid transparent',
- }}
- >
- {tab.label}
- </div>
- );
- })}
- </div>
-
- {/* Live Engine Controls */}
- <div style={{ padding: 14, display: 'flex', flexDirection: 'column', gap: 14, flex: 1 }}>
- {/* Surface Dials */}
- <div style={{ display: 'flex', flexDirection: 'column', gap: 8 }}>
- <ScrubOrTrackSlider studio={studio} label="Surface Brightness" valueText="0" percent={50} />
- <ScrubOrTrackSlider studio={studio} label="Contrast & Seams" valueText="104%" percent={58} />
- <div>
- <ScrubOrTrackSlider
- studio={studio}
- label="Surface Warmth"
- valueText={warmthLabel}
- percent={warmthPct}
- />
- <div
- className="font-mono-ui"
- style={{
- marginTop: 4,
- display: 'flex',
- justifyContent: 'space-between',
- fontSize: 9.5,
- color: t['--ui-text-muted'],
- }}
- >
- <span>Cool Slate -45</span>
- <span style={{ color: t['--ui-accent'], fontWeight: 600 }}>OKLCH LIVE</span>
- <span>Warm Sumi +60</span>
- </div>
- </div>
- </div>
-
- {/* Chrome & Corner Geometry Live Controls */}
- <div
- style={{
- padding: 10,
- borderRadius: `${studio.radiusMdPx}px`,
- background: t['--ui-bg-input'],
- border: `1px solid ${activeTab === 'chrome' ? t['--ui-accent-border'] : t['--ui-border-subtle']}`,
- display: 'flex',
- flexDirection: 'column',
- gap: 10,
- }}
- >
- <div>
- <div
- style={{
- display: 'flex',
- justifyContent: 'space-between',
- fontSize: 10.5,
- color: t['--ui-text-secondary'],
- marginBottom: 5,
- }}
- >
- <span>Chrome Architecture</span>
- <span className="font-mono-ui" style={{ fontSize: 9.5, color: t['--ui-accent'] }}>
- {chromeStyle.toUpperCase()} · {Math.round(studio.panelGapPx)}px gap
- </span>
- </div>
- <div
- style={{
- display: 'grid',
- gridTemplateColumns: 'repeat(3, 1fr)',
- gap: 3,
- padding: 2,
- background: t['--ui-bg-void'],
- borderRadius: `${studio.radiusSmPx}px`,
- }}
- >
- {(['flat', 'hairline', 'islands'] as const).map((cs) => {
- const act = cs === chromeStyle;
- return (
- <div
- key={cs}
- style={{
- height: 24,
- borderRadius: `${Math.max(1, studio.radiusSmPx - 1)}px`,
- background: act ? t['--ui-accent-subtle'] : 'transparent',
- border: act ? `1px solid ${t['--ui-accent-border']}` : '1px solid transparent',
- color: act ? t['--ui-text-primary'] : t['--ui-text-muted'],
- fontSize: 10.5,
- fontWeight: act ? 600 : 400,
- display: 'flex',
- alignItems: 'center',
- justifyContent: 'center',
- textTransform: 'capitalize',
- }}
- >
- {cs}
- </div>
- );
- })}
- </div>
- </div>
-
- <div>
- <div
- style={{
- display: 'flex',
- justifyContent: 'space-between',
- fontSize: 10.5,
- color: t['--ui-text-secondary'],
- marginBottom: 5,
- }}
- >
- <span>Corner Geometry</span>
- <span className="font-mono-ui" style={{ fontSize: 9.5, color: t['--ui-accent'] }}>
- {cornerRadius.toUpperCase()} · {Math.round(studio.radiusLgPx)}px
- </span>
- </div>
- <div
- style={{
- display: 'grid',
- gridTemplateColumns: 'repeat(3, 1fr)',
- gap: 3,
- padding: 2,
- background: t['--ui-bg-void'],
- borderRadius: `${studio.radiusSmPx}px`,
- }}
- >
- {(['sharp', 'machined', 'soft'] as const).map((cr) => {
- const act = cr === cornerRadius;
- return (
- <div
- key={cr}
- style={{
- height: 24,
- borderRadius: `${Math.max(1, studio.radiusSmPx - 1)}px`,
- background: act ? t['--ui-accent-subtle'] : 'transparent',
- border: act ? `1px solid ${t['--ui-accent-border']}` : '1px solid transparent',
- color: act ? t['--ui-text-primary'] : t['--ui-text-muted'],
- fontSize: 10.5,
- fontWeight: act ? 600 : 400,
- display: 'flex',
- alignItems: 'center',
- justifyContent: 'center',
- textTransform: 'capitalize',
- }}
- >
- {cr}
- </div>
- );
- })}
- </div>
- </div>
- </div>
-
- {/* Mineral Accent Pigments */}
- <div>
- <div
- style={{
- display: 'flex',
- justifyContent: 'space-between',
- fontSize: 10.5,
- marginBottom: 7,
- }}
- >
- <span style={{ color: t['--ui-text-secondary'] }}>Accent Pigment</span>
- <span style={{ color: t['--ui-text-primary'], fontWeight: 600 }}>
- {ACCENT_PIGMENTS[activeAccent].label}
- </span>
- </div>
- <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: 6 }}>
- {BUILT_IN_ACCENT_PIGMENT_IDS.map((pid) => {
- const p = ACCENT_PIGMENTS[pid];
- const hex = oklchToHex(p.dark.l, p.dark.c, p.dark.h);
- const act = pid === activeAccent;
- return (
- <div
- key={pid}
- style={{
- flex: 1,
- height: 32,
- borderRadius: `${studio.radiusSmPx}px`,
- background: act ? t['--ui-accent-subtle'] : t['--ui-bg-input'],
- border: `1.5px solid ${act ? t['--ui-accent'] : t['--ui-border-subtle']}`,
- display: 'flex',
- alignItems: 'center',
- justifyContent: 'center',
- }}
- >
- <div
- style={{
- width: 14,
- height: 14,
- borderRadius: '50%',
- background: hex,
- boxShadow: act ? `0 0 0 2px ${t['--ui-bg-panel']}, 0 0 0 3.5px ${hex}` : 'none',
- }}
- />
- </div>
- );
- })}
- </div>
- </div>
-
- {/* Canvas Surround (Matte) */}
- <div>
- <div
- style={{
- display: 'flex',
- justifyContent: 'space-between',
- fontSize: 10.5,
- marginBottom: 6,
- }}
- >
- <span style={{ color: t['--ui-text-secondary'] }}>Canvas Surround (Matte)</span>
- <span className="font-mono-ui" style={{ fontSize: 10, color: t['--ui-text-muted'] }}>
- {t['--ui-canvas-matte']}
- </span>
- </div>
- <div style={{ display: 'grid', gridTemplateColumns: 'repeat(5, 1fr)', gap: 3 }}>
- {['Linked', 'Dark', 'Mid 18%', 'Light', 'Custom'].map((lbl, idx) => (
- <div
- key={lbl}
- style={{
- height: 24,
- borderRadius: `${studio.radiusSmPx}px`,
- background: idx === 0 ? t['--ui-bg-control-active'] : t['--ui-bg-input'],
- border: `1px solid ${idx === 0 ? t['--ui-border-strong'] : t['--ui-border-subtle']}`,
- color: idx === 0 ? t['--ui-text-primary'] : t['--ui-text-muted'],
- fontSize: 9.5,
- display: 'flex',
- alignItems: 'center',
- justifyContent: 'center',
- }}
- >
- {lbl}
- </div>
- ))}
- </div>
- </div>
- </div>
-
- {/* Bottom Live WCAG Contrast Audit Bar */}
- <div
- style={{
- height: 32,
- padding: '0 12px',
- borderTop: `1px solid ${t['--ui-border-subtle']}`,
- background: t['--ui-bg-header'],
- display: 'flex',
- alignItems: 'center',
- justifyContent: 'space-between',
- fontSize: 10,
- }}
- >
- <span style={{ color: t['--ui-text-muted'] }}>OKLCH · .inktheme / .inkworkspace</span>
- <span
- className="font-mono-ui"
- style={{
- color: t['--ui-success'],
- fontWeight: 700,
- letterSpacing: '0.03em',
- }}
- >
- WCAG {contrastRatio}:1 AAA
- </span>
- </div>
- </aside>
- );
-};
diff --git a/promo/src/components/CorePanels.tsx b/promo/src/components/CorePanels.tsx
deleted file mode 100644
index 4e74d16..0000000
--- a/promo/src/components/CorePanels.tsx
+++ /dev/null
@@ -1,1355 +0,0 @@
-import React from 'react';
-import {
- Blend,
- Box,
- ChevronDown,
- ChevronRight,
- Columns2,
- Contrast,
- Droplet,
- Eraser,
- FlipHorizontal,
- FlipVertical,
- FolderPlus,
- Grid3x3,
- Hand,
- History,
- Lasso,
- Layers,
- Maximize2,
- MessageSquare,
- Minus,
- Move,
- PaintBucket,
- Paintbrush,
- Palette,
- PenTool,
- Pipette,
- Plus,
- Redo2,
- RotateCcw,
- Save,
- Settings,
- Shapes,
- SlidersHorizontal,
- Sparkles,
- Square,
- SquareDashed,
- Star,
- Trash2,
- Type,
- Undo2,
- Users,
- X,
- ZoomIn,
-} from 'lucide-react';
-import { ResolvedStudio } from '../studioConfigs';
-
-export const PanelChrome: React.FC<{
- studio: ResolvedStudio;
- title?: string;
- tabs?: Array<{ label: string; active?: boolean; icon?: React.ReactNode }>;
- rightSlot?: React.ReactNode;
- style?: React.CSSProperties;
- children: React.ReactNode;
-}> = ({ studio, title, tabs, rightSlot, style, children }) => {
- const t = studio.theme.tokens;
- const chrome = studio.spec.appearance.chromeStyle;
- const isIslands = chrome === 'islands';
- const isFlat = chrome === 'flat';
-
- return (
- <div
- style={{
- background: t['--ui-bg-panel'],
- border: isFlat
- ? `1px solid ${t['--ui-border-subtle']}`
- : `1px solid ${t['--ui-border-default']}`,
- borderRadius: isIslands ? `${studio.radiusLgPx}px` : `${studio.radiusSmPx}px`,
- boxShadow: isIslands
- ? studio.isDark
- ? '0 4px 16px rgba(0,0,0,0.34)'
- : '0 3px 12px rgba(20,18,16,0.08)'
- : 'none',
- display: 'flex',
- flexDirection: 'column',
- overflow: 'hidden',
- minHeight: 0,
- minWidth: 0,
- fontFamily: studio.fontSans,
- color: t['--ui-text-primary'],
- ...style,
- }}
- >
- {(title || tabs) && (
- <div
- style={{
- height: studio.spec.appearance.density === 'compact' ? 24 : 27,
- padding: '0 8px',
- background: t['--ui-bg-header'],
- borderBottom: `1px solid ${t['--ui-border-subtle']}`,
- display: 'flex',
- alignItems: 'center',
- justifyContent: 'space-between',
- gap: 6,
- flexShrink: 0,
- }}
- >
- {tabs ? (
- <div style={{ display: 'flex', alignItems: 'center', gap: 10, minWidth: 0 }}>
- {tabs.map((tab, idx) => (
- <div
- key={idx}
- style={{
- display: 'flex',
- alignItems: 'center',
- gap: 4,
- fontSize: 10.5,
- fontWeight: tab.active ? 600 : 500,
- color: tab.active ? t['--ui-text-primary'] : t['--ui-text-muted'],
- height: '100%',
- borderBottom: tab.active ? `2px solid ${t['--ui-accent']}` : '2px solid transparent',
- paddingTop: 2,
- paddingBottom: 1,
- whiteSpace: 'nowrap',
- }}
- >
- {tab.icon}
- <span>{tab.label}</span>
- </div>
- ))}
- </div>
- ) : (
- <div
- style={{
- fontSize: 10.5,
- fontWeight: 600,
- color: t['--ui-text-secondary'],
- letterSpacing: '0.01em',
- whiteSpace: 'nowrap',
- overflow: 'hidden',
- textOverflow: 'ellipsis',
- }}
- >
- {title}
- </div>
- )}
- <div style={{ display: 'flex', alignItems: 'center', gap: 5, color: t['--ui-icon-muted'] }}>
- {rightSlot}
- <span style={{ fontSize: 11, letterSpacing: 1, opacity: 0.65 }}>···</span>
- </div>
- </div>
- )}
- <div style={{ flex: 1, minHeight: 0, display: 'flex', flexDirection: 'column', overflow: 'hidden' }}>
- {children}
- </div>
- </div>
- );
-};
-
-/** Authentic organic SVG brushstroke previews matching Ink Studio's brush engine */
-export const BrushStrokeSvg: React.FC<{
- variant: number;
- color: string;
- width?: number;
- height?: number;
-}> = ({ variant, color, width = 54, height = 16 }) => {
- const paths = [
- // Loaded Impasto Oil (bold tapered painterly ribbon)
- 'M2 10.6 C11 1.6, 23 1.4, 34 7.8 C41.5 12.2, 47.5 11.4, 52 6.0 C48.8 14.4, 40.2 15.2, 31.8 11.4 C22.5 7.2, 13.5 7.6, 4.2 13.4 Z',
- // Alla-Prima Oil Flat (broad expressive oil dab)
- 'M2 9.4 C13.5 1.2, 26.5 2.0, 36.5 8.6 C43.5 13.4, 48.8 11.2, 52.5 6.8 C49.5 14.8, 41.2 15.4, 33.5 12.2 C24.5 8.0, 14 8.6, 3.8 13.0 Z',
- // Dry Bristle Rake (expressive textured taper)
- 'M2.5 11.2 C12.5 2.6, 25.5 2.4, 35 8.8 C42 13.6, 48.2 11.8, 52.2 7.2 C48.5 14.2, 40.8 14.8, 33 11.4 C24.5 7.4, 13.5 8.0, 4 13.0 Z',
- // Concept Matte
- 'M3 10.0 C14.5 2.2, 25 3.0, 35.5 8.6 C43 12.8, 48.2 11.2, 52 7.4 C48 13.8, 41 14.4, 33 11.2 C24 7.6, 14.2 8.2, 4.5 12.2 Z',
- // G-Pen Crisp Comic Ink
- 'M2 11.0 C12.5 3.0, 24.5 2.8, 35 9.2 C42 13.6, 47.8 11.4, 52 7.0 C48 13.6, 40.8 14.2, 33.2 11.0 C24 6.8, 13.2 7.0, 3.5 12.4 Z',
- // Silky Portrait
- 'M2.5 10.4 C13.5 3.4, 24.8 3.2, 35.5 9.0 C43 13.0, 48.5 11.5, 51.8 7.8 C48.5 13.4, 41.2 14.0, 33.5 11.2 C24.2 7.6, 13.8 8.0, 4 12.2 Z',
- ];
- const d = paths[variant % paths.length];
- return (
- <svg width={width} height={height} viewBox="0 0 54 16" fill="none" style={{ flexShrink: 0 }}>
- <path d={d} fill={color} opacity={variant === 2 ? 0.88 : 0.96} />
- {variant === 2 && (
- <path
- d="M8 8.2 C18 3.8, 28 4.8, 40 10.6"
- stroke={color}
- strokeWidth="1.05"
- strokeDasharray="3 2"
- opacity={0.62}
- />
- )}
- </svg>
- );
-};
-
-export const ScrubOrTrackSlider: React.FC<{
- studio: ResolvedStudio;
- label: string;
- valueText: string;
- percent: number;
- checker?: boolean;
- compact?: boolean;
-}> = ({ studio, label, valueText, percent, checker, compact }) => {
- const t = studio.theme.tokens;
- const isTrack = studio.spec.appearance.sliderStyle === 'track';
- const h = compact ? 20 : 23;
-
- if (isTrack) {
- return (
- <div style={{ display: 'flex', flexDirection: 'column', gap: 3 }}>
- <div
- style={{
- display: 'flex',
- justifyContent: 'space-between',
- alignItems: 'center',
- fontSize: 10,
- color: t['--ui-text-secondary'],
- }}
- >
- <span>{label}</span>
- <span className="font-mono-ui" style={{ color: t['--ui-text-primary'], fontWeight: 500 }}>
- {valueText}
- </span>
- </div>
- <div
- style={{
- position: 'relative',
- height: 12,
- display: 'flex',
- alignItems: 'center',
- }}
- >
- <div
- style={{
- width: '100%',
- height: 3,
- background: t['--ui-bg-input'],
- border: `1px solid ${t['--ui-border-subtle']}`,
- borderRadius: studio.radiusSmPx,
- overflow: 'hidden',
- }}
- >
- <div
- style={{
- width: `${percent}%`,
- height: '100%',
- background: t['--ui-accent'],
- }}
- />
- </div>
- <div
- style={{
- position: 'absolute',
- left: `calc(${percent}% - 5px)`,
- width: 10,
- height: 10,
- borderRadius: studio.spec.appearance.cornerRadius === 'sharp' ? 1 : 99,
- background: t['--ui-text-primary'],
- border: `2px solid ${t['--ui-accent']}`,
- boxShadow: '0 1px 3px rgba(0,0,0,0.35)',
- }}
- />
- </div>
- </div>
- );
- }
-
- return (
- <div
- className={checker ? (studio.isDark ? 'checker-bg-dark' : 'checker-bg-light') : undefined}
- style={{
- position: 'relative',
- height: h,
- backgroundColor: t['--ui-bg-input'],
- border: `1px solid ${t['--ui-border-default']}`,
- borderRadius: `${studio.radiusSmPx}px`,
- overflow: 'hidden',
- display: 'flex',
- alignItems: 'center',
- justifyContent: 'space-between',
- padding: '0 7px',
- fontSize: 10.5,
- }}
- >
- <div
- style={{
- position: 'absolute',
- left: 0,
- top: 0,
- bottom: 0,
- width: `${percent}%`,
- background: t['--ui-accent-subtle'],
- borderRight: percent < 94 ? `2px solid ${t['--ui-accent']}` : 'none',
- }}
- />
- <span style={{ position: 'relative', zIndex: 2, color: t['--ui-text-secondary'], fontWeight: 500 }}>
- {label}
- </span>
- <span
- className="font-mono-ui"
- style={{ position: 'relative', zIndex: 2, color: t['--ui-text-primary'], fontWeight: 600, fontSize: 10 }}
- >
- {valueText}
- </span>
- </div>
- );
-};
-
-export const MenuAndCommandBar: React.FC<{
- studio: ResolvedStudio;
- highlightAppearanceBtn?: boolean;
-}> = ({ studio, highlightAppearanceBtn }) => {
- const t = studio.theme.tokens;
- const sw = studio.spec.appearance.iconStrokeWidth;
- const menus = ['File', 'Edit', 'Select', 'Layer', 'Filter', 'Ruler', 'View', 'Manga', 'Animation', 'Window', 'Help'];
-
- return (
- <header
- style={{
- height: 32,
- background: t['--ui-bg-header'],
- borderBottom: `1px solid ${t['--ui-border-subtle']}`,
- padding: '0 10px',
- display: 'flex',
- alignItems: 'center',
- justifyContent: 'space-between',
- fontFamily: studio.fontSans,
- fontSize: 11,
- color: t['--ui-text-secondary'],
- flexShrink: 0,
- }}
- >
- {/* Left: Home | Workspace | Menus */}
- <div style={{ display: 'flex', alignItems: 'center', gap: 10 }}>
- <div
- style={{
- display: 'flex',
- alignItems: 'center',
- gap: 2,
- background: t['--ui-bg-input'],
- border: `1px solid ${t['--ui-border-subtle']}`,
- borderRadius: `${studio.radiusSmPx}px`,
- padding: 2,
- }}
- >
- <span style={{ padding: '1px 7px', fontSize: 10.5, color: t['--ui-text-muted'] }}>Home</span>
- <span
- style={{
- padding: '1px 8px',
- fontSize: 10.5,
- fontWeight: 600,
- background: t['--ui-bg-control-active'],
- color: t['--ui-text-primary'],
- borderRadius: `${Math.max(1, studio.radiusSmPx - 1)}px`,
- }}
- >
- Workspace
- </span>
- </div>
- <div style={{ display: 'flex', alignItems: 'center', gap: 11 }}>
- {menus.map((m) => (
- <span key={m} style={{ color: t['--ui-text-secondary'], fontSize: 11 }}>
- {m}
- </span>
- ))}
- </div>
- </div>
-
- {/* Center: Command Icons + Workspace Selector */}
- <div style={{ display: 'flex', alignItems: 'center', gap: 8 }}>
- <div
- style={{
- display: 'flex',
- alignItems: 'center',
- gap: 7,
- padding: '3px 8px',
- background: t['--ui-bg-input'],
- border: `1px solid ${t['--ui-border-subtle']}`,
- borderRadius: `${studio.radiusSmPx}px`,
- color: t['--ui-icon-default'],
- }}
- >
- <Save size={12} strokeWidth={sw} />
- <Undo2 size={12} strokeWidth={sw} />
- <Redo2 size={12} strokeWidth={sw} opacity={0.45} />
- <div style={{ width: 1, height: 11, background: t['--ui-border-default'] }} />
- <FlipHorizontal size={12} strokeWidth={sw} />
- <FlipVertical size={12} strokeWidth={sw} />
- <Layers size={12} strokeWidth={sw} />
- <Star size={12} strokeWidth={sw} />
- </div>
-
- <div
- style={{
- display: 'flex',
- alignItems: 'center',
- gap: 6,
- padding: '3px 9px',
- background: t['--ui-bg-control'],
- border: `1px solid ${t['--ui-border-default']}`,
- borderRadius: `${studio.radiusSmPx}px`,
- color: t['--ui-text-primary'],
- fontSize: 10.5,
- fontWeight: 500,
- }}
- >
- <Columns2 size={11} strokeWidth={sw} color={t['--ui-accent']} />
- <span>{studio.spec.workspaceLabel}</span>
- <ChevronDown size={11} strokeWidth={sw} color={t['--ui-icon-muted']} />
- </div>
- </div>
-
- {/* Right: Zoom + Appearance Studio + Window Controls */}
- <div style={{ display: 'flex', alignItems: 'center', gap: 9, color: t['--ui-icon-default'] }}>
- <div
- className="font-mono-ui"
- style={{
- display: 'flex',
- alignItems: 'center',
- gap: 7,
- padding: '2px 8px',
- background: t['--ui-bg-input'],
- border: `1px solid ${t['--ui-border-subtle']}`,
- borderRadius: `${studio.radiusSmPx}px`,
- fontSize: 10.5,
- color: t['--ui-text-primary'],
- }}
- >
- <Minus size={10} strokeWidth={sw} color={t['--ui-icon-muted']} />
- <span>27.5%</span>
- <Plus size={10} strokeWidth={sw} color={t['--ui-icon-muted']} />
- </div>
- <Users size={13} strokeWidth={sw} />
- <div
- style={{
- width: 22,
- height: 22,
- display: 'flex',
- alignItems: 'center',
- justifyContent: 'center',
- borderRadius: `${studio.radiusSmPx}px`,
- background: highlightAppearanceBtn ? t['--ui-accent-subtle'] : 'transparent',
- border: highlightAppearanceBtn ? `1px solid ${t['--ui-accent-border']}` : '1px solid transparent',
- color: highlightAppearanceBtn ? t['--ui-accent'] : t['--ui-icon-default'],
- }}
- >
- <Palette size={13} strokeWidth={sw} />
- </div>
- <Settings size={13} strokeWidth={sw} />
- <div style={{ display: 'flex', alignItems: 'center', gap: 9, marginLeft: 4, opacity: 0.6 }}>
- <Minus size={11} strokeWidth={1.5} />
- <Square size={10} strokeWidth={1.5} />
- <X size={12} strokeWidth={1.5} />
- </div>
- </div>
- </header>
- );
-};
-
-export const ToolOptionsBar: React.FC<{ studio: ResolvedStudio }> = ({ studio }) => {
- const t = studio.theme.tokens;
- const sw = studio.spec.appearance.iconStrokeWidth;
- return (
- <div
- style={{
- height: 36,
- background: t['--ui-bg-panel'],
- borderBottom: `1px solid ${t['--ui-border-default']}`,
- padding: '0 12px',
- display: 'flex',
- alignItems: 'center',
- gap: 10,
- fontFamily: studio.fontSans,
- fontSize: 11,
- color: t['--ui-text-primary'],
- flexShrink: 0,
- }}
- >
- <div
- style={{
- display: 'flex',
- alignItems: 'center',
- gap: 6,
- padding: '3px 9px',
- background: t['--ui-bg-control'],
- border: `1px solid ${t['--ui-border-default']}`,
- borderRadius: `${studio.radiusSmPx}px`,
- fontWeight: 600,
- }}
- >
- <Paintbrush size={12} strokeWidth={sw} color={t['--ui-accent']} />
- <span>Loaded Impasto Oil</span>
- <ChevronDown size={11} strokeWidth={sw} color={t['--ui-icon-muted']} />
- </div>
-
- <div style={{ width: 1, height: 18, background: t['--ui-border-subtle'] }} />
-
- <div style={{ display: 'flex', alignItems: 'center', gap: 6 }}>
- <span style={{ color: t['--ui-text-muted'], fontSize: 10.5 }}>Mode</span>
- <div
- style={{
- padding: '3px 10px',
- background: t['--ui-bg-input'],
- border: `1px solid ${t['--ui-border-default']}`,
- borderRadius: `${studio.radiusSmPx}px`,
- display: 'flex',
- alignItems: 'center',
- gap: 12,
- fontSize: 10.5,
- }}
- >
- <span>Normal</span>
- <ChevronDown size={10} strokeWidth={sw} />
- </div>
- </div>
-
- <div style={{ width: 126 }}>
- <ScrubOrTrackSlider studio={studio} label="Size" valueText="42px" percent={56} compact />
- </div>
- <div style={{ width: 132 }}>
- <ScrubOrTrackSlider studio={studio} label="Opacity" valueText="100%" percent={100} checker compact />
- </div>
- <div style={{ width: 118 }}>
- <ScrubOrTrackSlider studio={studio} label="Flow" valueText="96%" percent={96} compact />
- </div>
- <div style={{ width: 96 }}>
- <ScrubOrTrackSlider studio={studio} label="Stab" valueText="9" percent={62} compact />
- </div>
-
- <div style={{ display: 'flex', alignItems: 'center', gap: 5, marginLeft: 4 }}>
- {['Pressure', 'Smooth'].map((lbl) => (
- <span
- key={lbl}
- style={{
- padding: '3px 8px',
- borderRadius: `${studio.radiusSmPx}px`,
- background: t['--ui-accent-subtle'],
- border: `1px solid ${t['--ui-accent-border']}`,
- color: t['--ui-text-primary'],
- fontSize: 10.5,
- fontWeight: 500,
- }}
- >
- {lbl}
- </span>
- ))}
- <span
- style={{
- padding: '3px 8px',
- borderRadius: `${studio.radiusSmPx}px`,
- background: t['--ui-bg-control'],
- border: `1px solid ${t['--ui-border-subtle']}`,
- color: t['--ui-text-secondary'],
- fontSize: 10.5,
- }}
- >
- Erase Ink
- </span>
- <span
- style={{
- padding: '3px 9px',
- borderRadius: `${studio.radiusSmPx}px`,
- background: t['--ui-bg-control'],
- border: `1px solid ${t['--ui-border-default']}`,
- color: t['--ui-text-primary'],
- fontSize: 10.5,
- display: 'flex',
- alignItems: 'center',
- gap: 5,
- }}
- >
- <SlidersHorizontal size={11} strokeWidth={sw} />
- Brush Studio
- </span>
- </div>
- </div>
- );
-};
-
-export const DocumentTabBar: React.FC<{ studio: ResolvedStudio }> = ({ studio }) => {
- const t = studio.theme.tokens;
- const tabs = [
- { name: 'sunlit_meadow *', active: false },
- { name: 'sepia_study *', active: false },
- { name: 'meri_portrait', active: true },
- ];
- return (
- <div
- style={{
- height: 28,
- background: t['--ui-bg-header'],
- borderBottom: `1px solid ${t['--ui-border-subtle']}`,
- padding: '0 8px',
- display: 'flex',
- alignItems: 'flex-end',
- gap: 4,
- fontFamily: studio.fontSans,
- fontSize: 11,
- flexShrink: 0,
- }}
- >
- {tabs.map((tab) => (
- <div
- key={tab.name}
- style={{
- height: 23,
- padding: '0 11px',
- display: 'flex',
- alignItems: 'center',
- gap: 8,
- background: tab.active ? t['--ui-bg-panel'] : 'transparent',
- color: tab.active ? t['--ui-text-primary'] : t['--ui-text-muted'],
- borderTop: tab.active ? `1px solid ${t['--ui-border-default']}` : '1px solid transparent',
- borderLeft: tab.active ? `1px solid ${t['--ui-border-default']}` : '1px solid transparent',
- borderRight: tab.active ? `1px solid ${t['--ui-border-default']}` : '1px solid transparent',
- borderBottom: tab.active ? `2px solid ${t['--ui-accent']}` : '2px solid transparent',
- borderTopLeftRadius: `${studio.radiusSmPx}px`,
- borderTopRightRadius: `${studio.radiusSmPx}px`,
- fontWeight: tab.active ? 600 : 400,
- }}
- >
- <span>{tab.name}</span>
- {tab.active && <X size={10} opacity={0.65} />}
- </div>
- ))}
- <div
- style={{
- height: 23,
- width: 24,
- display: 'flex',
- alignItems: 'center',
- justifyContent: 'center',
- color: t['--ui-text-muted'],
- }}
- >
- <Plus size={12} />
- </div>
- </div>
- );
-};
-
-export const StatusBar: React.FC<{ studio: ResolvedStudio }> = ({ studio }) => {
- const t = studio.theme.tokens;
- const sw = studio.spec.appearance.iconStrokeWidth;
- return (
- <footer
- style={{
- height: 28,
- background: t['--ui-bg-header'],
- borderTop: `1px solid ${t['--ui-border-subtle']}`,
- padding: '0 10px',
- display: 'flex',
- alignItems: 'center',
- justifyContent: 'space-between',
- fontFamily: studio.fontSans,
- fontSize: 10.5,
- color: t['--ui-text-secondary'],
- flexShrink: 0,
- }}
- >
- <div style={{ display: 'flex', alignItems: 'center', gap: 6 }}>
- <div
- style={{
- display: 'flex',
- alignItems: 'center',
- gap: 6,
- padding: '2px 8px',
- background: t['--ui-bg-input'],
- border: `1px solid ${t['--ui-border-subtle']}`,
- borderRadius: `${studio.radiusSmPx}px`,
- }}
- >
- <span style={{ color: t['--ui-text-primary'], fontWeight: 600 }}>Brush</span>
- <span style={{ color: t['--ui-text-disabled'] }}>|</span>
- <span className="font-mono-ui" style={{ fontSize: 10 }}>
- Bézier
- </span>
- <span style={{ color: t['--ui-text-disabled'] }}>|</span>
- <span className="font-mono-ui" style={{ fontSize: 10, color: t['--ui-accent'], fontWeight: 600 }}>
- Stab: 9
- </span>
- </div>
-
- <div
- className="font-mono-ui"
- style={{
- display: 'flex',
- alignItems: 'center',
- gap: 6,
- padding: '2px 8px',
- background: t['--ui-bg-input'],
- border: `1px solid ${t['--ui-border-subtle']}`,
- borderRadius: `${studio.radiusSmPx}px`,
- fontSize: 10,
- }}
- >
- <span style={{ color: t['--ui-text-primary'] }}>3800×2800px</span>
- <span style={{ color: t['--ui-text-muted'] }}>600dpi</span>
- <span style={{ color: t['--ui-text-disabled'] }}>|</span>
- <span style={{ color: t['--ui-accent'], fontWeight: 600 }}>Color RGB</span>
- </div>
-
- <div
- style={{
- display: 'flex',
- alignItems: 'center',
- gap: 4,
- padding: '2px 7px',
- background: studio.spec.navigatorMode === 'split' ? t['--ui-accent-subtle'] : t['--ui-bg-input'],
- border: `1px solid ${studio.spec.navigatorMode === 'split' ? t['--ui-accent-border'] : t['--ui-border-subtle']}`,
- borderRadius: `${studio.radiusSmPx}px`,
- color: studio.spec.navigatorMode === 'split' ? t['--ui-accent'] : t['--ui-text-secondary'],
- fontSize: 10,
- }}
- >
- <Contrast size={11} strokeWidth={sw} />
- <span>Value</span>
- </div>
- </div>
-
- <div className="font-mono-ui" style={{ display: 'flex', alignItems: 'center', gap: 14, fontSize: 10 }}>
- <span>
- Pos: <strong style={{ color: t['--ui-text-primary'] }}>1842, 1296px</strong>
- </span>
- <div style={{ display: 'flex', alignItems: 'center', gap: 6 }}>
- <span>Pressure:</span>
- <div
- style={{
- width: 48,
- height: 4,
- background: t['--ui-bg-input'],
- borderRadius: 2,
- overflow: 'hidden',
- }}
- >
- <div style={{ width: '42%', height: '100%', background: t['--ui-accent'] }} />
- </div>
- <span style={{ color: t['--ui-text-primary'] }}>42%</span>
- </div>
- <span>
- Angle: <strong style={{ color: t['--ui-text-primary'] }}>0°</strong>
- </span>
- <span>
- Zoom: <strong style={{ color: t['--ui-text-primary'] }}>27.5%</strong>
- </span>
- </div>
- </footer>
- );
-};
-
-export const ToolStrip: React.FC<{ studio: ResolvedStudio; width?: number }> = ({ studio, width = 46 }) => {
- const t = studio.theme.tokens;
- const sw = studio.spec.appearance.iconStrokeWidth;
- const isCompact = studio.spec.appearance.density === 'compact';
- const isTablet = studio.spec.appearance.density === 'comfortable';
- const iconSize = isTablet ? 16 : isCompact ? 13 : 14;
- const btnSize = isTablet ? 34 : isCompact ? 26 : 30;
-
- const tools = [
- { icon: Paintbrush, active: true },
- { icon: Sparkles, active: false },
- { icon: Eraser, active: false },
- { icon: PenTool, active: false },
- { icon: PaintBucket, active: false },
- { icon: Blend, active: false },
- { icon: SquareDashed, active: false },
- { icon: Lasso, active: false },
- { icon: Move, active: false },
- { icon: Pipette, active: false },
- { icon: Type, active: false },
- { icon: Grid3x3, active: false },
- { icon: MessageSquare, active: false },
- { icon: Shapes, active: false },
- { icon: Box, active: false },
- { icon: Hand, active: false },
- { icon: ZoomIn, active: false },
- ];
-
- return (
- <PanelChrome
- studio={studio}
- style={{
- width,
- flexShrink: 0,
- height: '100%',
- }}
- >
- <div
- style={{
- flex: 1,
- display: 'flex',
- flexDirection: 'column',
- alignItems: 'center',
- justifyContent: 'space-between',
- padding: '8px 0 10px',
- }}
- >
- <div style={{ display: 'flex', flexDirection: 'column', alignItems: 'center', gap: isCompact ? 3 : 5 }}>
- {tools.map((item, idx) => {
- const Icon = item.icon;
- return (
- <div
- key={idx}
- style={{
- width: btnSize,
- height: btnSize,
- borderRadius: `${studio.radiusSmPx}px`,
- display: 'flex',
- alignItems: 'center',
- justifyContent: 'center',
- background: item.active ? t['--ui-accent-subtle'] : 'transparent',
- border: item.active ? `1px solid ${t['--ui-accent-border']}` : '1px solid transparent',
- color: item.active ? t['--ui-accent'] : t['--ui-icon-default'],
- }}
- >
- <Icon size={iconSize} strokeWidth={sw} />
- </div>
- );
- })}
- </div>
-
- {/* FG / BG / Transparent Swatches */}
- <div style={{ display: 'flex', flexDirection: 'column', alignItems: 'center', gap: 6 }}>
- <div style={{ position: 'relative', width: 26, height: 26 }}>
- <div
- style={{
- position: 'absolute',
- right: 0,
- bottom: 0,
- width: 16,
- height: 16,
- borderRadius: `${Math.min(3, studio.radiusSmPx)}px`,
- background: '#f5f2ec',
- border: `1px solid ${t['--ui-border-strong']}`,
- }}
- />
- <div
- style={{
- position: 'absolute',
- left: 0,
- top: 0,
- width: 17,
- height: 17,
- borderRadius: `${Math.min(3, studio.radiusSmPx)}px`,
- background: studio.spec.activeColorHex,
- border: `1.5px solid ${t['--ui-bg-panel']}`,
- boxShadow: `0 0 0 1px ${t['--ui-border-strong']}`,
- }}
- />
- </div>
- <div
- className={studio.isDark ? 'checker-bg-dark' : 'checker-bg-light'}
- style={{
- width: 22,
- height: 11,
- borderRadius: `${Math.min(3, studio.radiusSmPx)}px`,
- border: `1px solid ${t['--ui-border-default']}`,
- }}
- />
- </div>
- </div>
- </PanelChrome>
- );
-};
-
-export const CollapsedEdgeRail: React.FC<{
- studio: ResolvedStudio;
- side: 'left' | 'right';
-}> = ({ studio, side }) => {
- const t = studio.theme.tokens;
- const sw = studio.spec.appearance.iconStrokeWidth;
- const icons =
- side === 'left'
- ? [Paintbrush, Eraser, PenTool, PaintBucket, Blend, Pipette, Lasso, Hand, ZoomIn]
- : [Layers, Palette, History, SlidersHorizontal, Grid3x3, Contrast, Maximize2];
-
- return (
- <PanelChrome
- studio={studio}
- style={{
- width: 50,
- height: '100%',
- flexShrink: 0,
- }}
- >
- <div
- style={{
- flex: 1,
- display: 'flex',
- flexDirection: 'column',
- alignItems: 'center',
- justifyContent: 'space-between',
- padding: '12px 0',
- }}
- >
- <div style={{ display: 'flex', flexDirection: 'column', gap: 8, alignItems: 'center' }}>
- {icons.map((Icon, idx) => {
- const active = side === 'left' && idx === 0;
- return (
- <div
- key={idx}
- style={{
- width: 36,
- height: 36,
- borderRadius: `${studio.radiusMdPx}px`,
- display: 'flex',
- alignItems: 'center',
- justifyContent: 'center',
- background: active ? t['--ui-accent-subtle'] : 'transparent',
- border: active ? `1px solid ${t['--ui-accent-border']}` : '1px solid transparent',
- color: active ? t['--ui-accent'] : t['--ui-icon-default'],
- }}
- >
- <Icon size={17} strokeWidth={sw} />
- </div>
- );
- })}
- </div>
- {side === 'left' ? (
- <div
- style={{
- width: 26,
- height: 26,
- borderRadius: '50%',
- background: studio.spec.activeColorHex,
- border: `2px solid ${t['--ui-border-strong']}`,
- }}
- />
- ) : (
- <div
- className="font-mono-ui"
- style={{ fontSize: 9, color: t['--ui-text-muted'], writingMode: 'vertical-rl' }}
- >
- DOCK
- </div>
- )}
- </div>
- </PanelChrome>
- );
-};
-
-export const SubToolPanel: React.FC<{
- studio: ResolvedStudio;
- flex?: number;
- tabsOverride?: Array<{ label: string; active?: boolean }>;
-}> = ({ studio, flex = 1, tabsOverride }) => {
- const t = studio.theme.tokens;
- const isGrid = studio.spec.appearance.brushListStyle === 'grid';
- const isCompact = studio.spec.appearance.density === 'compact';
- const isManga = studio.spec.mangaScreentone;
-
- const brushes = isManga
- ? [
- { name: 'G-Pen', active: true, v: 4 },
- { name: 'Real G-Pen', active: false, v: 5 },
- { name: 'Maru Pen', active: false, v: 3 },
- { name: 'Turnip Pen', active: false, v: 1 },
- { name: 'Dry Rake', active: false, v: 2 },
- { name: 'Ink Wash', active: false, v: 0 },
- ]
- : [
- { name: 'Alla-Prima Oil', active: false, v: 1 },
- { name: 'Loaded Impasto', active: true, v: 0 },
- { name: 'Dry Bristle Rake', active: false, v: 2 },
- { name: 'Concept Matte', active: false, v: 3 },
- { name: 'Silky Portrait', active: false, v: 5 },
- { name: 'Canvas Scumble', active: false, v: 4 },
- ];
-
- const categories = isManga
- ? [
- { label: 'All', active: false },
- { label: 'Pen', active: true },
- { label: 'Sketch', active: false },
- { label: 'Brush', active: false },
- ]
- : [
- { label: 'All', active: false },
- { label: 'Pen', active: false },
- { label: 'Sketch', active: false },
- { label: 'Brush', active: true },
- ];
-
- return (
- <PanelChrome
- studio={studio}
- title={tabsOverride ? undefined : 'Sub Tool'}
- tabs={tabsOverride}
- style={{ flex }}
- >
- <div style={{ padding: isCompact ? 6 : 8, display: 'flex', flexDirection: 'column', gap: 6, flex: 1 }}>
- {/* Categories */}
- <div style={{ display: 'flex', alignItems: 'center', gap: 4, flexWrap: 'wrap' }}>
- {categories.map((cat) => (
- <span
- key={cat.label}
- style={{
- padding: '2px 6px',
- fontSize: 10,
- borderRadius: `${studio.radiusSmPx}px`,
- background: cat.active ? t['--ui-accent-subtle'] : 'transparent',
- color: cat.active ? t['--ui-text-primary'] : t['--ui-text-muted'],
- borderBottom: cat.active ? `1.5px solid ${t['--ui-accent']}` : '1.5px solid transparent',
- fontWeight: cat.active ? 600 : 400,
- }}
- >
- {cat.label}
- </span>
- ))}
- </div>
-
- {/* Brush List or Grid */}
- {isGrid ? (
- <div style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 4, flex: 1 }}>
- {brushes.map((b) => (
- <div
- key={b.name}
- style={{
- padding: '5px 6px',
- borderRadius: `${studio.radiusSmPx}px`,
- background: b.active ? t['--ui-accent-subtle'] : t['--ui-bg-control'],
- border: `1px solid ${b.active ? t['--ui-accent-border'] : t['--ui-border-subtle']}`,
- display: 'flex',
- flexDirection: 'column',
- justifyContent: 'space-between',
- gap: 4,
- }}
- >
- <BrushStrokeSvg
- variant={b.v}
- color={b.active ? t['--ui-text-primary'] : t['--ui-text-secondary']}
- width={56}
- height={15}
- />
- <span
- style={{
- fontSize: 9.5,
- fontWeight: b.active ? 600 : 500,
- color: b.active ? t['--ui-text-primary'] : t['--ui-text-secondary'],
- whiteSpace: 'nowrap',
- overflow: 'hidden',
- textOverflow: 'ellipsis',
- }}
- >
- {b.name}
- </span>
- </div>
- ))}
- </div>
- ) : (
- <div style={{ display: 'flex', flexDirection: 'column', gap: 3 }}>
- {brushes.map((b) => (
- <div
- key={b.name}
- style={{
- height: isCompact ? 24 : 28,
- padding: '0 7px',
- borderRadius: `${studio.radiusSmPx}px`,
- background: b.active ? t['--ui-accent-subtle'] : 'transparent',
- border: `1px solid ${b.active ? t['--ui-accent-border'] : 'transparent'}`,
- borderLeft: b.active ? `2px solid ${t['--ui-accent']}` : '2px solid transparent',
- display: 'flex',
- alignItems: 'center',
- justifyContent: 'space-between',
- gap: 6,
- }}
- >
- <span
- style={{
- fontSize: 10.5,
- fontWeight: b.active ? 600 : 400,
- color: b.active ? t['--ui-text-primary'] : t['--ui-text-secondary'],
- whiteSpace: 'nowrap',
- overflow: 'hidden',
- textOverflow: 'ellipsis',
- }}
- >
- {b.name}
- </span>
- <BrushStrokeSvg
- variant={b.v}
- color={b.active ? t['--ui-text-primary'] : t['--ui-text-muted']}
- width={48}
- height={14}
- />
- </div>
- ))}
- </div>
- )}
- </div>
- </PanelChrome>
- );
-};
-
-export const ToolPropertyPanel: React.FC<{ studio: ResolvedStudio; flex?: number }> = ({
- studio,
- flex = 1.15,
-}) => {
- const t = studio.theme.tokens;
- const rows = [
- { label: 'Ink', value: '96%' },
- { label: 'Brush Tip', value: '90%' },
- { label: 'Stabilization', value: '9' },
- { label: 'Blending & Mixing', value: 'Pigment', accent: true },
- { label: 'Texture & Spray', value: '28%' },
- { label: 'Dynamics & Jitter', value: '' },
- ];
-
- return (
- <PanelChrome studio={studio} title="Tool Property" style={{ flex }}>
- <div style={{ padding: 8, display: 'flex', flexDirection: 'column', gap: 6 }}>
- {/* Live Stroke Preview + Studio Button */}
- <div style={{ display: 'flex', gap: 6, alignItems: 'center' }}>
- <div
- style={{
- flex: 1,
- height: 30,
- background: t['--ui-bg-input'],
- border: `1px solid ${t['--ui-border-subtle']}`,
- borderRadius: `${studio.radiusSmPx}px`,
- display: 'flex',
- alignItems: 'center',
- justifyContent: 'center',
- }}
- >
- <BrushStrokeSvg variant={0} color={t['--ui-text-primary']} width={104} height={18} />
- </div>
- <div
- style={{
- height: 30,
- padding: '0 8px',
- background: t['--ui-bg-control'],
- border: `1px solid ${t['--ui-border-default']}`,
- borderRadius: `${studio.radiusSmPx}px`,
- display: 'flex',
- alignItems: 'center',
- gap: 4,
- fontSize: 10,
- color: t['--ui-text-primary'],
- }}
- >
- <SlidersHorizontal size={11} />
- <span>Studio</span>
- </div>
- </div>
-
- <ScrubOrTrackSlider studio={studio} label="Size" valueText="42px" percent={56} />
- <ScrubOrTrackSlider studio={studio} label="Opacity" valueText="100%" percent={100} checker />
-
- <div style={{ display: 'flex', flexDirection: 'column', gap: 2, marginTop: 2 }}>
- {rows.map((r) => (
- <div
- key={r.label}
- style={{
- height: 22,
- display: 'flex',
- alignItems: 'center',
- justifyContent: 'space-between',
- padding: '0 2px',
- borderTop: `1px solid ${t['--ui-border-subtle']}`,
- fontSize: 10.5,
- }}
- >
- <div style={{ display: 'flex', alignItems: 'center', gap: 4, color: t['--ui-text-secondary'] }}>
- <ChevronRight size={10} opacity={0.6} />
- <span>{r.label}</span>
- </div>
- <span
- className="font-mono-ui"
- style={{
- fontSize: 10,
- fontWeight: 600,
- color: r.accent ? t['--ui-success'] : t['--ui-text-primary'],
- }}
- >
- {r.value}
- </span>
- </div>
- ))}
- </div>
- </div>
- </PanelChrome>
- );
-};
-
-export const BrushSizePanel: React.FC<{ studio: ResolvedStudio; flex?: number }> = ({
- studio,
- flex = 0.85,
-}) => {
- const t = studio.theme.tokens;
- const sizes = [
- { label: '0.5', r: 1.5 },
- { label: '1', r: 2 },
- { label: '2', r: 2.8 },
- { label: '4', r: 3.6 },
- { label: '6', r: 4.5 },
- { label: '10', r: 5.5 },
- { label: '15', r: 6.8 },
- { label: '25', r: 8.2 },
- { label: '40', r: 9.8, active: true },
- { label: '60', r: 11.2 },
- { label: '80', r: 12.6 },
- { label: '120', r: 14 },
- { label: '150', r: 15.2 },
- { label: '200', r: 16.5 },
- { label: '250', r: 17.5 },
- ];
-
- return (
- <PanelChrome studio={studio} title="Brush Size" style={{ flex }}>
- <div style={{ padding: 7, display: 'flex', flexDirection: 'column', gap: 6, flex: 1 }}>
- <div
- style={{
- display: 'flex',
- alignItems: 'center',
- justifyContent: 'space-between',
- fontSize: 10,
- padding: '2px 4px',
- }}
- >
- <span style={{ color: t['--ui-text-primary'], fontWeight: 600 }}>
- {studio.spec.mangaScreentone ? 'G-Pen' : 'Loaded Impasto Oil'}
- </span>
- <span className="font-mono-ui" style={{ color: t['--ui-accent'], fontWeight: 600 }}>
- {studio.spec.mangaScreentone ? '12px' : '42px'}
- </span>
- </div>
- <div style={{ display: 'grid', gridTemplateColumns: 'repeat(5, 1fr)', gap: 3, flex: 1 }}>
- {sizes.map((s) => (
- <div
- key={s.label}
- style={{
- borderRadius: `${studio.radiusSmPx}px`,
- background: s.active ? t['--ui-accent-subtle'] : t['--ui-bg-input'],
- border: `1px solid ${s.active ? t['--ui-accent-border'] : t['--ui-border-subtle']}`,
- display: 'flex',
- flexDirection: 'column',
- alignItems: 'center',
- justifyContent: 'space-between',
- padding: '4px 2px 3px',
- }}
- >
- <div
- style={{
- flex: 1,
- display: 'flex',
- alignItems: 'center',
- justifyContent: 'center',
- width: '100%',
- overflow: 'hidden',
- }}
- >
- <div
- style={{
- width: Math.min(18, s.r),
- height: Math.min(18, s.r),
- borderRadius: '50%',
- background: s.active ? t['--ui-accent'] : t['--ui-text-primary'],
- opacity: s.active ? 1 : 0.85,
- }}
- />
- </div>
- <span className="font-mono-ui" style={{ fontSize: 8.5, color: t['--ui-text-muted'] }}>
- {s.label}
- </span>
- </div>
- ))}
- </div>
- </div>
- </PanelChrome>
- );
-};
-
-/** Signature Ink Studio floating vertical Size/Opacity edge bar next to tool dock */
-export const FloatingVerticalBrushPill: React.FC<{
- studio: ResolvedStudio;
- left?: number;
- right?: number;
-}> = ({ studio, left, right }) => {
- const t = studio.theme.tokens;
- return (
- <div
- style={{
- position: 'absolute',
- left,
- right,
- top: 410,
- width: 22,
- height: 248,
- background: t['--ui-bg-floating'],
- border: `1px solid ${t['--ui-border-default']}`,
- borderRadius: 99,
- boxShadow: t['--ui-shadow-floating'],
- display: 'flex',
- flexDirection: 'column',
- alignItems: 'center',
- justifyContent: 'space-between',
- padding: '10px 0',
- zIndex: 12,
- }}
- >
- {/* Size Track */}
- <div style={{ position: 'relative', width: 4, height: 92, background: t['--ui-bg-input'], borderRadius: 4 }}>
- <div
- style={{
- position: 'absolute',
- bottom: 0,
- left: 0,
- right: 0,
- height: '58%',
- background: t['--ui-accent'],
- borderRadius: 4,
- }}
- />
- <div
- style={{
- position: 'absolute',
- bottom: '55%',
- left: -3,
- width: 10,
- height: 4,
- borderRadius: 2,
- background: t['--ui-text-primary'],
- }}
- />
- </div>
- {/* Active Color Chip */}
- <div
- style={{
- width: 12,
- height: 12,
- borderRadius: 3,
- background: studio.spec.activeColorHex,
- border: `1px solid ${t['--ui-border-strong']}`,
- }}
- />
- {/* Opacity Track */}
- <div
- className={studio.isDark ? 'checker-bg-dark' : 'checker-bg-light'}
- style={{
- width: 8,
- height: 86,
- borderRadius: 4,
- border: `1px solid ${t['--ui-border-subtle']}`,
- overflow: 'hidden',
- position: 'relative',
- }}
- >
- <div
- style={{
- position: 'absolute',
- bottom: 0,
- left: 0,
- right: 0,
- height: '88%',
- background: t['--ui-accent-subtle'],
- borderTop: `2px solid ${t['--ui-accent']}`,
- }}
- />
- </div>
- </div>
- );
-};
diff --git a/promo/src/components/StudioShell.tsx b/promo/src/components/StudioShell.tsx
deleted file mode 100644
index 96f1d2c..0000000
--- a/promo/src/components/StudioShell.tsx
+++ /dev/null
@@ -1,482 +0,0 @@
-import React from 'react';
-import {
- BuiltInAccentPigmentId,
- ChromeStyle,
- CornerRadiusPreset,
-} from '@ink/types/appearance';
-import { CANVAS_RECT } from '../math';
-import { ResolvedStudio } from '../studioConfigs';
-import {
- BrushSizePanel,
- CollapsedEdgeRail,
- DocumentTabBar,
- FloatingVerticalBrushPill,
- MenuAndCommandBar,
- PanelChrome,
- StatusBar,
- SubToolPanel,
- ToolOptionsBar,
- ToolPropertyPanel,
- ToolStrip,
-} from './CorePanels';
-import {
- AppearanceStudioDrawerPanel,
- BottomDockStrip,
- ColorSlidersPanel,
- ColorWheelPanel,
- FloatingColorWindow,
- FloatingQuickFavoritesWindow,
- FloatingSphereWindow,
- FloatingSubViewWindow,
- FocusHudOverlay,
- HistoryPanel,
- LayersPanel,
- NavigatorPanel,
- QuickAccessPanel,
-} from './AtelierPanels';
-
-export interface StudioMotionOffsets {
- topY?: number;
- bottomY?: number;
- leftX?: number;
- rightX?: number;
- bottomDockY?: number;
- floatingOpacity?: number;
- floatingY?: number;
- focusEnter?: number;
- drawerX?: number;
-}
-
-export interface Act3LiveControls {
- activeTab: 'surface' | 'chrome';
- warmth: number;
- chromeStyle: ChromeStyle;
- cornerRadius: CornerRadiusPreset;
- activeAccent: BuiltInAccentPigmentId;
-}
-
-export const StudioShell: React.FC<{
- studio: ResolvedStudio;
- motion?: StudioMotionOffsets;
- act3Controls?: Act3LiveControls;
- showTelemetry?: boolean;
- telemetryOpacity?: number;
- hideMatte?: boolean;
-}> = ({
- studio,
- motion = {},
- act3Controls,
- showTelemetry = true,
- telemetryOpacity = 1,
- hideMatte = false,
-}) => {
- const t = studio.theme.tokens;
- const spec = studio.spec;
- const gap = studio.panelGapPx;
- const isIslands = spec.appearance.chromeStyle === 'islands';
- const outerPad = isIslands ? gap : 0;
-
- const topY = motion.topY ?? 0;
- const bottomY = motion.bottomY ?? 0;
- const leftX = motion.leftX ?? 0;
- const rightX = motion.rightX ?? 0;
- const bottomDockY = motion.bottomDockY ?? 0;
- const floatOp = motion.floatingOpacity ?? 1;
- const floatY = motion.floatingY ?? 0;
- const focusEnter = motion.focusEnter ?? 1;
- const drawerX = motion.drawerX ?? 0;
-
- const renderLeftAndRightDocks = () => {
- switch (spec.layout) {
- case 'pure-canvas':
- case 'focus-hud':
- return { left: null, right: null };
-
- case 'default-illustration':
- return {
- left: (
- <div style={{ display: 'flex', gap, height: '100%' }}>
- <ToolStrip studio={studio} width={46} />
- <div style={{ width: 206, display: 'flex', flexDirection: 'column', gap, height: '100%' }}>
- <SubToolPanel studio={studio} flex={1.08} />
- <ToolPropertyPanel studio={studio} flex={1.25} />
- <BrushSizePanel studio={studio} flex={0.85} />
- </div>
- </div>
- ),
- right: (
- <div style={{ width: 244, display: 'flex', flexDirection: 'column', gap, height: '100%' }}>
- <NavigatorPanel studio={studio} flex={0.85} />
- <ColorWheelPanel studio={studio} flex={0.95} />
- <LayersPanel studio={studio} flex={1.15} />
- </div>
- ),
- };
-
- case 'photoshop-islands':
- return {
- left: (
- <div style={{ display: 'flex', gap, height: '100%' }}>
- <ToolStrip studio={studio} width={48} />
- </div>
- ),
- right: (
- <div style={{ display: 'flex', gap, height: '100%' }}>
- <CollapsedEdgeRail studio={studio} side="right" />
- <div style={{ width: 254, display: 'flex', flexDirection: 'column', gap, height: '100%' }}>
- <ColorWheelPanel studio={studio} flex={0.96} />
- <SubToolPanel
- studio={studio}
- flex={0.92}
- tabsOverride={[
- { label: 'Sub', active: true },
- { label: 'Prop', active: false },
- { label: 'Size', active: false },
- ]}
- />
- <LayersPanel studio={studio} flex={1.12} />
- </div>
- </div>
- ),
- };
-
- case 'manga-cockpit':
- case 'printmaker-cockpit':
- return {
- left: (
- <div style={{ display: 'flex', gap, height: '100%' }}>
- <ToolStrip studio={studio} width={42} />
- <div style={{ width: 194, display: 'flex', flexDirection: 'column', gap, height: '100%' }}>
- <SubToolPanel studio={studio} flex={1.05} />
- <ToolPropertyPanel studio={studio} flex={0.98} />
- <BrushSizePanel studio={studio} flex={0.95} />
- </div>
- </div>
- ),
- right: (
- <div style={{ display: 'flex', gap, height: '100%' }}>
- {/* Inner Right Column: Quick Access Matrix + Color Sliders */}
- <div style={{ width: 170, display: 'flex', flexDirection: 'column', gap, height: '100%' }}>
- <QuickAccessPanel studio={studio} flex={1.1} />
- <ColorSlidersPanel studio={studio} flex={0.9} />
- </div>
- {/* Outer Right Column: Split CLR|B/W Navigator + Layers + History */}
- <div style={{ width: 234, display: 'flex', flexDirection: 'column', gap, height: '100%' }}>
- <NavigatorPanel studio={studio} flex={0.82} />
- <LayersPanel studio={studio} flex={1.15} />
- <HistoryPanel studio={studio} flex={0.5} />
- </div>
- </div>
- ),
- };
-
- case 'left-handed-sumi':
- return {
- // MIRRORED: Nav + Color + Layers on the LEFT
- left: (
- <div style={{ width: 234, display: 'flex', flexDirection: 'column', gap, height: '100%' }}>
- <NavigatorPanel studio={studio} flex={0.85} />
- <ColorWheelPanel studio={studio} flex={0.95} />
- <LayersPanel studio={studio} flex={1.15} />
- </div>
- ),
- // MIRRORED: SubTool/Prop/Size + Tool Rail on the RIGHT
- right: (
- <div style={{ display: 'flex', gap, height: '100%' }}>
- <div style={{ width: 204, display: 'flex', flexDirection: 'column', gap, height: '100%' }}>
- <SubToolPanel studio={studio} flex={1.05} />
- <ToolPropertyPanel studio={studio} flex={1.22} />
- <BrushSizePanel studio={studio} flex={0.85} />
- </div>
- <ToolStrip studio={studio} width={46} />
- </div>
- ),
- };
-
- case 'mirrored-drafting':
- return {
- // MIRRORED 18% Warm Mid-Grey Value Drafting Studio
- left: (
- <div style={{ display: 'flex', gap, height: '100%' }}>
- <div style={{ width: 236, display: 'flex', flexDirection: 'column', gap, height: '100%' }}>
- <NavigatorPanel studio={studio} flex={0.92} />
- <ColorSlidersPanel studio={studio} flex={0.85} />
- <LayersPanel studio={studio} flex={1.12} />
- </div>
- </div>
- ),
- right: (
- <div style={{ display: 'flex', gap, height: '100%' }}>
- <div style={{ width: 204, display: 'flex', flexDirection: 'column', gap, height: '100%' }}>
- <SubToolPanel studio={studio} flex={1.1} />
- <ToolPropertyPanel studio={studio} flex={1.0} />
- <HistoryPanel studio={studio} flex={0.55} />
- </div>
- <ToolStrip studio={studio} width={44} />
- </div>
- ),
- };
-
- case 'minimalist-tablet':
- return {
- left: <CollapsedEdgeRail studio={studio} side="left" />,
- right: <CollapsedEdgeRail studio={studio} side="right" />,
- };
-
- case 'bottom-flat-celadon':
- return {
- left: (
- <div style={{ display: 'flex', gap, height: '100%' }}>
- <ToolStrip studio={studio} width={44} />
- <div style={{ width: 192, display: 'flex', flexDirection: 'column', gap, height: '100%' }}>
- <SubToolPanel studio={studio} flex={1.0} />
- <BrushSizePanel studio={studio} flex={0.9} />
- </div>
- </div>
- ),
- right: (
- <div style={{ width: 248, display: 'flex', flexDirection: 'column', gap, height: '100%' }}>
- <LayersPanel studio={studio} flex={1.35} />
- <ColorSlidersPanel studio={studio} flex={0.7} />
- </div>
- ),
- };
-
- case 'detached-floating':
- return {
- left: <CollapsedEdgeRail studio={studio} side="left" />,
- right: <CollapsedEdgeRail studio={studio} side="right" />,
- };
-
- case 'appearance-studio':
- return {
- left: (
- <div style={{ display: 'flex', gap, height: '100%' }}>
- <ToolStrip studio={studio} width={46} />
- <div style={{ width: 206, display: 'flex', flexDirection: 'column', gap, height: '100%' }}>
- <SubToolPanel studio={studio} flex={1.05} />
- <ToolPropertyPanel studio={studio} flex={1.22} />
- <BrushSizePanel studio={studio} flex={0.85} />
- </div>
- </div>
- ),
- right: act3Controls ? (
- <div style={{ transform: `translate3d(${drawerX}px, 0, 0)`, height: '100%' }}>
- <AppearanceStudioDrawerPanel
- studio={studio}
- activeTab={act3Controls.activeTab}
- warmth={act3Controls.warmth}
- chromeStyle={act3Controls.chromeStyle}
- cornerRadius={act3Controls.cornerRadius}
- activeAccent={act3Controls.activeAccent}
- />
- </div>
- ) : null,
- };
- }
- };
-
- const docks = renderLeftAndRightDocks();
-
- // Subtle architectural matte telemetry ink
- const telemetryInk = studio.isDark ? 'rgba(242, 236, 226, 0.52)' : 'rgba(24, 22, 20, 0.56)';
- const telemetryStrong = studio.isDark ? 'rgba(242, 236, 226, 0.86)' : 'rgba(20, 18, 16, 0.86)';
-
- return (
- <div
- style={{
- position: 'absolute',
- inset: 0,
- width: 1920,
- height: 1080,
- background: hideMatte ? 'transparent' : t['--ui-canvas-matte'],
- overflow: 'hidden',
- display: 'flex',
- flexDirection: 'column',
- }}
- >
- {/* Physical Artboard Shadow & Hairline Frame strictly aligned behind locked meri_ink.png */}
- {!spec.seamlessVoid && (
- <div
- style={{
- position: 'absolute',
- left: CANVAS_RECT.x,
- top: CANVAS_RECT.y,
- width: CANVAS_RECT.w,
- height: CANVAS_RECT.h,
- boxShadow: studio.isDark
- ? '0 14px 44px rgba(0,0,0,0.58), 0 0 0 1px rgba(255,255,255,0.06)'
- : '0 18px 48px rgba(18,16,14,0.28), 0 2px 8px rgba(18,16,14,0.16), 0 0 0 1px rgba(0,0,0,0.16)',
- pointerEvents: 'none',
- zIndex: 1,
- }}
- />
- )}
-
- {/* Subtle Architectural Gallery Telemetry Line in open margin above the locked portrait */}
- {showTelemetry && spec.layout !== 'appearance-studio' && (
- <div
- className="font-mono-ui"
- style={{
- position: 'absolute',
- left: CANVAS_RECT.x,
- width: CANVAS_RECT.w,
- top: 156,
- display: 'flex',
- alignItems: 'center',
- justifyContent: 'space-between',
- fontSize: 10.5,
- letterSpacing: '0.11em',
- textTransform: 'uppercase',
- color: telemetryInk,
- opacity: telemetryOpacity,
- pointerEvents: 'none',
- zIndex: 6,
- }}
- >
- <div style={{ display: 'flex', alignItems: 'center', gap: 10 }}>
- <span style={{ color: t['--ui-accent'], fontWeight: 700 }}>{spec.indexTag}</span>
- <span style={{ color: telemetryStrong, fontWeight: 600 }}>{spec.name}</span>
- </div>
- <span style={{ fontSize: 9.5, letterSpacing: '0.12em' }}>{spec.metaTag}</span>
- </div>
- )}
-
- {/* TOP CHROME STACK */}
- {(spec.showTopMenuBar || spec.showToolOptionsBar || spec.showDocTabBar) && (
- <div
- style={{
- position: 'relative',
- zIndex: 20,
- transform: `translate3d(0, ${topY}px, 0)`,
- flexShrink: 0,
- }}
- >
- {spec.showTopMenuBar && (
- <MenuAndCommandBar
- studio={studio}
- highlightAppearanceBtn={spec.layout === 'appearance-studio'}
- />
- )}
- {spec.showToolOptionsBar && <ToolOptionsBar studio={studio} />}
- {spec.showDocTabBar && <DocumentTabBar studio={studio} />}
- </div>
- )}
-
- {/* MIDDLE WORKSPACE BODY (Left Docks + Open Center Canvas Zone + Right Docks) */}
- <div
- style={{
- flex: 1,
- minHeight: 0,
- display: 'flex',
- padding: outerPad,
- gap,
- position: 'relative',
- zIndex: 15,
- }}
- >
- {/* LEFT DOCK COLUMN(S) */}
- {docks.left && (
- <div
- style={{
- height: '100%',
- flexShrink: 0,
- transform: `translate3d(${leftX}px, 0, 0)`,
- }}
- >
- {docks.left}
- </div>
- )}
-
- {/* CENTER OPEN CANVAS ZONE + OPTIONAL BOTTOM DOCK */}
- <div
- style={{
- flex: 1,
- minWidth: 0,
- display: 'flex',
- flexDirection: 'column',
- justifyContent: 'flex-end',
- }}
- >
- {spec.showBottomDock && (
- <div
- style={{
- transform: `translate3d(0, ${bottomDockY}px, 0)`,
- }}
- >
- <BottomDockStrip studio={studio} height={106} />
- </div>
- )}
- </div>
-
- {/* RIGHT DOCK COLUMN(S) */}
- {docks.right && (
- <div
- style={{
- height: '100%',
- flexShrink: 0,
- transform: `translate3d(${rightX}px, 0, 0)`,
- }}
- >
- {docks.right}
- </div>
- )}
- </div>
-
- {/* SIGNATURE FLOATING EDGE PILL (Default Illustration & Photoshop Islands) */}
- {(spec.layout === 'default-illustration' || spec.layout === 'photoshop-islands') && (
- <div
- style={{
- position: 'absolute',
- inset: 0,
- pointerEvents: 'none',
- transform: `translate3d(${leftX}px, 0, 0)`,
- zIndex: 18,
- }}
- >
- <FloatingVerticalBrushPill
- studio={studio}
- left={spec.layout === 'photoshop-islands' ? 70 : 270}
- />
- </div>
- )}
-
- {/* FLOATING UNPINNED WINDOWS (3D Sphere, Quick Favorites, SubView, Color) */}
- {(spec.showFloatingSphere || spec.showFloatingFavorites || spec.showFloatingSubView || spec.showFloatingColorCard) &&
- spec.layout !== 'focus-hud' && (
- <div
- style={{
- position: 'absolute',
- inset: 0,
- pointerEvents: 'none',
- opacity: floatOp,
- transform: `translate3d(0, ${floatY}px, 0)`,
- zIndex: 24,
- }}
- >
- {spec.showFloatingSphere && <FloatingSphereWindow studio={studio} left={252} top={216} />}
- {spec.showFloatingFavorites && <FloatingQuickFavoritesWindow studio={studio} right={268} top={262} />}
- {spec.showFloatingSubView && <FloatingSubViewWindow studio={studio} />}
- {spec.showFloatingColorCard && <FloatingColorWindow studio={studio} />}
- </div>
- )}
-
- {/* FOCUS MODE FLOATING MICRO-HUDS */}
- {spec.layout === 'focus-hud' && <FocusHudOverlay studio={studio} enterProgress={focusEnter} />}
-
- {/* BOTTOM STATUS BAR */}
- {spec.showStatusBar && (
- <div
- style={{
- position: 'relative',
- zIndex: 20,
- transform: `translate3d(0, ${bottomY}px, 0)`,
- flexShrink: 0,
- }}
- >
- <StatusBar studio={studio} />
- </div>
- )}
- </div>
- );
-};
diff --git a/promo/src/main.tsx b/promo/src/main.tsx
deleted file mode 100644
index 3dcdacf..0000000
--- a/promo/src/main.tsx
+++ /dev/null
@@ -1,47 +0,0 @@
-import React, { useEffect, useState } from 'react';
-import { createRoot } from 'react-dom/client';
-import { PromoScene } from './PromoScene';
-import { FPS, TOTAL_FRAMES } from './math';
-import './styles.css';
-
-declare global {
- interface Window {
- __setFrame?: (frame: number) => void;
- __ready?: boolean;
- }
-}
-
-const PromoRoot: React.FC = () => {
- const params = new URLSearchParams(window.location.search);
- const initialFrame = Math.max(0, Math.min(TOTAL_FRAMES - 1, Number(params.get('frame') ?? 0) || 0));
- const autoPlay = params.get('play') === '1';
-
- const [frame, setFrame] = useState<number>(initialFrame);
-
- useEffect(() => {
- window.__setFrame = (nextFrame: number) => {
- setFrame(Math.max(0, Math.min(TOTAL_FRAMES - 1, Math.round(nextFrame))));
- };
- document.fonts.ready.then(() => {
- window.__ready = true;
- });
- }, []);
-
- useEffect(() => {
- if (!autoPlay) return;
- let raf = 0;
- const start = performance.now();
- const tick = (now: number) => {
- const elapsedSec = (now - start) / 1000;
- const next = Math.floor(elapsedSec * FPS) % TOTAL_FRAMES;
- setFrame(next);
- raf = requestAnimationFrame(tick);
- };
- raf = requestAnimationFrame(tick);
- return () => cancelAnimationFrame(raf);
- }, [autoPlay]);
-
- return <PromoScene frame={frame} />;
-};
-
-createRoot(document.getElementById('root')!).render(<PromoRoot />);
diff --git a/promo/src/math.ts b/promo/src/math.ts
deleted file mode 100644
index 06c1b95..0000000
--- a/promo/src/math.ts
+++ /dev/null
@@ -1,90 +0,0 @@
-export const FRAME_W = 1920;
-export const FRAME_H = 1080;
-export const FPS = 60;
-export const DURATION_SEC = 28.0;
-export const TOTAL_FRAMES = Math.round(DURATION_SEC * FPS); // 1680
-
-/**
- * Pixel-locked center canvas rectangle for `meri_ink.png` (3800x2800 = 1.35714 aspect).
- * Exact center: (960, 540). Size: 964 x 710 (aspect 1.35775, <0.05% error).
- * Leaves 478px on left and right, 185px on top and bottom — clearing even the widest
- * Twin-Right Manga cockpit (404px), Appearance Studio drawer (344px), Photoshop top bars (98px),
- * and Tablet Bottom Dock (152px) with crisp gallery breathing room and ZERO overlaps.
- */
-export const CANVAS_RECT = {
- x: 478,
- y: 185,
- w: 964,
- h: 710,
- right: 1442,
- bottom: 895,
- cx: 960,
- cy: 540,
-} as const;
-
-export function clamp(v: number, min = 0, max = 1): number {
- return v < min ? min : v > max ? max : v;
-}
-
-export function lerp(a: number, b: number, t: number): number {
- return a + (b - a) * t;
-}
-
-export function invLerp(a: number, b: number, v: number): number {
- if (Math.abs(b - a) < 1e-9) return v >= b ? 1 : 0;
- return clamp((v - a) / (b - a), 0, 1);
-}
-
-/**
- * Exact 1D cubic-bezier evaluation matching CSS cubic-bezier(x1, y1, x2, y2).
- * Uses Newton-Raphson + bisection fallback for frame-accurate deterministic curves.
- */
-export function cubicBezier(x1: number, y1: number, x2: number, y2: number, x: number): number {
- if (x <= 0) return 0;
- if (x >= 1) return 1;
-
- const sampleX = (u: number) => ((1 - 3 * x2 + 3 * x1) * u + (3 * x2 - 6 * x1)) * u * u + 3 * x1 * u;
- const sampleY = (u: number) => ((1 - 3 * y2 + 3 * y1) * u + (3 * y2 - 6 * y1)) * u * u + 3 * y1 * u;
- const sampleDerivX = (u: number) =>
- 3 * (1 - 3 * x2 + 3 * x1) * u * u + 2 * (3 * x2 - 6 * x1) * u + 3 * x1;
-
- let u = x;
- for (let i = 0; i < 6; i++) {
- const err = sampleX(u) - x;
- if (Math.abs(err) < 1e-6) return sampleY(u);
- const d = sampleDerivX(u);
- if (Math.abs(d) < 1e-6) break;
- u -= err / d;
- }
-
- let lo = 0;
- let hi = 1;
- u = clamp(u, 0, 1);
- for (let i = 0; i < 16; i++) {
- const cur = sampleX(u);
- if (Math.abs(cur - x) < 1e-6) break;
- if (cur < x) lo = u;
- else hi = u;
- u = 0.5 * (lo + hi);
- }
- return sampleY(u);
-}
-
-/** Weighted architectural ease for docks, HUD slides, and masked typography: cubic-bezier(0.16, 1, 0.3, 1) */
-export function easeArch(t: number): number {
- return cubicBezier(0.16, 1, 0.3, 1, clamp(t));
-}
-
-/** Razor-sharp polarity wipes & structural snaps: cubic-bezier(0.76, 0, 0.24, 1) */
-export function easeSnap(t: number): number {
- return cubicBezier(0.76, 0, 0.24, 1, clamp(t));
-}
-
-/** Smooth mechanical scrub curve for continuous dials: cubic-bezier(0.37, 0, 0.63, 1) */
-export function easeSineInOut(t: number): number {
- return 0.5 - 0.5 * Math.cos(Math.PI * clamp(t));
-}
-
-export function rangeProgress(t: number, start: number, end: number, easeFn: (u: number) => number = (u) => u): number {
- return easeFn(invLerp(start, end, t));
-}
diff --git a/promo/src/studioConfigs.ts b/promo/src/studioConfigs.ts
deleted file mode 100644
index 0bef7e6..0000000
--- a/promo/src/studioConfigs.ts
+++ /dev/null
@@ -1,749 +0,0 @@
-import {
- AppearanceConfig,
- BuiltInAccentPigmentId,
- BuiltInLookPresetId,
- ChromeStyle,
- CornerRadiusPreset,
- DensityPreset,
- FontProfile,
- IconStrokeWidth,
- LayerThumbSize,
- SliderStyle,
- BrushListStyle,
- createAppearanceFromPreset,
-} from '@ink/types/appearance';
-import { ResolvedAppearanceTheme, resolveAppearanceTokens } from '@ink/utils/themeEngine';
-
-export type LayoutArchetype =
- | 'pure-canvas'
- | 'focus-hud'
- | 'default-illustration'
- | 'photoshop-islands'
- | 'manga-cockpit'
- | 'left-handed-sumi'
- | 'minimalist-tablet'
- | 'appearance-studio'
- | 'bottom-flat-celadon'
- | 'detached-floating'
- | 'mirrored-drafting'
- | 'printmaker-cockpit';
-
-export interface StudioSpec {
- id: string;
- indexTag: string;
- name: string;
- metaTag: string;
- workspaceLabel: string;
- layout: LayoutArchetype;
- appearance: AppearanceConfig;
- mirrored?: boolean;
- showTopMenuBar: boolean;
- showToolOptionsBar?: boolean;
- showDocTabBar?: boolean;
- showStatusBar: boolean;
- navigatorMode?: 'color' | 'split' | 'bw';
- activeColorHex: string;
- showFloatingSphere?: boolean;
- showFloatingFavorites?: boolean;
- showFloatingSubView?: boolean;
- showFloatingColorCard?: boolean;
- showBottomDock?: boolean;
- mangaScreentone?: boolean;
- seamlessVoid?: boolean;
- /** Optional continuous overrides for live Act 3 animation */
- overridePanelGapPx?: number;
- overrideRadiusMdPx?: number;
- overrideRadiusLgPx?: number;
-}
-
-export interface ResolvedStudio {
- spec: StudioSpec;
- theme: ResolvedAppearanceTheme;
- isDark: boolean;
- panelGapPx: number;
- radiusSmPx: number;
- radiusMdPx: number;
- radiusLgPx: number;
- fontSans: string;
- fontMono: string;
-}
-
-function makeAppearance(
- preset: BuiltInLookPresetId,
- overrides: Partial<AppearanceConfig>
-): AppearanceConfig {
- return createAppearanceFromPreset(preset, overrides);
-}
-
-export function resolveStudio(spec: StudioSpec): ResolvedStudio {
- const theme = resolveAppearanceTokens(spec.appearance);
- const isDark = theme.colorScheme === 'dark';
-
- const radiusMap: Record<CornerRadiusPreset, { sm: number; md: number; lg: number }> = {
- sharp: { sm: 1, md: 2, lg: 3 },
- machined: { sm: 4, md: 5, lg: 8 },
- soft: { sm: 6, md: 10, lg: 13 },
- };
- const baseRadii = radiusMap[spec.appearance.cornerRadius];
-
- const gapMap: Record<ChromeStyle, number> = {
- flat: 0,
- hairline: 1,
- islands: spec.appearance.density === 'comfortable' ? 10 : spec.appearance.density === 'compact' ? 6 : 8,
- };
-
- const fontSansMap: Record<FontProfile, string> = {
- system: "'DM Sans', 'Segoe UI', -apple-system, sans-serif",
- humanist: "'DM Sans', 'Segoe UI Variable', sans-serif",
- technical: "'Bahnschrift', 'DM Sans', 'Segoe UI', sans-serif",
- };
-
- return {
- spec,
- theme,
- isDark,
- panelGapPx: spec.overridePanelGapPx ?? gapMap[spec.appearance.chromeStyle],
- radiusSmPx: spec.overrideRadiusMdPx !== undefined ? Math.max(1, spec.overrideRadiusMdPx * 0.55) : baseRadii.sm,
- radiusMdPx: spec.overrideRadiusMdPx ?? baseRadii.md,
- radiusLgPx: spec.overrideRadiusLgPx ?? baseRadii.lg,
- fontSans: fontSansMap[spec.appearance.fontProfile],
- fontMono: "'JetBrains Mono', 'Cascadia Mono', Consolas, ui-monospace, monospace",
- };
-}
-
-// ============================================================================
-// ACT 1 & ACT 2 STUDIOS (Pure Canvas + 6 Radical Full-Workspace Transformations)
-// ============================================================================
-
-export const STUDIO_PURE_CANVAS: StudioSpec = {
- id: 'pure-canvas',
- indexTag: '00',
- name: 'Pure Canvas Mode',
- metaTag: 'OBSIDIAN OLED · ZERO CHROME',
- workspaceLabel: 'Pure Canvas',
- layout: 'pure-canvas',
- appearance: makeAppearance('obsidian-oled', {
- accent: 'neutral',
- chromeStyle: 'flat',
- cornerRadius: 'soft',
- canvasMatteMode: 'custom',
- canvasMatteCustomHex: '#020202',
- tokenOverrides: {
- '--ui-canvas-matte': '#020202',
- '--ui-bg-void': '#020202',
- '--ui-bg-panel': '#111111',
- },
- }),
- showTopMenuBar: false,
- showDocTabBar: false,
- showStatusBar: false,
- activeColorHex: '#C89B62',
- seamlessVoid: true,
-};
-
-export const STUDIO_FOCUS_HUD: StudioSpec = {
- id: 'focus-hud',
- indexTag: '01',
- name: 'Focus Mode · Atelier HUD',
- metaTag: 'OBSIDIAN OLED · YELLOW OCHRE · FLOATING HUD',
- workspaceLabel: 'Focus Atelier',
- layout: 'focus-hud',
- appearance: makeAppearance('obsidian-oled', {
- accent: 'ochre',
- chromeStyle: 'islands',
- cornerRadius: 'soft',
- floatingOpacity: 0.9,
- density: 'balanced',
- canvasMatteMode: 'custom',
- canvasMatteCustomHex: '#020202',
- tokenOverrides: {
- '--ui-canvas-matte': '#020202',
- '--ui-bg-void': '#020202',
- '--ui-bg-panel': '#111111',
- '--ui-bg-elevated': '#161513',
- '--ui-accent': '#d9a255',
- },
- }),
- showTopMenuBar: false,
- showDocTabBar: false,
- showStatusBar: false,
- activeColorHex: '#C89B62',
- seamlessVoid: true,
-};
-
-export const STUDIO_DEFAULT_ILLUSTRATION: StudioSpec = {
- id: 'default-illustration',
- indexTag: '02',
- name: 'Atelier Default Illustration',
- metaTag: 'GRAPHITE ATELIER · HAIRLINE 1PX · MACHINED',
- workspaceLabel: 'Default Illustration',
- layout: 'default-illustration',
- appearance: makeAppearance('graphite-atelier', {
- accent: 'neutral',
- chromeStyle: 'hairline',
- cornerRadius: 'machined',
- density: 'balanced',
- fontProfile: 'system',
- sliderStyle: 'scrubber',
- brushListStyle: 'stroke',
- iconStrokeWidth: 1.5,
- tokenOverrides: {
- '--ui-bg-panel': '#202020',
- '--ui-canvas-matte': '#161616',
- '--ui-accent': '#e5e5e5',
- },
- }),
- showTopMenuBar: true,
- showDocTabBar: true,
- showStatusBar: true,
- navigatorMode: 'color',
- activeColorHex: '#C89E6E',
-};
-
-export const STUDIO_PHOTOSHOP_PAPER: StudioSpec = {
- id: 'photoshop-paper',
- indexTag: '03',
- name: 'Photoshop Studio · Warm Paper Islands',
- metaTag: 'WARM PAPER LIGHT · MATCHA CELADON · SOFT ISLANDS',
- workspaceLabel: 'Photoshop Studio',
- layout: 'photoshop-islands',
- appearance: makeAppearance('warm-paper-light', {
- accent: 'matcha',
- chromeStyle: 'islands',
- cornerRadius: 'soft',
- density: 'comfortable',
- fontProfile: 'humanist',
- sliderStyle: 'scrubber',
- brushListStyle: 'stroke',
- iconStrokeWidth: 1.5,
- tokenOverrides: {
- '--ui-bg-panel': '#e6e2dd',
- '--ui-bg-header': '#ded9d3',
- '--ui-bg-void': '#cdcac5',
- '--ui-canvas-matte': '#cdcac5',
- '--ui-accent': '#296a37',
- },
- }),
- showTopMenuBar: true,
- showToolOptionsBar: true,
- showDocTabBar: true,
- showStatusBar: true,
- navigatorMode: 'color',
- activeColorHex: '#5F8F64',
-};
-
-export const STUDIO_MANGA_COCKPIT: StudioSpec = {
- id: 'manga-cockpit',
- indexTag: '04',
- name: 'Manga & Value-Calibration Cockpit',
- metaTag: 'STUDIO NEUTRAL 18% · VERMILION SEAL · SHARP FLAT · COMPACT',
- workspaceLabel: 'Manga Studio',
- layout: 'manga-cockpit',
- appearance: makeAppearance('studio-neutral-18', {
- accent: 'vermilion',
- chromeStyle: 'flat',
- cornerRadius: 'sharp',
- density: 'compact',
- fontProfile: 'technical',
- sliderStyle: 'track',
- brushListStyle: 'grid',
- iconStrokeWidth: 1.25,
- borderCrispness: 65,
- tokenOverrides: {
- '--ui-bg-panel': '#494949',
- '--ui-bg-header': '#414141',
- '--ui-bg-void': '#3b3b3b',
- '--ui-canvas-matte': '#595959',
- '--ui-accent': '#e47261',
- },
- }),
- showTopMenuBar: true,
- showDocTabBar: true,
- showStatusBar: true,
- navigatorMode: 'split',
- activeColorHex: '#E47261',
- mangaScreentone: true,
-};
-
-export const STUDIO_LEFT_HANDED_SUMI: StudioSpec = {
- id: 'left-handed-sumi',
- indexTag: '05',
- name: 'Left-Handed Sumi Atelier + 3D Sphere',
- metaTag: 'SUMI SEPIA · YELLOW OCHRE · MIRRORED · 3D COLOR SPHERE',
- workspaceLabel: 'Sumi Atelier (Left)',
- layout: 'left-handed-sumi',
- mirrored: true,
- appearance: makeAppearance('sumi-sepia', {
- accent: 'ochre',
- chromeStyle: 'islands',
- cornerRadius: 'machined',
- density: 'balanced',
- fontProfile: 'system',
- sliderStyle: 'scrubber',
- brushListStyle: 'stroke',
- iconStrokeWidth: 1.5,
- tokenOverrides: {
- '--ui-bg-panel': '#231e1a',
- '--ui-bg-header': '#1d1915',
- '--ui-bg-void': '#17130f',
- '--ui-canvas-matte': '#17130f',
- '--ui-accent': '#d9a255',
- },
- }),
- showTopMenuBar: true,
- showDocTabBar: true,
- showStatusBar: true,
- navigatorMode: 'color',
- activeColorHex: '#D9A255',
- showFloatingSphere: true,
- showFloatingFavorites: true,
-};
-
-export const STUDIO_MINIMALIST_TABLET: StudioSpec = {
- id: 'minimalist-tablet',
- indexTag: '06',
- name: 'Minimalist Tablet + Bottom Dock',
- metaTag: 'DAYLIGHT CRISP · PRUSSIAN BLUE · SOFT 12PX · BOLD 1.85PX ICONS',
- workspaceLabel: 'Minimalist Tablet',
- layout: 'minimalist-tablet',
- appearance: makeAppearance('daylight-crisp', {
- accent: 'prussian',
- chromeStyle: 'islands',
- cornerRadius: 'soft',
- density: 'comfortable',
- fontProfile: 'humanist',
- sliderStyle: 'scrubber',
- iconStrokeWidth: 1.85,
- tokenOverrides: {
- '--ui-bg-panel': '#eaebec',
- '--ui-bg-header': '#e2e4e6',
- '--ui-bg-void': '#d3d3d4',
- '--ui-canvas-matte': '#d3d3d4',
- '--ui-accent': '#0a5a9a',
- },
- }),
- showTopMenuBar: true,
- showDocTabBar: false,
- showStatusBar: true,
- showBottomDock: true,
- activeColorHex: '#0A5A9A',
-};
-
-// ============================================================================
-// ACT 3 — LIVE ENGINE CONTINUOUS APPEARANCE STUDIO SPEC BUILDER
-// ============================================================================
-
-export function buildAct3LiveStudio(params: {
- warmth: number;
- chromeStyle: ChromeStyle;
- cornerRadius: CornerRadiusPreset;
- accent: BuiltInAccentPigmentId;
- panelGapPx: number;
- radiusMdPx: number;
- radiusLgPx: number;
-}): StudioSpec {
- const accentHexMap: Record<BuiltInAccentPigmentId, string> = {
- neutral: '#e5e5e5',
- vermilion: '#e47261',
- prussian: '#5ea1df',
- matcha: '#7bb583',
- ochre: '#d9a255',
- plum: '#b88ed1',
- };
- const warmthStr = params.warmth > 0 ? `+${Math.round(params.warmth)}` : `${Math.round(params.warmth)}`;
- return {
- id: 'act3-live-engine',
- indexTag: 'OKLCH',
- name: 'Appearance Studio · Live Engine',
- metaTag: `WARMTH ${warmthStr} · ${params.chromeStyle.toUpperCase()} · ${params.cornerRadius.toUpperCase()}`,
- workspaceLabel: 'Appearance Studio',
- layout: 'appearance-studio',
- appearance: makeAppearance('graphite-atelier', {
- lookPreset: 'custom',
- baseLookPreset: 'graphite-atelier',
- surfaceWarmth: params.warmth,
- surfaceContrast: 1.04,
- accent: params.accent,
- chromeStyle: params.chromeStyle,
- cornerRadius: params.cornerRadius,
- density: 'balanced',
- fontProfile: 'system',
- sliderStyle: 'scrubber',
- brushListStyle: 'stroke',
- iconStrokeWidth: 1.5,
- }),
- showTopMenuBar: true,
- showDocTabBar: false,
- showStatusBar: true,
- activeColorHex: accentHexMap[params.accent],
- overridePanelGapPx: params.panelGapPx,
- overrideRadiusMdPx: params.radiusMdPx,
- overrideRadiusLgPx: params.radiusLgPx,
- };
-}
-
-// ============================================================================
-// ACT 4 — 10 RADICAL STUDIO PERMUTATIONS (Climax Cascade)
-// ============================================================================
-
-export interface RapidBeatSpec {
- num: string;
- startSec: number;
- endSec: number;
- transition: 'cut' | 'wipe-h' | 'wipe-v' | 'wipe-diag';
- studio: StudioSpec;
-}
-
-export const ACT4_PERMUTATIONS: RapidBeatSpec[] = [
- {
- num: '01',
- startSec: 18.50,
- endSec: 19.12,
- transition: 'cut',
- studio: {
- id: 'p01-kyoto-sumi',
- indexTag: '01/10',
- name: 'Kyoto Sumi',
- metaTag: 'SUMI SEPIA · VERMILION SEAL · CLIP STUDIO DUAL-LEFT',
- workspaceLabel: 'Clip Studio',
- layout: 'default-illustration',
- appearance: makeAppearance('sumi-sepia', {
- accent: 'vermilion',
- chromeStyle: 'hairline',
- cornerRadius: 'machined',
- density: 'balanced',
- tokenOverrides: {
- '--ui-bg-panel': '#231e1a',
- '--ui-canvas-matte': '#17130f',
- '--ui-accent': '#e47261',
- },
- }),
- showTopMenuBar: true,
- showDocTabBar: true,
- showStatusBar: true,
- navigatorMode: 'color',
- activeColorHex: '#E47261',
- },
- },
- {
- num: '02',
- startSec: 19.12,
- endSec: 19.70,
- transition: 'wipe-h',
- studio: {
- id: 'p02-botanical-linen',
- indexTag: '02/10',
- name: 'Botanical Linen',
- metaTag: 'WARM PAPER · MATCHA CELADON · SOFT ISLANDS · TOP BAR',
- workspaceLabel: 'Photoshop Studio',
- layout: 'photoshop-islands',
- appearance: makeAppearance('warm-paper-light', {
- accent: 'matcha',
- chromeStyle: 'islands',
- cornerRadius: 'soft',
- density: 'comfortable',
- fontProfile: 'humanist',
- tokenOverrides: {
- '--ui-bg-panel': '#e6e2dd',
- '--ui-bg-void': '#cdcac5',
- '--ui-canvas-matte': '#cdcac5',
- '--ui-accent': '#296a37',
- },
- }),
- showTopMenuBar: true,
- showToolOptionsBar: true,
- showDocTabBar: true,
- showStatusBar: true,
- activeColorHex: '#5F8F64',
- },
- },
- {
- num: '03',
- startSec: 19.70,
- endSec: 20.24,
- transition: 'cut',
- studio: {
- id: 'p03-architect-slate',
- indexTag: '03/10',
- name: 'Architect Slate',
- metaTag: 'COOL SLATE #1C2026 · PRUSSIAN BLUE · LEFT-HANDED · TECHNICAL',
- workspaceLabel: 'Architect Mirror',
- layout: 'left-handed-sumi',
- mirrored: true,
- appearance: makeAppearance('graphite-atelier', {
- surfaceWarmth: -62,
- accent: 'prussian',
- chromeStyle: 'hairline',
- cornerRadius: 'sharp',
- density: 'compact',
- fontProfile: 'technical',
- sliderStyle: 'track',
- iconStrokeWidth: 1.25,
- tokenOverrides: {
- '--ui-bg-panel': '#1c2026',
- '--ui-bg-header': '#161a20',
- '--ui-bg-void': '#111419',
- '--ui-canvas-matte': '#13171d',
- '--ui-accent': '#5ea1df',
- },
- }),
- showTopMenuBar: true,
- showDocTabBar: true,
- showStatusBar: true,
- navigatorMode: 'color',
- activeColorHex: '#5EA1DF',
- showFloatingSphere: false,
- showFloatingFavorites: false,
- },
- },
- {
- num: '04',
- startSec: 20.24,
- endSec: 20.76,
- transition: 'cut',
- studio: {
- id: 'p04-nocturne-ochre',
- indexTag: '04/10',
- name: 'Nocturne Ochre',
- metaTag: 'OBSIDIAN OLED · YELLOW OCHRE · FOCUS HUD + 3D SPHERE',
- workspaceLabel: 'Focus Nocturne',
- layout: 'focus-hud',
- appearance: makeAppearance('obsidian-oled', {
- accent: 'ochre',
- chromeStyle: 'islands',
- cornerRadius: 'soft',
- floatingOpacity: 0.9,
- canvasMatteMode: 'custom',
- canvasMatteCustomHex: '#020202',
- tokenOverrides: {
- '--ui-canvas-matte': '#020202',
- '--ui-bg-void': '#020202',
- '--ui-bg-panel': '#111111',
- '--ui-accent': '#d9a255',
- },
- }),
- showTopMenuBar: false,
- showDocTabBar: false,
- showStatusBar: false,
- activeColorHex: '#D9A255',
- showFloatingSphere: true,
- seamlessVoid: true,
- },
- },
- {
- num: '05',
- startSec: 20.76,
- endSec: 21.26,
- transition: 'wipe-diag',
- studio: {
- id: 'p05-washi-seal',
- indexTag: '05/10',
- name: 'Washi Seal',
- metaTag: 'WARM RAG PAPER #DCD3C6 · VERMILION · MANGA TWIN-RIGHT',
- workspaceLabel: 'Washi Manga',
- layout: 'manga-cockpit',
- appearance: makeAppearance('warm-paper-light', {
- surfaceWarmth: 68,
- accent: 'vermilion',
- chromeStyle: 'hairline',
- cornerRadius: 'machined',
- density: 'compact',
- brushListStyle: 'grid',
- sliderStyle: 'track',
- tokenOverrides: {
- '--ui-bg-panel': '#dcd3c6',
- '--ui-bg-header': '#d2c8b9',
- '--ui-bg-void': '#c4b9a8',
- '--ui-canvas-matte': '#c8beaf',
- '--ui-accent': '#a32e24',
- },
- }),
- showTopMenuBar: true,
- showDocTabBar: true,
- showStatusBar: true,
- navigatorMode: 'split',
- activeColorHex: '#A32E24',
- mangaScreentone: true,
- },
- },
- {
- num: '06',
- startSec: 21.26,
- endSec: 21.74,
- transition: 'cut',
- studio: {
- id: 'p06-midnight-celadon',
- indexTag: '06/10',
- name: 'Midnight Celadon',
- metaTag: 'COOL OLED CHARCOAL · MATCHA · BORDERLESS FLAT · BOTTOM DOCK',
- workspaceLabel: 'Celadon Cinema',
- layout: 'bottom-flat-celadon',
- appearance: makeAppearance('obsidian-oled', {
- surfaceWarmth: -35,
- accent: 'matcha',
- chromeStyle: 'flat',
- cornerRadius: 'sharp',
- density: 'balanced',
- layerThumbSize: 'large',
- borderCrispness: 25,
- tokenOverrides: {
- '--ui-bg-panel': '#111615',
- '--ui-bg-header': '#0c100f',
- '--ui-bg-void': '#080b0a',
- '--ui-canvas-matte': '#0a0e0d',
- '--ui-accent': '#7bb583',
- },
- }),
- showTopMenuBar: true,
- showDocTabBar: false,
- showStatusBar: true,
- showBottomDock: true,
- activeColorHex: '#7BB583',
- },
- },
- {
- num: '07',
- startSec: 21.74,
- endSec: 22.20,
- transition: 'cut',
- studio: {
- id: 'p07-smoked-atelier',
- indexTag: '07/10',
- name: 'Smoked Atelier',
- metaTag: 'SMOKED PLUM #1D1A20 · SOFT ISLANDS · FLOATING SUBVIEW & COLOR',
- workspaceLabel: 'Floating Studio',
- layout: 'detached-floating',
- appearance: makeAppearance('graphite-atelier', {
- accent: 'plum',
- chromeStyle: 'islands',
- cornerRadius: 'soft',
- density: 'balanced',
- floatingOpacity: 0.94,
- tokenOverrides: {
- '--ui-bg-panel': '#1d1a20',
- '--ui-bg-header': '#17141a',
- '--ui-bg-void': '#121015',
- '--ui-canvas-matte': '#131116',
- '--ui-accent': '#b88ed1',
- },
- }),
- showTopMenuBar: true,
- showDocTabBar: false,
- showStatusBar: true,
- showFloatingSubView: true,
- showFloatingColorCard: true,
- activeColorHex: '#B88ED1',
- },
- },
- {
- num: '08',
- startSec: 22.20,
- endSec: 22.62,
- transition: 'wipe-h',
- studio: {
- id: 'p08-gallery-daylight',
- indexTag: '08/10',
- name: 'Gallery Daylight',
- metaTag: 'DAYLIGHT CRISP · PRUSSIAN BLUE · COLLAPSED TABLET EDGES',
- workspaceLabel: 'Gallery Tablet',
- layout: 'minimalist-tablet',
- appearance: makeAppearance('daylight-crisp', {
- accent: 'prussian',
- chromeStyle: 'islands',
- cornerRadius: 'soft',
- density: 'comfortable',
- iconStrokeWidth: 1.85,
- tokenOverrides: {
- '--ui-bg-panel': '#eaebec',
- '--ui-bg-header': '#e2e4e6',
- '--ui-bg-void': '#d3d3d4',
- '--ui-canvas-matte': '#d3d3d4',
- '--ui-accent': '#0a5a9a',
- },
- }),
- showTopMenuBar: true,
- showDocTabBar: false,
- showStatusBar: true,
- showBottomDock: true,
- activeColorHex: '#0A5A9A',
- },
- },
- {
- num: '09',
- startSec: 22.62,
- endSec: 23.02,
- transition: 'cut',
- studio: {
- id: 'p09-drafting-ochre',
- indexTag: '09/10',
- name: 'Drafting Ochre',
- metaTag: 'WARM 18% MID-GREY · YELLOW OCHRE · SPLIT VALUE NAV · GRID TILES',
- workspaceLabel: 'Value Drafting',
- layout: 'mirrored-drafting',
- mirrored: true,
- appearance: makeAppearance('studio-neutral-18', {
- surfaceWarmth: 36,
- accent: 'ochre',
- chromeStyle: 'hairline',
- cornerRadius: 'machined',
- density: 'compact',
- brushListStyle: 'grid',
- sliderStyle: 'track',
- fontProfile: 'technical',
- tokenOverrides: {
- '--ui-bg-panel': '#4c4944',
- '--ui-bg-header': '#43403c',
- '--ui-bg-void': '#3a3834',
- '--ui-canvas-matte': '#5c5852',
- '--ui-accent': '#d9a255',
- },
- }),
- showTopMenuBar: true,
- showDocTabBar: true,
- showStatusBar: true,
- navigatorMode: 'split',
- activeColorHex: '#D9A255',
- },
- },
- {
- num: '10',
- startSec: 23.02,
- endSec: 23.40,
- transition: 'cut',
- studio: {
- id: 'p10-stark-printmaker',
- indexTag: '10/10',
- name: 'Stark Printmaker Ink',
- metaTag: 'CRISP PAPER #F5F4F0 · PURE INK #111111 · SHARP 1PX FLAT COCKPIT',
- workspaceLabel: 'Printmaker Ink',
- layout: 'printmaker-cockpit',
- appearance: makeAppearance('daylight-crisp', {
- accent: 'neutral',
- chromeStyle: 'flat',
- cornerRadius: 'sharp',
- density: 'compact',
- fontProfile: 'technical',
- sliderStyle: 'track',
- brushListStyle: 'grid',
- iconStrokeWidth: 1.5,
- borderCrispness: 92,
- tokenOverrides: {
- '--ui-bg-panel': '#f5f4f0',
- '--ui-bg-header': '#eceae3',
- '--ui-bg-control': '#e7e5de',
- '--ui-bg-void': '#d8d5cc',
- '--ui-canvas-matte': '#e3e1da',
- '--ui-accent': '#111111',
- '--ui-border-default': 'rgba(17, 17, 17, 0.24)',
- '--ui-border-subtle': 'rgba(17, 17, 17, 0.14)',
- },
- }),
- showTopMenuBar: true,
- showDocTabBar: true,
- showStatusBar: true,
- navigatorMode: 'bw',
- activeColorHex: '#111111',
- mangaScreentone: true,
- },
- },
-];
diff --git a/promo/src/styles.css b/promo/src/styles.css
deleted file mode 100644
index 1867dbe..0000000
--- a/promo/src/styles.css
+++ /dev/null
@@ -1,86 +0,0 @@
-@font-face {
- font-family: 'Fraunces';
- font-style: normal;
- font-weight: 400 600;
- font-display: block;
- src: url('/assets/fonts/fraunces-latin.woff2') format('woff2');
-}
-
-@font-face {
- font-family: 'Fraunces';
- font-style: italic;
- font-weight: 400 500;
- font-display: block;
- src: url('/assets/fonts/fraunces-italic-latin.woff2') format('woff2');
-}
-
-@font-face {
- font-family: 'DM Sans';
- font-style: normal;
- font-weight: 400 700;
- font-display: block;
- src: url('/assets/fonts/dm-sans-latin.woff2') format('woff2');
-}
-
-@font-face {
- font-family: 'DM Sans';
- font-style: italic;
- font-weight: 400 500;
- font-display: block;
- src: url('/assets/fonts/dm-sans-italic-latin.woff2') format('woff2');
-}
-
-*,
-*::before,
-*::after {
- box-sizing: border-box;
- margin: 0;
- padding: 0;
-}
-
-html,
-body,
-#root {
- width: 1920px;
- height: 1080px;
- overflow: hidden;
- background: #11100f;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
- text-rendering: geometricPrecision;
- font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
- user-select: none;
-}
-
-.font-editorial {
- font-family: 'Fraunces', Georgia, serif;
-}
-
-.font-sans-ui {
- font-family: 'DM Sans', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
-}
-
-.font-mono-ui {
- font-family: 'JetBrains Mono', 'Cascadia Mono', 'Cascadia Code', Consolas, ui-monospace, monospace;
- font-variant-numeric: tabular-nums;
-}
-
-.checker-bg-dark {
- background-image:
- linear-gradient(45deg, rgba(255, 255, 255, 0.11) 25%, transparent 25%),
- linear-gradient(-45deg, rgba(255, 255, 255, 0.11) 25%, transparent 25%),
- linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.11) 75%),
- linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.11) 75%);
- background-size: 8px 8px;
- background-position: 0 0, 0 4px, 4px -4px, -4px 0;
-}
-
-.checker-bg-light {
- background-image:
- linear-gradient(45deg, rgba(20, 20, 24, 0.11) 25%, transparent 25%),
- linear-gradient(-45deg, rgba(20, 20, 24, 0.11) 25%, transparent 25%),
- linear-gradient(45deg, transparent 75%, rgba(20, 20, 24, 0.11) 75%),
- linear-gradient(-45deg, transparent 75%, rgba(20, 20, 24, 0.11) 75%);
- background-size: 8px 8px;
- background-position: 0 0, 0 4px, 4px -4px, -4px 0;
-}
diff --git a/promo/synth_audio.py b/promo/synth_audio.py
deleted file mode 100644
index 46b7c75..0000000
--- a/promo/synth_audio.py
+++ /dev/null
@@ -1,329 +0,0 @@
-import math
-import os
-import wave
-import numpy as np
-
-SR = 48000
-DURATION = 28.0
-N_SAMPLES = int(SR * DURATION)
-
-rng = np.random.default_rng(424242)
-
-
-def one_pole_lowpass(x: np.ndarray, cutoff_hz: float) -> np.ndarray:
- """Fast deterministic IIR low-pass via FFT for crisp zero-phase studio tone shaping."""
- n = len(x)
- freqs = np.fft.rfftfreq(n, 1.0 / SR)
- spec = np.fft.rfft(x)
- h = 1.0 / np.sqrt(1.0 + (freqs / max(1.0, cutoff_hz)) ** 4)
- return np.fft.irfft(spec * h, n=n)
-
-
-def bandpass_fft(x: np.ndarray, lo_hz: float, hi_hz: float) -> np.ndarray:
- n = len(x)
- freqs = np.fft.rfftfreq(n, 1.0 / SR)
- spec = np.fft.rfft(x)
- lo_mask = 1.0 / np.sqrt(1.0 + (max(1.0, lo_hz) / np.maximum(freqs, 1e-6)) ** 4)
- hi_mask = 1.0 / np.sqrt(1.0 + (freqs / max(1.0, hi_hz)) ** 4)
- mask = lo_mask * hi_mask
- mask[0] = 0.0
- return np.fft.irfft(spec * mask, n=n)
-
-
-def mix_stereo(buf: np.ndarray, start_sec: float, sig_l: np.ndarray, sig_r: np.ndarray | None = None, gain: float = 1.0):
- if sig_r is None:
- sig_r = sig_l
- i0 = int(round(start_sec * SR))
- n = len(sig_l)
- if i0 >= N_SAMPLES or i0 + n <= 0:
- return
- src_start = max(0, -i0)
- dst_start = max(0, i0)
- length = min(n - src_start, N_SAMPLES - dst_start)
- if length <= 0:
- return
- buf[dst_start:dst_start + length, 0] += sig_l[src_start:src_start + length] * gain
- buf[dst_start:dst_start + length, 1] += sig_r[src_start:src_start + length] * gain
-
-
-def make_leica_shutter(intensity: float = 1.0, bright: float = 1.0) -> tuple[np.ndarray, np.ndarray]:
- """Tactile dry Leica-style mechanical shutter snap (double-curtain damped click + woody body)."""
- dur = 0.085
- n = int(SR * dur)
- t = np.arange(n) / SR
-
- # 1. Warm damped mechanical chassis thud (fast pitch drop 185 -> 68 Hz)
- freq_thud = 68.0 + 117.0 * np.exp(-t * 95.0)
- phase = 2.0 * np.pi * np.cumsum(freq_thud) / SR
- thud = np.sin(phase) * np.exp(-t * 68.0) * 0.55
-
- # 2. First curtain dry transient click at t=0
- noise1 = rng.standard_normal(n)
- click1 = bandpass_fft(noise1, 1400.0 * bright, 5200.0 * bright) * np.exp(-t * 220.0) * 0.65
-
- # 3. Second curtain precision brass/steel detent at t=11ms
- t2 = np.maximum(0.0, t - 0.011)
- mask2 = (t >= 0.011).astype(np.float64)
- noise2 = rng.standard_normal(n)
- click2 = bandpass_fft(noise2, 2200.0 * bright, 6400.0 * bright) * np.exp(-t2 * 190.0) * mask2 * 0.48
- ping = np.sin(2.0 * np.pi * (3100.0 * bright) * t2) * np.exp(-t2 * 165.0) * mask2 * 0.09
-
- mono = (thud + click1 + click2 + ping) * intensity
- # Subtle micro stereo realism (0.25ms Haas decorrelation on high click)
- sig_l = mono.copy()
- sig_r = mono.copy()
- shift = 9
- sig_r[shift:] = (thud[shift:] + click1[:-shift] * 0.95 + click2[shift:] + ping[shift:]) * intensity
- return sig_l, sig_r
-
-
-def make_detent_tick(pitch_hz: float = 2400.0, intensity: float = 0.5) -> tuple[np.ndarray, np.ndarray]:
- """Crisp rotary encoder / machined UI switch micro-detent."""
- dur = 0.032
- n = int(SR * dur)
- t = np.arange(n) / SR
- noise = rng.standard_normal(n)
- click = bandpass_fft(noise, pitch_hz * 0.7, pitch_hz * 1.9) * np.exp(-t * 290.0)
- body = np.sin(2.0 * np.pi * (pitch_hz * 0.22) * t) * np.exp(-t * 180.0) * 0.35
- sig = (click * 0.75 + body) * intensity
- return sig, sig * 0.96
-
-
-def make_paper_wipe(dur: float = 0.58, direction: str = 'lr', weight: float = 1.0) -> tuple[np.ndarray, np.ndarray]:
- """Soft dry heavyweight cotton rag paper / linen brush sweep with natural stereo movement."""
- n = int(SR * dur)
- t = np.arange(n) / SR
- u = t / dur
-
- # Smooth weighted velocity profile matching cubic-bezier(0.76, 0, 0.24, 1) derivative
- env = np.sin(np.pi * u) ** 1.45
- # Subtle paper fiber micro-texture ripple
- grain = 1.0 + 0.16 * np.sin(2.0 * np.pi * 29.0 * t + 0.7) * np.sin(2.0 * np.pi * 11.5 * t)
-
- raw_l = rng.standard_normal(n)
- raw_r = rng.standard_normal(n)
- # Two layers: warm cotton body (350-1150 Hz) + dry linen surface brush (1200-3400 Hz)
- body_l = bandpass_fft(raw_l, 320.0, 1150.0) * 0.62
- body_r = bandpass_fft(raw_r, 320.0, 1150.0) * 0.62
- brush_l = bandpass_fft(raw_l, 1150.0, 3400.0) * 0.42
- brush_r = bandpass_fft(raw_r, 1150.0, 3400.0) * 0.42
-
- tex_l = (body_l + brush_l * (0.65 + 0.55 * u)) * env * grain * weight * 0.42
- tex_r = (body_r + brush_r * (0.65 + 0.55 * u)) * env * grain * weight * 0.42
-
- # Gentle natural stereo pan (never gimmicky hard pan: 0.35 <-> 0.65)
- pan = 0.32 + 0.36 * u if direction == 'lr' else 0.68 - 0.36 * u
- sig_l = tex_l * np.sqrt(1.0 - pan) * 1.25
- sig_r = tex_r * np.sqrt(pan) * 1.25
- return sig_l, sig_r
-
-
-def make_drawer_glide(dur: float = 0.42, intensity: float = 0.5) -> tuple[np.ndarray, np.ndarray]:
- """Subtle precision-machined rail slide ending with soft tactile lock."""
- n = int(SR * dur)
- t = np.arange(n) / SR
- u = t / dur
- env = (u ** 0.6) * ((1.0 - u) ** 1.4) * 3.8
- raw = rng.standard_normal(n)
- rail = bandpass_fft(raw, 420.0, 1550.0) * env * 0.28 * intensity
- # Soft damped low air movement
- low = bandpass_fft(rng.standard_normal(n), 95.0, 260.0) * env * 0.22 * intensity
- sig = rail + low
- return sig, sig
-
-
-def make_analog_pulse(freq_hz: float = 65.41, dur: float = 0.28, intensity: float = 0.42) -> tuple[np.ndarray, np.ndarray]:
- """Dry, muted warm analog bass pulse (zero EDM boom, pure subtle studio momentum)."""
- n = int(SR * dur)
- t = np.arange(n) / SR
- attack = np.minimum(1.0, t / 0.006)
- decay = np.exp(-t * 10.5)
- f = freq_hz * (1.0 + 0.14 * np.exp(-t * 75.0))
- phase = 2.0 * np.pi * np.cumsum(f) / SR
- # Warm fundamental + gentle 2nd harmonic
- tone = (np.sin(phase) * 0.85 + np.sin(2.0 * phase) * 0.15) * attack * decay
- tone = one_pole_lowpass(tone, 240.0) * intensity
- return tone, tone
-
-
-def make_felt_chord(dur: float = 3.65, intensity: float = 0.62) -> tuple[np.ndarray, np.ndarray]:
- """One warm, organic, resonant acoustic felt-piano D-major-9 atelier chord for the end card."""
- n = int(SR * dur)
- t = np.arange(n) / SR
-
- # Voicing: D2 (soft anchor), D3, A3, E4, F#4, A4 (open warm gallery resonance)
- notes = [
- (73.42, 0.26, 0.00, 0.85, -0.10),
- (146.83, 0.34, 0.012, 0.92, -0.18),
- (220.00, 0.30, 0.024, 1.00, 0.12),
- (329.63, 0.24, 0.036, 1.12, -0.22),
- (369.99, 0.20, 0.048, 1.24, 0.24),
- (440.00, 0.14, 0.062, 1.45, 0.08),
- ]
-
- sig_l = np.zeros(n, dtype=np.float64)
- sig_r = np.zeros(n, dtype=np.float64)
-
- for freq, amp, delay_s, decay_rate, pan in notes:
- tn = np.maximum(0.0, t - delay_s)
- active = (t >= delay_s).astype(np.float64)
- # Soft felt hammer attack (14ms) + organic dual-stage acoustic string decay
- atk = 1.0 - np.exp(-tn / 0.014)
- env = atk * (0.68 * np.exp(-tn * decay_rate) + 0.32 * np.exp(-tn * decay_rate * 0.42)) * active
-
- # Natural piano unison micro-detuning (+-0.35 Hz) & gentle harmonic warmth
- w = 2.0 * np.pi * freq * tn
- h1 = np.sin(w) * 0.72 + np.sin(w * 1.0014 + 0.4) * 0.28
- h2 = np.sin(2.0 * w + 0.2) * 0.22 * np.exp(-tn * (decay_rate * 1.9))
- h3 = np.sin(3.0 * w + 0.9) * 0.06 * np.exp(-tn * (decay_rate * 3.1))
-
- # Subtle muffled felt hammer thump
- felt_n = bandpass_fft(rng.standard_normal(n), 140.0, 520.0) * np.exp(-tn * 65.0) * active * 0.09
-
- voice = (h1 + h2 + h3 + felt_n) * env * amp
- pan_r = 0.5 + pan * 0.5
- sig_l += voice * math.sqrt(1.0 - pan_r)
- sig_r += voice * math.sqrt(pan_r)
-
- # Warm felt low-pass filter so there is zero harsh digital fizz
- sig_l = one_pole_lowpass(sig_l, 1650.0)
- sig_r = one_pole_lowpass(sig_r, 1650.0)
-
- # Smooth fade out at very end (last 0.48s)
- fade_n = int(0.48 * SR)
- fade_curve = 0.5 * (1.0 + np.cos(np.pi * np.linspace(0.0, 1.0, fade_n)))
- sig_l[-fade_n:] *= fade_curve
- sig_r[-fade_n:] *= fade_curve
-
- return sig_l * intensity, sig_r * intensity
-
-
-def make_act1_bed() -> tuple[np.ndarray, np.ndarray]:
- """Barely perceptible warm felt room resonance underneath Act 1 title card (0.0 -> 2.65s)."""
- dur = 2.75
- n = int(SR * dur)
- t = np.arange(n) / SR
- env = np.minimum(1.0, t / 0.45) * np.where(t < 2.0, 1.0, np.maximum(0.0, 1.0 - (t - 2.0) / 0.65))
- tone = (
- np.sin(2.0 * np.pi * 73.42 * t) * 0.65
- + np.sin(2.0 * np.pi * 110.00 * t + 0.5) * 0.35
- ) * env
- tone = one_pole_lowpass(tone, 220.0) * 0.14
- return tone, tone
-
-
-def build_soundtrack(out_wav_path: str):
- buf = np.zeros((N_SAMPLES, 2), dtype=np.float64)
-
- # =========================================================================
- # ACT 1 (0.00 - 3.50): Cold Open, Hairline Draw, Horizontal Curtain Part
- # =========================================================================
- mix_stereo(buf, 0.05, *make_act1_bed(), gain=1.0)
- mix_stereo(buf, 1.72, *make_detent_tick(2900.0, 0.32)) # Hairline draw
- mix_stereo(buf, 2.02, *make_paper_wipe(0.58, 'lr', weight=0.62)) # Charcoal curtain part
-
- # =========================================================================
- # ACT 2 (3.50 - 15.50): Six Radical Full-Workspace Transformations
- # =========================================================================
- # 1. 3.50 Focus Mode Atelier HUD glide in
- mix_stereo(buf, 3.50, *make_drawer_glide(0.38, 0.55))
- mix_stereo(buf, 3.88, *make_detent_tick(2150.0, 0.36))
-
- # 2. 5.20 Default Illustration 4-edge machined drawer slide
- mix_stereo(buf, 5.20, *make_detent_tick(1750.0, 0.32))
- mix_stereo(buf, 5.26, *make_drawer_glide(0.52, 0.72))
- mix_stereo(buf, 5.82, *make_leica_shutter(0.58, bright=0.92))
-
- # 3. 7.20 Photoshop Studio Warm Paper Islands (Vertical Polarity Wipe!)
- mix_stereo(buf, 7.20, *make_paper_wipe(0.62, 'lr', weight=1.05))
- mix_stereo(buf, 7.80, *make_detent_tick(2650.0, 0.38))
-
- # 4. 9.40 Manga & Value-Calibration Cockpit (Hard Architectural Snap)
- mix_stereo(buf, 9.40, *make_leica_shutter(0.95, bright=1.08))
- mix_stereo(buf, 9.58, *make_detent_tick(3100.0, 0.42))
-
- # 5. 11.40 Left-Handed Sumi Atelier + 3D Sphere (Horizontal Mirror Snap)
- mix_stereo(buf, 11.40, *make_leica_shutter(0.75, bright=0.86))
- mix_stereo(buf, 11.44, *make_paper_wipe(0.42, 'rl', weight=0.68))
- mix_stereo(buf, 11.88, *make_detent_tick(1950.0, 0.38))
-
- # 6. 13.50 Minimalist Tablet + Bottom Dock (Diagonal Daylight Wipe + Bottom Glide)
- mix_stereo(buf, 13.50, *make_paper_wipe(0.56, 'lr', weight=0.95))
- mix_stereo(buf, 13.72, *make_drawer_glide(0.44, 0.62))
- mix_stereo(buf, 14.18, *make_detent_tick(2450.0, 0.35))
-
- # =========================================================================
- # ACT 3 (15.50 - 18.50): Live Engine Micro-Craft Beat (Appearance Studio)
- # =========================================================================
- mix_stereo(buf, 15.50, *make_drawer_glide(0.38, 0.65))
- # Subtle tactile rotary encoder micro-ticks during continuous OKLCH Warmth scrub
- for i, ts in enumerate(np.linspace(15.82, 16.66, 9)):
- mix_stereo(buf, float(ts), *make_detent_tick(1800.0 + i * 95.0, 0.22))
- # Crisp 3-step chrome morph switches (FLAT -> HAIRLINE -> ISLANDS)
- mix_stereo(buf, 16.72, *make_leica_shutter(0.52, bright=0.95))
- mix_stereo(buf, 17.04, *make_leica_shutter(0.56, bright=1.04))
- mix_stereo(buf, 17.34, *make_leica_shutter(0.62, bright=1.12))
- # 5 mineral pigment ticks rippling up gently
- for i, ts in enumerate([17.62, 17.80, 17.97, 18.15, 18.32]):
- mix_stereo(buf, ts, *make_detent_tick(2100.0 + i * 240.0, 0.34))
-
- # =========================================================================
- # ACT 4 (18.50 - 23.40): 10 Radical Studio Permutations Accelerating Cascade
- # =========================================================================
- act4_beats = [
- (18.50, 'cut', 65.41), # 01 Kyoto Sumi
- (19.12, 'wipe', 65.41), # 02 Botanical Linen (light wipe)
- (19.70, 'cut', 73.42), # 03 Architect Slate
- (20.24, 'cut', 73.42), # 04 Nocturne Ochre
- (20.76, 'wipe', 73.42), # 05 Washi Seal (rag paper wipe)
- (21.26, 'cut', 82.41), # 06 Midnight Celadon
- (21.74, 'cut', 82.41), # 07 Smoked Atelier
- (22.20, 'wipe', 82.41), # 08 Gallery Daylight (daylight wipe)
- (22.62, 'cut', 87.31), # 09 Drafting Ochre
- (23.02, 'cut', 98.00), # 10 Stark Printmaker Ink
- ]
- for idx, (ts, kind, bass_hz) in enumerate(act4_beats):
- drive = 0.72 + 0.032 * idx
- mix_stereo(buf, ts, *make_leica_shutter(drive, bright=0.92 + 0.03 * idx))
- mix_stereo(buf, ts, *make_analog_pulse(bass_hz, dur=0.26, intensity=0.28 + 0.015 * idx))
- if kind == 'wipe':
- mix_stereo(buf, ts, *make_paper_wipe(0.22, 'lr', weight=0.72))
-
- # 23.40: Crisp outward snap click — THEN HARD CUT TO TOTAL DEAD SILENCE (23.45 -> 23.80)!
- mix_stereo(buf, 23.40, *make_detent_tick(2850.0, 0.58))
- # Guarantee mathematical zero digital silence from 23.45s to 23.80s!
- s_start = int(23.45 * SR)
- s_end = int(23.80 * SR)
- # 12ms micro fade-out right before dead silence so zero click artifact
- f_len = int(0.012 * SR)
- buf[s_start - f_len:s_start] *= np.linspace(1.0, 0.0, f_len)[:, None]
- buf[s_start:s_end] = 0.0
-
- # =========================================================================
- # ACT 5 (23.80 - 28.00): Cotton Rag Curtain Wipe + Warm Resonant Atelier Chord
- # =========================================================================
- mix_stereo(buf, 23.80, *make_paper_wipe(0.68, 'lr', weight=1.10))
- mix_stereo(buf, 24.34, *make_felt_chord(dur=3.65, intensity=0.68))
-
- # Gentle warm analog soft-clipping & peak normalization to -1.5 dBFS (0.84)
- buf = np.tanh(buf * 1.15) / 1.15
- peak = float(np.max(np.abs(buf)))
- if peak > 1e-6:
- buf *= 0.84 / peak
-
- # Write 16-bit 48kHz Stereo PCM WAV
- os.makedirs(os.path.dirname(out_wav_path), exist_ok=True)
- pcm = np.clip(buf * 32767.0, -32768, 32767).astype('<i2')
- with wave.open(out_wav_path, 'wb') as wf:
- wf.setnchannels(2)
- wf.setsampwidth(2)
- wf.setframerate(SR)
- wf.writeframes(pcm.tobytes())
-
- silence_peak = float(np.max(np.abs(buf[s_start:s_end])))
- print(f'Wrote {out_wav_path} | duration={DURATION:.2f}s | sr={SR}Hz | peak={float(np.max(np.abs(buf))):.3f} | silence_23.45-23.80_peak={silence_peak:.6f}')
-
-
-if __name__ == '__main__':
- out_path = os.path.join(os.path.dirname(__file__), 'out', 'soundtrack.wav')
- build_soundtrack(out_path)
diff --git a/promo/vite.config.ts b/promo/vite.config.ts
deleted file mode 100644
index 28ccb9c..0000000
--- a/promo/vite.config.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-import path from 'node:path';
-import { defineConfig } from 'vite';
-import react from '@vitejs/plugin-react';
-
-export default defineConfig({
- root: __dirname,
- plugins: [react()],
- resolve: {
- alias: {
- '@ink': path.resolve(__dirname, '../src'),
- },
- },
- server: {
- host: '127.0.0.1',
- port: 4179,
- strictPort: true,
- fs: {
- allow: [path.resolve(__dirname, '..')],
- },
- },
-});