diff --git a/apps/arc-web/app/app.css b/apps/arc-web/app/app.css index 63818aa80..48ac2dc41 100644 --- a/apps/arc-web/app/app.css +++ b/apps/arc-web/app/app.css @@ -24,17 +24,103 @@ --color-mint: #5AC8A8; --color-amber: #F0A45B; --color-coral: #E86B6B; + + /* ── Semantic tokens (dark defaults) ── */ + --color-page: #0F1729; + --color-panel: #252C3D; + --color-panel-alt: #1a2133; + --color-overlay: rgba(255, 255, 255, 0.04); + --color-overlay-strong: rgba(255, 255, 255, 0.10); + --color-fg: #ffffff; + --color-fg-2: #E8EDF3; + --color-fg-3: #A8B5C5; + --color-fg-muted: #4B5768; + --color-line: rgba(255, 255, 255, 0.06); + --color-line-strong: rgba(255, 255, 255, 0.12); + --color-focus: rgba(103, 178, 215, 0.4); +} + +/* ── Light theme overrides ── */ + +.light { + /* Semantic tokens */ + --color-page: #ffffff; + --color-panel: #f8fafc; + --color-panel-alt: #f1f5f9; + --color-overlay: rgba(0, 0, 0, 0.04); + --color-overlay-strong: rgba(0, 0, 0, 0.10); + --color-fg: #0f172a; + --color-fg-2: #1e293b; + --color-fg-3: #475569; + --color-fg-muted: #94a3b8; + --color-line: rgba(0, 0, 0, 0.08); + --color-line-strong: rgba(0, 0, 0, 0.15); + --color-focus: rgba(14, 116, 144, 0.5); + + /* Accent — darkened for WCAG AA on white */ + --color-mint: #0d9488; + --color-amber: #d97706; + --color-coral: #dc2626; + --color-teal-300: #0891b2; + --color-teal-500: #0e7490; + + /* @pierre/diffs — light surfaces */ + --diffs-bg-buffer-override: #ffffff; + --diffs-bg-context-override: #f8fafc; + --diffs-bg-hover-override: #f1f5f9; + --diffs-bg-separator-override: #e2e8f0; + --diffs-fg-number-override: #94a3b8; + --diffs-addition-color-override: #0d9488; + --diffs-fg-number-addition-override: rgba(13, 148, 136, 0.5); + --diffs-deletion-color-override: #dc2626; + --diffs-fg-number-deletion-override: rgba(220, 38, 38, 0.5); + + /* Chart variables */ + --chart-gridline: rgba(0, 0, 0, 0.06); + --chart-axis-label: rgba(71, 85, 105, 1); +} + +/* ── Chart variables (dark defaults) ── */ + +:root { + --chart-gridline: rgba(255, 255, 255, 0.04); + --chart-axis-label: rgba(75, 87, 104, 1); } /* ── Background atmosphere ── */ .bg-atmosphere { - background-color: var(--color-navy-950); + background-color: var(--color-page); background-image: radial-gradient(ellipse 120% 60% at 15% 5%, rgba(53, 127, 158, 0.12) 0%, transparent 50%), radial-gradient(ellipse 80% 50% at 85% 90%, rgba(90, 200, 168, 0.07) 0%, transparent 45%); background-attachment: fixed; } + +.light .bg-atmosphere, +.light.bg-atmosphere { + background-image: + radial-gradient(ellipse 120% 60% at 15% 5%, rgba(14, 116, 144, 0.06) 0%, transparent 50%), + radial-gradient(ellipse 80% 50% at 85% 90%, rgba(13, 148, 136, 0.04) 0%, transparent 45%); +} + +.bg-atmosphere::before { + content: ""; + position: fixed; + inset: 0; + z-index: 1; + pointer-events: none; + opacity: 0.07; + background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); + background-repeat: repeat; + background-size: 200px 200px; +} + +.light .bg-atmosphere::before, +.light.bg-atmosphere::before { + opacity: 0.03; +} + /* ── @pierre/diffs brand overrides ── */ :root { @@ -60,15 +146,3 @@ --diffs-deletion-color-override: #E86B6B; --diffs-fg-number-deletion-override: rgba(232, 107, 107, 0.5); } - -.bg-atmosphere::before { - content: ""; - position: fixed; - inset: 0; - z-index: 1; - pointer-events: none; - opacity: 0.07; - background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); - background-repeat: repeat; - background-size: 200px 200px; -} diff --git a/apps/arc-web/app/components/collapsible-file.tsx b/apps/arc-web/app/components/collapsible-file.tsx index d3b293591..453e9a99d 100644 --- a/apps/arc-web/app/components/collapsible-file.tsx +++ b/apps/arc-web/app/components/collapsible-file.tsx @@ -2,6 +2,7 @@ import { useState } from "react"; import { ChevronRightIcon } from "@heroicons/react/20/solid"; import type { FileContents } from "@pierre/diffs"; import { File } from "@pierre/diffs/react"; +import { useTheme } from "../lib/theme"; export function CollapsibleFile({ file, @@ -11,32 +12,33 @@ export function CollapsibleFile({ defaultOpen?: boolean; }) { const [open, setOpen] = useState(defaultOpen); + const { theme } = useTheme(); const lines = file.contents.split("\n"); const lineCount = lines.length; const loc = lines.filter((l) => l.trim().length > 0).length; return ( -
| {col} | @@ -276,7 +276,7 @@ function ResultTable({ result }: { result: QueryResult }) { {result.rows.map((row, i) => (
|---|
|
{isNum ? formatNumber(val) : String(val)}
@@ -344,11 +344,11 @@ function SqlEditor({
};
return (
-
+
{/* Line numbers */}
@@ -441,11 +441,11 @@ export default function InsightsEditor() {
}
}}
placeholder="Untitled query"
- className="min-w-0 max-w-xs rounded border border-teal-500/40 bg-navy-950/60 px-2 py-0.5 text-sm font-medium text-ice-100 placeholder-navy-600 outline-none"
+ className="min-w-0 max-w-xs rounded border border-focus bg-page/60 px-2 py-0.5 text-sm font-medium text-fg-2 placeholder-fg-muted outline-none"
/>
) : (
-
+
{queryName || "Untitled query"}
@@ -468,7 +468,7 @@ export default function InsightsEditor() {
|