diff --git a/packages/core/config/runtime.json b/packages/core/config/runtime.json new file mode 100644 index 00000000..6be41d11 --- /dev/null +++ b/packages/core/config/runtime.json @@ -0,0 +1,3 @@ +{ + "webuiPort": 8080 +} \ No newline at end of file diff --git a/packages/core/src/common/runtime.ts b/packages/core/src/common/runtime.ts index 333abea1..c581aeb6 100644 --- a/packages/core/src/common/runtime.ts +++ b/packages/core/src/common/runtime.ts @@ -9,7 +9,7 @@ const CONFIG_DIR = 'config'; const RUNTIME_CONFIG_PATH = path.join(CONFIG_DIR, 'runtime.json'); const DEFAULT_RUNTIME_CONFIG: RuntimeConfig = { - webuiPort: 8080, + webuiPort: 5099, }; export function loadRuntimeConfig(): RuntimeConfig { @@ -22,7 +22,7 @@ export function loadRuntimeConfig(): RuntimeConfig { } const normalized: RuntimeConfig = { - webuiPort: normalizePort(loaded.webuiPort ?? 8080, 8080), + webuiPort: normalizePort(loaded.webuiPort ?? 5099, 5099), }; if ( @@ -43,7 +43,7 @@ function tryLoadRuntimeConfig(): RuntimeConfig | null { if (!isObject(parsed)) return null; return { - webuiPort: normalizePort(parsed.webuiPort ?? 8080, 8080), + webuiPort: normalizePort(parsed.webuiPort ?? 5099, 5099), }; } catch { return null; diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index 46348ce3..d796c129 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -20,11 +20,14 @@ async function main() { bridgeManager.bind(ntqq); oneBotManager.bind(bridgeManager); - if (typeof __BUILD_WEBUI__ !== 'undefined' && __BUILD_WEBUI__) { + if ( + (typeof __BUILD_WEBUI__ !== 'undefined' && __BUILD_WEBUI__) || + process.env.SNOWLUMA_DEV_WEBUI === '1' + ) { try { log.info('WebUI is enabled, starting...'); const { initWebUI } = await import('./webui/server'); - initWebUI(runtimeConfig.webuiPort || 8080, oneBotManager, hookManager); + await initWebUI(runtimeConfig.webuiPort || 5099, oneBotManager, hookManager); } catch (err) { log.error('Failed to start WebUI: ', err); } diff --git a/packages/core/src/webui/auth.ts b/packages/core/src/webui/auth.ts new file mode 100644 index 00000000..a0d0770f --- /dev/null +++ b/packages/core/src/webui/auth.ts @@ -0,0 +1,161 @@ +import fs from 'fs'; +import path from 'path'; +import { randomBytes, scryptSync, timingSafeEqual } from 'crypto'; + +const CONFIG_DIR = 'config'; +const WEBUI_CONFIG_PATH = path.join(CONFIG_DIR, 'webui.json'); + +const SCRYPT_KEYLEN = 64; +const SCRYPT_N = 16384; // cost +const SCRYPT_R = 8; +const SCRYPT_P = 1; + +export interface WebuiAuthState { + passwordHash: string; // hex + passwordSalt: string; // hex + mustChangePassword: boolean; + generatedAt: string; + updatedAt: string; +} + +export interface PasswordRule { + id: string; + label: string; + test: (pwd: string) => boolean; +} + +export const PASSWORD_RULES: PasswordRule[] = [ + { id: 'length', label: '长度不少于 10 位', test: (p) => p.length >= 10 }, + { id: 'lower', label: '包含小写字母', test: (p) => /[a-z]/.test(p) }, + { id: 'upper', label: '包含大写字母', test: (p) => /[A-Z]/.test(p) }, + { id: 'special', label: '包含特殊符号 (!@#$%…)', test: (p) => /[^A-Za-z0-9\s]/.test(p) }, + { id: 'no-space', label: '不包含空格', test: (p) => !/\s/.test(p) && p.length > 0 }, +]; + +export function evaluatePasswordRules(password: string): { id: string; label: string; met: boolean }[] { + return PASSWORD_RULES.map((r) => ({ id: r.id, label: r.label, met: r.test(password) })); +} + +export function isStrongPassword(password: string): boolean { + return PASSWORD_RULES.every((r) => r.test(password)); +} + +function hashPassword(password: string, salt: Buffer): Buffer { + return scryptSync(password, salt, SCRYPT_KEYLEN, { N: SCRYPT_N, r: SCRYPT_R, p: SCRYPT_P }); +} + +function ensureConfigDir(): void { + fs.mkdirSync(CONFIG_DIR, { recursive: true }); +} + +function isValidState(value: unknown): value is WebuiAuthState { + if (!value || typeof value !== 'object') return false; + const v = value as Record; + return ( + typeof v.passwordHash === 'string' && + typeof v.passwordSalt === 'string' && + typeof v.mustChangePassword === 'boolean' && + /^[0-9a-f]+$/i.test(v.passwordHash) && + /^[0-9a-f]+$/i.test(v.passwordSalt) + ); +} + +function generateInitialState(initialPassword: string): WebuiAuthState { + const salt = randomBytes(16); + const hash = hashPassword(initialPassword, salt); + const now = new Date().toISOString(); + return { + passwordHash: hash.toString('hex'), + passwordSalt: salt.toString('hex'), + mustChangePassword: true, + generatedAt: now, + updatedAt: now, + }; +} + +function atomicWrite(state: WebuiAuthState): void { + ensureConfigDir(); + const tmp = WEBUI_CONFIG_PATH + '.tmp'; + fs.writeFileSync(tmp, JSON.stringify(state, null, 2), { encoding: 'utf8', mode: 0o600 }); + // chmod again in case the file already existed with looser perms + try { + fs.chmodSync(tmp, 0o600); + } catch { + /* ignore */ + } + fs.renameSync(tmp, WEBUI_CONFIG_PATH); +} + +export class WebuiAuth { + private state: WebuiAuthState; + private initialPlain: string | null; + + private constructor(state: WebuiAuthState, initialPlain: string | null) { + this.state = state; + this.initialPlain = initialPlain; + } + + static load(): WebuiAuth { + ensureConfigDir(); + if (fs.existsSync(WEBUI_CONFIG_PATH)) { + try { + const raw = fs.readFileSync(WEBUI_CONFIG_PATH, 'utf8'); + const parsed = JSON.parse(raw) as unknown; + if (isValidState(parsed)) { + return new WebuiAuth(parsed, null); + } + } catch { + /* fallthrough — regenerate */ + } + } + const initialPassword = randomBytes(8).toString('hex'); + const state = generateInitialState(initialPassword); + atomicWrite(state); + return new WebuiAuth(state, initialPassword); + } + + /** Returns the auto-generated initial password if this is a fresh install, else null. */ + takeInitialPassword(): string | null { + const p = this.initialPlain; + this.initialPlain = null; + return p; + } + + mustChangePassword(): boolean { + return this.state.mustChangePassword; + } + + verify(password: string): boolean { + if (typeof password !== 'string' || password.length === 0) return false; + try { + const salt = Buffer.from(this.state.passwordSalt, 'hex'); + const expected = Buffer.from(this.state.passwordHash, 'hex'); + const got = hashPassword(password, salt); + if (got.length !== expected.length) return false; + return timingSafeEqual(got, expected); + } catch { + return false; + } + } + + /** + * Update password atomically. Throws if the new password fails strength rules. + * After success, mustChangePassword=false and the file is rewritten on disk. + */ + setPassword(newPassword: string): void { + if (!isStrongPassword(newPassword)) { + throw new Error('密码不符合强度要求'); + } + const salt = randomBytes(16); + const hash = hashPassword(newPassword, salt); + const next: WebuiAuthState = { + passwordHash: hash.toString('hex'), + passwordSalt: salt.toString('hex'), + mustChangePassword: false, + generatedAt: this.state.generatedAt, + updatedAt: new Date().toISOString(), + }; + atomicWrite(next); + this.state = next; + } +} diff --git a/packages/core/src/webui/port.ts b/packages/core/src/webui/port.ts new file mode 100644 index 00000000..8006cc92 --- /dev/null +++ b/packages/core/src/webui/port.ts @@ -0,0 +1,42 @@ +import net from 'net'; + +/** + * Probe whether a TCP port is bindable on the given host. + * Resolves to true when bind+listen succeed. + */ +function isPortAvailable(port: number, host = '0.0.0.0'): Promise { + return new Promise((resolve) => { + const server = net.createServer(); + let settled = false; + const finalize = (ok: boolean) => { + if (settled) return; + settled = true; + try { + server.close(() => resolve(ok)); + } catch { + resolve(ok); + } + }; + server.once('error', () => finalize(false)); + server.once('listening', () => finalize(true)); + try { + server.listen(port, host); + } catch { + finalize(false); + } + }); +} + +/** + * Find an available TCP port starting from `start`, advancing by 1 up to `maxTries` attempts. + * Skips reserved/invalid port numbers. + */ +export async function findAvailablePort(start: number, maxTries = 50): Promise { + let port = Math.max(1, Math.min(65535, Math.trunc(start))); + for (let i = 0; i < maxTries; i++) { + if (port > 65535) break; + if (await isPortAvailable(port)) return port; + port += 1; + } + throw new Error(`No available TCP port found near ${start}`); +} diff --git a/packages/core/src/webui/server.ts b/packages/core/src/webui/server.ts index 80034731..891e8137 100644 --- a/packages/core/src/webui/server.ts +++ b/packages/core/src/webui/server.ts @@ -8,29 +8,52 @@ import { loadOneBotConfig, saveOneBotConfig } from '../onebot/config'; import type { OneBotConfig } from '../onebot/types'; import type { HookManager } from '../hook/hook-manager'; import path from 'path'; +import { existsSync, readFileSync } from 'fs'; import { fileURLToPath } from 'url'; +import os from 'os'; +import { exec } from 'child_process'; +import { promisify } from 'util'; +import { WebuiAuth, evaluatePasswordRules, isStrongPassword } from './auth'; +import { findAvailablePort } from './port'; + +const execAsync = promisify(exec); const log = createLogger('WebUI'); const __dirname = path.dirname(fileURLToPath(import.meta.url)); -// Session token store: token -> expiry timestamp (24h) -const sessionTokens = new Map(); +interface SessionInfo { + expiresAt: number; + mustChangePassword: boolean; +} -// Login attempt tracker: ip -> { count, resetAt } +const sessionTokens = new Map(); const loginAttempts = new Map(); const LOGIN_MAX_ATTEMPTS = 5; -const LOGIN_LOCKOUT_MS = 15 * 60 * 1000; // 15 minutes -const TOKEN_TTL_MS = 24 * 60 * 60 * 1000; // 24 hours +const LOGIN_LOCKOUT_MS = 15 * 60 * 1000; +const TOKEN_TTL_MS = 24 * 60 * 60 * 1000; const AVATAR_CACHE_TTL_MS = 30 * 24 * 60 * 60 * 1000; const AVATAR_BROWSER_CACHE_SECONDS = 30 * 24 * 60 * 60; +// Endpoints that an auth-required-but-must-change-password session can still hit. +const MUST_CHANGE_ALLOWLIST = new Set([ + '/api/status', + '/api/auth/state', + '/api/auth/check-strength', + '/api/auth/change-password', + '/api/logout', +]); + +// uin = QQ number; 5–12 digits. Used to construct config file paths, +// so we MUST refuse anything else (path traversal, NUL bytes, etc.). +const UIN_REGEX = /^\d{5,12}$/; + const avatarCache = new Map(); function purgeExpiredTokens() { const now = Date.now(); - for (const [token, expiry] of sessionTokens) { - if (now > expiry) sessionTokens.delete(token); + for (const [token, info] of sessionTokens) { + if (now > info.expiresAt) sessionTokens.delete(token); } } @@ -42,90 +65,162 @@ async function fetchQqAvatar(uin: string): Promise<{ body: Uint8Array; contentTy const response = await fetch(`https://q1.qlogo.cn/g?b=qq&nk=${encodeURIComponent(uin)}&s=100`, { headers: { 'User-Agent': 'SnowLuma WebUI', - 'Accept': 'image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8', + Accept: 'image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8', }, }); - - if (!response.ok) { - throw new Error(`avatar upstream responded with ${response.status}`); - } - + if (!response.ok) throw new Error(`avatar upstream responded with ${response.status}`); const contentType = response.headers.get('content-type') || 'image/jpeg'; const body = new Uint8Array(await response.arrayBuffer()); return { body, contentType }; } -export function initWebUI(port: number = 8080, oneBotManager: OneBotManager, hookManager?: HookManager) { +export async function initWebUI( + desiredPort: number = 5099, + oneBotManager: OneBotManager, + hookManager?: HookManager, +): Promise<{ port: number }> { + const auth = WebuiAuth.load(); + const initialPassword = auth.takeInitialPassword(); + if (initialPassword) { + log.info('========================================='); + log.info('WebUI 安全认证(首次启动,已生成临时密码)'); + log.info('默认用户: admin'); + log.info('临时密码: %s', initialPassword); + log.info('请使用该密码登录后立即设置强密码(≥10 位、含大小写、特殊符号、不含空格)'); + log.info('========================================='); + } else if (auth.mustChangePassword()) { + log.warn('WebUI 仍未完成强制改密,登录后须立即修改密码。'); + } + const app = new Hono(); - // Generate random password (printed once at startup) - const randomPassword = randomBytes(8).toString('hex'); - log.info(`=========================================`); - log.info(`WebUI 安全认证`); - log.info(`默认用户: admin`); - log.info(`临时密码: ${randomPassword}`); - log.info(`=========================================`); - - // API Auth middleware + // ─── Auth middleware ───────────────────────────────────────────────────── app.use('/api/*', async (c, next) => { - if (c.req.path === '/api/login') { - return next(); - } + const reqPath = c.req.path; + if (reqPath === '/api/login') return next(); const authHeader = c.req.header('Authorization'); const bearerToken = authHeader?.startsWith('Bearer ') ? authHeader.slice(7) : ''; const queryToken = c.req.query('token') ?? ''; const token = bearerToken || queryToken; - if (!token) { - return c.json({ status: 'failed', message: 'Unauthorized' }, 401); - } + if (!token) return c.json({ status: 'failed', message: 'Unauthorized' }, 401); purgeExpiredTokens(); - const expiry = sessionTokens.get(token); - if (!expiry || Date.now() > expiry) { + const info = sessionTokens.get(token); + if (!info || Date.now() > info.expiresAt) { return c.json({ status: 'failed', message: 'Token expired or invalid' }, 401); } + if (info.mustChangePassword && !MUST_CHANGE_ALLOWLIST.has(reqPath)) { + return c.json({ status: 'failed', message: '请先修改密码', mustChangePassword: true }, 403); + } + + c.set('sessionToken' as never, token); await next(); }); - // Login Endpoint with rate limiting + // ─── Login ─────────────────────────────────────────────────────────────── app.post('/api/login', async (c) => { const ip = getClientIp(c.req.raw); const now = Date.now(); const attempt = loginAttempts.get(ip); - if (attempt && attempt.count >= LOGIN_MAX_ATTEMPTS && now < attempt.resetAt) { const waitSec = Math.ceil((attempt.resetAt - now) / 1000); return c.json({ success: false, message: `登录尝试过多,请 ${waitSec} 秒后重试` }, 429); } + let body: { password?: unknown }; try { - const { password } = await c.req.json(); - if (password === randomPassword) { - loginAttempts.delete(ip); - purgeExpiredTokens(); - const token = randomBytes(32).toString('hex'); - sessionTokens.set(token, now + TOKEN_TTL_MS); - return c.json({ success: true, token }); - } - + body = await c.req.json(); + } catch { + return c.json({ success: false, message: '请求格式错误' }, 400); + } + const password = typeof body.password === 'string' ? body.password : ''; + if (!auth.verify(password)) { const current = loginAttempts.get(ip) ?? { count: 0, resetAt: now + LOGIN_LOCKOUT_MS }; current.count += 1; if (current.count === 1) current.resetAt = now + LOGIN_LOCKOUT_MS; loginAttempts.set(ip, current); - return c.json({ success: false, message: '密码错误' }, 401); + } + + loginAttempts.delete(ip); + purgeExpiredTokens(); + const token = randomBytes(32).toString('hex'); + const mustChange = auth.mustChangePassword(); + sessionTokens.set(token, { expiresAt: now + TOKEN_TTL_MS, mustChangePassword: mustChange }); + return c.json({ success: true, token, mustChangePassword: mustChange }); + }); + + app.post('/api/logout', (c) => { + const token = c.get('sessionToken' as never) as string | undefined; + if (token) sessionTokens.delete(token); + return c.json({ success: true }); + }); + + app.get('/api/auth/state', (c) => { + const token = c.get('sessionToken' as never) as string | undefined; + const info = token ? sessionTokens.get(token) : undefined; + return c.json({ + mustChangePassword: info?.mustChangePassword ?? auth.mustChangePassword(), + }); + }); + + app.post('/api/auth/check-strength', async (c) => { + let body: { password?: unknown }; + try { + body = await c.req.json(); + } catch { + return c.json({ rules: evaluatePasswordRules(''), valid: false }); + } + const pwd = typeof body.password === 'string' ? body.password : ''; + return c.json({ rules: evaluatePasswordRules(pwd), valid: isStrongPassword(pwd) }); + }); + + app.post('/api/auth/change-password', async (c) => { + let body: { oldPassword?: unknown; newPassword?: unknown }; + try { + body = await c.req.json(); } catch { return c.json({ success: false, message: '请求格式错误' }, 400); } + const oldPassword = typeof body.oldPassword === 'string' ? body.oldPassword : ''; + const newPassword = typeof body.newPassword === 'string' ? body.newPassword : ''; + if (!auth.verify(oldPassword)) { + return c.json({ success: false, message: '当前密码不正确' }, 401); + } + if (!isStrongPassword(newPassword)) { + return c.json( + { success: false, message: '新密码不符合强度要求', rules: evaluatePasswordRules(newPassword) }, + 400, + ); + } + if (oldPassword === newPassword) { + return c.json({ success: false, message: '新密码不得与旧密码相同' }, 400); + } + try { + auth.setPassword(newPassword); + } catch (err) { + return c.json({ success: false, message: err instanceof Error ? err.message : String(err) }, 400); + } + // Invalidate all other sessions; current keeps but loses must-change flag. + const currentToken = c.get('sessionToken' as never) as string | undefined; + for (const [tok, info] of sessionTokens) { + if (tok === currentToken) { + info.mustChangePassword = false; + sessionTokens.set(tok, info); + } else { + sessionTokens.delete(tok); + } + } + log.info('WebUI 密码已更新(强制改密流程完成)'); + return c.json({ success: true }); }); + // ─── Avatar proxy (uin validated) ──────────────────────────────────────── app.get('/avatar/:uin', async (c) => { const uin = c.req.param('uin'); - if (!/^\d{5,12}$/.test(uin)) { - return c.text('invalid uin', 400); - } + if (!UIN_REGEX.test(uin)) return c.text('invalid uin', 400); const now = Date.now(); let cached = avatarCache.get(uin); @@ -139,7 +234,6 @@ export function initWebUI(port: number = 8080, oneBotManager: OneBotManager, hoo if (!cached) return c.text('avatar unavailable', 502); } } - return new Response(cached.body, { headers: { 'Content-Type': cached.contentType, @@ -148,17 +242,123 @@ export function initWebUI(port: number = 8080, oneBotManager: OneBotManager, hoo }); }); - // API Routes - app.get('/api/status', (c) => { - return c.json({ status: 'running' }); + // ─── Read-only API ─────────────────────────────────────────────────────── + app.get('/api/status', (c) => c.json({ status: 'running' })); + + // Host system info + let lastCpuTimes: { idle: number; total: number }[] | null = null; + function sampleCpuLoad(): number[] { + const cpus = os.cpus(); + const current = cpus.map((cpu) => { + const t = cpu.times; + const total = t.user + t.nice + t.sys + t.idle + t.irq; + return { idle: t.idle, total }; + }); + if (!lastCpuTimes || lastCpuTimes.length !== current.length) { + lastCpuTimes = current; + return current.map(() => 0); + } + const usage = current.map((cur, i) => { + const prev = lastCpuTimes![i]; + const totalDiff = cur.total - prev.total; + const idleDiff = cur.idle - prev.idle; + if (totalDiff <= 0) return 0; + return Math.max(0, Math.min(100, ((totalDiff - idleDiff) / totalDiff) * 100)); + }); + lastCpuTimes = current; + return usage; + } + + let cachedGpu: { name: string; vendor: string }[] | null = null; + let gpuFetchedAt = 0; + async function detectGpus(): Promise<{ name: string; vendor: string }[]> { + const now = Date.now(); + if (cachedGpu && now - gpuFetchedAt < 60_000) return cachedGpu; + const platform = os.platform(); + const result: { name: string; vendor: string }[] = []; + try { + if (platform === 'win32') { + const { stdout } = await execAsync('wmic path win32_VideoController get Name /value', { + timeout: 4000, + windowsHide: true, + }); + for (const line of stdout.split(/\r?\n/)) { + const m = line.match(/^Name=(.+)$/); + if (m && m[1].trim()) result.push({ name: m[1].trim(), vendor: '' }); + } + } else if (platform === 'linux') { + try { + const { stdout } = await execAsync('lspci -mm | grep -Ei "vga|3d|display"', { timeout: 4000 }); + for (const line of stdout.split(/\r?\n/)) { + const parts = line.match(/"([^"]+)"\s+"([^"]+)"\s+"([^"]+)"/); + if (parts) result.push({ vendor: parts[2], name: parts[3] }); + } + } catch { + try { + const { stdout } = await execAsync('nvidia-smi --query-gpu=name --format=csv,noheader', { timeout: 4000 }); + for (const line of stdout.split(/\r?\n/)) { + if (line.trim()) result.push({ name: line.trim(), vendor: 'NVIDIA' }); + } + } catch { + /* ignore */ + } + } + } else if (platform === 'darwin') { + const { stdout } = await execAsync('system_profiler SPDisplaysDataType -json', { timeout: 5000 }); + try { + const json = JSON.parse(stdout); + const list = json.SPDisplaysDataType ?? []; + for (const item of list) { + if (item._name) result.push({ name: item._name, vendor: item.spdisplays_vendor ?? '' }); + } + } catch { + /* ignore */ + } + } + } catch { + /* best-effort */ + } + cachedGpu = result; + gpuFetchedAt = now; + return result; + } + + app.get('/api/system', async (c) => { + const cpus = os.cpus(); + const usage = sampleCpuLoad(); + const totalMem = os.totalmem(); + const freeMem = os.freemem(); + const usedMem = totalMem - freeMem; + const gpus = await detectGpus().catch(() => []); + return c.json({ + hostname: os.hostname(), + platform: os.platform(), + arch: os.arch(), + release: os.release(), + uptime: os.uptime(), + processUptime: process.uptime(), + nodeVersion: process.version, + cpu: { + model: cpus[0]?.model ?? 'unknown', + cores: cpus.length, + speedMHz: cpus[0]?.speed ?? 0, + loadAvg: os.loadavg(), + perCore: usage, + average: usage.length ? usage.reduce((s, v) => s + v, 0) / usage.length : 0, + }, + memory: { + total: totalMem, + free: freeMem, + used: usedMem, + usagePercent: totalMem ? (usedMem / totalMem) * 100 : 0, + }, + gpus, + }); }); app.get('/api/qq-list', (c) => { const instances = oneBotManager.getInstances(); - const list = instances.map(inst => ({ - uin: inst.uin, - nickname: inst.qqInfo.nickname - })); + const list = instances.map((inst) => ({ uin: inst.uin, nickname: inst.qqInfo.nickname })); return c.json({ list }); }); @@ -185,16 +385,16 @@ export function initWebUI(port: number = 8080, oneBotManager: OneBotManager, hoo try { controller.close(); } catch { + /* ignore */ } }); }, }); - return new Response(stream, { headers: { 'Content-Type': 'text/event-stream', 'Cache-Control': 'no-cache', - 'Connection': 'keep-alive', + Connection: 'keep-alive', }, }); }); @@ -211,7 +411,7 @@ export function initWebUI(port: number = 8080, oneBotManager: OneBotManager, hoo app.post('/api/processes/:pid/load', async (c) => { if (!hookManager) return c.json({ success: false, message: 'hook manager is not available' }, 503); const pid = Number(c.req.param('pid')); - if (!Number.isInteger(pid) || pid <= 0) { + if (!Number.isInteger(pid) || pid <= 0 || pid > 4_194_304) { return c.json({ success: false, message: 'invalid pid' }, 400); } try { @@ -225,7 +425,7 @@ export function initWebUI(port: number = 8080, oneBotManager: OneBotManager, hoo app.post('/api/processes/:pid/unload', async (c) => { if (!hookManager) return c.json({ success: false, message: 'hook manager is not available' }, 503); const pid = Number(c.req.param('pid')); - if (!Number.isInteger(pid) || pid <= 0) { + if (!Number.isInteger(pid) || pid <= 0 || pid > 4_194_304) { return c.json({ success: false, message: 'invalid pid' }, 400); } try { @@ -238,6 +438,7 @@ export function initWebUI(port: number = 8080, oneBotManager: OneBotManager, hoo app.get('/api/config/:uin', (c) => { const uin = c.req.param('uin'); + if (!UIN_REGEX.test(uin)) return c.json({ message: 'invalid uin' }, 400); const config = loadOneBotConfig(uin); return c.json({ config }); }); @@ -245,7 +446,8 @@ export function initWebUI(port: number = 8080, oneBotManager: OneBotManager, hoo app.post('/api/config/:uin', async (c) => { try { const uin = c.req.param('uin'); - const body = await c.req.json() as OneBotConfig; + if (!UIN_REGEX.test(uin)) return c.json({ success: false, message: 'invalid uin' }, 400); + const body = (await c.req.json()) as OneBotConfig; saveOneBotConfig(uin, body); const reloaded = oneBotManager.reloadConfig(uin); log.info('Updated OneBot config for UIN: %s%s', uin, reloaded ? ' and reloaded' : ''); @@ -259,14 +461,38 @@ export function initWebUI(port: number = 8080, oneBotManager: OneBotManager, hoo } }); - // Serve static files generated by the React frontend - const staticRoot = path.join(__dirname, 'client'); + // ─── Static frontend ───────────────────────────────────────────────────── + // Build path is relative to the bundled / dev __dirname. SPA fallback to + // index.html so client-side routes (if any) keep working. + const staticRoot = path.resolve(__dirname, 'client'); app.use('/*', serveStatic({ root: staticRoot })); - serve({ - fetch: app.fetch, - port - }, (info) => { - log.info(`WebUI server is listening on http://localhost:${info.port}`); + const indexHtmlPath = path.join(staticRoot, 'index.html'); + app.get('*', (c) => { + // SPA fallback: only for navigations that didn't hit a static asset. + if (c.req.path.startsWith('/api/') || c.req.path.startsWith('/avatar/')) { + return c.text('not found', 404); + } + if (existsSync(indexHtmlPath)) { + const html = readFileSync(indexHtmlPath, 'utf8'); + return c.html(html); + } + return c.text( + 'WebUI client bundle not found. Run `pnpm --filter webui build` (or use the dev server on :5178).', + 404, + ); }); + + const finalPort = await findAvailablePort(desiredPort); + if (finalPort !== desiredPort) { + log.warn('端口 %d 已被占用,已自动改用 %d', desiredPort, finalPort); + } + + await new Promise((resolve) => { + serve({ fetch: app.fetch, port: finalPort }, (info) => { + log.info(`WebUI 服务监听 http://localhost:${info.port}`); + resolve(); + }); + }); + return { port: finalPort }; } diff --git a/packages/core/vite.config.ts b/packages/core/vite.config.ts index 1e50ef46..3f65bf35 100644 --- a/packages/core/vite.config.ts +++ b/packages/core/vite.config.ts @@ -35,13 +35,16 @@ const runtimeDistFiles = ['package.json', ]; // Native binaries shipped for the selected target: -// * `snowluma-*.{dll,node}` – NTQQ hook (Windows-only). -// * `websocket-*.node` – RFC 6455 framing/mask addon (all platforms). +// * `snowluma-*.{dll,node,so}` – NTQQ hook (Windows + Linux). +// * `websocket-*.node` – RFC 6455 framing/mask addon (all platforms). const nativeFiles = [ `websocket-${targetTriple}.node`, ...(targetPlatform === 'win32' ? [`snowluma-${targetTriple}.dll`, `snowluma-${targetTriple}.node`] : []), + ...(targetPlatform === 'linux' + ? [`snowluma-${targetTriple}.node`, `snowluma-${targetTriple}.so`] + : []), ]; // Fail fast if any expected native binary is missing from packages/runtime/native/. diff --git a/packages/websocket/src/native.ts b/packages/websocket/src/native.ts index 6d62dd9d..9fabf451 100644 --- a/packages/websocket/src/native.ts +++ b/packages/websocket/src/native.ts @@ -84,5 +84,46 @@ function loadAddon(): NativeAddon { return mod.exports as unknown as NativeAddon; } -const addon: NativeAddon = loadAddon(); +// Local-only escape hatch: when SNOWLUMA_DEV_NO_NATIVE=1 is set, we return a +// stub addon that lets the process boot (so the WebUI / HTTP API can run on +// platforms without a prebuilt binary, e.g. darwin-arm64 dev machines). Any +// actual WebSocket parsing/serialization call will throw at use-time. This +// branch never triggers for normal users because the env var is opt-in. +function createStubAddon(reason: string): NativeAddon { + const fail = (): never => { + throw new Error( + `[snowluma/websocket] native addon is stubbed (${reason}). ` + + `Set SNOWLUMA_DEV_NO_NATIVE=0 (or unset) and provide the prebuilt binary to enable WebSocket I/O.`, + ); + }; + class StubParser { + constructor(_options: ParserOptions) {} + push(_chunk: Buffer): ParseResult { + return fail(); + } + } + // eslint-disable-next-line no-console + console.warn( + `[snowluma/websocket] WARNING: using stub addon (${reason}). WebSocket features are disabled.`, + ); + return { + Parser: StubParser as unknown as NativeAddon['Parser'], + buildFrame: fail as unknown as NativeAddon['buildFrame'], + computeAcceptKey: fail as unknown as NativeAddon['computeAcceptKey'], + }; +} + +function tryLoad(): NativeAddon { + const devSkip = process.env.SNOWLUMA_DEV_NO_NATIVE === '1'; + try { + return loadAddon(); + } catch (err) { + if (devSkip) { + return createStubAddon((err as Error).message); + } + throw err; + } +} + +const addon: NativeAddon = tryLoad(); export default addon; diff --git a/packages/webui/components.json b/packages/webui/components.json new file mode 100644 index 00000000..13e1db0b --- /dev/null +++ b/packages/webui/components.json @@ -0,0 +1,21 @@ +{ + "$schema": "https://ui.shadcn.com/schema.json", + "style": "new-york", + "rsc": false, + "tsx": true, + "tailwind": { + "config": "", + "css": "src/index.css", + "baseColor": "neutral", + "cssVariables": true, + "prefix": "" + }, + "aliases": { + "components": "@/components", + "utils": "@/lib/utils", + "ui": "@/components/ui", + "lib": "@/lib", + "hooks": "@/hooks" + }, + "iconLibrary": "lucide" +} diff --git a/packages/webui/index.html b/packages/webui/index.html index 8494216e..b6b77b81 100644 --- a/packages/webui/index.html +++ b/packages/webui/index.html @@ -2,9 +2,10 @@ - - - SnowLuma + + + + SnowLuma 控制台 diff --git a/packages/webui/package.json b/packages/webui/package.json index da169c4f..6c74ae2b 100644 --- a/packages/webui/package.json +++ b/packages/webui/package.json @@ -11,14 +11,21 @@ "preview": "vite preview" }, "dependencies": { - "@heroui/react": "^3.0.2", - "@heroui/styles": "^3.0.2", + "@radix-ui/react-alert-dialog": "^1.1.7", + "@radix-ui/react-dialog": "^1.1.7", + "@radix-ui/react-label": "^2.1.3", + "@radix-ui/react-scroll-area": "^1.2.4", + "@radix-ui/react-separator": "^1.1.3", + "@radix-ui/react-slot": "^1.1.3", + "@radix-ui/react-tooltip": "^1.1.9", + "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", - "framer-motion": "^12.38.0", - "lucide-react": "^1.8.0", + "lucide-react": "^0.469.0", + "motion": "^12.0.0", "react": "^19.2.5", "react-dom": "^19.2.5", - "tailwind-merge": "^3.5.0" + "tailwind-merge": "^3.5.0", + "tw-animate-css": "^1.2.5" }, "devDependencies": { "@eslint/js": "^10.0.1", @@ -31,7 +38,6 @@ "eslint-plugin-react-hooks": "^7.0.1", "eslint-plugin-react-refresh": "^0.5.2", "globals": "^17.5.0", - "sass": "^1.99.0", "tailwindcss": "^4.2.2", "typescript": "catalog:", "typescript-eslint": "^8.58.2", diff --git a/packages/webui/src/App.css b/packages/webui/src/App.css deleted file mode 100644 index 6bfc5fb2..00000000 --- a/packages/webui/src/App.css +++ /dev/null @@ -1,469 +0,0 @@ -.layout { - display: flex; - height: 100vh; - width: 100%; -} - -.sidebar { - width: 240px; - background: var(--bg-sidebar); - border-right: 1px solid var(--border-subtle); - display: flex; - flex-direction: column; - padding: 24px 0 0 0; - transition: background-color 0.3s; -} - -.brand { - padding: 0 24px; - margin-bottom: 32px; -} - -.brand h1 { - font-size: 1.3rem; - font-weight: 600; - color: var(--text-main); - background: linear-gradient(90deg, var(--color-primary), #818cf8); - -webkit-background-clip: text; - background-clip: text; - -webkit-text-fill-color: transparent; - display: inline-block; -} - -.nav-menu { - flex: 1; - padding: 0 16px; - display: flex; - flex-direction: column; - gap: 4px; -} - -.nav-item { - padding: 10px 16px; - border-radius: var(--radius-md); - cursor: pointer; - color: var(--text-muted); - font-size: 0.9rem; - transition: all 0.2s; -} - -.nav-item:hover { - background: var(--bg-hover); - color: var(--text-main); -} - -.nav-item.active { - background: var(--color-primary); - color: #fff; - font-weight: 500; -} - -.sidebar-footer { - padding: 16px; - border-top: 1px solid var(--border-subtle); - display: flex; - flex-direction: column; - gap: 8px; -} - -.btn { - display: inline-flex; - align-items: center; - justify-content: center; - padding: 8px 16px; - border-radius: var(--radius-md); - font-size: 0.85rem; - font-weight: 500; - cursor: pointer; - border: 1px solid transparent; - transition: all 0.2s; - outline: none; - font-family: inherit; -} - -.btn-primary { - background: var(--color-primary); - color: #fff; -} - -.btn-primary:hover { - background: var(--color-primary-hover); -} - -.btn-ghost { - background: transparent; - color: var(--text-muted); -} - -.btn-ghost:hover { - background: var(--bg-hover); - color: var(--text-main); -} - -.btn-outline { - background: transparent; - border-color: var(--border-subtle); - color: var(--text-muted); -} - -.btn-outline:hover { - background: var(--bg-hover); - color: var(--text-main); -} - -.btn-danger { - background: transparent; - border-color: var(--border-subtle); - color: var(--color-danger); -} - -.btn-danger:hover { - background: var(--color-danger); - border-color: var(--color-danger); - color: #fff; -} - -.btn-icon { - padding: 4px; - width: 28px; - height: 28px; -} - -.content { - flex: 1; - display: flex; - flex-direction: column; - overflow: hidden; - background: var(--bg-body); -} - -.header { - height: 60px; - display: flex; - align-items: center; - justify-content: space-between; - padding: 0 32px; - background: var(--bg-card); - border-bottom: 1px solid var(--border-subtle); -} - -.search-input { - background: var(--bg-input); - border: 1px solid var(--border-subtle); - padding: 8px 14px; - border-radius: var(--radius-sm); - color: var(--text-main); - width: 260px; - font-size: 0.85rem; - transition: border-color 0.2s; -} - -.search-input:focus { - border-color: var(--color-primary); -} - -.header-right { - display: flex; - align-items: center; - gap: 8px; - font-size: 0.85rem; - color: var(--text-muted); -} - -.status-dot { - width: 8px; - height: 8px; - border-radius: 50%; - background: var(--text-muted); -} -.status-dot.on { background: #10b981; } -.status-dot.off { background: var(--color-danger); } - -.main-scroll { - flex: 1; - overflow-y: auto; - padding: 32px; -} - -.card { - background: var(--bg-card); - border: 1px solid var(--border-subtle); - border-radius: var(--radius-lg); - box-shadow: var(--shadow-sm); - padding: 24px; -} - -.overview-grid { - display: grid; - grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); - gap: 20px; -} - -.overview-card { - display: flex; - flex-direction: column; - gap: 12px; -} - -.card-label { - font-size: 0.85rem; - color: var(--text-muted); -} - -.card-value { - font-size: 2rem; - font-weight: 600; - color: var(--text-main); -} -.status-ok { - color: #10b981; -} - -/* Config Layout */ -.config-layout { - display: flex; - gap: 24px; - align-items: flex-start; -} - -.list-pane { - width: 280px; - padding: 16px; -} - -.pane-title { - font-size: 0.95rem; - color: var(--text-main); - margin-bottom: 16px; - font-weight: 600; -} - -.qq-list { - display: flex; - flex-direction: column; - gap: 8px; -} - -.qq-item { - display: flex; - align-items: center; - gap: 12px; - padding: 10px; - border-radius: var(--radius-md); - cursor: pointer; - transition: background 0.2s; - border: 1px solid transparent; -} - -.qq-item:hover { - background: var(--bg-hover); -} - -.qq-item.active { - background: var(--bg-hover); - border-color: var(--border-active); -} - -.qq-avatar { - width: 36px; - height: 36px; - border-radius: 50%; - background: linear-gradient(135deg, var(--color-primary), #818cf8); -} - -.qq-info { - display: flex; - flex-direction: column; -} - -.qq-nik { - font-size: 0.9rem; - font-weight: 500; - color: var(--text-main); -} - -.qq-uin { - font-size: 0.75rem; - color: var(--text-muted); -} - -.editor-pane { - flex: 1; - min-height: 500px; - padding: 32px; -} - -.empty-state { - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - height: 100%; - color: var(--text-muted); - font-size: 0.9rem; - opacity: 0.7; -} - -.empty-icon { - font-size: 2rem; - margin-bottom: 12px; -} - -.editor-header { - display: flex; - justify-content: space-between; - align-items: flex-start; - margin-bottom: 32px; - border-bottom: 1px solid var(--border-subtle); - padding-bottom: 16px; -} - -.editor-title h2 { - font-size: 1.25rem; - color: var(--text-main); - margin-bottom: 4px; -} - -.editor-subtitle { - font-size: 0.85rem; - color: var(--text-muted); - font-family: monospace; -} - -.editor-actions { - display: flex; - align-items: center; - gap: 16px; -} - -.save-status { - font-size: 0.85rem; - color: var(--text-muted); -} -.save-status.ok { color: #10b981; } - -.cfg-section { - margin-bottom: 32px; -} - -.cfg-section-header { - display: flex; - align-items: center; - justify-content: space-between; - margin-bottom: 16px; -} - -.cfg-section-header h4 { - font-size: 1rem; - color: var(--text-main); - font-weight: 600; -} - -.cfg-section-body { - display: flex; - flex-direction: column; - gap: 16px; -} - -.endpoint-row { - display: flex; - align-items: center; - gap: 16px; - background: var(--bg-input); - border: 1px solid var(--border-subtle); - padding: 16px; - border-radius: var(--radius-md); -} - -.input-group { - display: flex; - flex-direction: column; - gap: 8px; - flex: 1; -} - -.input-group label { - font-size: 0.8rem; - color: var(--text-muted); -} - -.input-group input { - background: var(--bg-card); - border: 1px solid var(--border-subtle); - padding: 8px 12px; - border-radius: var(--radius-sm); - color: var(--text-main); - font-family: monospace; - font-size: 0.85rem; - transition: border-color 0.2s; - outline: none; -} - -.input-group input:focus { - border-color: var(--border-focus); -} - -.endpoint-actions { - display: flex; - align-items: center; - margin-top: 24px; -} - -.text-muted { - color: var(--text-muted); - font-size: 0.85rem; -} - -/* Login Screen Override */ -.login-screen { - position: fixed; - inset: 0; - z-index: 1000; - background: var(--bg-body); - display: flex; - justify-content: center; - align-items: center; -} - -.login-card { - width: 380px; - display: flex; - flex-direction: column; - align-items: center; - padding: 40px; -} - -.login-title { - font-size: 1.5rem; - color: var(--text-main); - margin-bottom: 12px; - background: linear-gradient(90deg, var(--color-primary), #818cf8); - -webkit-background-clip: text; - background-clip: text; - -webkit-text-fill-color: transparent; -} - -.login-desc { - font-size: 0.85rem; - color: var(--text-muted); - text-align: center; - margin-bottom: 32px; -} - -.login-form { - width: 100%; - display: flex; - flex-direction: column; - gap: 20px; -} - -.login-submit-btn { - width: 100%; - padding: 10px; -} - -.login-error { - color: var(--color-danger); - font-size: 0.8rem; - text-align: center; -} diff --git a/packages/webui/src/App.scss b/packages/webui/src/App.scss deleted file mode 100644 index 1acdf2d7..00000000 --- a/packages/webui/src/App.scss +++ /dev/null @@ -1,2 +0,0 @@ -// Token layer only — component styles live in Tailwind classes inside TSX -@use './styles/variables'; diff --git a/packages/webui/src/App.tsx b/packages/webui/src/App.tsx index 396ddcb4..302ddb0f 100644 --- a/packages/webui/src/App.tsx +++ b/packages/webui/src/App.tsx @@ -1,231 +1,348 @@ -import { useState, useEffect } from 'react'; -import { ThemeProvider } from './contexts/ThemeContext'; -import { MainLayout } from './components/layout/MainLayout'; -import { LoginPage } from './components/pages/LoginPage'; -import { OverviewPage } from './components/pages/OverviewPage'; -import { ConfigPage } from './components/pages/ConfigPage'; -import { LogsPage } from './components/pages/LogsPage'; -import type { QQInfo, OneBotConfig, HookProcessInfo } from './types'; +import { useCallback, useEffect, useRef, useState } from 'react'; +import { TooltipProvider } from '@/components/ui/tooltip'; +import { ThemeProvider, useTheme } from '@/contexts/ThemeContext'; +import { LoginPage } from '@/components/pages/login-page'; +import { MainLayout } from '@/components/layout/main-layout'; +import { OverviewPage } from '@/components/pages/overview-page'; +import { ConfigPage } from '@/components/pages/config-page'; +import { LogsPage } from '@/components/pages/logs-page'; +import { SettingsPage } from '@/components/pages/settings-page'; +import { ChangePasswordPage, type PasswordRule } from '@/components/pages/change-password-page'; +import type { Page } from '@/components/layout/sidebar'; +import type { HookProcessInfo, OneBotConfig, QQInfo, SystemInfo } from '@/types'; -const fetchApi = async (url: string, options: RequestInit = {}) => { - const token = localStorage.getItem('snowluma_token'); - const headers = new Headers(options.headers || {}); - if (token) headers.set('Authorization', `Bearer ${token}`); - return fetch(url, { ...options, headers }); -}; +const TOKEN_KEY = 'snowluma_token'; -function App() { - const [status, setStatus] = useState('连接中'); - const [isAuthenticated, setIsAuthenticated] = useState( - import.meta.env.VITE_SKIP_AUTH === 'true' ? true : null +function readToken() { + return localStorage.getItem(TOKEN_KEY) || ''; +} + +export default function App() { + return ( + + + ); - const [activePage, setActivePage] = useState<'总览' | '配置' | '日志'>('总览'); +} + +function AppInner() { + const { pollInterval } = useTheme(); + const [authChecked, setAuthChecked] = useState(false); + const [authed, setAuthed] = useState(false); + const [mustChange, setMustChange] = useState(false); + const [status, setStatus] = useState('未连接'); + const [active, setActive] = useState('overview'); + const [qqList, setQqList] = useState([]); const [processList, setProcessList] = useState([]); + const [systemInfo, setSystemInfo] = useState(null); + const [processLoadingPid, setProcessLoadingPid] = useState(null); const [processUnloadingPid, setProcessUnloadingPid] = useState(null); const [processActionStatus, setProcessActionStatus] = useState(''); + const [selectedUin, setSelectedUin] = useState(null); const [config, setConfig] = useState(null); const [saveStatus, setSaveStatus] = useState(''); - function checkStatus() { - fetchApi('/api/status') - .then(async (res) => { - if (res.status === 401) { setIsAuthenticated(false); setStatus('需要认证'); return; } - if (res.ok) { - setIsAuthenticated(true); - const data = await res.json(); - setStatus(data.status === 'running' ? '已连接' : '已断开'); - fetchQqList(); - fetchProcesses(); - return; - } - // Any other non-ok status (502, 500, etc.) - setIsAuthenticated(false); - setStatus('已断开'); - }) - .catch(() => { setStatus('已断开'); setIsAuthenticated(false); }); - } + const tokenRef = useRef(readToken()); - useEffect(() => { - if (import.meta.env.VITE_SKIP_AUTH !== 'true') checkStatus(); + // ---------- API helpers ---------- + const fetchApi = useCallback(async (url: string, options: RequestInit = {}) => { + const headers: Record = { + ...(options.headers as Record | undefined), + }; + if (tokenRef.current) headers['Authorization'] = `Bearer ${tokenRef.current}`; + if (options.body && !headers['Content-Type']) headers['Content-Type'] = 'application/json'; + const res = await fetch(url, { ...options, headers }); + if (res.status === 401) { + tokenRef.current = ''; + localStorage.removeItem(TOKEN_KEY); + setAuthed(false); + setStatus('未授权'); + } + return res; }, []); - useEffect(() => { - if (isAuthenticated !== true) return; - fetchQqList(); - fetchProcesses(); - const timer = window.setInterval(() => { - fetchQqList(); - fetchProcesses(); - }, 3000); - return () => window.clearInterval(timer); - }, [isAuthenticated]); + // ---------- Polling ---------- + const refreshQqList = useCallback(async () => { + try { + const res = await fetchApi('/api/qq-list'); + if (!res.ok) return; + const data = await res.json(); + setQqList(data.list || []); + } catch (e) { + console.error('qq-list', e); + } + }, [fetchApi]); - const handleLogin = async (password: string) => { + const refreshProcesses = useCallback(async () => { + try { + const res = await fetchApi('/api/processes'); + if (!res.ok) return; + const data = await res.json(); + setProcessList(data.list || []); + } catch (e) { + console.error('processes', e); + } + }, [fetchApi]); + + const refreshSystem = useCallback(async () => { + try { + const res = await fetchApi('/api/system'); + if (!res.ok) return; + const data = (await res.json()) as SystemInfo; + setSystemInfo(data); + } catch (e) { + console.error('system', e); + } + }, [fetchApi]); + + const checkStatus = useCallback(async () => { + try { + const res = await fetchApi('/api/status'); + if (res.ok) { + setAuthed(true); + setStatus('已连接'); + return true; + } + setStatus('未连接'); + return false; + } catch { + setStatus('未连接'); + return false; + } + }, [fetchApi]); + + useEffect(() => { + (async () => { + if (tokenRef.current) { + const ok = await checkStatus(); + if (ok) { + // Existing session may still need to change password. + try { + const r = await fetchApi('/api/auth/state'); + if (r.ok) { + const d = await r.json(); + setMustChange(!!d.mustChangePassword); + } + } catch { /* ignore */ } + } + } + setAuthChecked(true); + })(); + }, [checkStatus, fetchApi]); + + useEffect(() => { + if (!authed || mustChange) return; + if (pollInterval <= 0) return; + let cancelled = false; + const tick = async () => { + if (cancelled) return; + await Promise.all([refreshQqList(), refreshProcesses(), refreshSystem()]); + }; + tick(); + const interval = setInterval(tick, pollInterval); + return () => { + cancelled = true; + clearInterval(interval); + }; + }, [authed, mustChange, pollInterval, refreshQqList, refreshProcesses, refreshSystem]); + + // Auto-select first uin when navigating to config + useEffect(() => { + if (active !== 'config') return; + if (!selectedUin && qqList.length > 0) setSelectedUin(qqList[0].uin); + }, [active, qqList, selectedUin]); + + // Load config when selectedUin changes + useEffect(() => { + if (!selectedUin) { + setConfig(null); + return; + } + let cancelled = false; + (async () => { + try { + const res = await fetchApi(`/api/config/${encodeURIComponent(selectedUin)}`); + if (!res.ok) return; + const data = await res.json(); + if (cancelled) return; + setConfig({ + httpServers: data.httpServers || [], + httpPostEndpoints: data.httpPostEndpoints || [], + wsServers: data.wsServers || [], + wsClients: data.wsClients || [], + musicSignUrl: data.musicSignUrl, + }); + } catch (e) { + console.error('load-config', e); + } + })(); + return () => { + cancelled = true; + }; + }, [selectedUin, fetchApi]); + + // ---------- Actions ---------- + const handleLogin = useCallback(async (password: string) => { try { const res = await fetch('/api/login', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ password }), }); - const data = await res.json(); - if (res.ok && data.success) { - localStorage.setItem('snowluma_token', data.token); - setIsAuthenticated(true); - checkStatus(); - return { success: true }; + if (!res.ok) { + const data = await res.json().catch(() => ({})); + return { success: false, error: data.message || data.error || '令牌错误' }; } - return { success: false, error: '认证失败,请检查控制台日志' }; - } catch { - return { success: false, error: '内部错误,请检查后端运行状态' }; + const data = await res.json(); + const token = data.token as string; + localStorage.setItem(TOKEN_KEY, token); + tokenRef.current = token; + setMustChange(!!data.mustChangePassword); + const ok = await checkStatus(); + return ok ? { success: true } : { success: false, error: '校验失败' }; + } catch (e) { + return { success: false, error: (e as Error).message || '网络错误' }; } - }; + }, [checkStatus]); - const handleLogout = () => { - localStorage.removeItem('snowluma_token'); - setIsAuthenticated(false); - setStatus('需要认证'); + const handleLogout = useCallback(async () => { + try { await fetchApi('/api/logout', { method: 'POST' }); } catch { /* ignore */ } + localStorage.removeItem(TOKEN_KEY); + tokenRef.current = ''; + setAuthed(false); + setMustChange(false); + setStatus('未连接'); setQqList([]); setProcessList([]); + setSystemInfo(null); + setSelectedUin(null); setConfig(null); - }; + }, [fetchApi]); - async function fetchQqList() { - try { - const res = await fetchApi('/api/qq-list'); - if (res.ok) { const data = await res.json(); setQqList(data.list || []); } - } catch (err) { console.error(err); } - } - - async function fetchProcesses() { - try { - const res = await fetchApi('/api/processes'); - if (res.ok) { const data = await res.json(); setProcessList(data.list || []); } - } catch (err) { console.error(err); } - } - - const loadProcess = async (pid: number) => { + const handleLoadProcess = useCallback(async (pid: number) => { setProcessLoadingPid(pid); - setProcessActionStatus('正在手动映射加载 SnowLuma...'); + setProcessActionStatus(`正在向进程 ${pid} 加载 SnowLuma…`); try { - const res = await fetchApi(`/api/processes/${pid}/load`, { - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - body: JSON.stringify({}), - }); + const res = await fetchApi(`/api/processes/${pid}/load`, { method: 'POST' }); const data = await res.json().catch(() => ({})); - setProcessActionStatus(res.ok && data.success ? '已开始监听登录状态' : data.message || '加载失败'); - await fetchProcesses(); - await fetchQqList(); - } catch { - setProcessActionStatus('网络错误,加载失败'); + if (!res.ok) throw new Error(data.error || '加载失败'); + setProcessActionStatus(`已向进程 ${pid} 注入 SnowLuma`); + await refreshProcesses(); + } catch (e) { + setProcessActionStatus(`加载失败:${(e as Error).message}`); } finally { setProcessLoadingPid(null); - setTimeout(() => setProcessActionStatus(''), 3000); + setTimeout(() => setProcessActionStatus(''), 4000); } - }; + }, [fetchApi, refreshProcesses]); - const unloadProcess = async (pid: number) => { + const handleUnloadProcess = useCallback(async (pid: number) => { setProcessUnloadingPid(pid); - setProcessActionStatus('正在卸载 SnowLuma...'); + setProcessActionStatus(`正在从进程 ${pid} 卸载…`); try { - const res = await fetchApi(`/api/processes/${pid}/unload`, { - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - body: JSON.stringify({}), - }); + const res = await fetchApi(`/api/processes/${pid}/unload`, { method: 'POST' }); const data = await res.json().catch(() => ({})); - setProcessActionStatus(res.ok && data.success ? '已卸载 SnowLuma' : data.message || '卸载失败'); - await fetchProcesses(); - await fetchQqList(); - } catch { - setProcessActionStatus('网络错误,卸载失败'); + if (!res.ok) throw new Error(data.error || '卸载失败'); + setProcessActionStatus(`已从进程 ${pid} 卸载`); + await refreshProcesses(); + } catch (e) { + setProcessActionStatus(`卸载失败:${(e as Error).message}`); } finally { setProcessUnloadingPid(null); - setTimeout(() => setProcessActionStatus(''), 3000); + setTimeout(() => setProcessActionStatus(''), 4000); } - }; + }, [fetchApi, refreshProcesses]); - const loadConfig = async (uin: string) => { - setSelectedUin(uin); - setSaveStatus(''); - setConfig(null); - try { - const res = await fetchApi(`/api/config/${uin}`); - if (res.ok) { const data = await res.json(); setConfig(data.config); } - } catch (err) { console.error(err); } - }; - - const saveConfig = async () => { + const handleSaveConfig = useCallback(async () => { if (!selectedUin || !config) return; setSaveStatus('保存中...'); try { - const res = await fetchApi(`/api/config/${selectedUin}`, { + const res = await fetchApi(`/api/config/${encodeURIComponent(selectedUin)}`, { method: 'POST', - headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(config), }); - setSaveStatus(res.ok ? '保存成功' : '保存出错'); + const data = await res.json().catch(() => ({})); + if (!res.ok) throw new Error(data.error || '保存失败'); + setSaveStatus('保存成功'); + } catch (e) { + setSaveStatus(`保存失败:${(e as Error).message}`); + } finally { setTimeout(() => setSaveStatus(''), 3000); - } catch { - setSaveStatus('网络错误'); } - }; + }, [selectedUin, config, fetchApi]); - // Loading state - if (isAuthenticated === null) { + // ---------- Render ---------- + if (!authChecked) { return ( -
-
+
+ 初始化中…
); } - // Login - if (isAuthenticated === false) { - return ( - - - - ); - } + const checkStrength = async (password: string) => { + const res = await fetchApi('/api/auth/check-strength', { + method: 'POST', + body: JSON.stringify({ password }), + }); + const data = (await res.json().catch(() => ({}))) as { rules?: PasswordRule[]; valid?: boolean }; + return { rules: data.rules ?? [], valid: !!data.valid }; + }; + const submitPwd = async (oldPassword: string, newPassword: string) => { + const res = await fetchApi('/api/auth/change-password', { + method: 'POST', + body: JSON.stringify({ oldPassword, newPassword }), + }); + const data = (await res.json().catch(() => ({}))) as { success?: boolean; message?: string }; + return { success: !!data.success, message: data.message }; + }; - // Main app return ( - - - {activePage === '总览' && ( - - )} - {activePage === '配置' && ( - - )} - {activePage === '日志' && ( - - )} - - + + {!authed ? ( + + ) : mustChange ? ( + setMustChange(false)} + /> + ) : ( + + {active === 'overview' && ( + + )} + {active === 'config' && ( + + )} + {active === 'logs' && } + {active === 'settings' && } + + )} + ); } - -export default App; diff --git a/packages/webui/src/components/confirm-dialog.tsx b/packages/webui/src/components/confirm-dialog.tsx new file mode 100644 index 00000000..f384559a --- /dev/null +++ b/packages/webui/src/components/confirm-dialog.tsx @@ -0,0 +1,69 @@ +import { useState, type ReactNode } from 'react'; +import { + AlertDialog, + AlertDialogAction, + AlertDialogCancel, + AlertDialogContent, + AlertDialogDescription, + AlertDialogFooter, + AlertDialogHeader, + AlertDialogTitle, +} from '@/components/ui/alert-dialog'; +import { buttonVariants } from '@/components/ui/button'; +import { cn } from '@/lib/utils'; + +interface ConfirmDialogProps { + open: boolean; + onOpenChange: (open: boolean) => void; + title: string; + description?: ReactNode; + confirmText?: string; + cancelText?: string; + destructive?: boolean; + onConfirm: () => void | Promise; +} + +export function ConfirmDialog({ + open, + onOpenChange, + title, + description, + confirmText = '确认', + cancelText = '取消', + destructive = false, + onConfirm, +}: ConfirmDialogProps) { + const [busy, setBusy] = useState(false); + const handleConfirm = async () => { + setBusy(true); + try { + await onConfirm(); + onOpenChange(false); + } finally { + setBusy(false); + } + }; + return ( + + + + {title} + {description && {description}} + + + {cancelText} + { + e.preventDefault(); + void handleConfirm(); + }} + className={cn(destructive && buttonVariants({ variant: 'destructive' }))} + disabled={busy} + > + {busy ? '处理中…' : confirmText} + + + + + ); +} diff --git a/packages/webui/src/components/layout/MainLayout.tsx b/packages/webui/src/components/layout/MainLayout.tsx deleted file mode 100644 index 04fcc821..00000000 --- a/packages/webui/src/components/layout/MainLayout.tsx +++ /dev/null @@ -1,251 +0,0 @@ -import type { ReactNode } from 'react'; -import { motion, AnimatePresence } from 'framer-motion'; -import { Activity, LayoutDashboard, Settings, Sparkles, Terminal } from 'lucide-react'; -import { Sidebar } from './Sidebar'; -import { useTheme } from '../../contexts/ThemeContext'; - -type Page = '总览' | '配置' | '日志'; - -interface MainLayoutProps { - activePage: Page; - onNavigate: (page: Page) => void; - status: string; - onLogout: () => void; - children: ReactNode; -} - -const pageMeta: Record = { - '总览': { title: '总览', subtitle: '查看当前接入的 QQ 账号及服务运行状态', badge: '控制台视图', icon: LayoutDashboard }, - '配置': { title: '节点配置', subtitle: '管理 OneBot 协议端点与通信参数', badge: '协议编排', icon: Settings }, - '日志': { title: '日志', subtitle: '查看后端运行日志与实时事件流', badge: 'SSE 实时流', icon: Terminal }, -}; - -export function MainLayout({ activePage, onNavigate, status, onLogout, children }: MainLayoutProps) { - const meta = pageMeta[activePage]; - const { resolved } = useTheme(); - const dark = resolved === 'dark'; - const PageIcon = meta.icon; - const runtimeLabel = status === '已连接' ? '运行中' : status; - - return ( -
- {/* Full-screen ambient gradient — matches login page */} -
- - {/* Animated orbs */} -
- - -
- - {/* Sidebar */} - - - {/* Main content */} -
-
- {/* Top highlight */} -
- - {/* Grid texture overlay */} -
- - {/* Accent glow in corner */} - - -
- {/* Page header */} - - -
-
- - - -
-
- {/* Icon */} -
- -
- - {/* Title block */} -
-
-

- {meta.title} -

- - - {meta.badge} - -
-

- {meta.subtitle} -

-
-
- - - -
-
运行状态
-
{runtimeLabel}
-
-
-
-
- - - - {/* Page content */} -
- - - {children} - - - - - © {new Date().getFullYear()} SnowLuma. All rights reserved. - -
-
-
-
-
- ); -} diff --git a/packages/webui/src/components/layout/Sidebar.tsx b/packages/webui/src/components/layout/Sidebar.tsx index 93668281..c509f3d4 100644 --- a/packages/webui/src/components/layout/Sidebar.tsx +++ b/packages/webui/src/components/layout/Sidebar.tsx @@ -1,193 +1,91 @@ -import { LayoutDashboard, Settings, LogOut, Sun, Moon, Monitor, Terminal } from 'lucide-react'; -import { Avatar } from '@heroui/react'; -import { StatusBadge } from '../ui/StatusBadge'; -import { motion } from 'framer-motion'; -import { useTheme, type ThemeMode } from '../../contexts/ThemeContext'; +import { LayoutDashboard, Settings, SlidersHorizontal, Terminal } from 'lucide-react'; +import { motion } from 'motion/react'; +import { ScrollArea } from '@/components/ui/scroll-area'; +import { Separator } from '@/components/ui/separator'; +import { cn } from '@/lib/utils'; +import { APP_NAME, APP_VERSION } from '@/types'; -type Page = '总览' | '配置' | '日志'; +export type Page = 'overview' | 'config' | 'logs' | 'settings'; + +export const NAV_ITEMS: { page: Page; label: string; icon: typeof LayoutDashboard; description: string }[] = [ + { page: 'overview', label: '总览', icon: LayoutDashboard, description: '主机与服务状态' }, + { page: 'config', label: '节点配置', icon: Settings, description: 'OneBot 协议端点' }, + { page: 'logs', label: '日志', icon: Terminal, description: '实时事件流' }, + { page: 'settings', label: '系统设置', icon: SlidersHorizontal, description: '主题与账号' }, +]; interface SidebarProps { - activePage: Page; + active: Page; onNavigate: (page: Page) => void; - status: string; - onLogout: () => void; + collapsed?: boolean; + onItemClick?: () => void; } -const navItems: { page: Page; label: string; icon: typeof LayoutDashboard }[] = [ - { page: '总览', label: '总览', icon: LayoutDashboard }, - { page: '配置', label: '配置', icon: Settings }, - { page: '日志', label: '日志', icon: Terminal }, -]; - -const THEME_OPTIONS: { mode: ThemeMode; icon: typeof Sun; label: string }[] = [ - { mode: 'system', icon: Monitor, label: '跟随系统' }, - { mode: 'light', icon: Sun, label: '浅色' }, - { mode: 'dark', icon: Moon, label: '深色' }, -]; - -export function Sidebar({ activePage, onNavigate, status, onLogout }: SidebarProps) { - const { resolved, mode, setMode } = useTheme(); - const dark = resolved === 'dark'; - +export function Sidebar({ active, onNavigate, collapsed = false, onItemClick }: SidebarProps) { return ( - +
); } diff --git a/packages/webui/src/components/layout/TopBar.tsx b/packages/webui/src/components/layout/TopBar.tsx deleted file mode 100644 index ad0ff943..00000000 --- a/packages/webui/src/components/layout/TopBar.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import { Moon, Sun } from 'lucide-react'; -import { useTheme } from '../../contexts/ThemeContext'; - -interface TopBarProps { - title: string; - subtitle?: string; -} - -export function TopBar({ title, subtitle }: TopBarProps) { - const { resolved, mode, setMode } = useTheme(); - const cycleTheme = () => setMode(mode === 'system' ? 'light' : mode === 'light' ? 'dark' : 'system'); - - return ( -
-
-

{title}

- {subtitle &&

{subtitle}

} -
- -
- ); -} diff --git a/packages/webui/src/components/layout/main-layout.tsx b/packages/webui/src/components/layout/main-layout.tsx new file mode 100644 index 00000000..998552f7 --- /dev/null +++ b/packages/webui/src/components/layout/main-layout.tsx @@ -0,0 +1,88 @@ +import { useEffect, useState, type ReactNode } from 'react'; +import { motion, AnimatePresence } from 'motion/react'; +import { Sheet, SheetContent } from '@/components/ui/sheet'; +import { ScrollArea } from '@/components/ui/scroll-area'; +import { Sidebar, type Page } from '@/components/layout/sidebar'; +import { TopBar } from '@/components/layout/top-bar'; +import { useMediaQuery } from '@/hooks/use-media-query'; +import { cn } from '@/lib/utils'; + +interface MainLayoutProps { + active: Page; + onNavigate: (page: Page) => void; + status: string; + onLogout: () => void; + children: ReactNode; +} + +export function MainLayout({ active, onNavigate, status, onLogout, children }: MainLayoutProps) { + const isMobile = !useMediaQuery('(min-width: 768px)'); + const [collapsed, setCollapsed] = useState(() => { + return localStorage.getItem('snowluma_sidebar_collapsed') === '1'; + }); + const [mobileOpen, setMobileOpen] = useState(false); + + useEffect(() => { + localStorage.setItem('snowluma_sidebar_collapsed', collapsed ? '1' : '0'); + }, [collapsed]); + + return ( +
+ {/* Desktop sidebar */} + {!isMobile && ( + + + + )} + + {/* Mobile sidebar in sheet */} + {isMobile && ( + + + setMobileOpen(false)} + /> + + + )} + + {/* Main column */} +
+ setCollapsed((v) => !v)} + onOpenMobile={() => setMobileOpen(true)} + onLogout={onLogout} + isMobile={isMobile} + /> + +
+ +
+ + + {children} + + +
+
+
+
+
+ ); +} diff --git a/packages/webui/src/components/layout/top-bar.tsx b/packages/webui/src/components/layout/top-bar.tsx new file mode 100644 index 00000000..5354ad90 --- /dev/null +++ b/packages/webui/src/components/layout/top-bar.tsx @@ -0,0 +1,108 @@ +import { useState } from 'react'; +import { LogOut, Menu, PanelLeftClose, PanelLeftOpen } from 'lucide-react'; +import { motion, AnimatePresence } from 'motion/react'; +import { Button } from '@/components/ui/button'; +import { Badge } from '@/components/ui/badge'; +import { ThemeToggle } from '@/components/theme-toggle'; +import { ConfirmDialog } from '@/components/confirm-dialog'; +import type { Page } from '@/components/layout/sidebar'; +import { NAV_ITEMS } from '@/components/layout/sidebar'; + +interface TopBarProps { + active: Page; + status: string; + collapsed: boolean; + onToggleCollapse: () => void; + onOpenMobile: () => void; + onLogout: () => void; + isMobile: boolean; +} + +export function TopBar({ + active, + status, + collapsed, + onToggleCollapse, + onOpenMobile, + onLogout, + isMobile, +}: TopBarProps) { + const [confirmLogout, setConfirmLogout] = useState(false); + const meta = NAV_ITEMS.find((n) => n.page === active); + const PageIcon = meta?.icon; + const online = status === '已连接'; + + return ( +
+ {/* Collapse toggle (desktop) / menu (mobile) */} + {isMobile ? ( + + ) : ( + + )} + +
+ + {/* Page title */} + + + {PageIcon && } +

{meta?.label}

+ {meta?.description} +
+
+ +
+ + + {status} + + + + + +
+ + +
+ ); +} diff --git a/packages/webui/src/components/pages/ConfigPage.tsx b/packages/webui/src/components/pages/ConfigPage.tsx deleted file mode 100644 index 5b9a6934..00000000 --- a/packages/webui/src/components/pages/ConfigPage.tsx +++ /dev/null @@ -1,214 +0,0 @@ -import { MousePointerClick } from 'lucide-react'; -import { motion } from 'framer-motion'; -import { SectionCard } from '../ui/SectionCard'; -import { EndpointRow } from '../ui/EndpointRow'; -import { FieldInput } from '../ui/FieldInput'; -import { useTheme } from '../../contexts/ThemeContext'; -import type { QQInfo, OneBotConfig } from '../../types'; - -interface ConfigPageProps { - qqList: QQInfo[]; - selectedUin: string | null; - config: OneBotConfig | null; - saveStatus: string; - onSelectAccount: (uin: string) => void; - onSave: () => void; - onConfigChange: (config: OneBotConfig) => void; -} - -function qqAvatarUrl(uin: string): string { - return `/avatar/${encodeURIComponent(uin)}`; -} - -export function ConfigPage({ - qqList, selectedUin, config, saveStatus, - onSelectAccount, onSave, onConfigChange, -}: ConfigPageProps) { - const { resolved } = useTheme(); - const dark = resolved === 'dark'; - - return ( -
- {/* Account list panel */} -
-
-
- - 在线连接 - -
-
- {qqList.length === 0 ? ( -

暂无在线会话

- ) : qqList.map(q => { - const isActive = selectedUin === q.uin; - return ( - onSelectAccount(q.uin)} - className="w-full flex items-center gap-2.5 px-3 py-2 rounded-lg text-left cursor-pointer" - style={{ - background: isActive ? 'var(--accent-subtle)' : 'transparent', - transition: 'var(--transition-fast)', - }} - > -
- {q.nickname -
-
-
- {q.nickname} -
-
- {q.uin} -
-
-
- ); - })} -
-
-
- - {/* Editor panel */} -
- {!selectedUin ? ( -
- -

在左栏选择会话以配置通信节点

-
- ) : !config ? ( -
-
-
-
-
- ) : ( -
- {/* Header */} -
-
-

- OneBot 协议端点 -

- - UIN {selectedUin} - -
-
- {saveStatus && ( - - {saveStatus} - - )} - - 保存设定 - -
-
- - {/* HTTP Servers */} - { const c = { ...config }; c.httpServers = [...c.httpServers, { port: 3000, host: '0.0.0.0', path: '/' }]; onConfigChange(c); }}> - {config.httpServers.length === 0 ? null : config.httpServers.map((s, idx) => ( - { const c = { ...config }; c.httpServers = c.httpServers.filter((_, i) => i !== idx); onConfigChange(c); }}> - { const c = { ...config }; c.httpServers = c.httpServers.map((item, i) => i === idx ? { ...item, port: v as number } : item); onConfigChange(c); }} /> - { const c = { ...config }; c.httpServers = c.httpServers.map((item, i) => i === idx ? { ...item, accessToken: v as string } : item); onConfigChange(c); }} /> - - ))} - - - {/* HTTP Post */} - { const c = { ...config }; c.httpPostEndpoints = [...c.httpPostEndpoints, { url: 'http://127.0.0.1:5700' }]; onConfigChange(c); }}> - {config.httpPostEndpoints.length === 0 ? null : config.httpPostEndpoints.map((s, idx) => ( - { const c = { ...config }; c.httpPostEndpoints = c.httpPostEndpoints.filter((_, i) => i !== idx); onConfigChange(c); }}> - { const c = { ...config }; c.httpPostEndpoints = c.httpPostEndpoints.map((item, i) => i === idx ? { ...item, url: v as string } : item); onConfigChange(c); }} /> - { const c = { ...config }; c.httpPostEndpoints = c.httpPostEndpoints.map((item, i) => i === idx ? { ...item, accessToken: v as string } : item); onConfigChange(c); }} /> - - ))} - - - {/* WS Servers */} - { const c = { ...config }; c.wsServers = [...c.wsServers, { port: 3001, host: '0.0.0.0', path: '/' }]; onConfigChange(c); }}> - {config.wsServers.length === 0 ? null : config.wsServers.map((s, idx) => ( - { const c = { ...config }; c.wsServers = c.wsServers.filter((_, i) => i !== idx); onConfigChange(c); }}> - { const c = { ...config }; c.wsServers = c.wsServers.map((item, i) => i === idx ? { ...item, port: v as number } : item); onConfigChange(c); }} /> - { const c = { ...config }; c.wsServers = c.wsServers.map((item, i) => i === idx ? { ...item, accessToken: v as string } : item); onConfigChange(c); }} /> - - ))} - - - {/* WS Clients */} - { const c = { ...config }; c.wsClients = [...c.wsClients, { url: 'ws://127.0.0.1:8080/ws', reconnectIntervalMs: 5000 }]; onConfigChange(c); }}> - {config.wsClients.length === 0 ? null : config.wsClients.map((c2, idx) => ( - { const c = { ...config }; c.wsClients = c.wsClients.filter((_, i) => i !== idx); onConfigChange(c); }}> - { const c = { ...config }; c.wsClients = c.wsClients.map((item, i) => i === idx ? { ...item, url: v as string } : item); onConfigChange(c); }} /> - { const c = { ...config }; c.wsClients = c.wsClients.map((item, i) => i === idx ? { ...item, accessToken: v as string } : item); onConfigChange(c); }} /> - - ))} - - - {/* Music Sign URL */} - {}}> -
- onConfigChange({ ...config, musicSignUrl: (v as string) || undefined })} /> -
-
-
- )} -
-
- ); -} diff --git a/packages/webui/src/components/pages/LoginPage.tsx b/packages/webui/src/components/pages/LoginPage.tsx deleted file mode 100644 index af4717a3..00000000 --- a/packages/webui/src/components/pages/LoginPage.tsx +++ /dev/null @@ -1,473 +0,0 @@ -import { useState, useMemo, useRef, useCallback } from 'react'; -import { Avatar } from '@heroui/react'; -import { Sun, Moon, Monitor, Eye, EyeOff, ArrowRight, KeyRound } from 'lucide-react'; -import { motion, AnimatePresence, useMotionValue, useSpring, useTransform } from 'framer-motion'; -import { useTheme, type ThemeMode } from '../../contexts/ThemeContext'; - -interface LoginPageProps { - onLogin: (password: string) => Promise<{ success: boolean; error?: string }>; -} - -const THEME_OPTIONS: { mode: ThemeMode; icon: typeof Sun; label: string }[] = [ - { mode: 'system', icon: Monitor, label: '跟随系统' }, - { mode: 'light', icon: Sun, label: '浅色' }, - { mode: 'dark', icon: Moon, label: '深色' }, -]; - -const SPARKLES = Array.from({ length: 12 }, (_, i) => ({ - id: i, - x: (i * 31 + 9) % 100, - y: (i * 47 + 13) % 100, - size: 2 + (i % 2), - delay: (i * 0.35) % 4, - duration: 3.5 + (i % 3), -})); - -const BRAND_TAGS = ['OneBot v11', '多账号', '实时面板']; - -export function LoginPage({ onLogin }: LoginPageProps) { - const [password, setPassword] = useState(''); - const [showPwd, setShowPwd] = useState(false); - const [error, setError] = useState(''); - const [loading, setLoading] = useState(false); - const [shakeKey, setShakeKey] = useState(0); - const { mode, resolved, setMode } = useTheme(); - const containerRef = useRef(null); - - const logoSrc = useMemo(() => '/logo.png', []); - - const mouseX = useMotionValue(0); - const mouseY = useMotionValue(0); - const smoothX = useSpring(mouseX, { stiffness: 60, damping: 20 }); - const smoothY = useSpring(mouseY, { stiffness: 60, damping: 20 }); - - const shellRotateX = useTransform(smoothY, [-0.5, 0.5], [4, -4]); - const shellRotateY = useTransform(smoothX, [-0.5, 0.5], [-5, 5]); - - const orb1X = useTransform(smoothX, [-0.5, 0.5], [-45, 45]); - const orb1Y = useTransform(smoothY, [-0.5, 0.5], [-28, 28]); - const orb2X = useTransform(smoothX, [-0.5, 0.5], [35, -35]); - const orb2Y = useTransform(smoothY, [-0.5, 0.5], [30, -30]); - const accentX = useTransform(smoothX, [-0.5, 0.5], [-16, 16]); - const accentY = useTransform(smoothY, [-0.5, 0.5], [-12, 12]); - - const handleMouseMove = useCallback((e: React.MouseEvent) => { - const rect = containerRef.current?.getBoundingClientRect(); - if (!rect) return; - mouseX.set((e.clientX - rect.left) / rect.width - 0.5); - mouseY.set((e.clientY - rect.top) / rect.height - 0.5); - }, [mouseX, mouseY]); - - const handleMouseLeave = useCallback(() => { - mouseX.set(0); - mouseY.set(0); - }, [mouseX, mouseY]); - - const handleSubmit = async (e: React.FormEvent) => { - e.preventDefault(); - setError(''); - setLoading(true); - const result = await onLogin(password); - setLoading(false); - if (!result.success && result.error) { - setError(result.error); - setShakeKey(k => k + 1); - } - }; - - const darkMode = resolved === 'dark'; - - return ( -
-
- -
- {SPARKLES.map(s => ( - - ))} - - - -
- - - -
- -
- -
-
- - - -
-
-
- - -
-
- - - SL - -
- - -
-
- SnowLuma 控制台 -
-

- SnowLuma -

-
- - - - 基于 OneBot v11 标准实现的高性能 QQ 协议网关。 - - - - {BRAND_TAGS.map(tag => ( - - {tag} - - ))} - -
- -
- - © {new Date().getFullYear()} SnowLuma. All rights reserved. - -
-
- -
- - {/* Subtle animated background glow for the card */} - -
-
-
- 安全登录 -
- {/*

- 验证访问令牌 -

*/} -
-
- {THEME_OPTIONS.map(({ mode: m, icon: Icon, label }) => { - const active = mode === m; - return ( - - ); - })} -
-
- - - 0 ? { x: [0, -8, 8, -6, 6, -3, 3, 0] } : {}} - transition={{ duration: 0.45, ease: 'easeInOut' }} - > -
-
- -
- setPassword(e.target.value)} - autoFocus - className="h-full w-full bg-transparent text-sm font-medium outline-none placeholder:font-normal" - style={{ - color: 'var(--text-primary)', - }} - onFocus={e => { - const icon = e.target.previousElementSibling as HTMLElement; - if (icon) icon.style.color = 'var(--accent)'; - }} - onBlur={e => { - const icon = e.target.previousElementSibling as HTMLElement; - if (icon) icon.style.color = 'var(--text-tertiary)'; - }} - /> -
- -
- - - {error && ( - - {error} - - )} - - - - - {loading ? ( - <> - - 验证中… - - ) : ( - <> - 进入控制台 - - - )} - - -
-
-
-
-
-
-
-
- ); -} - diff --git a/packages/webui/src/components/pages/LogsPage.tsx b/packages/webui/src/components/pages/LogsPage.tsx deleted file mode 100644 index 302bfea7..00000000 --- a/packages/webui/src/components/pages/LogsPage.tsx +++ /dev/null @@ -1,132 +0,0 @@ -import { useEffect, useMemo, useRef, useState } from 'react'; -import { RefreshCw, Terminal } from 'lucide-react'; -import { motion } from 'framer-motion'; -import { useTheme } from '../../contexts/ThemeContext'; - -interface LogEntry { - id: number; - time: string; - level: 'debug' | 'info' | 'success' | 'warn' | 'error'; - scope: string; - message: string; - line: string; -} - -interface LogsPageProps { - fetchApi: (url: string, options?: RequestInit) => Promise; -} - -const levelColor: Record = { - debug: 'var(--text-tertiary)', - info: 'var(--accent)', - success: 'var(--color-success)', - warn: '#f59e0b', - error: 'var(--color-danger)', -}; - -export function LogsPage({ fetchApi }: LogsPageProps) { - const { resolved } = useTheme(); - const dark = resolved === 'dark'; - const [logs, setLogs] = useState([]); - const [streamStatus, setStreamStatus] = useState('连接中'); - const endRef = useRef(null); - - const token = useMemo(() => localStorage.getItem('snowluma_token') || '', []); - - async function loadLogs() { - const res = await fetchApi('/api/logs?limit=500'); - if (!res.ok) return; - const data = await res.json(); - setLogs(data.list || []); - } - - useEffect(() => { - loadLogs().catch(console.error); - }, []); - - useEffect(() => { - if (!token) return; - const url = `/api/logs/stream?token=${encodeURIComponent(token)}`; - const source = new EventSource(url); - source.onopen = () => setStreamStatus('实时连接'); - source.onerror = () => setStreamStatus('重连中'); - source.onmessage = event => { - try { - const entry = JSON.parse(event.data) as LogEntry | { type: string }; - if ('type' in entry) return; - setLogs(prev => [...prev.filter(item => item.id !== entry.id), entry].slice(-500)); - } catch { - } - }; - return () => source.close(); - }, [token]); - - useEffect(() => { - endRef.current?.scrollIntoView({ block: 'end' }); - }, [logs]); - - return ( -
- -
-
-
- -
-
-

运行日志

-

{streamStatus} · 最近 {logs.length} 条

-
-
- -
- -
- {logs.length === 0 ? ( -
暂无日志
- ) : logs.map(log => ( -
- {new Date(log.time).toLocaleTimeString()} - {log.level.toUpperCase()} - [{log.scope}] - {log.message} -
- ))} -
-
- -
- ); -} diff --git a/packages/webui/src/components/pages/OverviewPage.tsx b/packages/webui/src/components/pages/OverviewPage.tsx deleted file mode 100644 index 9b11a1be..00000000 --- a/packages/webui/src/components/pages/OverviewPage.tsx +++ /dev/null @@ -1,307 +0,0 @@ -import { Users, Activity, Cpu, RefreshCw, Loader2, CheckCircle2, AlertCircle, Unplug } from 'lucide-react'; -import { motion } from 'framer-motion'; -import { StatCard } from '../ui/StatCard'; -import { useTheme } from '../../contexts/ThemeContext'; -import type { QQInfo, HookProcessInfo } from '../../types'; - -interface OverviewPageProps { - qqList: QQInfo[]; - status: string; - processList: HookProcessInfo[]; - processLoadingPid: number | null; - processUnloadingPid: number | null; - processActionStatus: string; - onRefreshProcesses: () => void; - onLoadProcess: (pid: number) => void; - onUnloadProcess: (pid: number) => void; -} - -const processStatusLabel: Record = { - available: '可加载', - loading: '加载中', - loaded: '等待登录', - online: '已在线', - error: '错误', - disconnected: '已断开', -}; - -function processStatusColor(status: HookProcessInfo['status']): string { - if (status === 'online') return 'var(--color-success)'; - if (status === 'error' || status === 'disconnected') return 'var(--color-danger)'; - if (status === 'loading' || status === 'loaded') return 'var(--accent)'; - return 'var(--text-secondary)'; -} - -function qqAvatarUrl(uin: string): string { - return `/avatar/${encodeURIComponent(uin)}`; -} - -export function OverviewPage({ - qqList, - status, - processList, - processLoadingPid, - processUnloadingPid, - processActionStatus, - onRefreshProcesses, - onLoadProcess, - onUnloadProcess, -}: OverviewPageProps) { - const { resolved } = useTheme(); - const dark = resolved === 'dark'; - - return ( -
- {/* Stat cards */} -
- } - /> - } - accent={status === '已连接' ? 'success' : 'danger'} - /> -
- - -
-
-
- -
-
-

