Files
the-nexus/modules/core/theme.js
Alexander Whitestone f0fe9d76b6
All checks were successful
CI / validate (pull_request) Successful in 6s
CI / auto-merge (pull_request) Successful in 2s
feat: Phase 3 — extract panel modules from app.js (Refs #422)
Create 6 panel modules under modules/panels/ plus supporting core
infrastructure (state.js, theme.js, ticker.js). Each panel:
  - Exports init(scene, state, theme) and update(elapsed, delta)
  - Uses NEXUS.theme for all colors/fonts (no inline hex codes)
  - Reads from state.js (no direct API calls)
  - Subscribes to ticker for animation

Panel modules:
  panels/heatmap.js       — Commit heatmap floor overlay (DATA-TETHERED)
  panels/agent-board.js   — Agent status holographic board (REAL)
  panels/dual-brain.js    — Dual-brain panel (HONEST-OFFLINE)
  panels/lora-panel.js    — LoRA adapter panel (HONEST-OFFLINE)
  panels/sovereignty.js   — Sovereignty meter arc gauge (REAL manual)
  panels/earth.js         — Holographic Earth, activity-tethered (DATA-TETHERED)

Core infrastructure (consumed by panels):
  core/state.js   — shared reactive data bus
  core/theme.js   — NEXUS.theme design system
  core/ticker.js  — single RAF loop + subscribe/unsubscribe API

All files pass `node --check`. app.js unchanged.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 14:21:33 -04:00

57 lines
1.7 KiB
JavaScript

// modules/core/theme.js — Visual design system for the Nexus
// All colors, fonts, line weights, and glow params live here.
// No module may use inline hex codes — all visual constants come from NEXUS.theme.
export const NEXUS = {
theme: {
// Core palette
bg: 0x000008,
accent: 0x4488ff,
accentStr: '#4488ff',
starCore: 0xffffff,
starDim: 0x8899cc,
constellationLine: 0x334488,
// Agent status colors (hex strings for canvas, hex numbers for THREE)
agentWorking: '#00ff88',
agentWorkingHex: 0x00ff88,
agentIdle: '#4488ff',
agentIdleHex: 0x4488ff,
agentDormant: '#334466',
agentDormantHex: 0x334466,
agentDead: '#ff4444',
agentDeadHex: 0xff4444,
// Sovereignty meter colors
sovereignHigh: '#00ff88', // score >= 80
sovereignHighHex: 0x00ff88,
sovereignMid: '#ffcc00', // score >= 40
sovereignMidHex: 0xffcc00,
sovereignLow: '#ff4444', // score < 40
sovereignLowHex: 0xff4444,
// LoRA / training panel
loraAccent: '#cc44ff',
loraAccentHex: 0xcc44ff,
loraActive: '#00ff88',
loraInactive: '#334466',
// Earth
earthOcean: 0x003d99,
earthLand: 0x1a5c2a,
earthAtm: 0x1144cc,
earthGlow: 0x4488ff,
// Panel chrome
panelBg: 'rgba(0, 6, 20, 0.90)',
panelBorder: '#4488ff',
panelBorderFaint: '#1a3a6a',
panelText: '#ccd6f6',
panelDim: '#556688',
panelVeryDim: '#334466',
// Typography
fontMono: '"Courier New", monospace',
},
};