- 选择 QQ 进程 -

-

- 加载 SnowLuma 后会监听登录状态,登录成功后自动接入原有 OneBot 流程 -

-
-
- -
- - {processActionStatus && ( -
- {processActionStatus} -
- )} - - {processList.length > 0 ? ( -
- {processList.map((proc, idx) => { - const loading = processLoadingPid === proc.pid || proc.status === 'loading'; - const unloading = processUnloadingPid === proc.pid; - const busy = loading || unloading; - const online = proc.status === 'online'; - const canUnload = proc.injected || proc.status === 'loaded' || online || proc.status === 'disconnected'; - const disabled = busy; - const actionLabel = canUnload - ? unloading ? '卸载中' : '卸载' - : loading ? '加载中' : '加载'; - const action = canUnload ? () => onUnloadProcess(proc.pid) : () => onLoadProcess(proc.pid); - return ( - -
- {online ? : proc.status === 'error' ? : } -
-
-
- - {proc.name || 'QQ.exe'} - - - {processStatusLabel[proc.status]} - -
-
- PID {proc.pid}{proc.uin && proc.uin !== '0' ? ` · UIN ${proc.uin}` : ''} -
- {proc.path && ( -
- {proc.path} -
- )} - {proc.error && ( -
- {proc.error} -
- )} -
- -
- ); - })} -
- ) : ( -
- -

未检测到可加载 QQ 主进程

-
- )} -
- - {/* Account list */} - {qqList.length > 0 && ( - -

- 在线会话 -

-
- {qqList.map((q, idx) => ( - -
- {q.nickname -
-
-
- {q.nickname} -
-
- {q.uin} -
-
- -
- ))} -
-
- )} - - {qqList.length === 0 && ( - - -

暂无在线会话

-
- )} -
- ); -} diff --git a/packages/webui/src/components/pages/change-password-page.tsx b/packages/webui/src/components/pages/change-password-page.tsx new file mode 100644 index 00000000..7972b966 --- /dev/null +++ b/packages/webui/src/components/pages/change-password-page.tsx @@ -0,0 +1,303 @@ +import { useEffect, useMemo, useState } from 'react'; +import { motion, AnimatePresence } from 'motion/react'; +import { Check, Eye, EyeOff, KeyRound, Loader2, ShieldAlert } from 'lucide-react'; +import { Button } from '@/components/ui/button'; +import { Card, CardContent } from '@/components/ui/card'; +import { Input } from '@/components/ui/input'; +import { Label } from '@/components/ui/label'; +import { ThemeToggle } from '@/components/theme-toggle'; +import { cn } from '@/lib/utils'; + +export interface PasswordRule { + id: string; + label: string; + ok: boolean; +} + +interface ChangePasswordPageProps { + /** When true, this is the forced first-time change flow. */ + forced?: boolean; + /** Heading shown above the form. */ + title?: string; + /** Subheading. */ + description?: string; + /** Sends `{ password }` and returns the rule list + valid flag. */ + checkStrength: (password: string) => Promise<{ rules: PasswordRule[]; valid: boolean }>; + /** Sends `{ oldPassword, newPassword }`. Returns success or error message. */ + submit: (oldPassword: string, newPassword: string) => Promise<{ success: boolean; message?: string }>; + /** Called after a successful submit. */ + onSuccess: () => void; + /** Called when user cancels (only available when not forced). */ + onCancel?: () => void; +} + +export function ChangePasswordPage({ + forced = false, + title, + description, + checkStrength, + submit, + onSuccess, + onCancel, +}: ChangePasswordPageProps) { + const [oldPassword, setOldPassword] = useState(''); + const [newPassword, setNewPassword] = useState(''); + const [confirmPassword, setConfirmPassword] = useState(''); + const [showOld, setShowOld] = useState(false); + const [showNew, setShowNew] = useState(false); + const [rules, setRules] = useState([]); + const [valid, setValid] = useState(false); + const [submitting, setSubmitting] = useState(false); + const [error, setError] = useState(''); + + const confirmMatches = newPassword.length > 0 && newPassword === confirmPassword; + const canSubmit = + !submitting && oldPassword.length > 0 && valid && confirmMatches && oldPassword !== newPassword; + + // Debounce the strength check so we don't slam the API on every keystroke. + useEffect(() => { + let cancelled = false; + const handle = window.setTimeout(async () => { + try { + const res = await checkStrength(newPassword); + if (cancelled) return; + setRules(res.rules); + setValid(res.valid); + } catch { + /* ignore – the form will just stay disabled */ + } + }, 180); + return () => { + cancelled = true; + window.clearTimeout(handle); + }; + }, [newPassword, checkStrength]); + + const handleSubmit = async (e: React.FormEvent) => { + e.preventDefault(); + if (!canSubmit) return; + setSubmitting(true); + setError(''); + try { + const res = await submit(oldPassword, newPassword); + if (res.success) { + onSuccess(); + } else { + setError(res.message || '修改失败'); + } + } catch (err) { + setError(err instanceof Error ? err.message : '网络错误'); + } finally { + setSubmitting(false); + } + }; + + const computedTitle = title ?? (forced ? '请先设置新的访问密码' : '修改访问密码'); + const computedDescription = + description ?? + (forced + ? '为了保护你的实例,必须将首次启动生成的临时密码替换为符合下列要求的强密码。' + : '设置一个全新的强密码后,其他会话将被立即下线,需要重新登录。'); + + return ( +
+
+ +
+ +
+ + + + +
+
+ {forced ? ( + + ) : ( + + )} +
+
+

{computedTitle}

+

{computedDescription}

+
+
+ +
+
+ +
+ setOldPassword(e.target.value)} + placeholder="输入当前访问密码" + className="h-10 pr-10 text-sm" + /> + +
+
+ +
+ +
+ setNewPassword(e.target.value)} + placeholder="设置新的强密码" + className="h-10 pr-10 text-sm" + /> + +
+
+ +
+ + setConfirmPassword(e.target.value)} + placeholder="再次输入新密码" + className="h-10 text-sm" + /> + {confirmPassword.length > 0 && !confirmMatches && ( + 两次输入的密码不一致 + )} +
+ + + + + {error && ( + + {error} + + )} + + +
+ {!forced && onCancel && ( + + )} + +
+ +
+
+
+
+ ); +} + +function RuleList({ rules }: { rules: PasswordRule[] }) { + // Initial empty state: show a placeholder set so the user knows the rules + // exist even before any input. + const display = useMemo(() => { + if (rules.length > 0) return rules; + return [ + { id: 'length', label: '长度不少于 10 位', ok: false }, + { id: 'lower', label: '至少包含一个小写字母', ok: false }, + { id: 'upper', label: '至少包含一个大写字母', ok: false }, + { id: 'special', label: '至少包含一个特殊字符', ok: false }, + { id: 'no-space', label: '不得包含空格', ok: false }, + ]; + }, [rules]); + + return ( +
    + {display.map((rule) => ( +
  • + + + {rule.ok && ( + + + + )} + + + + {rule.label} + +
  • + ))} +
+ ); +} diff --git a/packages/webui/src/components/pages/config-page.tsx b/packages/webui/src/components/pages/config-page.tsx new file mode 100644 index 00000000..59fad188 --- /dev/null +++ b/packages/webui/src/components/pages/config-page.tsx @@ -0,0 +1,434 @@ +import { useState } from 'react'; +import { motion } from 'motion/react'; +import { MousePointerClick, Plus, Save, Trash2 } from 'lucide-react'; +import { Button } from '@/components/ui/button'; +import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; +import { Input } from '@/components/ui/input'; +import { Label } from '@/components/ui/label'; +import { ScrollArea } from '@/components/ui/scroll-area'; +import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar'; +import { Badge } from '@/components/ui/badge'; +import { Skeleton } from '@/components/ui/skeleton'; +import { ConfirmDialog } from '@/components/confirm-dialog'; +import { cn } from '@/lib/utils'; +import type { + HttpPostEndpoint, + HttpServerEndpoint, + OneBotConfig, + QQInfo, + WsClientEndpoint, + WsServerEndpoint, +} from '@/types'; + +interface ConfigPageProps { + qqList: QQInfo[]; + selectedUin: string | null; + config: OneBotConfig | null; + saveStatus: string; + onSelectAccount: (uin: string) => void; + onSave: () => Promise | void; + onConfigChange: (config: OneBotConfig) => void; +} + +function qqAvatarUrl(uin: string) { + return `/avatar/${encodeURIComponent(uin)}`; +} + +function Field({ + label, + value, + onChange, + placeholder, + type = 'text', + className, +}: { + label: string; + value: string | number | undefined; + onChange: (v: string) => void; + placeholder?: string; + type?: 'text' | 'number' | 'url'; + className?: string; +}) { + return ( +
+ + onChange(e.target.value)} + placeholder={placeholder} + /> +
+ ); +} + +interface SectionProps { + title: string; + description?: string; + onAdd?: () => void; + children: React.ReactNode; + count?: number; +} + +function Section({ title, description, onAdd, children, count }: SectionProps) { + return ( + + +
+
+ {title} + {typeof count === 'number' && {count}} +
+ {description &&

{description}

} +
+ {onAdd && ( + + )} +
+ {children} +
+ ); +} + +function EndpointRow({ children, onRemove }: { children: React.ReactNode; onRemove?: () => void }) { + return ( + +
{children}
+ {onRemove && ( + + )} +
+ ); +} + +export function ConfigPage({ + qqList, + selectedUin, + config, + saveStatus, + onSelectAccount, + onSave, + onConfigChange, +}: ConfigPageProps) { + const [confirmSave, setConfirmSave] = useState(false); + + const update = (next: OneBotConfig) => onConfigChange(next); + + return ( +
+ {/* Account list */} + + + 在线连接 + + + {qqList.length === 0 ? ( +

暂无在线会话

+ ) : ( + +
+ {qqList.map((q) => { + const isActive = selectedUin === q.uin; + return ( + onSelectAccount(q.uin)} + className={cn( + 'flex items-center gap-2.5 rounded-lg border px-2.5 py-2 text-left transition-colors cursor-pointer', + isActive ? 'border-primary/30 bg-primary/10' : 'border-transparent hover:bg-accent/40' + )} + > + + + {(q.nickname || q.uin).slice(0, 2)} + +
+
+ {q.nickname} +
+
{q.uin}
+
+
+ ); + })} +
+
+ )} +
+
+ + {/* Editor */} +
+ {!selectedUin ? ( +
+ +

请在左栏选择会话以配置通信节点

+
+ ) : !config ? ( +
+ + + +
+ ) : ( +
+ {/* Header */} +
+
+

OneBot 协议端点

+ UIN {selectedUin} +
+
+ {saveStatus && ( + + {saveStatus} + + )} + +
+
+ + {/* HTTP Servers */} +
update({ ...config, httpServers: [...config.httpServers, { port: 3000, host: '0.0.0.0', path: '/' }] })} + > + {config.httpServers.length === 0 ? ( + + ) : ( + config.httpServers.map((s, idx) => ( + update({ ...config, httpServers: config.httpServers.filter((_, i) => i !== idx) })} + > + + update({ + ...config, + httpServers: config.httpServers.map((it, i) => (i === idx ? { ...it, port: Number(v) || undefined } : it)) as HttpServerEndpoint[], + }) + } + className="sm:w-32" + /> + + update({ + ...config, + httpServers: config.httpServers.map((it, i) => (i === idx ? { ...it, accessToken: v || undefined } : it)), + }) + } + className="flex-1" + /> + + )) + )} +
+ + {/* HTTP Post */} +
update({ ...config, httpPostEndpoints: [...config.httpPostEndpoints, { url: 'http://127.0.0.1:5700' }] })} + > + {config.httpPostEndpoints.length === 0 ? ( + + ) : ( + config.httpPostEndpoints.map((s, idx) => ( + + update({ ...config, httpPostEndpoints: config.httpPostEndpoints.filter((_, i) => i !== idx) }) + } + > + + update({ + ...config, + httpPostEndpoints: config.httpPostEndpoints.map((it, i) => (i === idx ? { ...it, url: v } : it)) as HttpPostEndpoint[], + }) + } + className="flex-1" + /> + + update({ + ...config, + httpPostEndpoints: config.httpPostEndpoints.map((it, i) => (i === idx ? { ...it, accessToken: v || undefined } : it)), + }) + } + className="sm:w-64" + /> + + )) + )} +
+ + {/* WS Servers */} +
update({ ...config, wsServers: [...config.wsServers, { port: 3001, host: '0.0.0.0', path: '/' }] })} + > + {config.wsServers.length === 0 ? ( + + ) : ( + config.wsServers.map((s, idx) => ( + update({ ...config, wsServers: config.wsServers.filter((_, i) => i !== idx) })} + > + + update({ + ...config, + wsServers: config.wsServers.map((it, i) => (i === idx ? { ...it, port: Number(v) || undefined } : it)) as WsServerEndpoint[], + }) + } + className="sm:w-32" + /> + + update({ + ...config, + wsServers: config.wsServers.map((it, i) => (i === idx ? { ...it, accessToken: v || undefined } : it)), + }) + } + className="flex-1" + /> + + )) + )} +
+ + {/* WS Clients */} +
+ update({ + ...config, + wsClients: [...config.wsClients, { url: 'ws://127.0.0.1:8080/ws', reconnectIntervalMs: 5000 }], + }) + } + > + {config.wsClients.length === 0 ? ( + + ) : ( + config.wsClients.map((c, idx) => ( + update({ ...config, wsClients: config.wsClients.filter((_, i) => i !== idx) })} + > + + update({ + ...config, + wsClients: config.wsClients.map((it, i) => (i === idx ? { ...it, url: v } : it)) as WsClientEndpoint[], + }) + } + className="flex-1" + /> + + update({ + ...config, + wsClients: config.wsClients.map((it, i) => (i === idx ? { ...it, accessToken: v || undefined } : it)), + }) + } + className="sm:w-64" + /> + + )) + )} +
+ +
+ update({ ...config, musicSignUrl: v || undefined })} + /> +
+
+ )} +
+ + +
+ ); +} + +function EmptyHint({ label }: { label: string }) { + return ( +
{label}
+ ); +} diff --git a/packages/webui/src/components/pages/login-page.tsx b/packages/webui/src/components/pages/login-page.tsx new file mode 100644 index 00000000..cf856320 --- /dev/null +++ b/packages/webui/src/components/pages/login-page.tsx @@ -0,0 +1,135 @@ +import { useState } from 'react'; +import { motion } from 'motion/react'; +import { ArrowRight, Eye, EyeOff, KeyRound } from 'lucide-react'; +import { Button } from '@/components/ui/button'; +import { Card, CardContent } from '@/components/ui/card'; +import { Input } from '@/components/ui/input'; +import { ThemeToggle } from '@/components/theme-toggle'; +import { APP_NAME, APP_VERSION } from '@/types'; + +interface LoginPageProps { + onLogin: (password: string) => Promise<{ success: boolean; error?: string }>; +} + +export function LoginPage({ onLogin }: LoginPageProps) { + const [password, setPassword] = useState(''); + const [showPwd, setShowPwd] = useState(false); + const [error, setError] = useState(''); + const [loading, setLoading] = useState(false); + const [shake, setShake] = useState(0); + + const handleSubmit = async (e: React.FormEvent) => { + e.preventDefault(); + setError(''); + setLoading(true); + const result = await onLogin(password); + setLoading(false); + if (!result.success) { + setError(result.error || '登录失败'); + setShake((k) => k + 1); + } + }; + + return ( +
+ {/* Sky gradient backdrop */} +
+ + + +
+ +
+ + + + +
+
+ SnowLuma +
+
+
+ {APP_NAME} + v{APP_VERSION} +
+

OneBot v11 协议网关 · 安全登录

+
+
+ +
+ 0 ? { x: [0, -8, 8, -6, 6, -3, 3, 0] } : {}} + transition={{ duration: 0.4 }} + className="relative" + > + + setPassword(e.target.value)} + autoFocus + className="h-11 pl-9 pr-10 text-sm" + /> + + + + {error && ( + + {error} + + )} + + +
+ +

+ © {new Date().getFullYear()} SnowLuma. All rights reserved. +

+
+
+
+
+ ); +} diff --git a/packages/webui/src/components/pages/logs-page.tsx b/packages/webui/src/components/pages/logs-page.tsx new file mode 100644 index 00000000..bc0f07f3 --- /dev/null +++ b/packages/webui/src/components/pages/logs-page.tsx @@ -0,0 +1,199 @@ +import { useEffect, useMemo, useRef, useState } from 'react'; +import { motion } from 'motion/react'; +import { Pause, Play, RefreshCw, Trash2 } from 'lucide-react'; +import { Button } from '@/components/ui/button'; +import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'; +import { Badge } from '@/components/ui/badge'; +import { Input } from '@/components/ui/input'; +import { ScrollArea } from '@/components/ui/scroll-area'; +import { ConfirmDialog } from '@/components/confirm-dialog'; +import { cn } from '@/lib/utils'; +import type { LogEntry } from '@/types'; + +interface LogsPageProps { + fetchApi: (url: string, options?: RequestInit) => Promise; +} + +const levelClass: Record = { + debug: 'text-muted-foreground', + info: 'text-primary', + success: 'text-success', + warn: 'text-warning', + error: 'text-destructive', +}; + +const LEVELS: LogEntry['level'][] = ['debug', 'info', 'success', 'warn', 'error']; + +export function LogsPage({ fetchApi }: LogsPageProps) { + const [logs, setLogs] = useState([]); + const [streamStatus, setStreamStatus] = useState('连接中'); + const [paused, setPaused] = useState(false); + const [filter, setFilter] = useState(''); + const [enabledLevels, setEnabledLevels] = useState>(new Set(LEVELS)); + const [confirmClear, setConfirmClear] = useState(false); + const endRef = useRef(null); + const viewportRef = useRef(null); + + const token = useMemo(() => localStorage.getItem('snowluma_token') || '', []); + + async function loadLogs() { + const res = await fetchApi('/api/logs?limit=500'); + if (!res.ok) return; + const data = await res.json(); + setLogs(data.list || []); + } + + useEffect(() => { + loadLogs().catch(console.error); + }, []); + + useEffect(() => { + if (!token) return; + const url = `/api/logs/stream?token=${encodeURIComponent(token)}`; + const source = new EventSource(url); + source.onopen = () => setStreamStatus('实时'); + source.onerror = () => setStreamStatus('重连中'); + source.onmessage = (event) => { + try { + const entry = JSON.parse(event.data) as LogEntry | { type: string }; + if ('type' in entry) return; + setLogs((prev) => [...prev.filter((it) => it.id !== entry.id), entry].slice(-1000)); + } catch { + // ignore + } + }; + return () => source.close(); + }, [token]); + + useEffect(() => { + if (paused) return; + endRef.current?.scrollIntoView({ block: 'end' }); + }, [logs, paused]); + + const filtered = useMemo(() => { + const f = filter.trim().toLowerCase(); + return logs.filter((l) => { + if (!enabledLevels.has(l.level)) return false; + if (!f) return true; + return ( + l.message.toLowerCase().includes(f) || + l.scope.toLowerCase().includes(f) || + l.level.toLowerCase().includes(f) + ); + }); + }, [logs, filter, enabledLevels]); + + const toggleLevel = (lv: LogEntry['level']) => { + setEnabledLevels((prev) => { + const next = new Set(prev); + if (next.has(lv)) next.delete(lv); + else next.add(lv); + return next; + }); + }; + + return ( + + +
+ + 运行日志 + {streamStatus} + + + 最近 {filtered.length} / {logs.length} 条 · 通过 SSE 推送 + +
+
+ setFilter(e.target.value)} + className="h-8 w-48" + /> + + + +
+
+ +
+ {LEVELS.map((lv) => { + const active = enabledLevels.has(lv); + return ( + + ); + })} +
+ + +
+ +
+ {filtered.length === 0 ? ( +
暂无日志
+ ) : ( + filtered.map((log) => ( + + + {new Date(log.time).toLocaleTimeString()} + + + {log.level.toUpperCase()} + + [{log.scope}] + {log.message} + + )) + )} +
+
+ +
+ + + setLogs([])} + /> + + ); +} diff --git a/packages/webui/src/components/pages/overview-page.tsx b/packages/webui/src/components/pages/overview-page.tsx new file mode 100644 index 00000000..c109859b --- /dev/null +++ b/packages/webui/src/components/pages/overview-page.tsx @@ -0,0 +1,421 @@ +import { useEffect, useState } from 'react'; +import { motion } from 'motion/react'; +import { + Activity, + AlertCircle, + CheckCircle2, + Cpu, + HardDrive, + Loader2, + MemoryStick, + MonitorCog, + RefreshCw, + Server, + Unplug, + Users, +} from 'lucide-react'; +import { Button } from '@/components/ui/button'; +import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'; +import { Badge } from '@/components/ui/badge'; +import { Progress } from '@/components/ui/progress'; +import { ScrollArea } from '@/components/ui/scroll-area'; +import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar'; +import { Skeleton } from '@/components/ui/skeleton'; +import { ConfirmDialog } from '@/components/confirm-dialog'; +import { cn, formatBytes, formatUptime } from '@/lib/utils'; +import type { HookProcessInfo, QQInfo, SystemInfo } from '@/types'; + +interface OverviewPageProps { + qqList: QQInfo[]; + status: string; + processList: HookProcessInfo[]; + processLoadingPid: number | null; + processUnloadingPid: number | null; + processActionStatus: string; + systemInfo: SystemInfo | null; + onRefreshProcesses: () => void; + onRefreshSystem: () => void; + onLoadProcess: (pid: number) => Promise | void; + onUnloadProcess: (pid: number) => Promise | void; +} + +const processStatusLabel: Record = { + available: '可加载', + loading: '加载中', + loaded: '等待登录', + online: '已在线', + error: '错误', + disconnected: '已断开', +}; + +function processBadgeVariant(status: HookProcessInfo['status']) { + if (status === 'online') return 'success' as const; + if (status === 'error' || status === 'disconnected') return 'destructive' as const; + if (status === 'loading' || status === 'loaded') return 'default' as const; + return 'secondary' as const; +} + +function qqAvatarUrl(uin: string) { + return `/avatar/${encodeURIComponent(uin)}`; +} + +function StatTile({ + icon, + label, + value, + subtext, + accent = false, +}: { + icon: React.ReactNode; + label: string; + value: React.ReactNode; + subtext?: React.ReactNode; + accent?: boolean; +}) { + return ( + + +
+ {icon} +
+
+

{label}

+
{value}
+ {subtext &&

{subtext}

} +
+
+
+ ); +} + +export function OverviewPage({ + qqList, + status, + processList, + processLoadingPid, + processUnloadingPid, + processActionStatus, + systemInfo, + onRefreshProcesses, + onRefreshSystem, + onLoadProcess, + onUnloadProcess, +}: OverviewPageProps) { + const [confirm, setConfirm] = useState< + | { kind: 'load' | 'unload'; pid: number; name: string } + | null + >(null); + + // Lightweight tick to refresh "uptime" pretty-print every 30s + const [, force] = useState(0); + useEffect(() => { + const t = setInterval(() => force((v) => v + 1), 30_000); + return () => clearInterval(t); + }, []); + + const online = status === '已连接'; + + return ( +
+ {/* Top stats */} +
+ } + label="服务状态" + value={online ? '运行中' : status} + subtext={online ? '已连接到后端' : '请检查后端进程'} + accent={online} + /> + } + label="在线账号" + value={qqList.length} + subtext={`已接入 ${qqList.length} 个会话`} + /> + } + label="主机名" + value={systemInfo?.hostname ?? '—'} + subtext={systemInfo ? `${systemInfo.platform} · ${systemInfo.arch}` : '加载中'} + /> + } + label="系统运行" + value={systemInfo ? formatUptime(systemInfo.uptime) : '—'} + subtext={systemInfo ? `进程 ${formatUptime(systemInfo.processUptime)}` : undefined} + /> +
+ + {/* System metrics */} + + +
+ 主机资源 + + {systemInfo + ? `${systemInfo.cpu.model.trim()} · ${systemInfo.cpu.cores} 核 · Node ${systemInfo.nodeVersion}` + : '正在采集主机信息…'} + +
+ +
+ + {/* CPU */} +
+
+
+ + CPU 使用率 +
+ + {systemInfo ? `${systemInfo.cpu.average.toFixed(1)}%` : '—'} + +
+ +

+ 负载: {systemInfo ? systemInfo.cpu.loadAvg.map((v) => v.toFixed(2)).join(' / ') : '—'} +

+ {systemInfo && systemInfo.cpu.perCore.length > 0 && ( +
+ {systemInfo.cpu.perCore.map((p, i) => ( +
+
+
+ ))} +
+ )} +
+ + {/* Memory */} +
+
+
+ + 内存使用 +
+ + {systemInfo ? `${systemInfo.memory.usagePercent.toFixed(1)}%` : '—'} + +
+ +
+ 已用 {systemInfo ? formatBytes(systemInfo.memory.used) : '—'} + 共 {systemInfo ? formatBytes(systemInfo.memory.total) : '—'} +
+
+ + {/* GPU */} +
+
+ + 显示适配器 +
+ {!systemInfo ? ( +
+ + +
+ ) : systemInfo.gpus.length === 0 ? ( +

未检测到 GPU 信息

+ ) : ( +
    + {systemInfo.gpus.map((g, i) => ( +
  • +
    {g.name}
    + {g.vendor &&
    {g.vendor}
    } +
  • + ))} +
+ )} +
+ + + + {/* QQ Processes */} + + +
+ QQ 进程 + + 加载 SnowLuma 后会监听登录状态,登录后自动接入 OneBot 流程 + +
+ +
+ + {processActionStatus && ( + + {processActionStatus} + + )} + {processList.length === 0 ? ( +
+ +

未检测到可加载 QQ 主进程

+
+ ) : ( +
+ {processList.map((proc, idx) => { + const loading = processLoadingPid === proc.pid || proc.status === 'loading'; + const unloading = processUnloadingPid === proc.pid; + const busy = loading || unloading; + const isOnline = proc.status === 'online'; + const canUnload = + proc.injected || proc.status === 'loaded' || isOnline || proc.status === 'disconnected'; + return ( + +
+ {isOnline ? ( + + ) : proc.status === 'error' ? ( + + ) : ( + + )} +
+
+
+ {proc.name || 'QQ.exe'} + {processStatusLabel[proc.status]} +
+
+ PID {proc.pid} + {proc.uin && proc.uin !== '0' ? ` · UIN ${proc.uin}` : ''} +
+ {proc.path && ( +
+ {proc.path} +
+ )} + {proc.error && ( +
+ {proc.error} +
+ )} +
+ +
+ ); + })} +
+ )} +
+
+ + {/* Online accounts */} + + + 在线会话 + 当前已接入并完成登录的 QQ 账号 + + + {qqList.length === 0 ? ( +
+ +

暂无在线会话

+
+ ) : ( + +
+ {qqList.map((q, idx) => ( + + + + {(q.nickname || q.uin).slice(0, 2)} + +
+
{q.nickname}
+
{q.uin}
+
+ +
+ ))} +
+
+ )} +
+
+ + !o && setConfirm(null)} + title={confirm?.kind === 'unload' ? '确认卸载 SnowLuma?' : '确认加载 SnowLuma?'} + description={ + confirm + ? confirm.kind === 'unload' + ? `将从进程 ${confirm.name} 卸载 SnowLuma 注入,可能导致当前会话断开。` + : `将向进程 ${confirm.name} 注入 SnowLuma,并开始监听登录状态。` + : '' + } + confirmText={confirm?.kind === 'unload' ? '卸载' : '加载'} + destructive={confirm?.kind === 'unload'} + onConfirm={async () => { + if (!confirm) return; + if (confirm.kind === 'unload') await onUnloadProcess(confirm.pid); + else await onLoadProcess(confirm.pid); + }} + /> +
+ ); +} diff --git a/packages/webui/src/components/pages/settings-page.tsx b/packages/webui/src/components/pages/settings-page.tsx new file mode 100644 index 00000000..bdf9e31b --- /dev/null +++ b/packages/webui/src/components/pages/settings-page.tsx @@ -0,0 +1,285 @@ +import { useState } from 'react'; +import { motion } from 'motion/react'; +import { Check, KeyRound, Loader2, Monitor, Moon, Sun } from 'lucide-react'; +import { Card, CardContent, CardHeader, CardTitle, CardDescription } from '@/components/ui/card'; +import { Button } from '@/components/ui/button'; +import { Label } from '@/components/ui/label'; +import { Separator } from '@/components/ui/separator'; +import { + ACCENTS, + POLL_INTERVAL_OPTIONS, + RADIUS_OPTIONS, + useTheme, + type AccentColor, + type Density, + type ThemeMode, +} from '@/contexts/ThemeContext'; +import { + ChangePasswordPage, + type PasswordRule, +} from '@/components/pages/change-password-page'; +import { cn } from '@/lib/utils'; + +interface SettingsPageProps { + fetchApi: (url: string, options?: RequestInit) => Promise; + /** Called after successful logout (e.g. all-sessions invalidated). */ + onLogout: () => void; +} + +const MODE_OPTIONS: { value: ThemeMode; label: string; icon: typeof Sun }[] = [ + { value: 'light', label: '浅色', icon: Sun }, + { value: 'dark', label: '深色', icon: Moon }, + { value: 'system', label: '跟随系统', icon: Monitor }, +]; + +const DENSITY_OPTIONS: { value: Density; label: string; description: string }[] = [ + { value: 'cozy', label: '舒适', description: '默认间距,阅读更轻松' }, + { value: 'compact', label: '紧凑', description: '更小的字号与行距,单屏放更多内容' }, +]; + +export function SettingsPage({ fetchApi, onLogout }: SettingsPageProps) { + const { + mode, setMode, + accent, setAccent, + radius, setRadius, + density, setDensity, + pollInterval, setPollInterval, + } = useTheme(); + + const [showChangePwd, setShowChangePwd] = useState(false); + const [pwdSavedAt, setPwdSavedAt] = useState(null); + + const checkStrength = async (password: string) => { + const res = await fetchApi('/api/auth/check-strength', { + method: 'POST', + body: JSON.stringify({ password }), + }); + const data = (await res.json().catch(() => ({}))) as { rules?: PasswordRule[]; valid?: boolean }; + return { rules: data.rules ?? [], valid: !!data.valid }; + }; + + const submitPwd = async (oldPassword: string, newPassword: string) => { + const res = await fetchApi('/api/auth/change-password', { + method: 'POST', + body: JSON.stringify({ oldPassword, newPassword }), + }); + const data = (await res.json().catch(() => ({}))) as { success?: boolean; message?: string }; + return { success: !!data.success, message: data.message }; + }; + + if (showChangePwd) { + return ( + { + setShowChangePwd(false); + setPwdSavedAt(Date.now()); + }} + onCancel={() => setShowChangePwd(false)} + /> + ); + } + + return ( +
+ {/* Appearance */} + + + 外观 + 调整界面的明暗模式、强调色、圆角与密度。所有改动会立即应用并保存到本地。 + + + {/* Mode */} +
+ +
+ {MODE_OPTIONS.map((opt) => { + const Icon = opt.icon; + const active = mode === opt.value; + return ( + + ); + })} +
+
+ + + + {/* Accent color */} +
+ +
+ {ACCENTS.map((spec) => { + const active = accent === spec.id; + return ( + + ); + })} +
+

当前:{ACCENTS.find((a) => a.id === accent)?.label}

+
+ + + + {/* Radius */} +
+ +
+ {RADIUS_OPTIONS.map((opt) => { + const active = Math.abs(radius - opt.value) < 1e-6; + return ( + + ); + })} +
+
+ + + + {/* Density */} +
+ +
+ {DENSITY_OPTIONS.map((opt) => { + const active = density === opt.value; + return ( + + ); + })} +
+
+
+
+ + {/* Behavior */} + + + 数据刷新 + 控制总览页轮询刷新 QQ 列表、进程列表与系统状态的间隔。 + + +
+ +
+ {POLL_INTERVAL_OPTIONS.map((opt) => { + const active = pollInterval === opt.value; + return ( + + ); + })} +
+

当前生效值:{pollInterval === 0 ? '已暂停轮询' : `${pollInterval} 毫秒`}

+
+
+
+ + {/* Account */} + + + 账号安全 + WebUI 仅有 admin 一个账号,密码会以 scrypt 哈希形式持久化到 config/webui.json。 + + + + {pwdSavedAt && ( + + 密码已更新({new Date(pwdSavedAt).toLocaleTimeString()})— 其他设备的会话已失效。 + + )} + + + +
+

退出登录

+

立即清除当前浏览器的会话令牌。

+ +
+
+
+
+ ); +} diff --git a/packages/webui/src/components/theme-toggle.tsx b/packages/webui/src/components/theme-toggle.tsx new file mode 100644 index 00000000..4ba50491 --- /dev/null +++ b/packages/webui/src/components/theme-toggle.tsx @@ -0,0 +1,48 @@ +import { Monitor, Moon, Sun } from 'lucide-react'; +import { motion } from 'motion/react'; +import { useTheme, type ThemeMode } from '@/contexts/ThemeContext'; +import { cn } from '@/lib/utils'; + +const OPTIONS: { mode: ThemeMode; icon: typeof Sun; label: string }[] = [ + { mode: 'system', icon: Monitor, label: '跟随系统' }, + { mode: 'light', icon: Sun, label: '浅色' }, + { mode: 'dark', icon: Moon, label: '深色' }, +]; + +export function ThemeToggle({ className }: { className?: string }) { + const { mode, setMode } = useTheme(); + return ( +
+ {OPTIONS.map(({ mode: m, icon: Icon, label }) => { + const active = mode === m; + return ( + + ); + })} +
+ ); +} diff --git a/packages/webui/src/components/ui/EndpointRow.tsx b/packages/webui/src/components/ui/EndpointRow.tsx deleted file mode 100644 index c890b5a3..00000000 --- a/packages/webui/src/components/ui/EndpointRow.tsx +++ /dev/null @@ -1,30 +0,0 @@ -import type { ReactNode } from 'react'; -import { X } from 'lucide-react'; -import { motion } from 'framer-motion'; - -interface EndpointRowProps { - onRemove: () => void; - children: ReactNode; -} - -export function EndpointRow({ onRemove, children }: EndpointRowProps) { - return ( -
- {children} - { e.currentTarget.style.color = 'var(--color-danger)'; e.currentTarget.style.background = 'rgba(248,113,113,0.08)'; }} - onMouseLeave={e => { e.currentTarget.style.color = 'var(--text-tertiary)'; e.currentTarget.style.background = 'transparent'; }} - > - - -
- ); -} diff --git a/packages/webui/src/components/ui/FieldInput.tsx b/packages/webui/src/components/ui/FieldInput.tsx deleted file mode 100644 index d843d88d..00000000 --- a/packages/webui/src/components/ui/FieldInput.tsx +++ /dev/null @@ -1,34 +0,0 @@ -interface FieldInputProps { - label: string; - placeholder?: string; - value?: string | number; - isNum?: boolean; - flex?: string; - grow?: boolean; - onChange: (v: string | number) => void; -} - -export function FieldInput({ label, placeholder, value, isNum, flex, grow, onChange }: FieldInputProps) { - return ( -
- - onChange(isNum ? (parseInt(e.target.value) || 0) : e.target.value)} - className="h-9 px-3 rounded-lg text-sm outline-none" - style={{ - background: 'rgba(0,0,0,0.12)', - border: '1px solid var(--border-subtle)', - boxShadow: 'inset 0 2px 4px rgba(0,0,0,0.05)', - color: 'var(--text-primary)', - transition: 'all 0.3s ease', - ...(isNum ? { fontVariantNumeric: 'tabular-nums', fontFamily: 'var(--font-mono, monospace)' } : {}), - }} - onFocus={e => { e.target.style.borderColor = 'var(--border-focus)'; e.target.style.boxShadow = '0 0 0 2px var(--accent-subtle)'; }} - onBlur={e => { e.target.style.borderColor = 'var(--border-subtle)'; e.target.style.boxShadow = 'inset 0 2px 4px rgba(0,0,0,0.05)'; }} - /> -
- ); -} diff --git a/packages/webui/src/components/ui/SectionCard.tsx b/packages/webui/src/components/ui/SectionCard.tsx deleted file mode 100644 index bec05654..00000000 --- a/packages/webui/src/components/ui/SectionCard.tsx +++ /dev/null @@ -1,55 +0,0 @@ -import type { ReactNode } from 'react'; -import { Plus } from 'lucide-react'; -import { motion } from 'framer-motion'; -import { useTheme } from '../../contexts/ThemeContext'; - -interface SectionCardProps { - title: string; - onAdd: () => void; - children: ReactNode; -} - -export function SectionCard({ title, onAdd, children }: SectionCardProps) { - const { resolved } = useTheme(); - const dark = resolved === 'dark'; - return ( -
- {/* Header */} -
-

{title}

- - - -
- - {/* Body */} -
- {!children ? ( -

未配置,点击 + 新增

- ) : children} -
-
- ); -} diff --git a/packages/webui/src/components/ui/StatCard.tsx b/packages/webui/src/components/ui/StatCard.tsx deleted file mode 100644 index a6657a93..00000000 --- a/packages/webui/src/components/ui/StatCard.tsx +++ /dev/null @@ -1,61 +0,0 @@ -import type { ReactNode } from 'react'; -import { motion } from 'framer-motion'; -import { useTheme } from '../../contexts/ThemeContext'; - -interface StatCardProps { - label: string; - value: string; - icon?: ReactNode; - accent?: 'default' | 'success' | 'warning' | 'danger'; -} - -const accentColors: Record = { - default: { icon: 'var(--accent)', value: 'var(--text-primary)', glow: 'var(--accent-glow)' }, - success: { icon: 'var(--color-success)', value: 'var(--color-success)', glow: 'rgba(52,211,153,0.1)' }, - warning: { icon: 'var(--color-warning)', value: 'var(--color-warning)', glow: 'rgba(251,191,36,0.1)' }, - danger: { icon: 'var(--color-danger)', value: 'var(--color-danger)', glow: 'rgba(248,113,113,0.1)' }, -}; - -export function StatCard({ label, value, icon, accent = 'default' }: StatCardProps) { - const colors = accentColors[accent]; - const { resolved } = useTheme(); - const dark = resolved === 'dark'; - return ( - -
- - {label} - - {icon && ( -
- {icon} -
- )} -
-
- {value} -
-
- ); -} diff --git a/packages/webui/src/components/ui/StatusBadge.tsx b/packages/webui/src/components/ui/StatusBadge.tsx deleted file mode 100644 index 213351bd..00000000 --- a/packages/webui/src/components/ui/StatusBadge.tsx +++ /dev/null @@ -1,27 +0,0 @@ -interface StatusBadgeProps { - status: string; -} - -export function StatusBadge({ status }: StatusBadgeProps) { - const isOnline = status === '已连接'; - const isConnecting = status === '连接中'; - - const dotColor = isOnline - ? 'var(--color-success)' - : isConnecting - ? 'var(--color-warning)' - : 'var(--text-tertiary)'; - - return ( - - - {status} - - ); -} diff --git a/packages/webui/src/components/ui/alert-dialog.tsx b/packages/webui/src/components/ui/alert-dialog.tsx new file mode 100644 index 00000000..6c04a72c --- /dev/null +++ b/packages/webui/src/components/ui/alert-dialog.tsx @@ -0,0 +1,97 @@ +import * as React from 'react'; +import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog'; +import { cn } from '@/lib/utils'; +import { buttonVariants } from '@/components/ui/button'; + +const AlertDialog = AlertDialogPrimitive.Root; +const AlertDialogTrigger = AlertDialogPrimitive.Trigger; +const AlertDialogPortal = AlertDialogPrimitive.Portal; + +const AlertDialogOverlay = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)); +AlertDialogOverlay.displayName = 'AlertDialogOverlay'; + +const AlertDialogContent = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + + + + +)); +AlertDialogContent.displayName = 'AlertDialogContent'; + +const AlertDialogHeader = ({ className, ...props }: React.HTMLAttributes) => ( +
+); + +const AlertDialogFooter = ({ className, ...props }: React.HTMLAttributes) => ( +
+); + +const AlertDialogTitle = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)); +AlertDialogTitle.displayName = 'AlertDialogTitle'; + +const AlertDialogDescription = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)); +AlertDialogDescription.displayName = 'AlertDialogDescription'; + +const AlertDialogAction = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)); +AlertDialogAction.displayName = 'AlertDialogAction'; + +const AlertDialogCancel = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)); +AlertDialogCancel.displayName = 'AlertDialogCancel'; + +export { + AlertDialog, + AlertDialogPortal, + AlertDialogOverlay, + AlertDialogTrigger, + AlertDialogContent, + AlertDialogHeader, + AlertDialogFooter, + AlertDialogTitle, + AlertDialogDescription, + AlertDialogAction, + AlertDialogCancel, +}; diff --git a/packages/webui/src/components/ui/avatar.tsx b/packages/webui/src/components/ui/avatar.tsx new file mode 100644 index 00000000..8d331319 --- /dev/null +++ b/packages/webui/src/components/ui/avatar.tsx @@ -0,0 +1,44 @@ +import * as React from 'react'; +import { cn } from '@/lib/utils'; + +interface AvatarProps extends React.HTMLAttributes { + size?: number; +} + +const Avatar = React.forwardRef( + ({ className, size = 36, style, ...props }, ref) => ( +
+ ) +); +Avatar.displayName = 'Avatar'; + +const AvatarImage = React.forwardRef>( + ({ className, alt = '', ...props }, ref) => ( + {alt} + ) +); +AvatarImage.displayName = 'AvatarImage'; + +const AvatarFallback = React.forwardRef>( + ({ className, ...props }, ref) => ( + + ) +); +AvatarFallback.displayName = 'AvatarFallback'; + +export { Avatar, AvatarImage, AvatarFallback }; diff --git a/packages/webui/src/components/ui/badge.tsx b/packages/webui/src/components/ui/badge.tsx new file mode 100644 index 00000000..edeb587b --- /dev/null +++ b/packages/webui/src/components/ui/badge.tsx @@ -0,0 +1,28 @@ +import * as React from 'react'; +import { cva, type VariantProps } from 'class-variance-authority'; +import { cn } from '@/lib/utils'; + +const badgeVariants = cva( + 'inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-[11px] font-medium transition-colors', + { + variants: { + variant: { + default: 'border-transparent bg-primary/15 text-primary', + secondary: 'border-transparent bg-secondary text-secondary-foreground', + destructive: 'border-transparent bg-destructive/15 text-destructive', + success: 'border-transparent bg-success/15 text-success', + warning: 'border-transparent bg-warning/15 text-warning', + outline: 'border-border text-foreground', + }, + }, + defaultVariants: { variant: 'default' }, + } +); + +export interface BadgeProps extends React.HTMLAttributes, VariantProps {} + +function Badge({ className, variant, ...props }: BadgeProps) { + return ; +} + +export { Badge, badgeVariants }; diff --git a/packages/webui/src/components/ui/button.tsx b/packages/webui/src/components/ui/button.tsx new file mode 100644 index 00000000..4fc446ec --- /dev/null +++ b/packages/webui/src/components/ui/button.tsx @@ -0,0 +1,42 @@ +import * as React from 'react'; +import { Slot } from '@radix-ui/react-slot'; +import { cva, type VariantProps } from 'class-variance-authority'; +import { cn } from '@/lib/utils'; + +const buttonVariants = cva( + "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 outline-none focus-visible:ring-[3px] focus-visible:ring-ring/40 focus-visible:border-ring cursor-pointer", + { + variants: { + variant: { + default: 'bg-primary text-primary-foreground shadow-sm hover:bg-primary/90 active:bg-primary/95', + destructive: 'bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90', + outline: 'border border-border bg-transparent hover:bg-accent hover:text-accent-foreground', + secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary/80', + ghost: 'hover:bg-accent hover:text-accent-foreground', + link: 'text-primary underline-offset-4 hover:underline', + }, + size: { + default: 'h-9 px-4 py-2', + sm: 'h-8 rounded-md px-3 text-xs', + lg: 'h-10 rounded-md px-6', + icon: 'size-9', + 'icon-sm': 'size-8', + }, + }, + defaultVariants: { variant: 'default', size: 'default' }, + } +); + +interface ButtonProps extends React.ButtonHTMLAttributes, VariantProps { + asChild?: boolean; +} + +const Button = React.forwardRef( + ({ className, variant, size, asChild = false, ...props }, ref) => { + const Comp = asChild ? Slot : 'button'; + return ; + } +); +Button.displayName = 'Button'; + +export { Button, buttonVariants }; diff --git a/packages/webui/src/components/ui/card.tsx b/packages/webui/src/components/ui/card.tsx new file mode 100644 index 00000000..413c3e03 --- /dev/null +++ b/packages/webui/src/components/ui/card.tsx @@ -0,0 +1,50 @@ +import * as React from 'react'; +import { cn } from '@/lib/utils'; + +const Card = React.forwardRef>( + ({ className, ...props }, ref) => ( +
+ ) +); +Card.displayName = 'Card'; + +const CardHeader = React.forwardRef>( + ({ className, ...props }, ref) => ( +
+ ) +); +CardHeader.displayName = 'CardHeader'; + +const CardTitle = React.forwardRef>( + ({ className, ...props }, ref) => ( +
+ ) +); +CardTitle.displayName = 'CardTitle'; + +const CardDescription = React.forwardRef>( + ({ className, ...props }, ref) => ( +
+ ) +); +CardDescription.displayName = 'CardDescription'; + +const CardContent = React.forwardRef>( + ({ className, ...props }, ref) => ( +
+ ) +); +CardContent.displayName = 'CardContent'; + +const CardFooter = React.forwardRef>( + ({ className, ...props }, ref) => ( +
+ ) +); +CardFooter.displayName = 'CardFooter'; + +export { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter }; diff --git a/packages/webui/src/components/ui/dialog.tsx b/packages/webui/src/components/ui/dialog.tsx new file mode 100644 index 00000000..4352566a --- /dev/null +++ b/packages/webui/src/components/ui/dialog.tsx @@ -0,0 +1,89 @@ +import * as React from 'react'; +import * as DialogPrimitive from '@radix-ui/react-dialog'; +import { X } from 'lucide-react'; +import { cn } from '@/lib/utils'; + +const Dialog = DialogPrimitive.Root; +const DialogTrigger = DialogPrimitive.Trigger; +const DialogPortal = DialogPrimitive.Portal; +const DialogClose = DialogPrimitive.Close; + +const DialogOverlay = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)); +DialogOverlay.displayName = 'DialogOverlay'; + +const DialogContent = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef & { showClose?: boolean } +>(({ className, children, showClose = true, ...props }, ref) => ( + + + + {children} + {showClose && ( + + + Close + + )} + + +)); +DialogContent.displayName = 'DialogContent'; + +const DialogHeader = ({ className, ...props }: React.HTMLAttributes) => ( +
+); + +const DialogFooter = ({ className, ...props }: React.HTMLAttributes) => ( +
+); + +const DialogTitle = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)); +DialogTitle.displayName = 'DialogTitle'; + +const DialogDescription = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)); +DialogDescription.displayName = 'DialogDescription'; + +export { + Dialog, + DialogPortal, + DialogOverlay, + DialogTrigger, + DialogClose, + DialogContent, + DialogHeader, + DialogFooter, + DialogTitle, + DialogDescription, +}; diff --git a/packages/webui/src/components/ui/input.tsx b/packages/webui/src/components/ui/input.tsx new file mode 100644 index 00000000..0b8a1e2d --- /dev/null +++ b/packages/webui/src/components/ui/input.tsx @@ -0,0 +1,24 @@ +import * as React from 'react'; +import { cn } from '@/lib/utils'; + +const Input = React.forwardRef>( + ({ className, type, ...props }, ref) => ( + + ) +); +Input.displayName = 'Input'; + +export { Input }; diff --git a/packages/webui/src/components/ui/label.tsx b/packages/webui/src/components/ui/label.tsx new file mode 100644 index 00000000..8949b2b6 --- /dev/null +++ b/packages/webui/src/components/ui/label.tsx @@ -0,0 +1,17 @@ +import * as React from 'react'; +import * as LabelPrimitive from '@radix-ui/react-label'; +import { cn } from '@/lib/utils'; + +const Label = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)); +Label.displayName = 'Label'; + +export { Label }; diff --git a/packages/webui/src/components/ui/progress.tsx b/packages/webui/src/components/ui/progress.tsx new file mode 100644 index 00000000..ca6a6c12 --- /dev/null +++ b/packages/webui/src/components/ui/progress.tsx @@ -0,0 +1,32 @@ +import * as React from 'react'; +import { cn } from '@/lib/utils'; + +interface ProgressProps extends React.HTMLAttributes { + value?: number; + indicatorClassName?: string; +} + +const Progress = React.forwardRef( + ({ className, value = 0, indicatorClassName, ...props }, ref) => { + const clamped = Math.max(0, Math.min(100, value)); + return ( +
+
+
+ ); + } +); +Progress.displayName = 'Progress'; + +export { Progress }; diff --git a/packages/webui/src/components/ui/scroll-area.tsx b/packages/webui/src/components/ui/scroll-area.tsx new file mode 100644 index 00000000..dd5f714a --- /dev/null +++ b/packages/webui/src/components/ui/scroll-area.tsx @@ -0,0 +1,49 @@ +import * as React from 'react'; +import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area'; +import { cn } from '@/lib/utils'; + +interface ScrollAreaProps extends React.ComponentPropsWithoutRef { + viewportClassName?: string; +} + +const ScrollArea = React.forwardRef, ScrollAreaProps>( + ({ className, children, viewportClassName, ...props }, ref) => ( + + div]:!block', viewportClassName)} + > + {children} + + + + + + ) +); +ScrollArea.displayName = 'ScrollArea'; + +const ScrollBar = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, orientation = 'vertical', ...props }, ref) => ( + + + +)); +ScrollBar.displayName = 'ScrollBar'; + +export { ScrollArea, ScrollBar }; diff --git a/packages/webui/src/components/ui/separator.tsx b/packages/webui/src/components/ui/separator.tsx new file mode 100644 index 00000000..888e1659 --- /dev/null +++ b/packages/webui/src/components/ui/separator.tsx @@ -0,0 +1,23 @@ +import * as React from 'react'; +import * as SeparatorPrimitive from '@radix-ui/react-separator'; +import { cn } from '@/lib/utils'; + +const Separator = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, orientation = 'horizontal', decorative = true, ...props }, ref) => ( + +)); +Separator.displayName = 'Separator'; + +export { Separator }; diff --git a/packages/webui/src/components/ui/sheet.tsx b/packages/webui/src/components/ui/sheet.tsx new file mode 100644 index 00000000..8b2b1254 --- /dev/null +++ b/packages/webui/src/components/ui/sheet.tsx @@ -0,0 +1,66 @@ +import * as React from 'react'; +import * as DialogPrimitive from '@radix-ui/react-dialog'; +import { X } from 'lucide-react'; +import { cva, type VariantProps } from 'class-variance-authority'; +import { cn } from '@/lib/utils'; + +const Sheet = DialogPrimitive.Root; +const SheetTrigger = DialogPrimitive.Trigger; +const SheetClose = DialogPrimitive.Close; +const SheetPortal = DialogPrimitive.Portal; + +const SheetOverlay = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)); +SheetOverlay.displayName = 'SheetOverlay'; + +const sheetVariants = cva( + 'fixed z-50 gap-4 bg-card p-0 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500 outline-none', + { + variants: { + side: { + top: 'inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top', + bottom: 'inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom', + left: 'inset-y-0 left-0 h-full w-3/4 max-w-xs border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm', + right: 'inset-y-0 right-0 h-full w-3/4 max-w-xs border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm', + }, + }, + defaultVariants: { side: 'right' }, + } +); + +interface SheetContentProps + extends React.ComponentPropsWithoutRef, + VariantProps { + showClose?: boolean; +} + +const SheetContent = React.forwardRef, SheetContentProps>( + ({ side = 'right', className, children, showClose = true, ...props }, ref) => ( + + + + {children} + {showClose && ( + + + Close + + )} + + + ) +); +SheetContent.displayName = 'SheetContent'; + +export { Sheet, SheetTrigger, SheetClose, SheetContent, SheetPortal, SheetOverlay }; diff --git a/packages/webui/src/components/ui/skeleton.tsx b/packages/webui/src/components/ui/skeleton.tsx new file mode 100644 index 00000000..c6d0d8fc --- /dev/null +++ b/packages/webui/src/components/ui/skeleton.tsx @@ -0,0 +1,8 @@ +import * as React from 'react'; +import { cn } from '@/lib/utils'; + +function Skeleton({ className, ...props }: React.HTMLAttributes) { + return
; +} + +export { Skeleton }; diff --git a/packages/webui/src/components/ui/tooltip.tsx b/packages/webui/src/components/ui/tooltip.tsx new file mode 100644 index 00000000..7b66ae1b --- /dev/null +++ b/packages/webui/src/components/ui/tooltip.tsx @@ -0,0 +1,28 @@ +import * as React from 'react'; +import * as TooltipPrimitive from '@radix-ui/react-tooltip'; +import { cn } from '@/lib/utils'; + +const TooltipProvider = TooltipPrimitive.Provider; +const Tooltip = TooltipPrimitive.Root; +const TooltipTrigger = TooltipPrimitive.Trigger; + +const TooltipContent = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, sideOffset = 6, ...props }, ref) => ( + + + +)); +TooltipContent.displayName = 'TooltipContent'; + +export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }; diff --git a/packages/webui/src/contexts/ThemeContext.tsx b/packages/webui/src/contexts/ThemeContext.tsx index f43de1ec..2d984519 100644 --- a/packages/webui/src/contexts/ThemeContext.tsx +++ b/packages/webui/src/contexts/ThemeContext.tsx @@ -1,27 +1,118 @@ -import { createContext, useContext, useEffect, useState, type ReactNode } from 'react'; +import { createContext, useContext, useEffect, useMemo, useState, type ReactNode } from 'react'; export type ThemeMode = 'light' | 'dark' | 'system'; +export type AccentColor = 'sky' | 'blue' | 'violet' | 'rose' | 'emerald' | 'amber' | 'orange'; +export type Density = 'cozy' | 'compact'; + +export interface AccentSpec { + id: AccentColor; + label: string; + swatch: string; + light: { primary: string; ring: string; sidebarPrimary: string; sidebarRing: string }; + dark: { primary: string; ring: string; sidebarPrimary: string; sidebarRing: string }; +} + +export const ACCENTS: AccentSpec[] = [ + { id: 'sky', label: '天蓝', swatch: '#38bdf8', + light: { primary: 'oklch(68.5% 0.155 230)', ring: 'oklch(68.5% 0.155 230)', sidebarPrimary: 'oklch(68.5% 0.155 230)', sidebarRing: 'oklch(68.5% 0.155 230)' }, + dark: { primary: 'oklch(75% 0.14 230)', ring: 'oklch(75% 0.14 230)', sidebarPrimary: 'oklch(75% 0.14 230)', sidebarRing: 'oklch(75% 0.14 230)' } }, + { id: 'blue', label: '靛蓝', swatch: '#3b82f6', + light: { primary: 'oklch(60% 0.18 258)', ring: 'oklch(60% 0.18 258)', sidebarPrimary: 'oklch(60% 0.18 258)', sidebarRing: 'oklch(60% 0.18 258)' }, + dark: { primary: 'oklch(70% 0.16 258)', ring: 'oklch(70% 0.16 258)', sidebarPrimary: 'oklch(70% 0.16 258)', sidebarRing: 'oklch(70% 0.16 258)' } }, + { id: 'violet', label: '紫罗兰', swatch: '#8b5cf6', + light: { primary: 'oklch(60% 0.2 290)', ring: 'oklch(60% 0.2 290)', sidebarPrimary: 'oklch(60% 0.2 290)', sidebarRing: 'oklch(60% 0.2 290)' }, + dark: { primary: 'oklch(72% 0.17 290)', ring: 'oklch(72% 0.17 290)', sidebarPrimary: 'oklch(72% 0.17 290)', sidebarRing: 'oklch(72% 0.17 290)' } }, + { id: 'rose', label: '玫瑰', swatch: '#f43f5e', + light: { primary: 'oklch(63% 0.21 18)', ring: 'oklch(63% 0.21 18)', sidebarPrimary: 'oklch(63% 0.21 18)', sidebarRing: 'oklch(63% 0.21 18)' }, + dark: { primary: 'oklch(72% 0.18 18)', ring: 'oklch(72% 0.18 18)', sidebarPrimary: 'oklch(72% 0.18 18)', sidebarRing: 'oklch(72% 0.18 18)' } }, + { id: 'emerald', label: '翡翠', swatch: '#10b981', + light: { primary: 'oklch(64% 0.16 162)', ring: 'oklch(64% 0.16 162)', sidebarPrimary: 'oklch(64% 0.16 162)', sidebarRing: 'oklch(64% 0.16 162)' }, + dark: { primary: 'oklch(74% 0.15 162)', ring: 'oklch(74% 0.15 162)', sidebarPrimary: 'oklch(74% 0.15 162)', sidebarRing: 'oklch(74% 0.15 162)' } }, + { id: 'amber', label: '琥珀', swatch: '#f59e0b', + light: { primary: 'oklch(72% 0.17 70)', ring: 'oklch(72% 0.17 70)', sidebarPrimary: 'oklch(72% 0.17 70)', sidebarRing: 'oklch(72% 0.17 70)' }, + dark: { primary: 'oklch(78% 0.16 70)', ring: 'oklch(78% 0.16 70)', sidebarPrimary: 'oklch(78% 0.16 70)', sidebarRing: 'oklch(78% 0.16 70)' } }, + { id: 'orange', label: '夕橙', swatch: '#f97316', + light: { primary: 'oklch(67% 0.2 45)', ring: 'oklch(67% 0.2 45)', sidebarPrimary: 'oklch(67% 0.2 45)', sidebarRing: 'oklch(67% 0.2 45)' }, + dark: { primary: 'oklch(74% 0.18 45)', ring: 'oklch(74% 0.18 45)', sidebarPrimary: 'oklch(74% 0.18 45)', sidebarRing: 'oklch(74% 0.18 45)' } }, +]; + +export const RADIUS_OPTIONS = [ + { value: 0.375, label: '紧凑' }, + { value: 0.5, label: '默认' }, + { value: 0.75, label: '舒适' }, + { value: 1.0, label: '圆润' }, +] as const; + +export const POLL_INTERVAL_OPTIONS = [ + { value: 1000, label: '1 秒(实时)' }, + { value: 3000, label: '3 秒(默认)' }, + { value: 5000, label: '5 秒(节能)' }, + { value: 10000, label: '10 秒(省电)' }, + { value: 0, label: '已暂停' }, +] as const; + interface ThemeContextValue { mode: ThemeMode; resolved: 'light' | 'dark'; setMode: (mode: ThemeMode) => void; + accent: AccentColor; + setAccent: (a: AccentColor) => void; + radius: number; + setRadius: (r: number) => void; + density: Density; + setDensity: (d: Density) => void; + pollInterval: number; + setPollInterval: (ms: number) => void; } const ThemeContext = createContext(null); +const LS = { + mode: 'snowluma_theme', + accent: 'snowluma_accent', + radius: 'snowluma_radius', + density: 'snowluma_density', + poll: 'snowluma_poll_interval', +}; + function getSystemTheme(): 'light' | 'dark' { + if (typeof window === 'undefined') return 'light'; return window.matchMedia?.('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'; } +function readAccent(): AccentColor { + const v = localStorage.getItem(LS.accent); + if (v && ACCENTS.some((a) => a.id === v)) return v as AccentColor; + return 'sky'; +} +function readRadius(): number { + const v = Number(localStorage.getItem(LS.radius)); + if (Number.isFinite(v) && v > 0 && v <= 2) return v; + return 0.75; +} +function readDensity(): Density { + return localStorage.getItem(LS.density) === 'compact' ? 'compact' : 'cozy'; +} +function readPoll(): number { + const raw = localStorage.getItem(LS.poll); + if (raw === null) return 3000; + const v = Number(raw); + if (Number.isFinite(v) && v >= 0 && v <= 60_000) return v; + return 3000; +} + export function ThemeProvider({ children }: { children: ReactNode }) { const [mode, setModeState] = useState(() => { - const saved = localStorage.getItem('snowluma_theme') as ThemeMode | null; + const saved = localStorage.getItem(LS.mode) as ThemeMode | null; if (saved === 'light' || saved === 'dark' || saved === 'system') return saved; return 'system'; }); - const [systemTheme, setSystemTheme] = useState<'light' | 'dark'>(getSystemTheme); + const [accent, setAccentState] = useState(readAccent); + const [radius, setRadiusState] = useState(readRadius); + const [density, setDensityState] = useState(readDensity); + const [pollInterval, setPollIntervalState] = useState(readPoll); useEffect(() => { const mq = window.matchMedia('(prefers-color-scheme: dark)'); @@ -34,21 +125,54 @@ export function ThemeProvider({ children }: { children: ReactNode }) { useEffect(() => { const root = document.documentElement; - root.className = resolved; + root.classList.remove('light', 'dark'); + root.classList.add(resolved); root.setAttribute('data-theme', resolved); root.style.colorScheme = resolved; }, [resolved]); - const setMode = (m: ThemeMode) => { - setModeState(m); - localStorage.setItem('snowluma_theme', m); - }; + useEffect(() => { + document.documentElement.setAttribute('data-density', density); + }, [density]); - return ( - - {children} - + useEffect(() => { + const styleId = 'snowluma-theme-overrides'; + let el = document.getElementById(styleId) as HTMLStyleElement | null; + if (!el) { + el = document.createElement('style'); + el.id = styleId; + document.head.appendChild(el); + } + const spec = ACCENTS.find((a) => a.id === accent) ?? ACCENTS[0]; + el.textContent = ` +:root { + --radius: ${radius}rem; + --primary: ${spec.light.primary}; + --ring: ${spec.light.ring}; + --sidebar-primary: ${spec.light.sidebarPrimary}; + --sidebar-ring: ${spec.light.sidebarRing}; +} +.dark { + --primary: ${spec.dark.primary}; + --ring: ${spec.dark.ring}; + --sidebar-primary: ${spec.dark.sidebarPrimary}; + --sidebar-ring: ${spec.dark.sidebarRing}; +} +`.trim(); + }, [accent, radius]); + + const setMode = (m: ThemeMode) => { setModeState(m); localStorage.setItem(LS.mode, m); }; + const setAccent = (a: AccentColor) => { setAccentState(a); localStorage.setItem(LS.accent, a); }; + const setRadius = (r: number) => { setRadiusState(r); localStorage.setItem(LS.radius, String(r)); }; + const setDensity = (d: Density) => { setDensityState(d); localStorage.setItem(LS.density, d); }; + const setPollInterval = (ms: number) => { setPollIntervalState(ms); localStorage.setItem(LS.poll, String(ms)); }; + + const value = useMemo( + () => ({ mode, resolved, setMode, accent, setAccent, radius, setRadius, density, setDensity, pollInterval, setPollInterval }), + [mode, resolved, accent, radius, density, pollInterval], ); + + return {children}; } export function useTheme() { diff --git a/packages/webui/src/hooks/use-media-query.ts b/packages/webui/src/hooks/use-media-query.ts new file mode 100644 index 00000000..56b69b11 --- /dev/null +++ b/packages/webui/src/hooks/use-media-query.ts @@ -0,0 +1,18 @@ +import { useEffect, useState } from 'react'; + +export function useMediaQuery(query: string): boolean { + const [matches, setMatches] = useState(() => { + if (typeof window === 'undefined') return false; + return window.matchMedia(query).matches; + }); + + useEffect(() => { + const mq = window.matchMedia(query); + const handler = (e: MediaQueryListEvent) => setMatches(e.matches); + setMatches(mq.matches); + mq.addEventListener('change', handler); + return () => mq.removeEventListener('change', handler); + }, [query]); + + return matches; +} diff --git a/packages/webui/src/index.css b/packages/webui/src/index.css index d7847312..16d98728 100644 --- a/packages/webui/src/index.css +++ b/packages/webui/src/index.css @@ -1,78 +1,164 @@ @import "tailwindcss"; +@import "tw-animate-css"; -/* ── Global Reset & Base ── */ +@custom-variant dark (&:where(.dark, .dark *)); + +/* ────────────────────────────────────────────── + Theme tokens (sky-blue accent) + ────────────────────────────────────────────── */ :root { - color-scheme: light dark; + --radius: 0.75rem; + + --background: oklch(99% 0.004 240); + --foreground: oklch(20% 0.03 250); + + --card: oklch(100% 0 0); + --card-foreground: oklch(20% 0.03 250); + + --popover: oklch(100% 0 0); + --popover-foreground: oklch(20% 0.03 250); + + /* sky-500 */ + --primary: oklch(68.5% 0.155 230); + --primary-foreground: oklch(99% 0.005 240); + + --secondary: oklch(96% 0.012 240); + --secondary-foreground: oklch(25% 0.03 250); + + --muted: oklch(96% 0.012 240); + --muted-foreground: oklch(50% 0.02 250); + + --accent: oklch(94% 0.03 230); + --accent-foreground: oklch(35% 0.07 230); + + --destructive: oklch(60% 0.22 27); + --destructive-foreground: oklch(99% 0.005 240); + + --success: oklch(70% 0.15 160); + --warning: oklch(78% 0.16 80); + + --border: oklch(92% 0.01 240); + --input: oklch(94% 0.012 240); + --ring: oklch(68.5% 0.155 230); + + --sidebar: oklch(98% 0.006 240); + --sidebar-foreground: oklch(25% 0.03 250); + --sidebar-primary: oklch(68.5% 0.155 230); + --sidebar-primary-foreground: oklch(99% 0.005 240); + --sidebar-accent: oklch(94% 0.025 230); + --sidebar-accent-foreground: oklch(35% 0.08 230); + --sidebar-border: oklch(92% 0.01 240); + --sidebar-ring: oklch(68.5% 0.155 230); } -/* ── HeroUI Avatar base ── */ -.avatar { - position: relative; - display: flex; - align-items: center; - justify-content: center; - overflow: hidden; - border-radius: 9999px; - flex-shrink: 0; -} -.avatar__image { - width: 100%; - height: 100%; - object-fit: cover; - aspect-ratio: 1 / 1; -} -.avatar__fallback { - display: flex; - align-items: center; - justify-content: center; - width: 100%; - height: 100%; +.dark { + --background: oklch(16% 0.02 250); + --foreground: oklch(96% 0.01 240); + + --card: oklch(20% 0.025 250); + --card-foreground: oklch(96% 0.01 240); + + --popover: oklch(20% 0.025 250); + --popover-foreground: oklch(96% 0.01 240); + + --primary: oklch(75% 0.14 230); + --primary-foreground: oklch(15% 0.02 250); + + --secondary: oklch(25% 0.025 250); + --secondary-foreground: oklch(96% 0.01 240); + + --muted: oklch(24% 0.02 250); + --muted-foreground: oklch(68% 0.02 240); + + --accent: oklch(28% 0.05 230); + --accent-foreground: oklch(85% 0.1 230); + + --destructive: oklch(62% 0.2 27); + --destructive-foreground: oklch(98% 0.005 240); + + --success: oklch(72% 0.15 160); + --warning: oklch(80% 0.16 80); + + --border: oklch(28% 0.02 250); + --input: oklch(26% 0.02 250); + --ring: oklch(75% 0.14 230); + + --sidebar: oklch(18% 0.022 250); + --sidebar-foreground: oklch(92% 0.01 240); + --sidebar-primary: oklch(75% 0.14 230); + --sidebar-primary-foreground: oklch(15% 0.02 250); + --sidebar-accent: oklch(28% 0.05 230); + --sidebar-accent-foreground: oklch(85% 0.1 230); + --sidebar-border: oklch(26% 0.02 250); + --sidebar-ring: oklch(75% 0.14 230); } -body { - margin: 0; - width: 100vw; - height: 100vh; - overflow: hidden; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - font-family: 'Inter', 'Noto Sans SC', system-ui, -apple-system, sans-serif; - line-height: 1.5; - color: var(--text-primary); - background-color: var(--bg-body); - transition: background-color 0.3s ease, color 0.3s ease; +@theme inline { + --color-background: var(--background); + --color-foreground: var(--foreground); + --color-card: var(--card); + --color-card-foreground: var(--card-foreground); + --color-popover: var(--popover); + --color-popover-foreground: var(--popover-foreground); + --color-primary: var(--primary); + --color-primary-foreground: var(--primary-foreground); + --color-secondary: var(--secondary); + --color-secondary-foreground: var(--secondary-foreground); + --color-muted: var(--muted); + --color-muted-foreground: var(--muted-foreground); + --color-accent: var(--accent); + --color-accent-foreground: var(--accent-foreground); + --color-destructive: var(--destructive); + --color-destructive-foreground: var(--destructive-foreground); + --color-success: var(--success); + --color-warning: var(--warning); + --color-border: var(--border); + --color-input: var(--input); + --color-ring: var(--ring); + --color-sidebar: var(--sidebar); + --color-sidebar-foreground: var(--sidebar-foreground); + --color-sidebar-primary: var(--sidebar-primary); + --color-sidebar-primary-foreground: var(--sidebar-primary-foreground); + --color-sidebar-accent: var(--sidebar-accent); + --color-sidebar-accent-foreground: var(--sidebar-accent-foreground); + --color-sidebar-border: var(--sidebar-border); + --color-sidebar-ring: var(--sidebar-ring); + + --radius-sm: calc(var(--radius) - 4px); + --radius-md: calc(var(--radius) - 2px); + --radius-lg: var(--radius); + --radius-xl: calc(var(--radius) + 4px); + + --font-sans: 'Inter', 'Noto Sans SC', system-ui, -apple-system, sans-serif; + --font-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace; } -#root { - width: 100%; - height: 100%; +@layer base { + * { + border-color: var(--border); + } + html, body, #root { + height: 100%; + } + body { + margin: 0; + background-color: var(--background); + color: var(--foreground); + font-family: var(--font-sans); + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + line-height: 1.5; + } + ::selection { + background-color: color-mix(in oklab, var(--primary) 28%, transparent); + color: var(--foreground); + } + /* Density: compact tightens the global rhythm a touch. */ + html[data-density="compact"] body { + font-size: 13.5px; + line-height: 1.45; + } + html[data-density="compact"] { + --tw-leading: 1.4; + } } - -* { - box-sizing: border-box; -} - -h1, h2, h3, h4, p { - margin: 0; -} - -/* ── Scrollbar ── */ -::-webkit-scrollbar { - width: 6px; -} -::-webkit-scrollbar-track { - background: transparent; -} -::-webkit-scrollbar-thumb { - background: rgba(255, 255, 255, 0.08); - border-radius: 3px; -} -::-webkit-scrollbar-thumb:hover { - background: rgba(255, 255, 255, 0.15); -} - -/* ── Selection ── */ -::selection { - background: rgba(56, 189, 248, 0.25); - color: #f1f5f9; -} \ No newline at end of file diff --git a/packages/webui/src/lib/utils.ts b/packages/webui/src/lib/utils.ts new file mode 100644 index 00000000..6e356172 --- /dev/null +++ b/packages/webui/src/lib/utils.ts @@ -0,0 +1,26 @@ +import { clsx, type ClassValue } from 'clsx'; +import { twMerge } from 'tailwind-merge'; + +export function cn(...inputs: ClassValue[]) { + return twMerge(clsx(inputs)); +} + +export function formatBytes(bytes: number, decimals = 1): string { + if (!Number.isFinite(bytes) || bytes <= 0) return '0 B'; + const units = ['B', 'KB', 'MB', 'GB', 'TB', 'PB']; + const i = Math.min(units.length - 1, Math.floor(Math.log(bytes) / Math.log(1024))); + const v = bytes / Math.pow(1024, i); + return `${v.toFixed(decimals)} ${units[i]}`; +} + +export function formatUptime(seconds: number): string { + if (!Number.isFinite(seconds) || seconds <= 0) return '0 秒'; + const d = Math.floor(seconds / 86400); + const h = Math.floor((seconds % 86400) / 3600); + const m = Math.floor((seconds % 3600) / 60); + const parts: string[] = []; + if (d) parts.push(`${d} 天`); + if (h) parts.push(`${h} 时`); + if (m || (!d && !h)) parts.push(`${m} 分`); + return parts.join(' '); +} diff --git a/packages/webui/src/main.tsx b/packages/webui/src/main.tsx index 0c272fdc..df655eae 100644 --- a/packages/webui/src/main.tsx +++ b/packages/webui/src/main.tsx @@ -1,11 +1,10 @@ -import { StrictMode } from 'react' -import { createRoot } from 'react-dom/client' -import './index.css' -import './App.scss' -import App from './App.tsx' +import { StrictMode } from 'react'; +import { createRoot } from 'react-dom/client'; +import './index.css'; +import App from './App.tsx'; createRoot(document.getElementById('root')!).render( - , -) + +); diff --git a/packages/webui/src/styles/_mixins.scss b/packages/webui/src/styles/_mixins.scss deleted file mode 100644 index 075ff219..00000000 --- a/packages/webui/src/styles/_mixins.scss +++ /dev/null @@ -1,30 +0,0 @@ -// Responsive breakpoint mixins -@mixin sm { - @media (min-width: 640px) { @content; } -} - -@mixin md { - @media (min-width: 768px) { @content; } -} - -@mixin lg { - @media (min-width: 1024px) { @content; } -} - -// Flex shortcuts -@mixin flex-center { - display: flex; - align-items: center; - justify-content: center; -} - -@mixin flex-between { - display: flex; - align-items: center; - justify-content: space-between; -} - -@mixin flex-col { - display: flex; - flex-direction: column; -} diff --git a/packages/webui/src/styles/_variables.scss b/packages/webui/src/styles/_variables.scss deleted file mode 100644 index cac6bdfa..00000000 --- a/packages/webui/src/styles/_variables.scss +++ /dev/null @@ -1,103 +0,0 @@ -// SnowLuma – Refined dark-first glassmorphism design system -// Palette: deep navy base, cool slate surfaces, cyan/indigo accent pair - -:root { - // Typography - --font-sans: 'Inter', 'Noto Sans SC', system-ui, -apple-system, sans-serif; - --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', ui-monospace, monospace; - - // Radii - --radius-xs: 6px; - --radius-sm: 8px; - --radius-md: 12px; - --radius-lg: 16px; - --radius-xl: 20px; - --radius-2xl: 24px; - --radius-full: 9999px; - - // Transitions - --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1); - --transition-base: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); - --transition-smooth: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); -} - -// Dark theme (default) -:root, -[data-theme='dark'], -.dark { - --bg-body: #080b12; - --bg-surface: rgba(15, 19, 28, 0.85); - --bg-card: rgba(20, 26, 38, 0.7); - --bg-card-hover: rgba(28, 35, 50, 0.8); - --bg-input: rgba(12, 16, 24, 0.8); - --bg-hover: rgba(99, 179, 237, 0.06); - --bg-active: rgba(99, 179, 237, 0.12); - - --border-subtle: rgba(255, 255, 255, 0.06); - --border-medium: rgba(255, 255, 255, 0.1); - --border-focus: rgba(56, 189, 248, 0.5); - - --text-primary: #f1f5f9; - --text-secondary: #94a3b8; - --text-tertiary: #475569; - --text-accent: #7dd3fc; - - --accent: #38bdf8; - --accent-hover: #7dd3fc; - --accent-subtle: rgba(56, 189, 248, 0.1); - --accent-glow: rgba(56, 189, 248, 0.15); - - --color-success: #34d399; - --color-warning: #fbbf24; - --color-danger: #f87171; - - --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3); - --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4); - --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.5); - --shadow-glow: 0 0 40px rgba(56, 189, 248, 0.08); - --shadow-focus: 0 0 0 3px rgba(56, 189, 248, 0.2); - - --glass-bg: rgba(15, 19, 28, 0.75); - --glass-border: rgba(255, 255, 255, 0.08); - --glass-highlight: rgba(255, 255, 255, 0.04); -} - -// Light theme -[data-theme='light'], -.light { - --bg-body: #f8fafc; - --bg-surface: rgba(255, 255, 255, 0.85); - --bg-card: rgba(255, 255, 255, 0.9); - --bg-card-hover: rgba(248, 250, 252, 1); - --bg-input: rgba(241, 245, 249, 0.9); - --bg-hover: rgba(14, 165, 233, 0.05); - --bg-active: rgba(14, 165, 233, 0.1); - - --border-subtle: rgba(0, 0, 0, 0.06); - --border-medium: rgba(0, 0, 0, 0.1); - --border-focus: rgba(14, 165, 233, 0.5); - - --text-primary: #0f172a; - --text-secondary: #64748b; - --text-tertiary: #94a3b8; - --text-accent: #0284c7; - - --accent: #0ea5e9; - --accent-hover: #0284c7; - --accent-subtle: rgba(14, 165, 233, 0.08); - --accent-glow: rgba(14, 165, 233, 0.1); - - --color-success: #10b981; - --color-warning: #f59e0b; - --color-danger: #ef4444; - - --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05); - --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08); - --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.1); - --shadow-glow: 0 0 40px rgba(14, 165, 233, 0.05); - --shadow-focus: 0 0 0 3px rgba(14, 165, 233, 0.15); - - --glass-bg: rgba(255, 255, 255, 0.8); - --glass-border: rgba(255, 255, 255, 0.6); - --glass-highlight: rgba(255, 255, 255, 0.5); -} diff --git a/packages/webui/src/styles/components/_config.scss b/packages/webui/src/styles/components/_config.scss deleted file mode 100644 index dc691e4a..00000000 --- a/packages/webui/src/styles/components/_config.scss +++ /dev/null @@ -1,402 +0,0 @@ -// Config styles — now handled via Tailwind + CSS vars in components - - &.active { - background: var(--color-primary-subtle); - border-color: var(--border-focus); - - .qq-nik { - color: var(--color-primary); - } - } -} - -.qq-avatar { - width: 38px; - height: 38px; - border-radius: 50%; - background: linear-gradient(135deg, var(--color-primary) 0%, #818cf8 100%); - flex-shrink: 0; - box-shadow: 0 2px 8px rgba(14, 165, 233, 0.28); -} - -.qq-info { - @include flex-col; - gap: 2px; -} - -.qq-nik { - font-size: 0.875rem; - font-weight: 600; - color: var(--text-main); - transition: color 0.15s; -} - -.qq-uin { - font-size: 0.72rem; - color: var(--text-muted); - font-family: var(--font-mono); -} - -// ---- Editor Pane ---- -.editor-pane { - flex: 1; - min-height: 500px; - padding: 28px !important; - border-radius: var(--radius-lg) !important; -} - -.empty-state { - @include flex-col; - @include flex-center; - height: 100%; - min-height: 380px; - color: var(--text-muted); - font-size: 0.875rem; - opacity: 0.5; - gap: 14px; -} - -.editor-header { - @include flex-between; - align-items: flex-start; - margin-bottom: 24px; - padding-bottom: 20px; - border-bottom: 1px solid var(--border-subtle); -} - -.editor-title { - h2 { - font-size: 1.1rem; - font-weight: 700; - color: var(--text-main); - margin-bottom: 6px; - letter-spacing: -0.01em; - } -} - -.editor-subtitle { - font-size: 0.75rem; - color: var(--text-muted); - font-family: var(--font-mono); - background: var(--bg-input); - border: 1px solid var(--border-subtle); - padding: 2px 8px; - border-radius: var(--radius-xs); - display: inline-block; -} - -.editor-actions { - display: flex; - align-items: center; - gap: 12px; -} - -.save-status { - font-size: 0.8rem; - color: var(--text-muted); - padding: 4px 10px; - border-radius: var(--radius-xs); - background: var(--bg-input); - - &.ok { - color: var(--color-success); - background: rgba(16, 185, 129, 0.1); - } -} - -// ---- Config Sections ---- -.editor-sections { - @include flex-col; - gap: 10px; -} - -.cfg-section { - border-radius: var(--radius-md); - overflow: hidden; - border: 1px solid var(--border-subtle); - background: var(--bg-card); -} - -.cfg-section-header { - @include flex-between; - padding: 13px 18px; - background: var(--bg-input); - border-bottom: 1px solid var(--border-subtle); - - h4 { - font-size: 0.85rem; - color: var(--text-main); - font-weight: 600; - } -} - -.cfg-section-body { - @include flex-col; - gap: 0; - - .text-muted { - padding: 16px 18px; - font-size: 0.82rem; - } -} - -.endpoint-row { - display: flex; - align-items: flex-end; - gap: 12px; - padding: 14px 18px; - border-top: 1px solid var(--border-subtle); - transition: background 0.15s; - - &:hover { - background: var(--bg-hover); - } -} - -.endpoint-actions { - display: flex; - align-items: center; - padding-bottom: 1px; -} - -.input-group { - @include flex-col; - gap: 6px; - flex: 1; - - label { - font-size: 0.73rem; - color: var(--text-muted); - font-weight: 600; - letter-spacing: 0.03em; - text-transform: uppercase; - } - - input { - background: var(--bg-input); - border: 1.5px solid var(--border-subtle); - padding: 8px 12px; - border-radius: var(--radius-sm); - color: var(--text-main); - font-family: var(--font-sans); - font-size: 0.85rem; - transition: var(--transition-fast); - outline: none; - width: 100%; - - &::placeholder { - color: var(--text-placeholder); - } - - &:focus { - border-color: var(--border-focus); - box-shadow: var(--shadow-focus); - background: var(--bg-card-solid); - } - - &[type='number'] { - font-family: var(--font-mono); - } - } -} - - -.card-label { - font-size: 0.85rem; - color: var(--text-muted); -} - -.card-value { - font-size: 2rem; - font-weight: 600; - color: var(--text-main); - - &.status-ok { - color: #10b981; - } -} - -// ---- Config Layout ---- -.config-layout { - display: flex; - gap: 24px; - align-items: flex-start; -} - -.list-pane { - width: 280px; - padding: 16px; -} - -.pane-title { - font-size: 0.95rem; - color: var(--text-main); - margin-bottom: 16px; - font-weight: 600; -} - -.qq-list { - @include flex-col; - gap: 8px; -} - -.qq-item { - display: flex; - align-items: center; - gap: 12px; - padding: 10px; - border-radius: var(--radius-md); - cursor: pointer; - transition: background 0.2s; - border: 1px solid transparent; - - &:hover { - background: var(--bg-hover); - } - - &.active { - background: var(--bg-hover); - border-color: var(--border-active); - } -} - -.qq-avatar { - width: 36px; - height: 36px; - border-radius: 50%; - background: linear-gradient(135deg, var(--color-primary), #818cf8); - flex-shrink: 0; -} - -.qq-info { - @include flex-col; -} - -.qq-nik { - font-size: 0.9rem; - font-weight: 500; - color: var(--text-main); -} - -.qq-uin { - font-size: 0.75rem; - color: var(--text-muted); -} - -// ---- Editor Pane ---- -.editor-pane { - flex: 1; - min-height: 500px; - padding: 32px; -} - -.empty-state { - @include flex-col; - @include flex-center; - height: 100%; - color: var(--text-muted); - font-size: 0.9rem; - opacity: 0.7; - gap: 12px; -} - -.editor-header { - @include flex-between; - align-items: flex-start; - margin-bottom: 32px; - border-bottom: 1px solid var(--border-subtle); - padding-bottom: 16px; -} - -.editor-title { - h2 { - font-size: 1.25rem; - color: var(--text-main); - margin-bottom: 4px; - } -} - -.editor-subtitle { - font-size: 0.85rem; - color: var(--text-muted); - font-family: monospace; -} - -.editor-actions { - display: flex; - align-items: center; - gap: 16px; -} - -.save-status { - font-size: 0.85rem; - color: var(--text-muted); - - &.ok { - color: #10b981; - } -} - -// ---- Config Sections ---- -.cfg-section { - margin-bottom: 32px; -} - -.cfg-section-header { - @include flex-between; - margin-bottom: 16px; - - h4 { - font-size: 1rem; - color: var(--text-main); - font-weight: 600; - } -} - -.cfg-section-body { - @include flex-col; - gap: 16px; -} - -.endpoint-row { - display: flex; - align-items: center; - gap: 16px; - background: var(--bg-input); - border: 1px solid var(--border-subtle); - padding: 16px; - border-radius: var(--radius-md); -} - -.endpoint-actions { - display: flex; - align-items: center; - margin-top: 24px; -} - -.input-group { - @include flex-col; - gap: 8px; - flex: 1; - - label { - font-size: 0.8rem; - color: var(--text-muted); - } - - input { - background: var(--bg-card); - border: 1px solid var(--border-subtle); - padding: 8px 12px; - border-radius: var(--radius-sm); - color: var(--text-main); - font-family: monospace; - font-size: 0.85rem; - transition: border-color 0.2s; - outline: none; - - &:focus { - border-color: var(--border-focus); - } - } -} diff --git a/packages/webui/src/styles/components/_layout.scss b/packages/webui/src/styles/components/_layout.scss deleted file mode 100644 index 9a64a77b..00000000 --- a/packages/webui/src/styles/components/_layout.scss +++ /dev/null @@ -1,61 +0,0 @@ -// Layout styles — now handled via Tailwind + CSS vars in components - -.sidebar-footer { - padding: 12px; - border-top: 1px solid var(--border-subtle); - @include flex-col; - gap: 4px; -} - -// ---- Main Content ---- -.content { - flex: 1; - @include flex-col; - overflow: hidden; - min-width: 0; -} - -.header { - height: 64px; - flex-shrink: 0; - @include flex-between; - padding: 0 32px; - background: var(--glass-bg); - backdrop-filter: var(--glass-blur); - -webkit-backdrop-filter: var(--glass-blur); - border-bottom: 1px solid var(--glass-border); - box-shadow: var(--shadow-xs); - z-index: 5; -} - -.header-right { - @include flex-center; - gap: 8px; - font-size: 0.8rem; - color: var(--text-muted); - font-weight: 500; - letter-spacing: 0.01em; -} - -.main-scroll { - flex: 1; - overflow-y: auto; - padding: 28px 32px; - - &::-webkit-scrollbar { - width: 5px; - } - - &::-webkit-scrollbar-track { - background: transparent; - } - - &::-webkit-scrollbar-thumb { - background: var(--border-subtle); - border-radius: var(--radius-full); - - &:hover { - background: var(--text-muted); - } - } -} diff --git a/packages/webui/src/styles/components/_shared.scss b/packages/webui/src/styles/components/_shared.scss deleted file mode 100644 index cd1a3cf2..00000000 --- a/packages/webui/src/styles/components/_shared.scss +++ /dev/null @@ -1,264 +0,0 @@ -// Shared styles — now handled via Tailwind + CSS vars in components - color: #fff; - box-shadow: 0 2px 8px rgba(14, 165, 233, 0.28); - - &:hover { - background: var(--color-primary-hover); - box-shadow: 0 4px 16px rgba(14, 165, 233, 0.38); - transform: translateY(-1px); - } - - &:active { - transform: translateY(0); - } -} - -.btn-ghost { - background: transparent; - color: var(--text-muted); - border-radius: var(--radius-md); - - &:hover { - background: var(--bg-hover); - color: var(--text-main); - } -} - -.btn-outline { - background: transparent; - border-color: var(--border-subtle); - color: var(--text-muted); - - &:hover { - background: var(--bg-hover); - color: var(--text-main); - border-color: var(--border-active); - } -} - -.btn-danger { - background: transparent; - border-color: var(--border-subtle); - color: var(--color-danger); - border-radius: var(--radius-sm); - - &:hover { - background: var(--color-danger); - border-color: var(--color-danger); - color: #fff; - box-shadow: 0 2px 8px rgba(239, 68, 68, 0.28); - } -} - -.btn-icon { - padding: 4px; - width: 28px; - height: 28px; -} - -// ---- Login Screen ---- -.login-screen { - position: fixed; - inset: 0; - z-index: 1000; - background: var(--bg-body); - background-image: var(--glass-body-gradient); - @include flex-center; -} - -.login-card { - width: 400px; - @include flex-col; - align-items: center; - padding: 48px 40px; - border-radius: var(--radius-xl); - background: var(--bg-card); - backdrop-filter: blur(20px) saturate(1.8); - -webkit-backdrop-filter: blur(20px) saturate(1.8); - border: 1px solid var(--glass-border); - box-shadow: var(--shadow-lg); -} - -.login-title { - font-size: 1.6rem; - font-weight: 700; - letter-spacing: -0.02em; - margin-bottom: 10px; - background: linear-gradient(135deg, var(--color-primary) 0%, #818cf8 100%); - -webkit-background-clip: text; - background-clip: text; - -webkit-text-fill-color: transparent; -} - -.login-desc { - font-size: 0.83rem; - color: var(--text-muted); - text-align: center; - line-height: 1.65; - margin-bottom: 32px; -} - -.login-form { - width: 100%; - @include flex-col; - gap: 16px; -} - -.login-submit-btn { - width: 100%; - padding: 10px; -} - -.login-error { - color: var(--color-danger); - font-size: 0.8rem; - text-align: center; - padding: 8px 12px; - background: rgba(239, 68, 68, 0.08); - border-radius: var(--radius-sm); -} - - -// Search input (header) -.search-input { - background: var(--bg-input); - border: 1px solid var(--border-subtle); - padding: 8px 14px; - border-radius: var(--radius-sm); - color: var(--text-main); - width: 260px; - font-size: 0.85rem; - transition: border-color 0.2s; - outline: none; - - &:focus { - border-color: var(--color-primary); - } -} - -// Generic card -.card { - background: var(--bg-card); - border: 1px solid var(--border-subtle); - border-radius: var(--radius-lg); - box-shadow: var(--shadow-sm); - padding: 24px; -} - -// Muted helper -.text-muted { - color: var(--text-muted); - font-size: 0.85rem; -} - -// ---- Shared Button System ---- -.btn { - display: inline-flex; - align-items: center; - justify-content: center; - gap: 6px; - padding: 8px 16px; - border-radius: var(--radius-md); - font-size: 0.85rem; - font-weight: 500; - cursor: pointer; - border: 1px solid transparent; - transition: all 0.2s; - outline: none; - font-family: inherit; -} - -.btn-primary { - background: var(--color-primary); - color: #fff; - - &:hover { background: var(--color-primary-hover); } -} - -.btn-ghost { - background: transparent; - color: var(--text-muted); - - &:hover { - background: var(--bg-hover); - color: var(--text-main); - } -} - -.btn-outline { - background: transparent; - border-color: var(--border-subtle); - color: var(--text-muted); - - &:hover { - background: var(--bg-hover); - color: var(--text-main); - } -} - -.btn-danger { - background: transparent; - border-color: var(--border-subtle); - color: var(--color-danger); - - &:hover { - background: var(--color-danger); - border-color: var(--color-danger); - color: #fff; - } -} - -.btn-icon { - padding: 4px; - width: 28px; - height: 28px; -} - -// ---- Login Screen ---- -.login-screen { - position: fixed; - inset: 0; - z-index: 1000; - background: var(--bg-body); - @include flex-center; -} - -.login-card { - width: 380px; - @include flex-col; - align-items: center; - padding: 40px; -} - -.login-title { - font-size: 1.5rem; - margin-bottom: 12px; - background: linear-gradient(90deg, var(--color-primary), #818cf8); - -webkit-background-clip: text; - background-clip: text; - -webkit-text-fill-color: transparent; -} - -.login-desc { - font-size: 0.85rem; - color: var(--text-muted); - text-align: center; - margin-bottom: 32px; -} - -.login-form { - width: 100%; - @include flex-col; - gap: 20px; -} - -.login-submit-btn { - width: 100%; - padding: 10px; -} - -.login-error { - color: var(--color-danger); - font-size: 0.8rem; - text-align: center; -} diff --git a/packages/webui/src/styles/index.scss b/packages/webui/src/styles/index.scss deleted file mode 100644 index b51f69e0..00000000 --- a/packages/webui/src/styles/index.scss +++ /dev/null @@ -1,5 +0,0 @@ -@use 'variables'; -@use 'mixins'; -@use 'components/layout'; -@use 'components/config'; -@use 'components/shared'; diff --git a/packages/webui/src/types.ts b/packages/webui/src/types.ts index 90702fdb..2fdf7f47 100644 --- a/packages/webui/src/types.ts +++ b/packages/webui/src/types.ts @@ -1,3 +1,6 @@ +export const APP_NAME = 'SnowLuma'; +export const APP_VERSION = '0.1.0'; + export interface QQInfo { uin: string; nickname: string; @@ -55,3 +58,37 @@ export interface OneBotConfig { wsClients: WsClientEndpoint[]; musicSignUrl?: string; } + +export interface SystemInfo { + hostname: string; + platform: string; + arch: string; + release: string; + uptime: number; + processUptime: number; + nodeVersion: string; + cpu: { + model: string; + cores: number; + speedMHz: number; + loadAvg: number[]; + perCore: number[]; + average: number; + }; + memory: { + total: number; + free: number; + used: number; + usagePercent: number; + }; + gpus: { name: string; vendor: string }[]; +} + +export interface LogEntry { + id: number; + time: string; + level: 'debug' | 'info' | 'success' | 'warn' | 'error'; + scope: string; + message: string; + line: string; +} diff --git a/packages/webui/tsconfig.app.json b/packages/webui/tsconfig.app.json index 1d29c885..a6b82940 100644 --- a/packages/webui/tsconfig.app.json +++ b/packages/webui/tsconfig.app.json @@ -11,6 +11,7 @@ "moduleResolution": "bundler", "allowImportingTsExtensions": true, "verbatimModuleSyntax": true, + "paths": { "@/*": ["./src/*"] }, "moduleDetection": "force", "noEmit": true, "jsx": "react-jsx", diff --git a/packages/webui/vite.config.ts b/packages/webui/vite.config.ts index e006d65e..8c7c9754 100644 --- a/packages/webui/vite.config.ts +++ b/packages/webui/vite.config.ts @@ -1,20 +1,29 @@ +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; import { defineConfig } from 'vite'; import react from '@vitejs/plugin-react'; import tailwindcss from '@tailwindcss/vite'; +const __dirname = path.dirname(fileURLToPath(import.meta.url)); + export default defineConfig({ plugins: [tailwindcss(), react()], + resolve: { + alias: { + '@': path.resolve(__dirname, 'src'), + }, + }, server: { + port: 5178, + strictPort: false, proxy: { - '/api': { - target: 'http://localhost:8080', - changeOrigin: true, - }, + '/api': { target: 'http://localhost:5099', changeOrigin: true, ws: true }, + '/avatar': { target: 'http://localhost:5099', changeOrigin: true }, }, }, build: { // Emit into the monorepo-root dist/client so the bundled core can serve it via Hono. outDir: '../../dist/client', - emptyOutDir: true - } + emptyOutDir: true, + }, }); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e6e1baad..66a82c78 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -74,21 +74,39 @@ importers: packages/webui: dependencies: - '@heroui/react': - specifier: ^3.0.2 - version: 3.0.2(@react-spectrum/provider@3.11.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.5(react@19.2.5))(react@19.2.5)(tailwindcss@4.2.2) - '@heroui/styles': - specifier: ^3.0.2 - version: 3.0.2(tailwind-merge@3.5.0)(tailwindcss@4.2.2) + '@radix-ui/react-alert-dialog': + specifier: ^1.1.7 + version: 1.1.15(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.5(react@19.2.5))(react@19.2.5) + '@radix-ui/react-dialog': + specifier: ^1.1.7 + version: 1.1.15(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.5(react@19.2.5))(react@19.2.5) + '@radix-ui/react-label': + specifier: ^2.1.3 + version: 2.1.8(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.5(react@19.2.5))(react@19.2.5) + '@radix-ui/react-scroll-area': + specifier: ^1.2.4 + version: 1.2.10(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.5(react@19.2.5))(react@19.2.5) + '@radix-ui/react-separator': + specifier: ^1.1.3 + version: 1.1.8(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.5(react@19.2.5))(react@19.2.5) + '@radix-ui/react-slot': + specifier: ^1.1.3 + version: 1.2.4(@types/react@19.2.14)(react@19.2.5) + '@radix-ui/react-tooltip': + specifier: ^1.1.9 + version: 1.2.8(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.5(react@19.2.5))(react@19.2.5) + class-variance-authority: + specifier: ^0.7.1 + version: 0.7.1 clsx: specifier: ^2.1.1 version: 2.1.1 - framer-motion: - specifier: ^12.38.0 - version: 12.38.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) lucide-react: - specifier: ^1.8.0 - version: 1.8.0(react@19.2.5) + specifier: ^0.469.0 + version: 0.469.0(react@19.2.5) + motion: + specifier: ^12.0.0 + version: 12.38.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) react: specifier: ^19.2.5 version: 19.2.5 @@ -98,6 +116,9 @@ importers: tailwind-merge: specifier: ^3.5.0 version: 3.5.0 + tw-animate-css: + specifier: ^1.2.5 + version: 1.4.0 devDependencies: '@eslint/js': specifier: ^10.0.1 @@ -129,9 +150,6 @@ importers: globals: specifier: ^17.5.0 version: 17.5.0 - sass: - specifier: ^1.99.0 - version: 1.99.0 tailwindcss: specifier: ^4.2.2 version: 4.2.2 @@ -147,24 +165,6 @@ importers: packages: - '@adobe/react-spectrum-ui@1.2.1': - resolution: {integrity: sha512-wcrbEE2O/9WnEn6avBnaVRRx88S5PLFsPLr4wffzlbMfXeQsy+RMQwaJd3cbzrn18/j04Isit7f7Emfn0dhrJA==} - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - - '@adobe/react-spectrum-workflow@2.3.5': - resolution: {integrity: sha512-b53VIPwPWKb/T5gzE3qs+QlGP5gVrw/LnWV3xMksDU+CRl3rzOKUwxIGiZO8ICyYh1WiyqY4myGlPU/nAynBUg==} - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - - '@adobe/react-spectrum@3.47.0': - resolution: {integrity: sha512-EDQuMzz0kUeiMUUlxoeLFQyyxOXaAC7qlBw2PYOUfFLYd87xcV7VVV0JxiYx8zGk1IIY3UgQHgXrS1fv7CgezQ==} - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - '@babel/code-frame@7.29.0': resolution: {integrity: sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw==} engines: {node: '>=6.9.0'} @@ -220,10 +220,6 @@ packages: engines: {node: '>=6.0.0'} hasBin: true - '@babel/runtime@7.29.2': - resolution: {integrity: sha512-JiDShH45zKHWyGe4ZNVRrCjBz8Nh9TMmZG1kh4QTK8hCBTWBi8Da+i7s1fJw7/lYpM4ccepSNfqzZ/QvABBi5g==} - engines: {node: '>=6.9.0'} - '@babel/template@7.28.6': resolution: {integrity: sha512-YA6Ma2KsCdGb+WC6UpBVFJGXL58MDA6oyONbjyF/+5sBgxY/dwkhLogbMT2GXXyU84/IhRw/2D1Os1B/giz+BQ==} engines: {node: '>=6.9.0'} @@ -443,32 +439,20 @@ packages: resolution: {integrity: sha512-rZAP3aVgB9ds9KOeUSL+zZ21hPmo8dh6fnIFwRQj5EAZl9gzR7wxYbYXYysAM8CTqGmUGyp2S4kUdV17MnGuWQ==} engines: {node: ^20.19.0 || ^22.13.0 || >=24} - '@formatjs/ecma402-abstract@2.3.6': - resolution: {integrity: sha512-HJnTFeRM2kVFVr5gr5kH1XP6K0JcJtE7Lzvtr3FS/so5f1kpsqqqxy5JF+FRaO6H2qmcMfAUIox7AJteieRtVw==} + '@floating-ui/core@1.7.5': + resolution: {integrity: sha512-1Ih4WTWyw0+lKyFMcBHGbb5U5FtuHJuujoyyr5zTaWS5EYMeT6Jb2AuDeftsCsEuchO+mM2ij5+q9crhydzLhQ==} - '@formatjs/fast-memoize@2.2.7': - resolution: {integrity: sha512-Yabmi9nSvyOMrlSeGGWDiH7rf3a7sIwplbvo/dlz9WCIjzIQAfy1RMf4S0X3yG724n5Ghu2GmEl5NJIV6O9sZQ==} + '@floating-ui/dom@1.7.6': + resolution: {integrity: sha512-9gZSAI5XM36880PPMm//9dfiEngYoC6Am2izES1FF406YFsjvyBMmeJ2g4SAju3xWwtuynNRFL2s9hgxpLI5SQ==} - '@formatjs/icu-messageformat-parser@2.11.4': - resolution: {integrity: sha512-7kR78cRrPNB4fjGFZg3Rmj5aah8rQj9KPzuLsmcSn4ipLXQvC04keycTI1F7kJYDwIXtT2+7IDEto842CfZBtw==} - - '@formatjs/icu-skeleton-parser@1.8.16': - resolution: {integrity: sha512-H13E9Xl+PxBd8D5/6TVUluSpxGNvFSlN/b3coUp0e0JpuWXXnQDiavIpY3NnvSp4xhEMoXyyBvVfdFX8jglOHQ==} - - '@formatjs/intl-localematcher@0.6.2': - resolution: {integrity: sha512-XOMO2Hupl0wdd172Y06h6kLpBz6Dv+J4okPLl4LPtzbr8f66WbIoy4ev98EBuZ6ZK4h5ydTN6XneT4QVpD7cdA==} - - '@heroui/react@3.0.2': - resolution: {integrity: sha512-HWcYFurH+OnLITgIvQKyCd6BhYLApyzg0qqL3T5xemK5hgo1Nr+wQGQ5JSNVfBAmF4tWSS9TOzr24UHEO+21Ww==} + '@floating-ui/react-dom@2.1.8': + resolution: {integrity: sha512-cC52bHwM/n/CxS87FH0yWdngEZrjdtLW/qVruo68qg+prK7ZQ4YGdut2GyDVpoGeAYe/h899rVeOVm6Oi40k2A==} peerDependencies: - react: '>=19.0.0' - react-dom: '>=19.0.0' - tailwindcss: '>=4.0.0' + react: '>=16.8.0' + react-dom: '>=16.8.0' - '@heroui/styles@3.0.2': - resolution: {integrity: sha512-UGohTT5WVgVUqosujtUegGevtNkmKLi/V29+zhT4a1lwCQxY5sD2PMtInk1ImBSqtxzfrb5uPoxySb5v1LptYQ==} - peerDependencies: - tailwindcss: '>=4.0.0' + '@floating-ui/utils@0.2.11': + resolution: {integrity: sha512-RiB/yIh78pcIxl6lLMG0CgBXAZ2Y0eVHqMPYugu+9U0AeT6YBeiJpf7lbdJNIugFP5SIjwNRgo4DhR1Qxi26Gg==} '@hono/node-server@1.19.14': resolution: {integrity: sha512-GwtvgtXxnWsucXvbQXkRgqksiH2Qed37H9xHZocE5sA3N8O8O8/8FA3uclQXxXVzc9XBZuEOMK7+r02FmSpHtw==} @@ -492,18 +476,6 @@ packages: resolution: {integrity: sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==} engines: {node: '>=18.18'} - '@internationalized/date@3.12.1': - resolution: {integrity: sha512-6IedsVWXyq4P9Tj+TxuU8WGWM70hYLl12nbYU8jkikVpa6WXapFazPUcHUMDMoWftIDE2ILDkFFte6W2nFCkRQ==} - - '@internationalized/message@3.1.9': - resolution: {integrity: sha512-x03MSVTaB/4JHtW1VAYaY/2cCuBrHbWM6ZvlgpKdnSdW28tZbqpR673RJrVJyXWRw1bpgYN89Tz7ohX5tgNgPA==} - - '@internationalized/number@3.6.6': - resolution: {integrity: sha512-iFgmQaXHE0vytNfpLZWOC2mEJCBRzcUxt53Xf/yCXG93lRvqas237i3r7X4RKMwO3txiyZD4mQjKAByFv6UGSQ==} - - '@internationalized/string@3.2.8': - resolution: {integrity: sha512-NdbMQUSfXLYIQol5VyMtinm9pZDciiMfN7RtmSuSB78io1hqwJ0naYfxyW6vgxWBkzWymQa/3uLDlbfmshtCaA==} - '@jridgewell/gen-mapping@0.3.13': resolution: {integrity: sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==} @@ -617,8 +589,27 @@ packages: resolution: {integrity: sha512-tmmZ3lQxAe/k/+rNnXQRawJ4NjxO2hqiOLTHvWchtGZULp4RyFeh6aU4XdOYBFe2KE1oShQTv4AblOs2iOrNnQ==} engines: {node: '>= 10.0.0'} - '@radix-ui/react-avatar@1.1.11': - resolution: {integrity: sha512-0Qk603AHGV28BOBO34p7IgD5m+V5Sg/YovfayABkoDDBM5d3NCx0Mp4gGrjzLGes1jV5eNOE1r3itqOR33VC6Q==} + '@radix-ui/number@1.1.1': + resolution: {integrity: sha512-MkKCwxlXTgz6CFoJx3pCwn07GKp36+aZyu/u2Ln2VrA5DcdyCZkASEDBTd8x5whTQQL5CiYf4prXKLcgQdv29g==} + + '@radix-ui/primitive@1.1.3': + resolution: {integrity: sha512-JTF99U/6XIjCBo0wqkU5sK10glYe27MRRsfwoiq5zzOEZLHU3A3KCMa5X/azekYRCJ0HlwI0crAXS/5dEHTzDg==} + + '@radix-ui/react-alert-dialog@1.1.15': + resolution: {integrity: sha512-oTVLkEw5GpdRe29BqJ0LSDFWI3qu0vR1M0mUkOQWDIUnY/QIkLpgDMWuKxP94c2NAC2LGcgVhG1ImF3jkZ5wXw==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-arrow@1.1.7': + resolution: {integrity: sha512-F+M1tLhO+mlQaOWspE8Wstg+z6PwxwRd8oQ8IXceWz92kfAmalTRf0EjrouQeo7QssEPfCn05B4Ihs1K9WQ/7w==} peerDependencies: '@types/react': '*' '@types/react-dom': '*' @@ -639,8 +630,8 @@ packages: '@types/react': optional: true - '@radix-ui/react-context@1.1.3': - resolution: {integrity: sha512-ieIFACdMpYfMEjF0rEf5KLvfVyIkOz6PDGyNnP+u+4xQ6jny3VCgA4OgXOwNx2aUkxn8zx9fiVcM8CfFYv9Lxw==} + '@radix-ui/react-context@1.1.2': + resolution: {integrity: sha512-jCi/QKUM2r1Ju5a3J64TH2A5SpKAgh0LpknyqdQ4m6DCV0xJ2HG1xARRwNGPQfi1SLdLWZ1OJz6F4OMBBNiGJA==} peerDependencies: '@types/react': '*' react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc @@ -648,6 +639,137 @@ packages: '@types/react': optional: true + '@radix-ui/react-dialog@1.1.15': + resolution: {integrity: sha512-TCglVRtzlffRNxRMEyR36DGBLJpeusFcgMVD9PZEzAKnUs1lKCgX5u9BmC2Yg+LL9MgZDugFFs1Vl+Jp4t/PGw==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-direction@1.1.1': + resolution: {integrity: sha512-1UEWRX6jnOA2y4H5WczZ44gOOjTEmlqv1uNW4GAJEO5+bauCBhv8snY65Iw5/VOS/ghKN9gr2KjnLKxrsvoMVw==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-dismissable-layer@1.1.11': + resolution: {integrity: sha512-Nqcp+t5cTB8BinFkZgXiMJniQH0PsUt2k51FUhbdfeKvc4ACcG2uQniY/8+h1Yv6Kza4Q7lD7PQV0z0oicE0Mg==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-focus-guards@1.1.3': + resolution: {integrity: sha512-0rFg/Rj2Q62NCm62jZw0QX7a3sz6QCQU0LpZdNrJX8byRGaGVTqbrW9jAoIAHyMQqsNpeZ81YgSizOt5WXq0Pw==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-focus-scope@1.1.7': + resolution: {integrity: sha512-t2ODlkXBQyn7jkl6TNaw/MtVEVvIGelJDCG41Okq/KwUsJBwQ4XVZsHAVUkK4mBv3ewiAS3PGuUWuY2BoK4ZUw==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-id@1.1.1': + resolution: {integrity: sha512-kGkGegYIdQsOb4XjsfM97rXsiHaBwco+hFI66oO4s9LU+PLAC5oJ7khdOVFxkhsmlbpUqDAvXw11CluXP+jkHg==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-label@2.1.8': + resolution: {integrity: sha512-FmXs37I6hSBVDlO4y764TNz1rLgKwjJMQ0EGte6F3Cb3f4bIuHB/iLa/8I9VKkmOy+gNHq8rql3j686ACVV21A==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-popper@1.2.8': + resolution: {integrity: sha512-0NJQ4LFFUuWkE7Oxf0htBKS6zLkkjBH+hM1uk7Ng705ReR8m/uelduy1DBo0PyBXPKVnBA6YBlU94MBGXrSBCw==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-portal@1.1.9': + resolution: {integrity: sha512-bpIxvq03if6UNwXZ+HTK71JLh4APvnXntDc6XOX8UVq4XQOVl7lwok0AvIl+b8zgCw3fSaVTZMpAPPagXbKmHQ==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-presence@1.1.5': + resolution: {integrity: sha512-/jfEwNDdQVBCNvjkGit4h6pMOzq8bHkopq458dPt2lMjx+eBQUohZNG9A7DtO/O5ukSbxuaNGXMjHicgwy6rQQ==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-primitive@2.1.3': + resolution: {integrity: sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + '@radix-ui/react-primitive@2.1.4': resolution: {integrity: sha512-9hQc4+GNVtJAIEPEqlYqW5RiYdrr8ea5XQ0ZOnD6fgru+83kqT15mq2OCcbe8KnjRZl5vF3ks69AKz3kh1jrhg==} peerDependencies: @@ -661,6 +783,41 @@ packages: '@types/react-dom': optional: true + '@radix-ui/react-scroll-area@1.2.10': + resolution: {integrity: sha512-tAXIa1g3sM5CGpVT0uIbUx/U3Gs5N8T52IICuCtObaos1S8fzsrPXG5WObkQN3S6NVl6wKgPhAIiBGbWnvc97A==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-separator@1.1.8': + resolution: {integrity: sha512-sDvqVY4itsKwwSMEe0jtKgfTh+72Sy3gPmQpjqcQneqQ4PFmr/1I0YA+2/puilhggCe2gJcx5EBAYFkWkdpa5g==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-slot@1.2.3': + resolution: {integrity: sha512-aeNmHnBxbi2St0au6VBVC7JXFlhLlOnvIIlePNniyUNAClzmtAUEY8/pBiK3iHjufOlwA+c20/8jngo7xcrg8A==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@radix-ui/react-slot@1.2.4': resolution: {integrity: sha512-Jl+bCv8HxKnlTLVrcDE8zTMJ09R9/ukw4qBs/oZClOfoQk/cOTbDn+NceXfV7j09YPVQUryJPHurafcSg6EVKA==} peerDependencies: @@ -670,6 +827,19 @@ packages: '@types/react': optional: true + '@radix-ui/react-tooltip@1.2.8': + resolution: {integrity: sha512-tY7sVt1yL9ozIxvmbtN5qtmH2krXcBCfjEiCgKGLqunJHvgvZG2Pcl2oQ3kbcZARb1BGEHdkLzcYGO8ynVlieg==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + '@radix-ui/react-use-callback-ref@1.1.1': resolution: {integrity: sha512-FkBMwD+qbGQeMu1cOHnuGB6x4yzPjho8ap5WtbEJ26umhgqVXbhekKUQO+hZEL1vU92a3wHwdp0HAcqAUF5iDg==} peerDependencies: @@ -679,8 +849,26 @@ packages: '@types/react': optional: true - '@radix-ui/react-use-is-hydrated@0.1.0': - resolution: {integrity: sha512-U+UORVEq+cTnRIaostJv9AGdV3G6Y+zbVd+12e18jQ5A3c0xL03IhnHuiU4UV69wolOQp5GfR58NW/EgdQhwOA==} + '@radix-ui/react-use-controllable-state@1.2.2': + resolution: {integrity: sha512-BjasUjixPFdS+NKkypcyyN5Pmg83Olst0+c6vGov0diwTEo6mgdqVR6hxcEgFuh4QrAs7Rc+9KuGJ9TVCj0Zzg==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-use-effect-event@0.0.2': + resolution: {integrity: sha512-Qp8WbZOBe+blgpuUT+lw2xheLP8q0oatc9UpmiemEICxGvFLYmHm9QowVZGHtJlGbS6A6yJ3iViad/2cVjnOiA==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-use-escape-keydown@1.1.1': + resolution: {integrity: sha512-Il0+boE7w/XebUHyBjroE+DbByORGR9KKmITzbR7MyQ4akpORYP/ZmbhAr0DG7RmmBqoOnZdy2QlvajJ2QA59g==} peerDependencies: '@types/react': '*' react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc @@ -697,288 +885,39 @@ packages: '@types/react': optional: true - '@react-aria/autocomplete@3.0.0-rc.6': - resolution: {integrity: sha512-uymUNJ8NW+dX7lmgkHE+SklAbxwktycAJcI5lBBw6KPZyc0EdMHC+/Fc5CUz3enIAhNwd2oxxogcSHknquMzQA==} + '@radix-ui/react-use-rect@1.1.1': + resolution: {integrity: sha512-QTYuDesS0VtuHNNvMh+CjlKJ4LJickCMUAqjlE3+j8w+RlRpwyX3apEQKGFzbZGdo7XNG1tXa+bQqIE7HIXT2w==} peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true - '@react-aria/button@3.15.0': - resolution: {integrity: sha512-p8KehQ+OmhvhYmsjkp4K/Yv0tufyEBOHu6woJlRYL6kq5m6GKY5MZp8pyO26FpSiOyjhnZe6wbTyvCifvaokwQ==} + '@radix-ui/react-use-size@1.1.1': + resolution: {integrity: sha512-ewrXRDTAqAXlkl6t/fkXWNAhFX9I+CkKlw6zjEwk86RSPKwZr3xpBRso655aqYafwtnbpHLj6toFzmd6xdVptQ==} peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true - '@react-aria/collections@3.1.0': - resolution: {integrity: sha512-OwWoxHaAN0jNw7oo17TfTPY2KZksDme4p5a8KCnNBfm/a0zo+y4wiOUaFpGDmDT6HxwznyBcu3x3oSN7orTtvA==} + '@radix-ui/react-visually-hidden@1.2.3': + resolution: {integrity: sha512-pzJq12tEaaIhqjbzpCuv/OypJY/BPavOofm+dbab+MHLajy277+1lLm6JFcGgF5eskJ6mquGirhXY2GD/8u8Ug==} peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true - '@react-aria/combobox@3.16.0': - resolution: {integrity: sha512-yPPLduVUluCBuIFSZ+WgBMgl5oH7A5oQTemSpvf9ZmJ2oABIe+h6VQcwkEtMdokveHrdbmWIB9BL0E5jdDczAA==} - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - - '@react-aria/dnd@3.12.0': - resolution: {integrity: sha512-FqAaxIMCgpq83UQhJRpSR+o3K4XQQYbJMKxhBWGL84Wn1p6m8QmWGvRKAiHeUoQXlY8R6KNxlMR/KjJvV8/lBA==} - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - - '@react-aria/focus@3.22.0': - resolution: {integrity: sha512-ZfDOVuVhqDsM9mkNji3QUZ/d40JhlVgXrDkrfXylM1035QCrcTHN7m2DpbE95sU2A8EQb4wikvt5jM6K/73BPg==} - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - - '@react-aria/i18n@3.12.16': - resolution: {integrity: sha512-Km2CAz6MFQOUEaattaW+2jBdWOHUF8WX7VQoNbjlqElCP58nSaqi9yxTWUDRhAcn8/xFUnkFh4MFweNgtrHuEA==} - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - - '@react-aria/interactions@3.28.0': - resolution: {integrity: sha512-OXwdU1EWFdMxmr/K1CXNGJzmNlCClByb+PuCaqUyzBymHPCGVhawirLIon/CrIN5psh3AiWpHSh4H0WeJdVpng==} - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - - '@react-aria/listbox@3.16.0': - resolution: {integrity: sha512-Jv6aTJECRntBvG+0ZQtXniAtHEQjvEi2QSm35FxRcsB8kgv7TmcinUOSZuHe5r8RDY2djILwdrqmfy6ApX0MDA==} - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - - '@react-aria/live-announcer@3.5.0': - resolution: {integrity: sha512-1b+Txq00WQ/PJPCsZT+CI5qP86DrfFGPuJL5ifKtdMVXrxNGJWrfu7jTj6q9AbAOOXLG11BJ6blILu7sZeRPxg==} - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - - '@react-aria/overlays@3.32.0': - resolution: {integrity: sha512-H9meBB14/M0bDwk8gZl8Fu8bwZN2El9LDlk5cNkgAozbEiRuQvTFOeE3RoP6XI6bwEnSBvb0ovPmx3/kNyOehQ==} - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - - '@react-aria/searchfield@3.9.0': - resolution: {integrity: sha512-B8oOFhwGDotb7enoQ0bmXjhVkx8BkzK/ZnMmr4aF2ezexSFpG/ELkWqJPlfwknCwoBgBzhmpIKZvkoxQHR/iIw==} - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - - '@react-aria/slider@3.9.0': - resolution: {integrity: sha512-FdowBjuYOT1OfAo6iEBGoz/EFJ0paRt3Gk/om+NwBF98yeqjHB7qZAkucGIswpixDfMNLYhGoiwiGYIYerhCxw==} - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - - '@react-aria/ssr@3.9.10': - resolution: {integrity: sha512-hvTm77Pf+pMBhuBm760Li0BVIO38jv1IBws1xFm1NoL26PU+fe+FMW5+VZWyANR6nYL65joaJKZqOdTQMkO9IQ==} - engines: {node: '>= 12'} - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - - '@react-aria/textfield@3.19.0': - resolution: {integrity: sha512-P5Da8QFV/bCp3oCXQAqaTWhXNtx4vWEjvoqa49oG5TM1blodLjFrzNyiRM7TmQU0VLwiQPAQrqD4yaDLXZ0Nqg==} - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - - '@react-aria/toolbar@3.0.0-beta.24': - resolution: {integrity: sha512-B2Rmpko7Ghi2RbNfsGdbR7I+RQBDhPGVE4bU3/EwHz+P/vNe5LyGPTeSwqaOMsQTF9lKNCkY8424dVTCr6RUMg==} - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - - '@react-aria/utils@3.33.1': - resolution: {integrity: sha512-kIx1Sj6bbAT0pdqCegHuPanR9zrLn5zMRiM7LN12rgRf55S19ptd9g3ncahArifYTRkfEU9VIn+q0HjfMqS9/w==} - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - - '@react-aria/virtualizer@4.2.0': - resolution: {integrity: sha512-j4Dj/PMQK+d/2E2Dxyr5ifPdg8IG/NYsfZJtPnvKHXeKlI3vj7F/InamujwCuEFHZBK3YmxlRPRGcoMdS66qfw==} - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - - '@react-spectrum/button@3.18.0': - resolution: {integrity: sha512-SmjsXt+mLK2cf8PGstNZvLBfjqE5TjHW15yPIATI6ddqMdcC9JZ3ldnBTdFji9P/B6Rlop4ajnAdDV6bpxLtXA==} - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - - '@react-spectrum/combobox@3.17.0': - resolution: {integrity: sha512-HuJjm7m5W/lvpak0KQXAdqkvO17GpIfQ6/AuddnXEyltWhl481oRok04b9VQKdZAy9xrmmpReFcvXJ4zFDIGvg==} - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - - '@react-spectrum/form@3.8.0': - resolution: {integrity: sha512-zNFA1zRFvoEZAhK6HxWyo2yUDlUXqCaaySxHvuCaevq4Zw3DKndbxq72ax9YDaUAvYlhgnb/bI616JBCZUAhdA==} - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - - '@react-spectrum/provider@3.11.0': - resolution: {integrity: sha512-W2Gxbj8AcG5OR2K5Ua3K8qQqxdsiytEiz+2rhr6oQyBM8VafEgDcNPYSOTtfjrQM3snl2Uhp8LzwN0jwQe/6nQ==} - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - - '@react-spectrum/searchfield@3.9.0': - resolution: {integrity: sha512-so1IeolnYPsgjoIJmoGakUuQv+Ij5NVoWx2VTBc3o2sUva1GkxtFp6Woiow2Qqw0mFyoTwwoKi6zQJHLMqHhvQ==} - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - - '@react-spectrum/slider@3.9.0': - resolution: {integrity: sha512-FTsfWfn6+BkXi8ZDcd7mBQs/KbKYJRHV6aQ64pC4gCnMw54eFcKSuCtlCtdGw3exLPQtGHCNVWGznOjgc8PtGw==} - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - - '@react-spectrum/table@3.18.0': - resolution: {integrity: sha512-ckvjjz/Tp8Y/Ck/OOOXX/dTs8PtoWCy7+QDBxWzNpqvxcLiLviudNKJFhGfeyGGDi3IOMWRSaG5yWN9wrvItNQ==} - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - - '@react-stately/autocomplete@3.0.0-beta.4': - resolution: {integrity: sha512-K2Uy7XEdseFvgwRQ8CyrYEHMupjVKEszddOapP8deNz4hntYvT1aRm0m+sKa5Kl/4kvg9c/3NZpQcrky/vRZIg==} - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - - '@react-stately/combobox@3.14.0': - resolution: {integrity: sha512-WYWJK9IzWKDqnFk1HF6FGISrhPh/bzYkRLgd40Psyke5dwYusOrEUzG161P8v9vxAzs621pYB4hz2UhrRWsMPQ==} - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - - '@react-stately/flags@3.2.0': - resolution: {integrity: sha512-HcfFk5sUpSVUgjOHUSi4izUWbiya+iTt2/PAviW+cKmCJOy507CQ3VG3Yu0Rqs0cr66yt3foDKy0MRNQ2zmGmQ==} - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - - '@react-stately/grid@3.12.0': - resolution: {integrity: sha512-MLCN3hyxRpaj4tUnQyc+aFR2/QBP2rmFcXGdADHO1c0kvxd9Vk+bEe88uA9MJTz2VClQ+AN7yRGCTIuME+QvNQ==} - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - - '@react-stately/layout@4.7.0': - resolution: {integrity: sha512-63VvOKI8KXeD3SO7yt41511CdZ+9wK2LVY2mpY+c87ML5fVVgMTc/o1IsYWI07rW3IjEFcWoW93eItgMbJCXyg==} - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - - '@react-stately/searchfield@3.6.0': - resolution: {integrity: sha512-cSSDXynj3oQdILHSthEaB2pAIXG0POHKqjZZ07k6L/A0fkyhkwAbR/hyg+idHCH7Ah9hWnS+YhicWE1b6nw1zg==} - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - - '@react-stately/selection@3.21.0': - resolution: {integrity: sha512-SBafuZoJgDr7L9dCgMjat1Mx85xOnRO7E5UCtAj6TF/7yhisJVnrNkfnryOH2CunPyXCUgfUlUebkxeXjbW+lw==} - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - - '@react-stately/slider@3.8.0': - resolution: {integrity: sha512-TonYUZZ9BENheuT1VPL8tJl3ltM3DKzw0aDKpfQudqMz3c9L11Efq+ZrBaIUIwNvA/W0kfrCRJ30byFEkNTyCQ==} - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - - '@react-stately/table@3.16.0': - resolution: {integrity: sha512-xuvkFuRj8SYE36T+hEed+30oPCzbkcGNduVBAOJGr9K0z7y/a3OxFdOnAv/OsCvKW1sLK231oTSFvZ36zRFndA==} - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - - '@react-stately/utils@3.11.0': - resolution: {integrity: sha512-8LZpYowJ9eZmmYLpudbo/eclIRnbhWIJZ994ncmlKlouNzKohtM8qTC6B1w1pwUbiwGdUoyzLuQbeaIor5Dvcw==} - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - - '@react-stately/virtualizer@4.5.0': - resolution: {integrity: sha512-Yf1xA9U7PuuaHgxWExwO5MrWCqzDZZTPCzo9YCcsilkOFk2GxMcGNysM71funj+d4CMqsWjCNmgNhZQjBXKjNw==} - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - - '@react-types/autocomplete@3.0.0-alpha.38': - resolution: {integrity: sha512-0XrlVC8drzcrCNzybbkZdLcTofXEzBsHuaFevt5awW1J0xBJ+SMLIQMDeUYrvKjjwXUBlCtjJJpOvitGt4Z+KA==} - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - - '@react-types/button@3.16.0': - resolution: {integrity: sha512-Z5///n2Y1jtF0gokBq2Y1K1cpOwsWZ24HPeAm3eEmZrbBXMrxC2oEA5ZThsSHuIGsqiyNJiQ2scsDftmr+PkZw==} - peerDependencies: - '@react-spectrum/provider': ^3.0.0 - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - - '@react-types/color@3.1.4': - resolution: {integrity: sha512-s+Xj4pvNBlJPpQ1Gr7bO1j4/tuwMUfdS9xIVFuiW5RvDsSybKTUJ/gqPzTxms94VDCRhLFocVn2STNdD2Erf6A==} - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - - '@react-types/combobox@3.15.0': - resolution: {integrity: sha512-iWV9UfLg1P0XhEqPTbnhsVMHFwc0RnrZjHfCLwgilH0Af0z1CQ8RyWiT8cOd1eqbkOAiVgCv29Xs8PAxaQBHSg==} - peerDependencies: - '@react-spectrum/provider': ^3.0.0 - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - - '@react-types/form@3.8.0': - resolution: {integrity: sha512-ff38E4/5xLxqVemicLw+GefRoWBJEAro+hDwFZ5sde6kslktYt2LHJ7+IkID6yQYy+T3qxXgIdfxX+O1rlpWvw==} - peerDependencies: - '@react-spectrum/provider': ^3.0.0 - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - - '@react-types/grid@3.4.0': - resolution: {integrity: sha512-h+u3hKli9gVwfYx6cabkTNZrP+HQ97vAmTugGIk5IAfouE6kjhoDaDzVD0VUvIWqc12LIkrqe1LdBMZ0ofbV6A==} - peerDependencies: - '@react-spectrum/provider': ^3.0.0 - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - - '@react-types/searchfield@3.7.0': - resolution: {integrity: sha512-/JBVYkXLB4EozPEfgpYW7C9tzw4xUmdVmuf7g+8ip/AsFgsyW/FjdLpbaXESXR78D0nppWaNxUxcdUXcuo+eEg==} - peerDependencies: - '@react-spectrum/provider': ^3.0.0 - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - - '@react-types/shared@3.33.1': - resolution: {integrity: sha512-oJHtjvLG43VjwemQDadlR5g/8VepK56B/xKO2XORPHt9zlW6IZs3tZrYlvH29BMvoqC7RtE7E5UjgbnbFtDGag==} - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - - '@react-types/shared@3.34.0': - resolution: {integrity: sha512-gp6xo/s2lX54AlTjOiqwDnxA7UW79BNvI9dB9pr3LZTzRKCd1ZA+ZbgKw/ReIiWuvvVw/8QFJpnqeeFyLocMcQ==} - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - - '@react-types/slider@3.9.0': - resolution: {integrity: sha512-gbQWB8LnucC+jhDi5Imd2ZDPbVuiHt0xzObGHWq6GTZ3slLgTvGQaHNO5h9+h7dZH0iFQOVNb6+TlyTsnjFuAw==} - peerDependencies: - '@react-spectrum/provider': ^3.0.0 - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - - '@react-types/table@3.14.0': - resolution: {integrity: sha512-emTYu9biFFlVEN208EmYpnO3bzi0f7q+07rnerUWRRRqXQpgNW/G5Tc6ifgCUXLp+KjwzLIeoDl4hs3ZnG5NSA==} - peerDependencies: - '@react-spectrum/provider': ^3.0.0 - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 + '@radix-ui/rect@1.1.1': + resolution: {integrity: sha512-HPwpGIzkl28mWyZqG52jiqDJ12waP11Pa1lGoiyUkIEuMLBP0oeK/C89esbXrxsky5we7dfd8U58nm0SgAWpVw==} '@rolldown/binding-android-arm64@1.0.0-rc.15': resolution: {integrity: sha512-YYe6aWruPZDtHNpwu7+qAHEMbQ/yRl6atqb/AhznLTnD3UY99Q1jE7ihLSahNWkF4EqRPVC4SiR4O0UkLK02tA==} @@ -1099,26 +1038,9 @@ packages: rollup: optional: true - '@spectrum-icons/ui@3.7.0': - resolution: {integrity: sha512-86iQSDfJb3Ama1WSJ/mEiFy4DJT7e/v4pSmEuX4aKKMzbNYft+O40N18S2POUnmblrb7MQneLC/pgIp1SDBwEQ==} - peerDependencies: - '@adobe/react-spectrum': ^3.47.0 - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - - '@spectrum-icons/workflow@4.3.0': - resolution: {integrity: sha512-ILuhgWh9jMXaEVMRuOYgTAjMc22cKyvCtUDyZmc8OEMfOYuejj+Gcp5t6DhaCfE0M9rORtVxCrRgsO2WyEgfUw==} - peerDependencies: - '@adobe/react-spectrum': ^3.47.0 - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - '@standard-schema/spec@1.1.0': resolution: {integrity: sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==} - '@swc/helpers@0.5.21': - resolution: {integrity: sha512-jI/VAmtdjB/RnI8GTnokyX7Ug8c+g+ffD6QRLa6XQewtnGyukKkKSk3wLTM3b5cjt1jNh9x0jfVlagdN2gDKQg==} - '@tailwindcss/node@4.2.2': resolution: {integrity: sha512-pXS+wJ2gZpVXqFaUEjojq7jzMpTGf8rU6ipJz5ovJV6PUGmlJ+jvIwGrzdHdQ80Sg+wmQxUFuoW1UAAwHNEdFA==} @@ -1420,8 +1342,8 @@ packages: resolution: {integrity: sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==} engines: {node: '>= 14.16.0'} - client-only@0.0.1: - resolution: {integrity: sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==} + class-variance-authority@0.7.1: + resolution: {integrity: sha512-Ka+9Trutv7G8M6WT6SeiRWz792K5qEqIGEGzXKhAE6xOWAY6pPH8U+9IY3oCMv6kqTmLsv7Xh/2w2RigkePMsg==} clsx@2.1.1: resolution: {integrity: sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==} @@ -1458,9 +1380,6 @@ packages: supports-color: optional: true - decimal.js@10.6.0: - resolution: {integrity: sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg==} - deep-is@0.1.4: resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} @@ -1472,8 +1391,8 @@ packages: resolution: {integrity: sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==} engines: {node: '>=8'} - dom-helpers@5.2.1: - resolution: {integrity: sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA==} + detect-node-es@1.1.0: + resolution: {integrity: sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ==} electron-to-chromium@1.5.339: resolution: {integrity: sha512-Is+0BBHJ4NrdpAYiperrmp53pLywG/yV/6lIMTAnhxvzj/Cmn5Q/ogSHC6AKe7X+8kPLxxFk0cs5oc/3j/fxIg==} @@ -1633,6 +1552,10 @@ packages: resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} engines: {node: '>=6.9.0'} + get-nonce@1.0.1: + resolution: {integrity: sha512-FJhYRoDaiatfEkUK8HKlicmu/3SGFD51q3itKDGoSTysQJBnfOcxU5GxnhE1E6soB76MbT0MBtnKJuXyAx+96Q==} + engines: {node: '>=6'} + get-tsconfig@4.14.0: resolution: {integrity: sha512-yTb+8DXzDREzgvYmh6s9vHsSVCHeC0G3PI5bEXNBHtmshPnO+S5O7qgLEOn0I5QvMy6kpZN8K1NKGyilLb93wA==} @@ -1676,15 +1599,6 @@ packages: resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} engines: {node: '>=0.8.19'} - input-otp@1.4.2: - resolution: {integrity: sha512-l3jWwYNvrEa6NTCt7BECfCm48GvwuZzkoeG3gBL2w4CHeOXW3eKFmf9UNYkNfYc3mxMrthMnxjIE07MT0zLBQA==} - peerDependencies: - react: ^16.8 || ^17.0 || ^18.0 || ^19.0.0 || ^19.0.0-rc - react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0.0 || ^19.0.0-rc - - intl-messageformat@10.7.18: - resolution: {integrity: sha512-m3Ofv/X/tV8Y3tHXLohcuVuhWKo7BBq62cqY15etqmLxg2DZ34AGGgQDeR+SCta2+zICb1NX83af0GJmbQ1++g==} - is-core-module@2.16.1: resolution: {integrity: sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==} engines: {node: '>= 0.4'} @@ -1820,15 +1734,11 @@ packages: resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} engines: {node: '>=10'} - loose-envify@1.4.0: - resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} - hasBin: true - lru-cache@5.1.1: resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} - lucide-react@1.8.0: - resolution: {integrity: sha512-WuvlsjngSk7TnTBJ1hsCy3ql9V9VOdcPkd3PKcSmM34vJD8KG6molxz7m7zbYFgICwsanQWmJ13JlYs4Zp7Arw==} + lucide-react@0.469.0: + resolution: {integrity: sha512-28vvUnnKQ/dBwiCQtwJw7QauYnE7yd2Cyp4tTTJpvglX4EMpbflcdBgrgToX2j71B3YvugK/NH3BGUk+E/p/Fw==} peerDependencies: react: ^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0 @@ -1845,6 +1755,20 @@ packages: motion-utils@12.36.0: resolution: {integrity: sha512-eHWisygbiwVvf6PZ1vhaHCLamvkSbPIeAYxWUuL3a2PD/TROgE7FvfHWTIH4vMl798QLfMw15nRqIaRDXTlYRg==} + motion@12.38.0: + resolution: {integrity: sha512-uYfXzeHlgThchzwz5Te47dlv5JOUC7OB4rjJ/7XTUgtBZD8CchMN8qEJ4ZVsUmTyYA44zjV0fBwsiktRuFnn+w==} + peerDependencies: + '@emotion/is-prop-valid': '*' + react: ^18.0.0 || ^19.0.0 + react-dom: ^18.0.0 || ^19.0.0 + peerDependenciesMeta: + '@emotion/is-prop-valid': + optional: true + react: + optional: true + react-dom: + optional: true + ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} @@ -1862,10 +1786,6 @@ packages: node-releases@2.0.37: resolution: {integrity: sha512-1h5gKZCF+pO/o3Iqt5Jp7wc9rH3eJJ0+nh/CIoiRwjRxde/hAHyLPXYN4V3CqKAbiZPSeJFSWHmJsbkicta0Eg==} - object-assign@4.1.1: - resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} - engines: {node: '>=0.10.0'} - obug@2.1.1: resolution: {integrity: sha512-uTqF9MuPraAQ+IsnPf366RG4cP9RtUi7MLO1N3KEc+wb0a6yKpeL0lmk2IB1jY5KHPAlTc6T/JRdC/YqxHNwkQ==} @@ -1910,49 +1830,44 @@ packages: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} - prop-types@15.8.1: - resolution: {integrity: sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==} - punycode@2.3.1: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} - react-aria-components@1.16.0: - resolution: {integrity: sha512-MjHbTLpMFzzD2Tv5KbeXoZwPczuUWZcRavVvQQlNHRtXHH38D+sToMEYpNeir7Wh3K/XWtzeX3EujfJW6QNkrw==} - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - - react-aria-components@1.17.0: - resolution: {integrity: sha512-0EyisMgvsFJ2aML3crDYv2tW5vT2Ryf8PGzY/g63JjDdCbLshlwazhS8JNtPF1vkTkungJJ6sVJbKyX+YKSoFA==} - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - - react-aria@3.48.0: - resolution: {integrity: sha512-jQjd4rBEIMqecBaAKYJbVGK6EqIHLa5znVQ7jwFyK5vCyljoj6KhgtiahmcIPsG5vG5vEDLw+ba+bEWn6A2P4w==} - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - react-dom@19.2.5: resolution: {integrity: sha512-J5bAZz+DXMMwW/wV3xzKke59Af6CHY7G4uYLN1OvBcKEsWOs4pQExj86BBKamxl/Ik5bx9whOrvBlSDfWzgSag==} peerDependencies: react: ^19.2.5 - react-is@16.13.1: - resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} - - react-stately@3.46.0: - resolution: {integrity: sha512-OdxhWvHgs2L4OJGIs7hnuTr5WjjMM6enhNEAMRqiekhF8+ITvA2LRwNftOZwcogaoCslGYq5S2VQTQwnm0GbCA==} + react-remove-scroll-bar@2.3.8: + resolution: {integrity: sha512-9r+yi9+mgU33AKcj6IbT9oRCO78WriSj6t/cF8DWBZJ9aOGPOTEDvdUDz1FwKim7QXWwmHqtdHnRJfhAxEG46Q==} + engines: {node: '>=10'} peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 + '@types/react': '*' + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 + peerDependenciesMeta: + '@types/react': + optional: true - react-transition-group@4.4.5: - resolution: {integrity: sha512-pZcd1MCJoiKiBR2NRxeCRg13uCXbydPnmB4EOeRrY7480qNWO8IIgQG6zlDkm6uRMsURXPuKq0GWtiM59a5Q6g==} + react-remove-scroll@2.7.2: + resolution: {integrity: sha512-Iqb9NjCCTt6Hf+vOdNIZGdTiH1QSqr27H/Ek9sv/a97gfueI/5h1s3yRi1nngzMUaOOToin5dI1dXKdXiF+u0Q==} + engines: {node: '>=10'} peerDependencies: - react: '>=16.6.0' - react-dom: '>=16.6.0' + '@types/react': '*' + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + react-style-singleton@2.2.3: + resolution: {integrity: sha512-b6jSvxvVnyptAiLjbkWLE/lOnR4lfTtDAl+eUC7RZy+QQWc6wRzIV2CE6xBuMmDxc2qIihtDCZD5NPOFl7fRBQ==} + engines: {node: '>=10'} + peerDependencies: + '@types/react': '*' + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true react@19.2.5: resolution: {integrity: sha512-llUJLzz1zTUBrskt2pwZgLq59AemifIftw4aB7JxOqf1HY2FDaGDxgwpAPVzHU1kdWabH7FauP4i1oEeer2WCA==} @@ -2017,22 +1932,9 @@ packages: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} - tailwind-merge@3.4.0: - resolution: {integrity: sha512-uSaO4gnW+b3Y2aWoWfFpX62vn2sR3skfhbjsEnaBI81WD1wBLlHZe5sWf0AqjksNdYTbGBEd0UasQMT3SNV15g==} - tailwind-merge@3.5.0: resolution: {integrity: sha512-I8K9wewnVDkL1NTGoqWmVEIlUcB9gFriAEkXkfCjX5ib8ezGxtR3xD7iZIxrfArjEsH7F1CHD4RFUtxefdqV/A==} - tailwind-variants@3.2.2: - resolution: {integrity: sha512-Mi4kHeMTLvKlM98XPnK+7HoBPmf4gygdFmqQPaDivc3DpYS6aIY6KiG/PgThrGvii5YZJqRsPz0aPyhoFzmZgg==} - engines: {node: '>=16.x', pnpm: '>=7.x'} - peerDependencies: - tailwind-merge: '>=3.0.0' - tailwindcss: '*' - peerDependenciesMeta: - tailwind-merge: - optional: true - tailwindcss@4.2.2: resolution: {integrity: sha512-KWBIxs1Xb6NoLdMVqhbhgwZf2PGBpPEiwOqgI4pFIYbNTfBXiKYyWoTsXgBQ9WFg/OlhnvHaY+AEpW7wSmFo2Q==} @@ -2107,10 +2009,25 @@ packages: uri-js@4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} - use-sync-external-store@1.6.0: - resolution: {integrity: sha512-Pp6GSwGP/NrPIrxVFAIkOQeyw8lFenOHijQWkUTrDvrF4ALqylP2C/KCkeS9dpUM3KvYRQhna5vt7IL95+ZQ9w==} + use-callback-ref@1.3.3: + resolution: {integrity: sha512-jQL3lRnocaFtu3V00JToYz/4QkNWswxijDaCVNZRiRTO3HQDLsdu1ZtmIUvV4yPp+rvWm5j0y0TG/S61cuijTg==} + engines: {node: '>=10'} peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 + '@types/react': '*' + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + use-sidecar@1.1.3: + resolution: {integrity: sha512-Fedw0aZvkhynoPYlA5WXrMCAMm+nSWdZt6lzJQ7Ok8S6Q+VsHmHpRWndVRJ8Be0ZbkfPc5LRYH+5XrzXcEeLRQ==} + engines: {node: '>=10'} + peerDependencies: + '@types/react': '*' + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true vite-plugin-cp@6.0.3: resolution: {integrity: sha512-qxKGH3v9wPwUDbDchJf4IH4mRE1zkLWgzZSxwrl8LapwUWm48IFS7SlbRmcF4NquC/fESA5cHFge9E2Ps+woxg==} @@ -2236,33 +2153,6 @@ packages: snapshots: - '@adobe/react-spectrum-ui@1.2.1(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': - dependencies: - react: 19.2.5 - react-dom: 19.2.5(react@19.2.5) - - '@adobe/react-spectrum-workflow@2.3.5(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': - dependencies: - react: 19.2.5 - react-dom: 19.2.5(react@19.2.5) - - '@adobe/react-spectrum@3.47.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': - dependencies: - '@internationalized/date': 3.12.1 - '@react-types/shared': 3.34.0(react@19.2.5) - '@spectrum-icons/ui': 3.7.0(@adobe/react-spectrum@3.47.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@spectrum-icons/workflow': 4.3.0(@adobe/react-spectrum@3.47.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@swc/helpers': 0.5.21 - client-only: 0.0.1 - clsx: 2.1.1 - react: 19.2.5 - react-aria: 3.48.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - react-aria-components: 1.17.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - react-dom: 19.2.5(react@19.2.5) - react-stately: 3.46.0(react@19.2.5) - react-transition-group: 4.4.5(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - use-sync-external-store: 1.6.0(react@19.2.5) - '@babel/code-frame@7.29.0': dependencies: '@babel/helper-validator-identifier': 7.28.5 @@ -2340,8 +2230,6 @@ snapshots: dependencies: '@babel/types': 7.29.0 - '@babel/runtime@7.29.2': {} - '@babel/template@7.28.6': dependencies: '@babel/code-frame': 7.29.0 @@ -2495,69 +2383,22 @@ snapshots: '@eslint/core': 1.2.1 levn: 0.4.1 - '@formatjs/ecma402-abstract@2.3.6': + '@floating-ui/core@1.7.5': dependencies: - '@formatjs/fast-memoize': 2.2.7 - '@formatjs/intl-localematcher': 0.6.2 - decimal.js: 10.6.0 - tslib: 2.8.1 + '@floating-ui/utils': 0.2.11 - '@formatjs/fast-memoize@2.2.7': + '@floating-ui/dom@1.7.6': dependencies: - tslib: 2.8.1 + '@floating-ui/core': 1.7.5 + '@floating-ui/utils': 0.2.11 - '@formatjs/icu-messageformat-parser@2.11.4': + '@floating-ui/react-dom@2.1.8(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': dependencies: - '@formatjs/ecma402-abstract': 2.3.6 - '@formatjs/icu-skeleton-parser': 1.8.16 - tslib: 2.8.1 - - '@formatjs/icu-skeleton-parser@1.8.16': - dependencies: - '@formatjs/ecma402-abstract': 2.3.6 - tslib: 2.8.1 - - '@formatjs/intl-localematcher@0.6.2': - dependencies: - tslib: 2.8.1 - - '@heroui/react@3.0.2(@react-spectrum/provider@3.11.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.5(react@19.2.5))(react@19.2.5)(tailwindcss@4.2.2)': - dependencies: - '@heroui/styles': 3.0.2(tailwind-merge@3.4.0)(tailwindcss@4.2.2) - '@radix-ui/react-avatar': 1.1.11(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@react-aria/i18n': 3.12.16(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@react-aria/ssr': 3.9.10(react@19.2.5) - '@react-aria/utils': 3.33.1(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@react-stately/utils': 3.11.0(react@19.2.5) - '@react-types/color': 3.1.4(@react-spectrum/provider@3.11.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@react-types/shared': 3.33.1(react@19.2.5) - input-otp: 1.4.2(react-dom@19.2.5(react@19.2.5))(react@19.2.5) + '@floating-ui/dom': 1.7.6 react: 19.2.5 - react-aria-components: 1.16.0(@react-spectrum/provider@3.11.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(react-dom@19.2.5(react@19.2.5))(react@19.2.5) react-dom: 19.2.5(react@19.2.5) - tailwind-merge: 3.4.0 - tailwind-variants: 3.2.2(tailwind-merge@3.4.0)(tailwindcss@4.2.2) - tailwindcss: 4.2.2 - transitivePeerDependencies: - - '@react-spectrum/provider' - - '@types/react' - - '@types/react-dom' - '@heroui/styles@3.0.2(tailwind-merge@3.4.0)(tailwindcss@4.2.2)': - dependencies: - tailwind-variants: 3.2.2(tailwind-merge@3.4.0)(tailwindcss@4.2.2) - tailwindcss: 4.2.2 - tw-animate-css: 1.4.0 - transitivePeerDependencies: - - tailwind-merge - - '@heroui/styles@3.0.2(tailwind-merge@3.5.0)(tailwindcss@4.2.2)': - dependencies: - tailwind-variants: 3.2.2(tailwind-merge@3.5.0)(tailwindcss@4.2.2) - tailwindcss: 4.2.2 - tw-animate-css: 1.4.0 - transitivePeerDependencies: - - tailwind-merge + '@floating-ui/utils@0.2.11': {} '@hono/node-server@1.19.14(hono@4.12.14)': dependencies: @@ -2574,23 +2415,6 @@ snapshots: '@humanwhocodes/retry@0.4.3': {} - '@internationalized/date@3.12.1': - dependencies: - '@swc/helpers': 0.5.21 - - '@internationalized/message@3.1.9': - dependencies: - '@swc/helpers': 0.5.21 - intl-messageformat: 10.7.18 - - '@internationalized/number@3.6.6': - dependencies: - '@swc/helpers': 0.5.21 - - '@internationalized/string@3.2.8': - dependencies: - '@swc/helpers': 0.5.21 - '@jridgewell/gen-mapping@0.3.13': dependencies: '@jridgewell/sourcemap-codec': 1.5.5 @@ -2680,13 +2504,27 @@ snapshots: '@parcel/watcher-win32-x64': 2.5.6 optional: true - '@radix-ui/react-avatar@1.1.11(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': + '@radix-ui/number@1.1.1': {} + + '@radix-ui/primitive@1.1.3': {} + + '@radix-ui/react-alert-dialog@1.1.15(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': dependencies: - '@radix-ui/react-context': 1.1.3(@types/react@19.2.14)(react@19.2.5) - '@radix-ui/react-primitive': 2.1.4(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.14)(react@19.2.5) - '@radix-ui/react-use-is-hydrated': 0.1.0(@types/react@19.2.14)(react@19.2.5) - '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.14)(react@19.2.5) + '@radix-ui/primitive': 1.1.3 + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.14)(react@19.2.5) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.14)(react@19.2.5) + '@radix-ui/react-dialog': 1.1.15(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.5(react@19.2.5))(react@19.2.5) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.5(react@19.2.5))(react@19.2.5) + '@radix-ui/react-slot': 1.2.3(@types/react@19.2.14)(react@19.2.5) + react: 19.2.5 + react-dom: 19.2.5(react@19.2.5) + optionalDependencies: + '@types/react': 19.2.14 + '@types/react-dom': 19.2.3(@types/react@19.2.14) + + '@radix-ui/react-arrow@1.1.7(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': + dependencies: + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.5(react@19.2.5))(react@19.2.5) react: 19.2.5 react-dom: 19.2.5(react@19.2.5) optionalDependencies: @@ -2699,12 +2537,133 @@ snapshots: optionalDependencies: '@types/react': 19.2.14 - '@radix-ui/react-context@1.1.3(@types/react@19.2.14)(react@19.2.5)': + '@radix-ui/react-context@1.1.2(@types/react@19.2.14)(react@19.2.5)': dependencies: react: 19.2.5 optionalDependencies: '@types/react': 19.2.14 + '@radix-ui/react-dialog@1.1.15(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': + dependencies: + '@radix-ui/primitive': 1.1.3 + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.14)(react@19.2.5) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.14)(react@19.2.5) + '@radix-ui/react-dismissable-layer': 1.1.11(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.5(react@19.2.5))(react@19.2.5) + '@radix-ui/react-focus-guards': 1.1.3(@types/react@19.2.14)(react@19.2.5) + '@radix-ui/react-focus-scope': 1.1.7(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.5(react@19.2.5))(react@19.2.5) + '@radix-ui/react-id': 1.1.1(@types/react@19.2.14)(react@19.2.5) + '@radix-ui/react-portal': 1.1.9(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.5(react@19.2.5))(react@19.2.5) + '@radix-ui/react-presence': 1.1.5(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.5(react@19.2.5))(react@19.2.5) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.5(react@19.2.5))(react@19.2.5) + '@radix-ui/react-slot': 1.2.3(@types/react@19.2.14)(react@19.2.5) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.14)(react@19.2.5) + aria-hidden: 1.2.6 + react: 19.2.5 + react-dom: 19.2.5(react@19.2.5) + react-remove-scroll: 2.7.2(@types/react@19.2.14)(react@19.2.5) + optionalDependencies: + '@types/react': 19.2.14 + '@types/react-dom': 19.2.3(@types/react@19.2.14) + + '@radix-ui/react-direction@1.1.1(@types/react@19.2.14)(react@19.2.5)': + dependencies: + react: 19.2.5 + optionalDependencies: + '@types/react': 19.2.14 + + '@radix-ui/react-dismissable-layer@1.1.11(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': + dependencies: + '@radix-ui/primitive': 1.1.3 + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.14)(react@19.2.5) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.5(react@19.2.5))(react@19.2.5) + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.14)(react@19.2.5) + '@radix-ui/react-use-escape-keydown': 1.1.1(@types/react@19.2.14)(react@19.2.5) + react: 19.2.5 + react-dom: 19.2.5(react@19.2.5) + optionalDependencies: + '@types/react': 19.2.14 + '@types/react-dom': 19.2.3(@types/react@19.2.14) + + '@radix-ui/react-focus-guards@1.1.3(@types/react@19.2.14)(react@19.2.5)': + dependencies: + react: 19.2.5 + optionalDependencies: + '@types/react': 19.2.14 + + '@radix-ui/react-focus-scope@1.1.7(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': + dependencies: + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.14)(react@19.2.5) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.5(react@19.2.5))(react@19.2.5) + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.14)(react@19.2.5) + react: 19.2.5 + react-dom: 19.2.5(react@19.2.5) + optionalDependencies: + '@types/react': 19.2.14 + '@types/react-dom': 19.2.3(@types/react@19.2.14) + + '@radix-ui/react-id@1.1.1(@types/react@19.2.14)(react@19.2.5)': + dependencies: + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.14)(react@19.2.5) + react: 19.2.5 + optionalDependencies: + '@types/react': 19.2.14 + + '@radix-ui/react-label@2.1.8(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': + dependencies: + '@radix-ui/react-primitive': 2.1.4(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.5(react@19.2.5))(react@19.2.5) + react: 19.2.5 + react-dom: 19.2.5(react@19.2.5) + optionalDependencies: + '@types/react': 19.2.14 + '@types/react-dom': 19.2.3(@types/react@19.2.14) + + '@radix-ui/react-popper@1.2.8(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': + dependencies: + '@floating-ui/react-dom': 2.1.8(react-dom@19.2.5(react@19.2.5))(react@19.2.5) + '@radix-ui/react-arrow': 1.1.7(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.5(react@19.2.5))(react@19.2.5) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.14)(react@19.2.5) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.14)(react@19.2.5) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.5(react@19.2.5))(react@19.2.5) + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.14)(react@19.2.5) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.14)(react@19.2.5) + '@radix-ui/react-use-rect': 1.1.1(@types/react@19.2.14)(react@19.2.5) + '@radix-ui/react-use-size': 1.1.1(@types/react@19.2.14)(react@19.2.5) + '@radix-ui/rect': 1.1.1 + react: 19.2.5 + react-dom: 19.2.5(react@19.2.5) + optionalDependencies: + '@types/react': 19.2.14 + '@types/react-dom': 19.2.3(@types/react@19.2.14) + + '@radix-ui/react-portal@1.1.9(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': + dependencies: + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.5(react@19.2.5))(react@19.2.5) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.14)(react@19.2.5) + react: 19.2.5 + react-dom: 19.2.5(react@19.2.5) + optionalDependencies: + '@types/react': 19.2.14 + '@types/react-dom': 19.2.3(@types/react@19.2.14) + + '@radix-ui/react-presence@1.1.5(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': + dependencies: + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.14)(react@19.2.5) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.14)(react@19.2.5) + react: 19.2.5 + react-dom: 19.2.5(react@19.2.5) + optionalDependencies: + '@types/react': 19.2.14 + '@types/react-dom': 19.2.3(@types/react@19.2.14) + + '@radix-ui/react-primitive@2.1.3(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': + dependencies: + '@radix-ui/react-slot': 1.2.3(@types/react@19.2.14)(react@19.2.5) + react: 19.2.5 + react-dom: 19.2.5(react@19.2.5) + optionalDependencies: + '@types/react': 19.2.14 + '@types/react-dom': 19.2.3(@types/react@19.2.14) + '@radix-ui/react-primitive@2.1.4(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': dependencies: '@radix-ui/react-slot': 1.2.4(@types/react@19.2.14)(react@19.2.5) @@ -2714,6 +2673,39 @@ snapshots: '@types/react': 19.2.14 '@types/react-dom': 19.2.3(@types/react@19.2.14) + '@radix-ui/react-scroll-area@1.2.10(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': + dependencies: + '@radix-ui/number': 1.1.1 + '@radix-ui/primitive': 1.1.3 + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.14)(react@19.2.5) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.14)(react@19.2.5) + '@radix-ui/react-direction': 1.1.1(@types/react@19.2.14)(react@19.2.5) + '@radix-ui/react-presence': 1.1.5(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.5(react@19.2.5))(react@19.2.5) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.5(react@19.2.5))(react@19.2.5) + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.14)(react@19.2.5) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.14)(react@19.2.5) + react: 19.2.5 + react-dom: 19.2.5(react@19.2.5) + optionalDependencies: + '@types/react': 19.2.14 + '@types/react-dom': 19.2.3(@types/react@19.2.14) + + '@radix-ui/react-separator@1.1.8(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': + dependencies: + '@radix-ui/react-primitive': 2.1.4(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.5(react@19.2.5))(react@19.2.5) + react: 19.2.5 + react-dom: 19.2.5(react@19.2.5) + optionalDependencies: + '@types/react': 19.2.14 + '@types/react-dom': 19.2.3(@types/react@19.2.14) + + '@radix-ui/react-slot@1.2.3(@types/react@19.2.14)(react@19.2.5)': + dependencies: + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.14)(react@19.2.5) + react: 19.2.5 + optionalDependencies: + '@types/react': 19.2.14 + '@radix-ui/react-slot@1.2.4(@types/react@19.2.14)(react@19.2.5)': dependencies: '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.14)(react@19.2.5) @@ -2721,16 +2713,51 @@ snapshots: optionalDependencies: '@types/react': 19.2.14 + '@radix-ui/react-tooltip@1.2.8(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': + dependencies: + '@radix-ui/primitive': 1.1.3 + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.14)(react@19.2.5) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.14)(react@19.2.5) + '@radix-ui/react-dismissable-layer': 1.1.11(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.5(react@19.2.5))(react@19.2.5) + '@radix-ui/react-id': 1.1.1(@types/react@19.2.14)(react@19.2.5) + '@radix-ui/react-popper': 1.2.8(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.5(react@19.2.5))(react@19.2.5) + '@radix-ui/react-portal': 1.1.9(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.5(react@19.2.5))(react@19.2.5) + '@radix-ui/react-presence': 1.1.5(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.5(react@19.2.5))(react@19.2.5) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.5(react@19.2.5))(react@19.2.5) + '@radix-ui/react-slot': 1.2.3(@types/react@19.2.14)(react@19.2.5) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.14)(react@19.2.5) + '@radix-ui/react-visually-hidden': 1.2.3(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.5(react@19.2.5))(react@19.2.5) + react: 19.2.5 + react-dom: 19.2.5(react@19.2.5) + optionalDependencies: + '@types/react': 19.2.14 + '@types/react-dom': 19.2.3(@types/react@19.2.14) + '@radix-ui/react-use-callback-ref@1.1.1(@types/react@19.2.14)(react@19.2.5)': dependencies: react: 19.2.5 optionalDependencies: '@types/react': 19.2.14 - '@radix-ui/react-use-is-hydrated@0.1.0(@types/react@19.2.14)(react@19.2.5)': + '@radix-ui/react-use-controllable-state@1.2.2(@types/react@19.2.14)(react@19.2.5)': dependencies: + '@radix-ui/react-use-effect-event': 0.0.2(@types/react@19.2.14)(react@19.2.5) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.14)(react@19.2.5) + react: 19.2.5 + optionalDependencies: + '@types/react': 19.2.14 + + '@radix-ui/react-use-effect-event@0.0.2(@types/react@19.2.14)(react@19.2.5)': + dependencies: + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.14)(react@19.2.5) + react: 19.2.5 + optionalDependencies: + '@types/react': 19.2.14 + + '@radix-ui/react-use-escape-keydown@1.1.1(@types/react@19.2.14)(react@19.2.5)': + dependencies: + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.14)(react@19.2.5) react: 19.2.5 - use-sync-external-store: 1.6.0(react@19.2.5) optionalDependencies: '@types/react': 19.2.14 @@ -2740,370 +2767,30 @@ snapshots: optionalDependencies: '@types/react': 19.2.14 - '@react-aria/autocomplete@3.0.0-rc.6(@react-spectrum/provider@3.11.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': + '@radix-ui/react-use-rect@1.1.1(@types/react@19.2.14)(react@19.2.5)': dependencies: - '@react-aria/combobox': 3.16.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@react-aria/focus': 3.22.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@react-aria/i18n': 3.12.16(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@react-aria/interactions': 3.28.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@react-aria/listbox': 3.16.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@react-aria/searchfield': 3.9.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@react-aria/textfield': 3.19.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@react-aria/utils': 3.33.1(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@react-stately/autocomplete': 3.0.0-beta.4(react@19.2.5) - '@react-stately/combobox': 3.14.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@react-types/autocomplete': 3.0.0-alpha.38(@react-spectrum/provider@3.11.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@react-types/button': 3.16.0(@react-spectrum/provider@3.11.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@react-types/shared': 3.34.0(react@19.2.5) - '@swc/helpers': 0.5.21 + '@radix-ui/rect': 1.1.1 + react: 19.2.5 + optionalDependencies: + '@types/react': 19.2.14 + + '@radix-ui/react-use-size@1.1.1(@types/react@19.2.14)(react@19.2.5)': + dependencies: + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.14)(react@19.2.5) + react: 19.2.5 + optionalDependencies: + '@types/react': 19.2.14 + + '@radix-ui/react-visually-hidden@1.2.3(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': + dependencies: + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.5(react@19.2.5))(react@19.2.5) react: 19.2.5 react-dom: 19.2.5(react@19.2.5) - transitivePeerDependencies: - - '@react-spectrum/provider' + optionalDependencies: + '@types/react': 19.2.14 + '@types/react-dom': 19.2.3(@types/react@19.2.14) - '@react-aria/button@3.15.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': - dependencies: - '@swc/helpers': 0.5.21 - react: 19.2.5 - react-aria: 3.48.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - react-dom: 19.2.5(react@19.2.5) - - '@react-aria/collections@3.1.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': - dependencies: - '@swc/helpers': 0.5.21 - react: 19.2.5 - react-aria: 3.48.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - react-dom: 19.2.5(react@19.2.5) - - '@react-aria/combobox@3.16.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': - dependencies: - '@swc/helpers': 0.5.21 - react: 19.2.5 - react-aria: 3.48.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - react-dom: 19.2.5(react@19.2.5) - - '@react-aria/dnd@3.12.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': - dependencies: - '@react-types/shared': 3.34.0(react@19.2.5) - '@swc/helpers': 0.5.21 - react: 19.2.5 - react-aria: 3.48.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - react-dom: 19.2.5(react@19.2.5) - - '@react-aria/focus@3.22.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': - dependencies: - '@swc/helpers': 0.5.21 - react: 19.2.5 - react-aria: 3.48.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - react-dom: 19.2.5(react@19.2.5) - - '@react-aria/i18n@3.12.16(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': - dependencies: - '@internationalized/date': 3.12.1 - '@internationalized/message': 3.1.9 - '@internationalized/number': 3.6.6 - '@internationalized/string': 3.2.8 - '@react-aria/ssr': 3.9.10(react@19.2.5) - '@react-aria/utils': 3.33.1(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@react-types/shared': 3.34.0(react@19.2.5) - '@swc/helpers': 0.5.21 - react: 19.2.5 - react-dom: 19.2.5(react@19.2.5) - - '@react-aria/interactions@3.28.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': - dependencies: - '@react-types/shared': 3.34.0(react@19.2.5) - '@swc/helpers': 0.5.21 - react: 19.2.5 - react-aria: 3.48.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - react-dom: 19.2.5(react@19.2.5) - - '@react-aria/listbox@3.16.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': - dependencies: - '@swc/helpers': 0.5.21 - react: 19.2.5 - react-aria: 3.48.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - react-dom: 19.2.5(react@19.2.5) - - '@react-aria/live-announcer@3.5.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': - dependencies: - '@swc/helpers': 0.5.21 - react: 19.2.5 - react-aria: 3.48.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - react-dom: 19.2.5(react@19.2.5) - - '@react-aria/overlays@3.32.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': - dependencies: - '@swc/helpers': 0.5.21 - react: 19.2.5 - react-aria: 3.48.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - react-dom: 19.2.5(react@19.2.5) - - '@react-aria/searchfield@3.9.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': - dependencies: - '@swc/helpers': 0.5.21 - react: 19.2.5 - react-aria: 3.48.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - react-dom: 19.2.5(react@19.2.5) - - '@react-aria/slider@3.9.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': - dependencies: - '@react-types/shared': 3.34.0(react@19.2.5) - '@swc/helpers': 0.5.21 - react: 19.2.5 - react-aria: 3.48.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - react-dom: 19.2.5(react@19.2.5) - - '@react-aria/ssr@3.9.10(react@19.2.5)': - dependencies: - '@swc/helpers': 0.5.21 - react: 19.2.5 - - '@react-aria/textfield@3.19.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': - dependencies: - '@swc/helpers': 0.5.21 - react: 19.2.5 - react-aria: 3.48.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - react-dom: 19.2.5(react@19.2.5) - - '@react-aria/toolbar@3.0.0-beta.24(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': - dependencies: - '@react-aria/focus': 3.22.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@react-aria/i18n': 3.12.16(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@react-aria/utils': 3.33.1(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@react-types/shared': 3.34.0(react@19.2.5) - '@swc/helpers': 0.5.21 - react: 19.2.5 - react-dom: 19.2.5(react@19.2.5) - - '@react-aria/utils@3.33.1(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': - dependencies: - '@react-aria/ssr': 3.9.10(react@19.2.5) - '@react-stately/flags': 3.2.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@react-stately/utils': 3.11.0(react@19.2.5) - '@react-types/shared': 3.34.0(react@19.2.5) - '@swc/helpers': 0.5.21 - clsx: 2.1.1 - react: 19.2.5 - react-dom: 19.2.5(react@19.2.5) - - '@react-aria/virtualizer@4.2.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': - dependencies: - '@swc/helpers': 0.5.21 - react: 19.2.5 - react-aria: 3.48.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - react-dom: 19.2.5(react@19.2.5) - - '@react-spectrum/button@3.18.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': - dependencies: - '@adobe/react-spectrum': 3.47.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@swc/helpers': 0.5.21 - react: 19.2.5 - react-dom: 19.2.5(react@19.2.5) - - '@react-spectrum/combobox@3.17.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': - dependencies: - '@adobe/react-spectrum': 3.47.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@swc/helpers': 0.5.21 - react: 19.2.5 - react-dom: 19.2.5(react@19.2.5) - react-stately: 3.46.0(react@19.2.5) - - '@react-spectrum/form@3.8.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': - dependencies: - '@adobe/react-spectrum': 3.47.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@swc/helpers': 0.5.21 - react: 19.2.5 - react-dom: 19.2.5(react@19.2.5) - - '@react-spectrum/provider@3.11.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': - dependencies: - '@adobe/react-spectrum': 3.47.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@swc/helpers': 0.5.21 - react: 19.2.5 - react-dom: 19.2.5(react@19.2.5) - - '@react-spectrum/searchfield@3.9.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': - dependencies: - '@adobe/react-spectrum': 3.47.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@swc/helpers': 0.5.21 - react: 19.2.5 - react-dom: 19.2.5(react@19.2.5) - - '@react-spectrum/slider@3.9.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': - dependencies: - '@adobe/react-spectrum': 3.47.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@swc/helpers': 0.5.21 - react: 19.2.5 - react-dom: 19.2.5(react@19.2.5) - - '@react-spectrum/table@3.18.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': - dependencies: - '@adobe/react-spectrum': 3.47.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@swc/helpers': 0.5.21 - react: 19.2.5 - react-dom: 19.2.5(react@19.2.5) - react-stately: 3.46.0(react@19.2.5) - - '@react-stately/autocomplete@3.0.0-beta.4(react@19.2.5)': - dependencies: - '@react-stately/utils': 3.11.0(react@19.2.5) - '@swc/helpers': 0.5.21 - react: 19.2.5 - - '@react-stately/combobox@3.14.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': - dependencies: - '@swc/helpers': 0.5.21 - react: 19.2.5 - react-dom: 19.2.5(react@19.2.5) - react-stately: 3.46.0(react@19.2.5) - - '@react-stately/flags@3.2.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': - dependencies: - '@swc/helpers': 0.5.21 - react: 19.2.5 - react-dom: 19.2.5(react@19.2.5) - react-stately: 3.46.0(react@19.2.5) - - '@react-stately/grid@3.12.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': - dependencies: - '@swc/helpers': 0.5.21 - react: 19.2.5 - react-dom: 19.2.5(react@19.2.5) - react-stately: 3.46.0(react@19.2.5) - - '@react-stately/layout@4.7.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': - dependencies: - '@swc/helpers': 0.5.21 - react: 19.2.5 - react-dom: 19.2.5(react@19.2.5) - react-stately: 3.46.0(react@19.2.5) - - '@react-stately/searchfield@3.6.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': - dependencies: - '@swc/helpers': 0.5.21 - react: 19.2.5 - react-dom: 19.2.5(react@19.2.5) - react-stately: 3.46.0(react@19.2.5) - - '@react-stately/selection@3.21.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': - dependencies: - '@swc/helpers': 0.5.21 - react: 19.2.5 - react-dom: 19.2.5(react@19.2.5) - react-stately: 3.46.0(react@19.2.5) - - '@react-stately/slider@3.8.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': - dependencies: - '@swc/helpers': 0.5.21 - react: 19.2.5 - react-dom: 19.2.5(react@19.2.5) - react-stately: 3.46.0(react@19.2.5) - - '@react-stately/table@3.16.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': - dependencies: - '@swc/helpers': 0.5.21 - react: 19.2.5 - react-dom: 19.2.5(react@19.2.5) - react-stately: 3.46.0(react@19.2.5) - - '@react-stately/utils@3.11.0(react@19.2.5)': - dependencies: - '@swc/helpers': 0.5.21 - react: 19.2.5 - - '@react-stately/virtualizer@4.5.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': - dependencies: - '@swc/helpers': 0.5.21 - react: 19.2.5 - react-dom: 19.2.5(react@19.2.5) - react-stately: 3.46.0(react@19.2.5) - - '@react-types/autocomplete@3.0.0-alpha.38(@react-spectrum/provider@3.11.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': - dependencies: - '@react-types/combobox': 3.15.0(@react-spectrum/provider@3.11.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@react-types/searchfield': 3.7.0(@react-spectrum/provider@3.11.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@react-types/shared': 3.34.0(react@19.2.5) - react: 19.2.5 - transitivePeerDependencies: - - '@react-spectrum/provider' - - react-dom - - '@react-types/button@3.16.0(@react-spectrum/provider@3.11.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': - dependencies: - '@react-aria/button': 3.15.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@react-spectrum/button': 3.18.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@react-spectrum/provider': 3.11.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - react: 19.2.5 - react-dom: 19.2.5(react@19.2.5) - - '@react-types/color@3.1.4(@react-spectrum/provider@3.11.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': - dependencies: - '@react-types/shared': 3.34.0(react@19.2.5) - '@react-types/slider': 3.9.0(@react-spectrum/provider@3.11.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - react: 19.2.5 - transitivePeerDependencies: - - '@react-spectrum/provider' - - react-dom - - '@react-types/combobox@3.15.0(@react-spectrum/provider@3.11.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': - dependencies: - '@react-aria/combobox': 3.16.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@react-spectrum/combobox': 3.17.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@react-spectrum/provider': 3.11.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@react-stately/combobox': 3.14.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - react: 19.2.5 - react-dom: 19.2.5(react@19.2.5) - - '@react-types/form@3.8.0(@react-spectrum/provider@3.11.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': - dependencies: - '@react-spectrum/form': 3.8.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@react-spectrum/provider': 3.11.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@react-types/shared': 3.34.0(react@19.2.5) - react: 19.2.5 - react-dom: 19.2.5(react@19.2.5) - - '@react-types/grid@3.4.0(@react-spectrum/provider@3.11.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': - dependencies: - '@react-spectrum/provider': 3.11.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@react-stately/grid': 3.12.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - react: 19.2.5 - react-dom: 19.2.5(react@19.2.5) - - '@react-types/searchfield@3.7.0(@react-spectrum/provider@3.11.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': - dependencies: - '@react-aria/searchfield': 3.9.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@react-spectrum/provider': 3.11.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@react-spectrum/searchfield': 3.9.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@react-stately/searchfield': 3.6.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - react: 19.2.5 - react-dom: 19.2.5(react@19.2.5) - - '@react-types/shared@3.33.1(react@19.2.5)': - dependencies: - react: 19.2.5 - - '@react-types/shared@3.34.0(react@19.2.5)': - dependencies: - react: 19.2.5 - - '@react-types/slider@3.9.0(@react-spectrum/provider@3.11.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': - dependencies: - '@react-aria/slider': 3.9.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@react-spectrum/provider': 3.11.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@react-spectrum/slider': 3.9.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@react-stately/slider': 3.8.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - react: 19.2.5 - react-dom: 19.2.5(react@19.2.5) - - '@react-types/table@3.14.0(@react-spectrum/provider@3.11.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': - dependencies: - '@react-spectrum/provider': 3.11.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@react-spectrum/table': 3.18.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@react-stately/table': 3.16.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@react-types/shared': 3.34.0(react@19.2.5) - react: 19.2.5 - react-dom: 19.2.5(react@19.2.5) + '@radix-ui/rect@1.1.1': {} '@rolldown/binding-android-arm64@1.0.0-rc.15': optional: true @@ -3172,29 +2859,8 @@ snapshots: estree-walker: 2.0.2 picomatch: 4.0.4 - '@spectrum-icons/ui@3.7.0(@adobe/react-spectrum@3.47.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': - dependencies: - '@adobe/react-spectrum': 3.47.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@adobe/react-spectrum-ui': 1.2.1(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@babel/runtime': 7.29.2 - '@swc/helpers': 0.5.21 - react: 19.2.5 - react-dom: 19.2.5(react@19.2.5) - - '@spectrum-icons/workflow@4.3.0(@adobe/react-spectrum@3.47.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(react-dom@19.2.5(react@19.2.5))(react@19.2.5)': - dependencies: - '@adobe/react-spectrum': 3.47.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@adobe/react-spectrum-workflow': 2.3.5(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@swc/helpers': 0.5.21 - react: 19.2.5 - react-dom: 19.2.5(react@19.2.5) - '@standard-schema/spec@1.1.0': {} - '@swc/helpers@0.5.21': - dependencies: - tslib: 2.8.1 - '@tailwindcss/node@4.2.2': dependencies: '@jridgewell/remapping': 2.3.5 @@ -3513,8 +3179,11 @@ snapshots: chokidar@4.0.3: dependencies: readdirp: 4.1.2 + optional: true - client-only@0.0.1: {} + class-variance-authority@0.7.1: + dependencies: + clsx: 2.1.1 clsx@2.1.1: {} @@ -3541,18 +3210,13 @@ snapshots: dependencies: ms: 2.1.3 - decimal.js@10.6.0: {} - deep-is@0.1.4: {} deepmerge@4.3.1: {} detect-libc@2.1.2: {} - dom-helpers@5.2.1: - dependencies: - '@babel/runtime': 7.29.2 - csstype: 3.2.3 + detect-node-es@1.1.0: {} electron-to-chromium@1.5.339: {} @@ -3739,6 +3403,8 @@ snapshots: gensync@1.0.0-beta.2: {} + get-nonce@1.0.1: {} + get-tsconfig@4.14.0: dependencies: resolve-pkg-maps: 1.0.0 @@ -3767,22 +3433,11 @@ snapshots: ignore@7.0.5: {} - immutable@5.1.5: {} + immutable@5.1.5: + optional: true imurmurhash@0.1.4: {} - input-otp@1.4.2(react-dom@19.2.5(react@19.2.5))(react@19.2.5): - dependencies: - react: 19.2.5 - react-dom: 19.2.5(react@19.2.5) - - intl-messageformat@10.7.18: - dependencies: - '@formatjs/ecma402-abstract': 2.3.6 - '@formatjs/fast-memoize': 2.2.7 - '@formatjs/icu-messageformat-parser': 2.11.4 - tslib: 2.8.1 - is-core-module@2.16.1: dependencies: hasown: 2.0.2 @@ -3881,15 +3536,11 @@ snapshots: dependencies: p-locate: 5.0.0 - loose-envify@1.4.0: - dependencies: - js-tokens: 4.0.0 - lru-cache@5.1.1: dependencies: yallist: 3.1.1 - lucide-react@1.8.0(react@19.2.5): + lucide-react@0.469.0(react@19.2.5): dependencies: react: 19.2.5 @@ -3907,6 +3558,14 @@ snapshots: motion-utils@12.36.0: {} + motion@12.38.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5): + dependencies: + framer-motion: 12.38.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) + tslib: 2.8.1 + optionalDependencies: + react: 19.2.5 + react-dom: 19.2.5(react@19.2.5) + ms@2.1.3: {} nanoid@3.3.11: {} @@ -3918,8 +3577,6 @@ snapshots: node-releases@2.0.37: {} - object-assign@4.1.1: {} - obug@2.1.1: {} optionator@0.9.4: @@ -3959,104 +3616,44 @@ snapshots: prelude-ls@1.2.1: {} - prop-types@15.8.1: - dependencies: - loose-envify: 1.4.0 - object-assign: 4.1.1 - react-is: 16.13.1 - punycode@2.3.1: {} - react-aria-components@1.16.0(@react-spectrum/provider@3.11.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(react-dom@19.2.5(react@19.2.5))(react@19.2.5): - dependencies: - '@internationalized/date': 3.12.1 - '@internationalized/string': 3.2.8 - '@react-aria/autocomplete': 3.0.0-rc.6(@react-spectrum/provider@3.11.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@react-aria/collections': 3.1.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@react-aria/dnd': 3.12.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@react-aria/focus': 3.22.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@react-aria/interactions': 3.28.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@react-aria/live-announcer': 3.5.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@react-aria/overlays': 3.32.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@react-aria/ssr': 3.9.10(react@19.2.5) - '@react-aria/textfield': 3.19.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@react-aria/toolbar': 3.0.0-beta.24(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@react-aria/utils': 3.33.1(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@react-aria/virtualizer': 4.2.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@react-stately/autocomplete': 3.0.0-beta.4(react@19.2.5) - '@react-stately/layout': 4.7.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@react-stately/selection': 3.21.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@react-stately/table': 3.16.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@react-stately/utils': 3.11.0(react@19.2.5) - '@react-stately/virtualizer': 4.5.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@react-types/form': 3.8.0(@react-spectrum/provider@3.11.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@react-types/grid': 3.4.0(@react-spectrum/provider@3.11.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@react-types/shared': 3.34.0(react@19.2.5) - '@react-types/table': 3.14.0(@react-spectrum/provider@3.11.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - '@swc/helpers': 0.5.21 - client-only: 0.0.1 - react: 19.2.5 - react-aria: 3.48.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - react-dom: 19.2.5(react@19.2.5) - react-stately: 3.46.0(react@19.2.5) - use-sync-external-store: 1.6.0(react@19.2.5) - transitivePeerDependencies: - - '@react-spectrum/provider' - - react-aria-components@1.17.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5): - dependencies: - '@internationalized/date': 3.12.1 - '@react-types/shared': 3.34.0(react@19.2.5) - '@swc/helpers': 0.5.21 - client-only: 0.0.1 - react: 19.2.5 - react-aria: 3.48.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5) - react-dom: 19.2.5(react@19.2.5) - react-stately: 3.46.0(react@19.2.5) - - react-aria@3.48.0(react-dom@19.2.5(react@19.2.5))(react@19.2.5): - dependencies: - '@internationalized/date': 3.12.1 - '@internationalized/number': 3.6.6 - '@internationalized/string': 3.2.8 - '@react-types/shared': 3.34.0(react@19.2.5) - '@swc/helpers': 0.5.21 - aria-hidden: 1.2.6 - clsx: 2.1.1 - react: 19.2.5 - react-dom: 19.2.5(react@19.2.5) - react-stately: 3.46.0(react@19.2.5) - use-sync-external-store: 1.6.0(react@19.2.5) - react-dom@19.2.5(react@19.2.5): dependencies: react: 19.2.5 scheduler: 0.27.0 - react-is@16.13.1: {} - - react-stately@3.46.0(react@19.2.5): + react-remove-scroll-bar@2.3.8(@types/react@19.2.14)(react@19.2.5): dependencies: - '@internationalized/date': 3.12.1 - '@internationalized/number': 3.6.6 - '@internationalized/string': 3.2.8 - '@react-types/shared': 3.34.0(react@19.2.5) - '@swc/helpers': 0.5.21 react: 19.2.5 - use-sync-external-store: 1.6.0(react@19.2.5) + react-style-singleton: 2.2.3(@types/react@19.2.14)(react@19.2.5) + tslib: 2.8.1 + optionalDependencies: + '@types/react': 19.2.14 - react-transition-group@4.4.5(react-dom@19.2.5(react@19.2.5))(react@19.2.5): + react-remove-scroll@2.7.2(@types/react@19.2.14)(react@19.2.5): dependencies: - '@babel/runtime': 7.29.2 - dom-helpers: 5.2.1 - loose-envify: 1.4.0 - prop-types: 15.8.1 react: 19.2.5 - react-dom: 19.2.5(react@19.2.5) + react-remove-scroll-bar: 2.3.8(@types/react@19.2.14)(react@19.2.5) + react-style-singleton: 2.2.3(@types/react@19.2.14)(react@19.2.5) + tslib: 2.8.1 + use-callback-ref: 1.3.3(@types/react@19.2.14)(react@19.2.5) + use-sidecar: 1.1.3(@types/react@19.2.14)(react@19.2.5) + optionalDependencies: + '@types/react': 19.2.14 + + react-style-singleton@2.2.3(@types/react@19.2.14)(react@19.2.5): + dependencies: + get-nonce: 1.0.1 + react: 19.2.5 + tslib: 2.8.1 + optionalDependencies: + '@types/react': 19.2.14 react@19.2.5: {} - readdirp@4.1.2: {} + readdirp@4.1.2: + optional: true resolve-pkg-maps@1.0.0: {} @@ -4095,6 +3692,7 @@ snapshots: source-map-js: 1.2.1 optionalDependencies: '@parcel/watcher': 2.5.6 + optional: true scheduler@0.27.0: {} @@ -4118,22 +3716,8 @@ snapshots: supports-preserve-symlinks-flag@1.0.0: {} - tailwind-merge@3.4.0: {} - tailwind-merge@3.5.0: {} - tailwind-variants@3.2.2(tailwind-merge@3.4.0)(tailwindcss@4.2.2): - dependencies: - tailwindcss: 4.2.2 - optionalDependencies: - tailwind-merge: 3.4.0 - - tailwind-variants@3.2.2(tailwind-merge@3.5.0)(tailwindcss@4.2.2): - dependencies: - tailwindcss: 4.2.2 - optionalDependencies: - tailwind-merge: 3.5.0 - tailwindcss@4.2.2: {} tapable@2.3.2: {} @@ -4197,9 +3781,20 @@ snapshots: dependencies: punycode: 2.3.1 - use-sync-external-store@1.6.0(react@19.2.5): + use-callback-ref@1.3.3(@types/react@19.2.14)(react@19.2.5): dependencies: react: 19.2.5 + tslib: 2.8.1 + optionalDependencies: + '@types/react': 19.2.14 + + use-sidecar@1.1.3(@types/react@19.2.14)(react@19.2.5): + dependencies: + detect-node-es: 1.1.0 + react: 19.2.5 + tslib: 2.8.1 + optionalDependencies: + '@types/react': 19.2.14 vite-plugin-cp@6.0.3: dependencies: