Skip to content
TypeScript

fix(mobile): align built-in theme colors with desktop (#12534)

Julius Marminge0f1b572b9865
diff --git a/apps/mobile/clerk-theme.json b/apps/mobile/clerk-theme.json
index 119927a04d6..f854f52a0d4 100644
--- a/apps/mobile/clerk-theme.json
+++ b/apps/mobile/clerk-theme.json
@@ -1,36 +1,36 @@
{
"colors": {
- "primary": "#262626",
- "background": "#F2F2F7",
- "input": "#FFFFFF",
- "danger": "#DC2626",
+ "primary": "#1b4ed8",
+ "background": "#fcfcfc",
+ "input": "#ffffff",
+ "danger": "#c10007",
"success": "#059669",
- "warning": "#D97706",
- "foreground": "#262626",
- "mutedForeground": "#737373",
- "primaryForeground": "#FFFFFF",
- "inputForeground": "#262626",
- "neutral": "#F5F5F5",
- "border": "#E5E5EA",
- "ring": "#A3A3A3",
- "muted": "#F2F2F7",
+ "warning": "#bb4d00",
+ "foreground": "#27272a",
+ "mutedForeground": "#71717b",
+ "primaryForeground": "#ffffff",
+ "inputForeground": "#27272a",
+ "neutral": "#fafafa",
+ "border": "#e4e4e7",
+ "ring": "#1b4ed8",
+ "muted": "#fafafa",
"shadow": "#000000"
},
"darkColors": {
- "primary": "#F5F5F5",
- "background": "#0E0E0E",
- "input": "#171717",
- "danger": "#FCA5A5",
- "success": "#34D399",
- "warning": "#FBBF24",
- "foreground": "#F5F5F5",
- "mutedForeground": "#A3A3A3",
- "primaryForeground": "#0A0A0A",
- "inputForeground": "#F5F5F5",
- "neutral": "#1C1C1C",
- "border": "#2A2A2A",
- "ring": "#525252",
- "muted": "#0E0E0E",
+ "primary": "#346bf1",
+ "background": "#0a0a0a",
+ "input": "#111111",
+ "danger": "#ff6467",
+ "success": "#34d399",
+ "warning": "#ffb900",
+ "foreground": "#f5f5f5",
+ "mutedForeground": "#818181",
+ "primaryForeground": "#ffffff",
+ "inputForeground": "#f5f5f5",
+ "neutral": "#111111",
+ "border": "#191919",
+ "ring": "#346bf1",
+ "muted": "#111111",
"shadow": "#000000"
},
"design": {
diff --git a/apps/mobile/generated-uniwind-default-theme-variables.json b/apps/mobile/generated-uniwind-default-theme-variables.json
index 02430b86aae..961a0df24cd 100644
--- a/apps/mobile/generated-uniwind-default-theme-variables.json
+++ b/apps/mobile/generated-uniwind-default-theme-variables.json
@@ -1,156 +1,180 @@
{
"light": {
- "--color-screen": "#f2f2f7",
- "--color-sheet": "rgba(242, 242, 247, 0.98)",
- "--color-sheet-solid": "#f2f2f7",
+ "--color-screen": "#fcfcfc",
+ "--color-sheet": "rgba(252, 252, 252, 0.98)",
+ "--color-sheet-solid": "#fcfcfc",
"--color-card": "#ffffff",
- "--color-card-alt": "#f5f5f5",
+ "--color-grouped-card": "#f4f4f5",
+ "--color-card-alt": "#fcfcfc",
"--color-card-translucent": "rgba(255, 255, 255, 0.8)",
- "--color-thread-canvas": "#f5f5f5",
+ "--color-thread-canvas": "#fcfcfc",
"--color-thread-selected": "#ffffff",
- "--color-thread-selected-foreground": "#262626",
- "--color-thread-selected-foreground-muted": "#737373",
- "--color-composer-panel": "rgba(245, 245, 245, 0.88)",
- "--color-composer-surface": "rgba(255, 255, 255, 0.94)",
- "--color-composer-border": "rgba(0, 0, 0, 0.1)",
- "--color-foreground": "#262626",
- "--color-foreground-secondary": "#525252",
- "--color-foreground-muted": "#737373",
- "--color-foreground-tertiary": "#8e8e93",
- "--color-border": "rgba(0, 0, 0, 0.08)",
- "--color-border-subtle": "rgba(0, 0, 0, 0.06)",
- "--color-separator": "rgba(0, 0, 0, 0.04)",
- "--color-subtle": "rgba(0, 0, 0, 0.04)",
- "--color-subtle-strong": "rgba(0, 0, 0, 0.08)",
- "--color-inline-skill-background": "rgba(217, 70, 239, 0.12)",
- "--color-inline-skill-border": "rgba(217, 70, 239, 0.25)",
- "--color-inline-skill-foreground": "#a21caf",
- "--color-primary": "#262626",
+ "--color-thread-selected-foreground": "#27272a",
+ "--color-thread-selected-foreground-muted": "#71717b",
+ "--color-thread-hover": "#fcfcfc",
+ "--color-row-hover": "#f4f4f5",
+ "--color-composer-panel": "rgba(252, 252, 252, 0.88)",
+ "--color-composer-surface": "rgba(244, 244, 245, 0.94)",
+ "--color-composer-border": "rgba(228, 228, 231, 0.8)",
+ "--color-foreground": "#27272a",
+ "--color-foreground-secondary": "#6f6f79",
+ "--color-foreground-muted": "#6f6f79",
+ "--color-foreground-tertiary": "#71717b",
+ "--color-border": "#e4e4e7",
+ "--color-focus": "#1b4ed8",
+ "--color-border-subtle": "rgba(228, 228, 231, 0.7)",
+ "--color-separator": "rgba(228, 228, 231, 0.55)",
+ "--color-subtle": "#fafafa",
+ "--color-subtle-strong": "#fafafa",
+ "--color-inline-skill-background": "#f4f4f5",
+ "--color-inline-skill-border": "rgba(27, 78, 216, 0.42)",
+ "--color-inline-skill-foreground": "#18181b",
+ "--color-primary": "#1b4ed8",
"--color-primary-foreground": "#ffffff",
+ "--color-primary-text": "#1b4ed8",
"--color-primary-shadow": "#000000",
- "--color-secondary": "#ffffff",
- "--color-secondary-foreground": "#262626",
- "--color-secondary-border": "rgba(0, 0, 0, 0.08)",
- "--color-switch-active-track": "#34c759",
+ "--color-secondary": "#fafafa",
+ "--color-secondary-foreground": "#27272a",
+ "--color-secondary-border": "#e4e4e7",
+ "--color-switch-active-track": "#1b4ed8",
"--color-switch-active-thumb": "#ffffff",
- "--color-switch-inactive-track": "rgba(0, 0, 0, 0.08)",
- "--color-switch-inactive-thumb": "#8e8e93",
- "--color-warning": "#fffbeb",
- "--color-warning-border": "#fde68a",
- "--color-warning-foreground": "#b45309",
- "--color-danger": "#fef2f2",
- "--color-danger-border": "rgba(239, 68, 68, 0.12)",
- "--color-danger-foreground": "#dc2626",
+ "--color-switch-inactive-track": "#fafafa",
+ "--color-switch-inactive-thumb": "#71717b",
+ "--color-warning": "#fcf4e8",
+ "--color-warning-border": "rgba(254, 154, 0, 0.32)",
+ "--color-warning-foreground": "#bb4d00",
+ "--color-danger": "#fcebec",
+ "--color-danger-border": "rgba(251, 44, 54, 0.32)",
+ "--color-danger-foreground": "#c10007",
+ "--color-update": "#e0e6f7",
+ "--color-update-foreground": "#1b4ed8",
"--color-input": "#ffffff",
- "--color-input-border": "rgba(0, 0, 0, 0.1)",
- "--color-sidebar-search": "rgba(118, 118, 128, 0.12)",
- "--color-placeholder": "#737373",
- "--color-icon": "#262626",
- "--color-icon-muted": "#525252",
- "--color-icon-subtle": "#a3a3a3",
- "--color-header": "rgba(255, 255, 255, 0.97)",
- "--color-header-border": "rgba(0, 0, 0, 0.06)",
- "--color-glass-surface": "rgba(255, 255, 255, 0.72)",
- "--color-glass-tint": "rgba(255, 255, 255, 0.18)",
- "--color-status-bar": "#f2f2f7",
- "--color-md-body": "#111111",
- "--color-md-strong": "#000000",
- "--color-md-link": "#2563eb",
- "--color-md-blockquote-border": "rgba(0, 0, 0, 0.08)",
- "--color-md-blockquote-bg": "rgba(0, 0, 0, 0.02)",
- "--color-md-code-bg": "rgba(0, 0, 0, 0.04)",
- "--color-md-code-text": "#262626",
- "--color-md-user-code-bg": "rgba(0, 0, 0, 0.04)",
- "--color-md-user-code-text": "#262626",
- "--color-md-user-fence-bg": "rgba(0, 0, 0, 0.06)",
- "--color-md-user-fence-text": "#262626",
- "--color-md-hr": "rgba(0, 0, 0, 0.08)",
- "--color-user-bubble": "#ffffff",
- "--color-user-bubble-foreground": "#262626",
- "--color-user-bubble-foreground-muted": "rgba(38, 38, 38, 0.78)",
- "--color-user-bubble-skill-foreground": "#2563eb",
+ "--color-input-border": "#d4d4d8",
+ "--color-sidebar-search": "#f4f4f5",
+ "--color-placeholder": "#6f6f79",
+ "--color-icon": "#27272a",
+ "--color-icon-muted": "#71717b",
+ "--color-icon-subtle": "#71717b",
+ "--color-header": "rgba(252, 252, 252, 0.97)",
+ "--color-header-foreground": "#27272a",
+ "--color-header-border": "#e4e4e7",
+ "--color-glass-surface": "rgba(255, 255, 255, 0.74)",
+ "--color-glass-fallback": "rgba(244, 244, 245, 0.94)",
+ "--color-glass-tint": "rgba(255, 255, 255, 0.22)",
+ "--color-status-bar": "#fcfcfc",
+ "--color-md-body": "#27272a",
+ "--color-md-strong": "#27272a",
+ "--color-md-link": "#1b4ed8",
+ "--color-md-blockquote-border": "#e4e4e7",
+ "--color-md-blockquote-bg": "#fafafa",
+ "--color-md-code-bg": "#ffffff",
+ "--color-md-code-text": "#27272a",
+ "--color-md-user-code-bg": "rgba(39, 39, 42, 0.18)",
+ "--color-md-user-code-text": "#27272a",
+ "--color-md-user-fence-bg": "rgba(0, 0, 0, 0.16)",
+ "--color-md-user-fence-text": "#27272a",
+ "--color-md-hr": "#e4e4e7",
+ "--color-user-bubble": "#efeff1",
+ "--color-user-bubble-foreground": "#27272a",
+ "--color-user-bubble-foreground-muted": "rgba(39, 39, 42, 0.78)",
+ "--color-user-bubble-skill-foreground": "#1b4ed8",
"--color-backdrop": "rgba(0, 0, 0, 0.22)",
- "--color-drawer": "rgba(255, 255, 255, 0.99)",
+ "--color-drawer": "#fafafa",
+ "--color-drawer-foreground": "#27272a",
+ "--color-drawer-foreground-muted": "#71717b",
+ "--color-drawer-border": "#e4e4e7",
"--color-drawer-shadow": "rgba(0, 0, 0, 0.12)",
- "--color-dot-separator": "rgba(0, 0, 0, 0.2)",
- "--color-wordmark": "#262626",
- "--color-chevron": "rgba(0, 0, 0, 0.2)"
+ "--color-dot-separator": "rgba(113, 113, 123, 0.35)",
+ "--color-wordmark": "#27272a",
+ "--color-chevron": "rgba(113, 113, 123, 0.42)"
},
"dark": {
"--color-screen": "#0a0a0a",
- "--color-sheet": "rgba(14, 14, 14, 0.98)",
- "--color-sheet-solid": "#0e0e0e",
- "--color-card": "#171717",
- "--color-card-alt": "#1c1c1c",
+ "--color-sheet": "rgba(10, 10, 10, 0.98)",
+ "--color-sheet-solid": "#0a0a0a",
+ "--color-card": "#111111",
+ "--color-grouped-card": "#1a1b1b",
+ "--color-card-alt": "#111111",
"--color-card-translucent": "rgba(17, 17, 17, 0.8)",
- "--color-thread-canvas": "#1c1c1c",
- "--color-thread-selected": "#171717",
- "--color-thread-selected-foreground": "#f5f5f5",
- "--color-thread-selected-foreground-muted": "#8e8e93",
- "--color-composer-panel": "rgba(28, 28, 28, 0.92)",
- "--color-composer-surface": "rgba(23, 23, 23, 0.9)",
- "--color-composer-border": "rgba(255, 255, 255, 0.08)",
+ "--color-thread-canvas": "#0a0a0a",
+ "--color-thread-selected": "#1a1b1b",
+ "--color-thread-selected-foreground": "#f1f3f7",
+ "--color-thread-selected-foreground-muted": "#a3a3a3",
+ "--color-thread-hover": "#131313",
+ "--color-row-hover": "#141414",
+ "--color-composer-panel": "rgba(10, 10, 10, 0.92)",
+ "--color-composer-surface": "rgba(26, 27, 27, 0.9)",
+ "--color-composer-border": "rgba(25, 25, 25, 0.8)",
"--color-foreground": "#f5f5f5",
- "--color-foreground-secondary": "#a3a3a3",
- "--color-foreground-muted": "#8e8e93",
- "--color-foreground-tertiary": "#636366",
- "--color-border": "rgba(255, 255, 255, 0.06)",
- "--color-border-subtle": "rgba(255, 255, 255, 0.04)",
- "--color-separator": "rgba(255, 255, 255, 0.03)",
- "--color-subtle": "rgba(255, 255, 255, 0.04)",
- "--color-subtle-strong": "rgba(255, 255, 255, 0.08)",
- "--color-inline-skill-background": "rgba(217, 70, 239, 0.12)",
- "--color-inline-skill-border": "rgba(217, 70, 239, 0.25)",
- "--color-inline-skill-foreground": "#f0abfc",
- "--color-primary": "#f5f5f5",
- "--color-primary-foreground": "#0a0a0a",
+ "--color-foreground-secondary": "#838383",
+ "--color-foreground-muted": "#838383",
+ "--color-foreground-tertiary": "#818181",
+ "--color-border": "#191919",
+ "--color-focus": "#346bf1",
+ "--color-border-subtle": "rgba(25, 25, 25, 0.7)",
+ "--color-separator": "rgba(25, 25, 25, 0.55)",
+ "--color-subtle": "#111111",
+ "--color-subtle-strong": "#111111",
+ "--color-inline-skill-background": "#141414",
+ "--color-inline-skill-border": "rgba(52, 107, 241, 0.42)",
+ "--color-inline-skill-foreground": "#f5f5f5",
+ "--color-primary": "#346bf1",
+ "--color-primary-foreground": "#ffffff",
+ "--color-primary-text": "#4b7cf3",
"--color-primary-shadow": "#000000",
- "--color-secondary": "rgba(255, 255, 255, 0.04)",
+ "--color-secondary": "#111111",
"--color-secondary-foreground": "#f5f5f5",
- "--color-secondary-border": "rgba(255, 255, 255, 0.06)",
- "--color-switch-active-track": "#30d158",
+ "--color-secondary-border": "#191919",
+ "--color-switch-active-track": "#346bf1",
"--color-switch-active-thumb": "#ffffff",
- "--color-switch-inactive-track": "rgba(255, 255, 255, 0.06)",
- "--color-switch-inactive-thumb": "#8e8e93",
- "--color-warning": "rgba(69, 26, 3, 0.4)",
- "--color-warning-border": "rgba(120, 53, 15, 0.6)",
- "--color-warning-foreground": "#fcd34d",
- "--color-danger": "rgba(239, 68, 68, 0.14)",
- "--color-danger-border": "rgba(248, 113, 113, 0.18)",
- "--color-danger-foreground": "#fca5a5",
- "--color-input": "#141414",
- "--color-input-border": "rgba(255, 255, 255, 0.08)",
- "--color-sidebar-search": "rgba(118, 118, 128, 0.24)",
- "--color-placeholder": "#8e8e93",
+ "--color-switch-inactive-track": "#111111",
+ "--color-switch-inactive-thumb": "#818181",
+ "--color-warning": "#312108",
+ "--color-warning-border": "rgba(254, 154, 0, 0.32)",
+ "--color-warning-foreground": "#ffb900",
+ "--color-danger": "#301214",
+ "--color-danger-border": "rgba(251, 65, 74, 0.32)",
+ "--color-danger-foreground": "#ff6467",
+ "--color-update": "#121b34",
+ "--color-update-foreground": "#51a2ff",
+ "--color-input": "#111111",
+ "--color-input-border": "#1e1e1e",
+ "--color-sidebar-search": "#0a0a0a",
+ "--color-placeholder": "#838383",
"--color-icon": "#f5f5f5",
- "--color-icon-muted": "#a3a3a3",
- "--color-icon-subtle": "#8e8e93",
+ "--color-icon-muted": "#818181",
+ "--color-icon-subtle": "#818181",
"--color-header": "rgba(10, 10, 10, 0.97)",
- "--color-header-border": "rgba(255, 255, 255, 0.06)",
- "--color-glass-surface": "rgba(23, 23, 23, 0.78)",
- "--color-glass-tint": "rgba(23, 23, 23, 0.24)",
+ "--color-header-foreground": "#f5f5f5",
+ "--color-header-border": "#191919",
+ "--color-glass-surface": "rgba(17, 17, 17, 0.74)",
+ "--color-glass-fallback": "rgba(26, 27, 27, 0.9)",
+ "--color-glass-tint": "rgba(17, 17, 17, 0.22)",
"--color-status-bar": "#0a0a0a",
- "--color-md-body": "#e5e5e5",
+ "--color-md-body": "#f5f5f5",
"--color-md-strong": "#f5f5f5",
- "--color-md-link": "#60a5fa",
- "--color-md-blockquote-border": "rgba(255, 255, 255, 0.1)",
- "--color-md-blockquote-bg": "rgba(255, 255, 255, 0.03)",
- "--color-md-code-bg": "rgba(255, 255, 255, 0.06)",
- "--color-md-code-text": "#e5e5e5",
- "--color-md-user-code-bg": "rgba(255, 255, 255, 0.06)",
- "--color-md-user-code-text": "#e5e5e5",
- "--color-md-user-fence-bg": "rgba(255, 255, 255, 0.09)",
- "--color-md-user-fence-text": "#e5e5e5",
- "--color-md-hr": "rgba(255, 255, 255, 0.08)",
- "--color-user-bubble": "#171717",
+ "--color-md-link": "#3b70f1",
+ "--color-md-blockquote-border": "#191919",
+ "--color-md-blockquote-bg": "#111111",
+ "--color-md-code-bg": "#111111",
+ "--color-md-code-text": "#f5f5f5",
+ "--color-md-user-code-bg": "rgba(245, 245, 245, 0.18)",
+ "--color-md-user-code-text": "#f5f5f5",
+ "--color-md-user-fence-bg": "rgba(0, 0, 0, 0.28)",
+ "--color-md-user-fence-text": "#f5f5f5",
+ "--color-md-hr": "#191919",
+ "--color-user-bubble": "#161616",
"--color-user-bubble-foreground": "#f5f5f5",
"--color-user-bubble-foreground-muted": "rgba(245, 245, 245, 0.78)",
- "--color-user-bubble-skill-foreground": "#60a5fa",
+ "--color-user-bubble-skill-foreground": "#4678f2",
"--color-backdrop": "rgba(0, 0, 0, 0.48)",
- "--color-drawer": "rgba(14, 14, 14, 0.99)",
+ "--color-drawer": "#000000",
+ "--color-drawer-foreground": "#f1f3f7",
+ "--color-drawer-foreground-muted": "#a3a3a3",
+ "--color-drawer-border": "#141414",
"--color-drawer-shadow": "rgba(0, 0, 0, 0.32)",
- "--color-dot-separator": "rgba(255, 255, 255, 0.2)",
+ "--color-dot-separator": "rgba(129, 129, 129, 0.35)",
"--color-wordmark": "#f5f5f5",
- "--color-chevron": "rgba(255, 255, 255, 0.2)"
+ "--color-chevron": "rgba(129, 129, 129, 0.42)"
}
}
diff --git a/apps/mobile/generated-uniwind-themes.css b/apps/mobile/generated-uniwind-themes.css
index 84c445cf1cb..2a1ce362930 100644
--- a/apps/mobile/generated-uniwind-themes.css
+++ b/apps/mobile/generated-uniwind-themes.css
@@ -2,6 +2,93 @@
@layer theme {
:root {
@variant light {
+ --color-screen: #fcfcfc;
+ --color-sheet: rgba(252, 252, 252, 0.98);
+ --color-sheet-solid: #fcfcfc;
+ --color-card: #ffffff;
+ --color-grouped-card: #f4f4f5;
+ --color-card-alt: #fcfcfc;
+ --color-card-translucent: rgba(255, 255, 255, 0.8);
+ --color-thread-canvas: #fcfcfc;
+ --color-thread-selected: #ffffff;
+ --color-thread-selected-foreground: #27272a;
+ --color-thread-selected-foreground-muted: #71717b;
+ --color-thread-hover: #fcfcfc;
+ --color-row-hover: #f4f4f5;
+ --color-composer-panel: rgba(252, 252, 252, 0.88);
+ --color-composer-surface: rgba(244, 244, 245, 0.94);
+ --color-composer-border: rgba(228, 228, 231, 0.8);
+ --color-foreground: #27272a;
+ --color-foreground-secondary: #6f6f79;
+ --color-foreground-muted: #6f6f79;
+ --color-foreground-tertiary: #71717b;
+ --color-border: #e4e4e7;
+ --color-focus: #1b4ed8;
+ --color-border-subtle: rgba(228, 228, 231, 0.7);
+ --color-separator: rgba(228, 228, 231, 0.55);
+ --color-subtle: #fafafa;
+ --color-subtle-strong: #fafafa;
+ --color-inline-skill-background: #f4f4f5;
+ --color-inline-skill-border: rgba(27, 78, 216, 0.42);
+ --color-inline-skill-foreground: #18181b;
+ --color-primary: #1b4ed8;
+ --color-primary-foreground: #ffffff;
+ --color-primary-text: #1b4ed8;
+ --color-primary-shadow: #000000;
+ --color-secondary: #fafafa;
+ --color-secondary-foreground: #27272a;
+ --color-secondary-border: #e4e4e7;
+ --color-switch-active-track: #1b4ed8;
+ --color-switch-active-thumb: #ffffff;
+ --color-switch-inactive-track: #fafafa;
+ --color-switch-inactive-thumb: #71717b;
+ --color-warning: #fcf4e8;
+ --color-warning-border: rgba(254, 154, 0, 0.32);
+ --color-warning-foreground: #bb4d00;
+ --color-danger: #fcebec;
+ --color-danger-border: rgba(251, 44, 54, 0.32);
+ --color-danger-foreground: #c10007;
+ --color-update: #e0e6f7;
+ --color-update-foreground: #1b4ed8;
+ --color-input: #ffffff;
+ --color-input-border: #d4d4d8;
+ --color-sidebar-search: #f4f4f5;
+ --color-placeholder: #6f6f79;
+ --color-icon: #27272a;
+ --color-icon-muted: #71717b;
+ --color-icon-subtle: #71717b;
+ --color-header: rgba(252, 252, 252, 0.97);
+ --color-header-foreground: #27272a;
+ --color-header-border: #e4e4e7;
+ --color-glass-surface: rgba(255, 255, 255, 0.74);
+ --color-glass-fallback: rgba(244, 244, 245, 0.94);
+ --color-glass-tint: rgba(255, 255, 255, 0.22);
+ --color-status-bar: #fcfcfc;
+ --color-md-body: #27272a;
+ --color-md-strong: #27272a;
+ --color-md-link: #1b4ed8;
+ --color-md-blockquote-border: #e4e4e7;
+ --color-md-blockquote-bg: #fafafa;
+ --color-md-code-bg: #ffffff;
+ --color-md-code-text: #27272a;
+ --color-md-user-code-bg: rgba(39, 39, 42, 0.18);
+ --color-md-user-code-text: #27272a;
+ --color-md-user-fence-bg: rgba(0, 0, 0, 0.16);
+ --color-md-user-fence-text: #27272a;
+ --color-md-hr: #e4e4e7;
+ --color-user-bubble: #efeff1;
+ --color-user-bubble-foreground: #27272a;
+ --color-user-bubble-foreground-muted: rgba(39, 39, 42, 0.78);
+ --color-user-bubble-skill-foreground: #1b4ed8;
+ --color-backdrop: rgba(0, 0, 0, 0.22);
+ --color-drawer: #fafafa;
+ --color-drawer-foreground: #27272a;
+ --color-drawer-foreground-muted: #71717b;
+ --color-drawer-border: #e4e4e7;
+ --color-drawer-shadow: rgba(0, 0, 0, 0.12);
+ --color-dot-separator: rgba(113, 113, 123, 0.35);
+ --color-wordmark: #27272a;
+ --color-chevron: rgba(113, 113, 123, 0.42);
--color-adaptive-amber-50-950-a40: oklch(98.7% 0.022 95.277);
--color-adaptive-amber-200-900-a60: oklch(92.4% 0.12 95.746);
--color-adaptive-amber-500-a12-a16: oklch(76.9% 0.188 70.08 / 12%);
@@ -59,14 +146,101 @@
--color-adaptive-zinc-500-a12-a16: oklch(55.2% 0.016 285.938 / 12%);
--color-adaptive-zinc-500-400: oklch(55.2% 0.016 285.938);
--color-adaptive-zinc-600-300: oklch(44.2% 0.017 285.786);
- --color-clerk-page: #f2f2f7;
- --color-clerk-foreground: #262626;
- --color-clerk-foreground-muted: #737373;
- --color-clerk-border: rgba(229, 229, 234, 0.06);
- --color-clerk-danger: #dc2626;
+ --color-clerk-page: #fcfcfc;
+ --color-clerk-foreground: #27272a;
+ --color-clerk-foreground-muted: #71717b;
+ --color-clerk-border: #e4e4e7;
+ --color-clerk-danger: #c10007;
}
@variant dark {
+ --color-screen: #0a0a0a;
+ --color-sheet: rgba(10, 10, 10, 0.98);
+ --color-sheet-solid: #0a0a0a;
+ --color-card: #111111;
+ --color-grouped-card: #1a1b1b;
+ --color-card-alt: #111111;
+ --color-card-translucent: rgba(17, 17, 17, 0.8);
+ --color-thread-canvas: #0a0a0a;
+ --color-thread-selected: #1a1b1b;
+ --color-thread-selected-foreground: #f1f3f7;
+ --color-thread-selected-foreground-muted: #a3a3a3;
+ --color-thread-hover: #131313;
+ --color-row-hover: #141414;
+ --color-composer-panel: rgba(10, 10, 10, 0.92);
+ --color-composer-surface: rgba(26, 27, 27, 0.9);
+ --color-composer-border: rgba(25, 25, 25, 0.8);
+ --color-foreground: #f5f5f5;
+ --color-foreground-secondary: #838383;
+ --color-foreground-muted: #838383;
+ --color-foreground-tertiary: #818181;
+ --color-border: #191919;
+ --color-focus: #346bf1;
+ --color-border-subtle: rgba(25, 25, 25, 0.7);
+ --color-separator: rgba(25, 25, 25, 0.55);
+ --color-subtle: #111111;
+ --color-subtle-strong: #111111;
+ --color-inline-skill-background: #141414;
+ --color-inline-skill-border: rgba(52, 107, 241, 0.42);
+ --color-inline-skill-foreground: #f5f5f5;
+ --color-primary: #346bf1;
+ --color-primary-foreground: #ffffff;
+ --color-primary-text: #4b7cf3;
+ --color-primary-shadow: #000000;
+ --color-secondary: #111111;
+ --color-secondary-foreground: #f5f5f5;
+ --color-secondary-border: #191919;
+ --color-switch-active-track: #346bf1;
+ --color-switch-active-thumb: #ffffff;
+ --color-switch-inactive-track: #111111;
+ --color-switch-inactive-thumb: #818181;
+ --color-warning: #312108;
+ --color-warning-border: rgba(254, 154, 0, 0.32);
+ --color-warning-foreground: #ffb900;
+ --color-danger: #301214;
+ --color-danger-border: rgba(251, 65, 74, 0.32);
+ --color-danger-foreground: #ff6467;
+ --color-update: #121b34;
+ --color-update-foreground: #51a2ff;
+ --color-input: #111111;
+ --color-input-border: #1e1e1e;
+ --color-sidebar-search: #0a0a0a;
+ --color-placeholder: #838383;
+ --color-icon: #f5f5f5;
+ --color-icon-muted: #818181;
+ --color-icon-subtle: #818181;
+ --color-header: rgba(10, 10, 10, 0.97);
+ --color-header-foreground: #f5f5f5;
+ --color-header-border: #191919;
+ --color-glass-surface: rgba(17, 17, 17, 0.74);
+ --color-glass-fallback: rgba(26, 27, 27, 0.9);
+ --color-glass-tint: rgba(17, 17, 17, 0.22);
+ --color-status-bar: #0a0a0a;
+ --color-md-body: #f5f5f5;
+ --color-md-strong: #f5f5f5;
+ --color-md-link: #3b70f1;
+ --color-md-blockquote-border: #191919;
+ --color-md-blockquote-bg: #111111;
+ --color-md-code-bg: #111111;
+ --color-md-code-text: #f5f5f5;
+ --color-md-user-code-bg: rgba(245, 245, 245, 0.18);
+ --color-md-user-code-text: #f5f5f5;
+ --color-md-user-fence-bg: rgba(0, 0, 0, 0.28);
+ --color-md-user-fence-text: #f5f5f5;
+ --color-md-hr: #191919;
+ --color-user-bubble: #161616;
+ --color-user-bubble-foreground: #f5f5f5;
+ --color-user-bubble-foreground-muted: rgba(245, 245, 245, 0.78);
+ --color-user-bubble-skill-foreground: #4678f2;
+ --color-backdrop: rgba(0, 0, 0, 0.48);
+ --color-drawer: #000000;
+ --color-drawer-foreground: #f1f3f7;
+ --color-drawer-foreground-muted: #a3a3a3;
+ --color-drawer-border: #141414;
+ --color-drawer-shadow: rgba(0, 0, 0, 0.32);
+ --color-dot-separator: rgba(129, 129, 129, 0.35);
+ --color-wordmark: #f5f5f5;
+ --color-chevron: rgba(129, 129, 129, 0.42);
--color-adaptive-amber-50-950-a40: oklch(27.9% 0.077 45.635 / 40%);
--color-adaptive-amber-200-900-a60: oklch(41.4% 0.112 45.904 / 60%);
--color-adaptive-amber-500-a12-a16: oklch(76.9% 0.188 70.08 / 16%);
@@ -124,32 +298,36 @@
--color-adaptive-zinc-500-a12-a16: oklch(55.2% 0.016 285.938 / 16%);
--color-adaptive-zinc-500-400: oklch(70.5% 0.015 286.067);
--color-adaptive-zinc-600-300: oklch(87.1% 0.006 286.286);
- --color-clerk-page: #0e0e0e;
+ --color-clerk-page: #0a0a0a;
--color-clerk-foreground: #f5f5f5;
- --color-clerk-foreground-muted: #a3a3a3;
- --color-clerk-border: rgba(42, 42, 42, 0.06);
- --color-clerk-danger: #fca5a5;
+ --color-clerk-foreground-muted: #818181;
+ --color-clerk-border: #191919;
+ --color-clerk-danger: #ff6467;
}
@variant t3-chat-light {
--color-screen: #fdf7fd;
--color-sheet: rgba(253, 247, 253, 0.98);
--color-sheet-solid: #fdf7fd;
- --color-card: #fdfafd;
- --color-card-alt: #faf3fb;
- --color-card-translucent: rgba(253, 250, 253, 0.8);
- --color-thread-canvas: #faf3fb;
- --color-thread-selected: #fdfafd;
- --color-thread-selected-foreground: #501854;
+ --color-card: #faf3fb;
+ --color-grouped-card: #faf3fb;
+ --color-card-alt: #fdfafd;
+ --color-card-translucent: rgba(250, 243, 251, 0.8);
+ --color-thread-canvas: #fdf7fd;
+ --color-thread-selected: #f8f8f7;
+ --color-thread-selected-foreground: #454554;
--color-thread-selected-foreground-muted: #ac1668;
- --color-composer-panel: rgba(250, 243, 251, 0.88);
- --color-composer-surface: rgba(253, 250, 253, 0.94);
+ --color-thread-hover: #f8f8f7;
+ --color-row-hover: #eccfe3;
+ --color-composer-panel: rgba(253, 247, 253, 0.88);
+ --color-composer-surface: rgba(250, 243, 251, 0.94);
--color-composer-border: rgba(238, 225, 237, 0.54);
--color-foreground: #501854;
--color-foreground-secondary: #ac1668;
--color-foreground-muted: #8d1255;
--color-foreground-tertiary: #ac1668;
--color-border: #eee1ed;
+ --color-focus: #db2777;
--color-border-subtle: rgba(238, 225, 237, 0.7);
--color-separator: rgba(238, 225, 237, 0.55);
--color-subtle: #eaa7cb;
@@ -159,6 +337,7 @@
--color-inline-skill-foreground: #454554;
--color-primary: #db2777;
--color-primary-foreground: #ffffff;
+ --color-primary-text: #d32572;
--color-primary-shadow: #000000;
--color-secondary: #f1c4e6;
--color-secondary-foreground: #77347c;
@@ -173,7 +352,9 @@
--color-danger: #fde4f1;
--color-danger-border: rgba(247, 8, 108, 0.32);
--color-danger-foreground: #9d174d;
- --color-input: #fdfafd;
+ --color-update: #fadfef;
+ --color-update-foreground: #ac1668;
+ --color-input: #faf3fb;
--color-input-border: #e7c1dc;
--color-sidebar-search: #f8f8f7;
--color-placeholder: #8b5f90;
@@ -181,13 +362,15 @@
--color-icon-muted: #ac1668;
--color-icon-subtle: #ac1668;
--color-header: rgba(253, 247, 253, 0.97);
+ --color-header-foreground: #501854;
--color-header-border: #efbdeb;
--color-glass-surface: rgba(255, 255, 255, 0.74);
+ --color-glass-fallback: rgba(250, 243, 251, 0.94);
--color-glass-tint: rgba(255, 255, 255, 0.22);
--color-status-bar: #fdf7fd;
--color-md-body: #501854;
--color-md-strong: #501854;
- --color-md-link: #db2777;
+ --color-md-link: #d62675;
--color-md-blockquote-border: #eee1ed;
--color-md-blockquote-bg: #eaa7cb;
--color-md-code-bg: #f5ecf9;
@@ -202,7 +385,10 @@
--color-user-bubble-foreground-muted: rgba(73, 44, 97, 0.78);
--color-user-bubble-skill-foreground: #c12269;
--color-backdrop: rgba(0, 0, 0, 0.22);
- --color-drawer: rgba(242, 225, 244, 0.99);
+ --color-drawer: #f2e1f4;
+ --color-drawer-foreground: #454554;
+ --color-drawer-foreground-muted: #ac1668;
+ --color-drawer-border: #eceae9;
--color-drawer-shadow: rgba(0, 0, 0, 0.12);
--color-dot-separator: rgba(172, 22, 104, 0.35);
--color-wordmark: #501854;
@@ -264,32 +450,36 @@
--color-adaptive-zinc-500-a12-a16: oklch(55.2% 0.016 285.938 / 12%);
--color-adaptive-zinc-500-400: oklch(55.2% 0.016 285.938);
--color-adaptive-zinc-600-300: oklch(44.2% 0.017 285.786);
- --color-clerk-page: #f2f2f7;
- --color-clerk-foreground: #262626;
- --color-clerk-foreground-muted: #737373;
- --color-clerk-border: rgba(229, 229, 234, 0.06);
- --color-clerk-danger: #dc2626;
+ --color-clerk-page: #fcfcfc;
+ --color-clerk-foreground: #27272a;
+ --color-clerk-foreground-muted: #71717b;
+ --color-clerk-border: #e4e4e7;
+ --color-clerk-danger: #c10007;
}
@variant t3-chat-dark {
--color-screen: #1f1a24;
--color-sheet: rgba(31, 26, 36, 0.98);
--color-sheet-solid: #1f1a24;
- --color-card: #2c2631;
- --color-card-alt: #29232d;
- --color-card-translucent: rgba(44, 38, 49, 0.8);
- --color-thread-canvas: #29232d;
- --color-thread-selected: #2c2631;
- --color-thread-selected-foreground: #f9f8fb;
+ --color-card: #29232d;
+ --color-grouped-card: #29232d;
+ --color-card-alt: #2c2631;
+ --color-card-translucent: rgba(41, 35, 45, 0.8);
+ --color-thread-canvas: #1f1a24;
+ --color-thread-selected: #261922;
+ --color-thread-selected-foreground: #f4f4f5;
--color-thread-selected-foreground-muted: #e7d0dd;
- --color-composer-panel: rgba(41, 35, 45, 0.92);
- --color-composer-surface: rgba(44, 38, 49, 0.9);
+ --color-thread-hover: #261922;
+ --color-row-hover: #463753;
+ --color-composer-panel: rgba(31, 26, 36, 0.92);
+ --color-composer-surface: rgba(41, 35, 45, 0.9);
--color-composer-border: rgba(39, 36, 44, 0.46);
--color-foreground: #f9f8fb;
--color-foreground-secondary: #e7d0dd;
--color-foreground-muted: #e7d0dd;
--color-foreground-tertiary: #e7d0dd;
--color-border: #27242c;
+ --color-focus: #db2777;
--color-border-subtle: rgba(39, 36, 44, 0.7);
--color-separator: rgba(39, 36, 44, 0.55);
--color-subtle: #423a45;
@@ -299,6 +489,7 @@
--color-inline-skill-foreground: #f8f1f5;
--color-primary: #a3004c;
--color-primary-foreground: #fbd0e8;
+ --color-primary-text: #cc729c;
--color-primary-shadow: #000000;
--color-secondary: #362d3d;
--color-secondary-foreground: #d4c7e1;
@@ -313,7 +504,9 @@
--color-danger: #331a2b;
--color-danger-border: rgba(157, 23, 77, 0.32);
--color-danger-foreground: #fbd0e8;
- --color-input: #2c2631;
+ --color-update: #37152b;
+ --color-update-foreground: #fbd0e8;
+ --color-input: #29232d;
--color-input-border: #302029;
--color-sidebar-search: #261922;
--color-placeholder: #968d9f;
@@ -321,13 +514,15 @@
--color-icon-muted: #d4c7e1;
--color-icon-subtle: #e7d0dd;
--color-header: rgba(31, 26, 36, 0.97);
+ --color-header-foreground: #f9f8fb;
--color-header-border: #27242c;
--color-glass-surface: rgba(16, 10, 14, 0.74);
+ --color-glass-fallback: rgba(41, 35, 45, 0.9);
--color-glass-tint: rgba(16, 10, 14, 0.22);
--color-status-bar: #1f1a24;
--color-md-body: #f9f8fb;
--color-md-strong: #f9f8fb;
- --color-md-link: #a3004c;
+ --color-md-link: #c66290;
--color-md-blockquote-border: #27242c;
--color-md-blockquote-bg: #423a45;
--color-md-code-bg: #1f1a24;
@@ -342,7 +537,10 @@
--color-user-bubble-foreground-muted: rgba(242, 235, 250, 0.78);
--color-user-bubble-skill-foreground: #cb709a;
--color-backdrop: rgba(0, 0, 0, 0.48);
- --color-drawer: rgba(23, 16, 24, 0.99);
+ --color-drawer: #171018;
+ --color-drawer-foreground: #f4f4f5;
+ --color-drawer-foreground-muted: #e7d0dd;
+ --color-drawer-border: #322028;
--color-drawer-shadow: rgba(0, 0, 0, 0.32);
--color-dot-separator: rgba(231, 208, 221, 0.35);
--color-wordmark: #f9f8fb;
@@ -404,32 +602,36 @@
--color-adaptive-zinc-500-a12-a16: oklch(55.2% 0.016 285.938 / 16%);
--color-adaptive-zinc-500-400: oklch(70.5% 0.015 286.067);
--color-adaptive-zinc-600-300: oklch(87.1% 0.006 286.286);
- --color-clerk-page: #0e0e0e;
+ --color-clerk-page: #0a0a0a;
--color-clerk-foreground: #f5f5f5;
- --color-clerk-foreground-muted: #a3a3a3;
- --color-clerk-border: rgba(42, 42, 42, 0.06);
- --color-clerk-danger: #fca5a5;
+ --color-clerk-foreground-muted: #818181;
+ --color-clerk-border: #191919;
+ --color-clerk-danger: #ff6467;
}
@variant grove-light {
--color-screen: #f3f7f4;
--color-sheet: rgba(243, 247, 244, 0.98);
--color-sheet-solid: #f3f7f4;
- --color-card: #ecefed;
- --color-card-alt: #f3f7f4;
- --color-card-translucent: rgba(236, 239, 237, 0.8);
+ --color-card: #f3f7f4;
+ --color-grouped-card: #f3f7f4;
+ --color-card-alt: #ecefed;
+ --color-card-translucent: rgba(243, 247, 244, 0.8);
--color-thread-canvas: #f3f7f4;
- --color-thread-selected: #ecefed;
+ --color-thread-selected: #bad7c9;
--color-thread-selected-foreground: #241523;
- --color-thread-selected-foreground-muted: #746c73;
+ --color-thread-selected-foreground-muted: #5d585e;
+ --color-thread-hover: #cae0d5;
+ --color-row-hover: #d5e6dd;
--color-composer-panel: rgba(243, 247, 244, 0.88);
- --color-composer-surface: rgba(236, 239, 237, 0.94);
+ --color-composer-surface: rgba(243, 247, 244, 0.94);
--color-composer-border: rgba(203, 213, 209, 0.54);
--color-foreground: #241523;
- --color-foreground-secondary: #746c73;
+ --color-foreground-secondary: #726a71;
--color-foreground-muted: #6e696f;
--color-foreground-tertiary: #746c73;
--color-border: #cbd5d1;
+ --color-focus: #1b7d50;
--color-border-subtle: rgba(203, 213, 209, 0.7);
--color-separator: rgba(203, 213, 209, 0.55);
--color-subtle: #e6f0ea;
@@ -437,13 +639,14 @@
--color-inline-skill-background: #d5e6dd;
--color-inline-skill-border: rgba(27, 125, 80, 0.42);
--color-inline-skill-foreground: #241523;
- --color-primary: #1b7d50;
+ --color-primary: #8f6410;
--color-primary-foreground: #fffaff;
+ --color-primary-text: #8f6410;
--color-primary-shadow: #000000;
--color-secondary: #e2ede7;
--color-secondary-foreground: #241523;
--color-secondary-border: #cbd5d1;
- --color-switch-active-track: #1b7d50;
+ --color-switch-active-track: #8f6410;
--color-switch-active-thumb: #fffaff;
--color-switch-inactive-track: #e2ede7;
--color-switch-inactive-thumb: #6e696f;
@@ -453,7 +656,9 @@
--color-danger: #f4e7e5;
--color-danger-border: rgba(251, 44, 54, 0.32);
--color-danger-foreground: #c10007;
- --color-input: #ecefed;
+ --color-update: #d0e3da;
+ --color-update-foreground: #125134;
+ --color-input: #f3f7f4;
--color-input-border: #becbc5;
--color-sidebar-search: #d3dcd8;
--color-placeholder: #716971;
@@ -461,13 +666,15 @@
--color-icon-muted: #746c73;
--color-icon-subtle: #746c73;
--color-header: rgba(243, 247, 244, 0.97);
+ --color-header-foreground: #241523;
--color-header-border: #d5e6dd;
--color-glass-surface: rgba(231, 233, 232, 0.74);
+ --color-glass-fallback: rgba(243, 247, 244, 0.94);
--color-glass-tint: rgba(231, 233, 232, 0.22);
--color-status-bar: #f3f7f4;
--color-md-body: #241523;
--color-md-strong: #241523;
- --color-md-link: #1b7d50;
+ --color-md-link: #8f6410;
--color-md-blockquote-border: #cbd5d1;
--color-md-blockquote-bg: #e6f0ea;
--color-md-code-bg: #eef1ef;
@@ -482,7 +689,10 @@
--color-user-bubble-foreground-muted: rgba(36, 21, 35, 0.78);
--color-user-bubble-skill-foreground: #815a0e;
--color-backdrop: rgba(0, 0, 0, 0.22);
- --color-drawer: rgba(226, 237, 231, 0.99);
+ --color-drawer: #e2ede7;
+ --color-drawer-foreground: #241523;
+ --color-drawer-foreground-muted: #645f64;
+ --color-drawer-border: #cbd3d0;
--color-drawer-shadow: rgba(0, 0, 0, 0.12);
--color-dot-separator: rgba(116, 108, 115, 0.35);
--color-wordmark: #241523;
@@ -544,32 +754,36 @@
--color-adaptive-zinc-500-a12-a16: oklch(55.2% 0.016 285.938 / 12%);
--color-adaptive-zinc-500-400: oklch(55.2% 0.016 285.938);
--color-adaptive-zinc-600-300: oklch(44.2% 0.017 285.786);
- --color-clerk-page: #f2f2f7;
- --color-clerk-foreground: #262626;
- --color-clerk-foreground-muted: #737373;
- --color-clerk-border: rgba(229, 229, 234, 0.06);
- --color-clerk-danger: #dc2626;
+ --color-clerk-page: #fcfcfc;
+ --color-clerk-foreground: #27272a;
+ --color-clerk-foreground-muted: #71717b;
+ --color-clerk-border: #e4e4e7;
+ --color-clerk-danger: #c10007;
}
@variant grove-dark {
--color-screen: #1b2821;
--color-sheet: rgba(27, 40, 33, 0.98);
--color-sheet-solid: #1b2821;
- --color-card: #36413c;
- --color-card-alt: #1b2821;
- --color-card-translucent: rgba(54, 65, 60, 0.8);
+ --color-card: #1b2821;
+ --color-grouped-card: #1b2821;
+ --color-card-alt: #36413c;
+ --color-card-translucent: rgba(27, 40, 33, 0.8);
--color-thread-canvas: #1b2821;
- --color-thread-selected: #36413c;
+ --color-thread-selected: #2f5641;
--color-thread-selected-foreground: #fffaff;
- --color-thread-selected-foreground-muted: #919595;
+ --color-thread-selected-foreground-muted: #bbc0bf;
+ --color-thread-hover: #2a4938;
+ --color-row-hover: #325c46;
--color-composer-panel: rgba(27, 40, 33, 0.92);
- --color-composer-surface: rgba(54, 65, 60, 0.9);
+ --color-composer-surface: rgba(27, 40, 33, 0.9);
--color-composer-border: rgba(65, 95, 79, 0.46);
--color-foreground: #fffaff;
- --color-foreground-secondary: #919595;
- --color-foreground-muted: #9da5a2;
+ --color-foreground-secondary: #a6aaaa;
+ --color-foreground-muted: #a3aba8;
--color-foreground-tertiary: #919595;
--color-border: #415f4f;
+ --color-focus: #69d69a;
--color-border-subtle: rgba(65, 95, 79, 0.7);
--color-separator: rgba(65, 95, 79, 0.55);
--color-subtle: #253e31;
@@ -577,13 +791,14 @@
--color-inline-skill-background: #325c46;
--color-inline-skill-border: rgba(105, 214, 154, 0.42);
--color-inline-skill-foreground: #fffaff;
- --color-primary: #69d69a;
+ --color-primary: #e3b34e;
--color-primary-foreground: #241523;
+ --color-primary-text: #e3b34e;
--color-primary-shadow: #000000;
--color-secondary: #2a4b39;
--color-secondary-foreground: #fffaff;
--color-secondary-border: #415f4f;
- --color-switch-active-track: #69d69a;
+ --color-switch-active-track: #e3b34e;
--color-switch-active-thumb: #241523;
--color-switch-inactive-track: #2a4b39;
--color-switch-inactive-thumb: #9da5a2;
@@ -593,7 +808,9 @@
--color-danger: #3f2c28;
--color-danger-border: rgba(251, 65, 74, 0.32);
--color-danger-foreground: #ff6668;
- --color-input: #36413c;
+ --color-update: #345f48;
+ --color-update-foreground: #9ee4be;
+ --color-input: #1b2821;
--color-input-border: #4f725f;
--color-sidebar-search: #45554d;
--color-placeholder: #a9abab;
@@ -601,13 +818,15 @@
--color-icon-muted: #919595;
--color-icon-subtle: #919595;
--color-header: rgba(27, 40, 33, 0.97);
+ --color-header-foreground: #fffaff;
--color-header-border: #36654c;
--color-glass-surface: rgba(68, 77, 73, 0.74);
+ --color-glass-fallback: rgba(27, 40, 33, 0.9);
--color-glass-tint: rgba(68, 77, 73, 0.22);
--color-status-bar: #1b2821;
--color-md-body: #fffaff;
--color-md-strong: #fffaff;
- --color-md-link: #69d69a;
+ --color-md-link: #e3b34e;
--color-md-blockquote-border: #415f4f;
--color-md-blockquote-bg: #253e31;
--color-md-code-bg: #28342e;
@@ -622,7 +841,10 @@
--color-user-bubble-foreground-muted: rgba(255, 250, 255, 0.78);
--color-user-bubble-skill-foreground: #eed295;
--color-backdrop: rgba(0, 0, 0, 0.48);
- --color-drawer: rgba(33, 54, 43, 0.99);
+ --color-drawer: #21362b;
+ --color-drawer-foreground: #fffaff;
+ --color-drawer-foreground-muted: #aab0af;
+ --color-drawer-border: #6f7a75;
--color-drawer-shadow: rgba(0, 0, 0, 0.32);
--color-dot-separator: rgba(145, 149, 149, 0.35);
--color-wordmark: #fffaff;
@@ -684,32 +906,36 @@
--color-adaptive-zinc-500-a12-a16: oklch(55.2% 0.016 285.938 / 16%);
--color-adaptive-zinc-500-400: oklch(70.5% 0.015 286.067);
--color-adaptive-zinc-600-300: oklch(87.1% 0.006 286.286);
- --color-clerk-page: #0e0e0e;
+ --color-clerk-page: #0a0a0a;
--color-clerk-foreground: #f5f5f5;
- --color-clerk-foreground-muted: #a3a3a3;
- --color-clerk-border: rgba(42, 42, 42, 0.06);
- --color-clerk-danger: #fca5a5;
+ --color-clerk-foreground-muted: #818181;
+ --color-clerk-border: #191919;
+ --color-clerk-danger: #ff6467;
}
@variant ocean-light {
--color-screen: #f5f7f8;
--color-sheet: rgba(245, 247, 248, 0.98);
--color-sheet-solid: #f5f7f8;
- --color-card: #edeff1;
- --color-card-alt: #f5f7f8;
- --color-card-translucent: rgba(237, 239, 241, 0.8);
+ --color-card: #f5f7f8;
+ --color-grouped-card: #f5f7f8;
+ --color-card-alt: #edeff1;
+ --color-card-translucent: rgba(245, 247, 248, 0.8);
--color-thread-canvas: #f5f7f8;
- --color-thread-selected: #edeff1;
+ --color-thread-selected: #bed4e5;
--color-thread-selected-foreground: #241523;
- --color-thread-selected-foreground-muted: #746c75;
+ --color-thread-selected-foreground-muted: #5e5862;
+ --color-thread-hover: #cdddea;
+ --color-row-hover: #d8e4ee;
--color-composer-panel: rgba(245, 247, 248, 0.88);
- --color-composer-surface: rgba(237, 239, 241, 0.94);
+ --color-composer-surface: rgba(245, 247, 248, 0.94);
--color-composer-border: rgba(205, 212, 220, 0.54);
--color-foreground: #241523;
- --color-foreground-secondary: #746c75;
+ --color-foreground-secondary: #726a73;
--color-foreground-muted: #6f6873;
--color-foreground-tertiary: #746c75;
--color-border: #cdd4dc;
+ --color-focus: #2672af;
--color-border-subtle: rgba(205, 212, 220, 0.7);
--color-separator: rgba(205, 212, 220, 0.55);
--color-subtle: #e8eff4;
@@ -717,13 +943,14 @@
--color-inline-skill-background: #d8e4ee;
--color-inline-skill-border: rgba(38, 114, 175, 0.42);
--color-inline-skill-foreground: #241523;
- --color-primary: #2672af;
+ --color-primary: #0a6f75;
--color-primary-foreground: #fffaff;
+ --color-primary-text: #0a6f75;
--color-primary-shadow: #000000;
--color-secondary: #e4ecf2;
--color-secondary-foreground: #241523;
--color-secondary-border: #cdd4dc;
- --color-switch-active-track: #2672af;
+ --color-switch-active-track: #0a6f75;
--color-switch-active-thumb: #fffaff;
--color-switch-inactive-track: #e4ecf2;
--color-switch-inactive-thumb: #6f6873;
@@ -733,7 +960,9 @@
--color-danger: #f5e6e9;
--color-danger-border: rgba(251, 44, 54, 0.32);
--color-danger-foreground: #c10007;
- --color-input: #edeff1;
+ --color-update: #d4e1ed;
+ --color-update-foreground: #194a72;
+ --color-input: #f5f7f8;
--color-input-border: #c0c9d4;
--color-sidebar-search: #d5dbe2;
--color-placeholder: #716972;
@@ -741,13 +970,15 @@
--color-icon-muted: #746c75;
--color-icon-subtle: #746c75;
--color-header: rgba(245, 247, 248, 0.97);
+ --color-header-foreground: #241523;
--color-header-border: #d8e4ee;
--color-glass-surface: rgba(232, 233, 235, 0.74);
+ --color-glass-fallback: rgba(245, 247, 248, 0.94);
--color-glass-tint: rgba(232, 233, 235, 0.22);
--color-status-bar: #f5f7f8;
--color-md-body: #241523;
--color-md-strong: #241523;
- --color-md-link: #2672af;
+ --color-md-link: #0a6f75;
--color-md-blockquote-border: #cdd4dc;
--color-md-blockquote-bg: #e8eff4;
--color-md-code-bg: #f0f1f3;
@@ -762,7 +993,10 @@
--color-user-bubble-foreground-muted: rgba(36, 21, 35, 0.78);
--color-user-bubble-skill-foreground: #0a6c72;
--color-backdrop: rgba(0, 0, 0, 0.22);
- --color-drawer: rgba(228, 236, 242, 0.99);
+ --color-drawer: #e4ecf2;
+ --color-drawer-foreground: #241523;
+ --color-drawer-foreground-muted: #655e69;
+ --color-drawer-border: #cdd2d9;
--color-drawer-shadow: rgba(0, 0, 0, 0.12);
--color-dot-separator: rgba(116, 108, 117, 0.35);
--color-wordmark: #241523;
@@ -824,32 +1058,36 @@
--color-adaptive-zinc-500-a12-a16: oklch(55.2% 0.016 285.938 / 12%);
--color-adaptive-zinc-500-400: oklch(55.2% 0.016 285.938);
--color-adaptive-zinc-600-300: oklch(44.2% 0.017 285.786);
- --color-clerk-page: #f2f2f7;
- --color-clerk-foreground: #262626;
- --color-clerk-foreground-muted: #737373;
- --color-clerk-border: rgba(229, 229, 234, 0.06);
- --color-clerk-danger: #dc2626;
+ --color-clerk-page: #fcfcfc;
+ --color-clerk-foreground: #27272a;
+ --color-clerk-foreground-muted: #71717b;
+ --color-clerk-border: #e4e4e7;
+ --color-clerk-danger: #c10007;
}
@variant ocean-dark {
--color-screen: #17212b;
--color-sheet: rgba(23, 33, 43, 0.98);
--color-sheet-solid: #17212b;
- --color-card: #333b45;
- --color-card-alt: #17212b;
- --color-card-translucent: rgba(51, 59, 69, 0.8);
+ --color-card: #17212b;
+ --color-grouped-card: #17212b;
+ --color-card-alt: #333b45;
+ --color-card-translucent: rgba(23, 33, 43, 0.8);
--color-thread-canvas: #17212b;
- --color-thread-selected: #333b45;
+ --color-thread-selected: #2f495f;
--color-thread-selected-foreground: #fffaff;
- --color-thread-selected-foreground-muted: #8d8f97;
+ --color-thread-selected-foreground-muted: #b0b4ba;
+ --color-thread-hover: #283e50;
+ --color-row-hover: #324e66;
--color-composer-panel: rgba(23, 33, 43, 0.92);
- --color-composer-surface: rgba(51, 59, 69, 0.9);
+ --color-composer-surface: rgba(23, 33, 43, 0.9);
--color-composer-border: rgba(64, 85, 103, 0.46);
--color-foreground: #fffaff;
- --color-foreground-secondary: #8d8f97;
- --color-foreground-muted: #969ca6;
+ --color-foreground-secondary: #a2a3aa;
+ --color-foreground-muted: #9ea4ad;
--color-foreground-tertiary: #8d8f97;
--color-border: #405567;
+ --color-focus: #70b9ee;
--color-border-subtle: rgba(64, 85, 103, 0.7);
--color-separator: rgba(64, 85, 103, 0.55);
--color-subtle: #233544;
@@ -857,13 +1095,14 @@
--color-inline-skill-background: #324e66;
--color-inline-skill-border: rgba(112, 185, 238, 0.42);
--color-inline-skill-foreground: #fffaff;
- --color-primary: #70b9ee;
+ --color-primary: #5bd0d6;
--color-primary-foreground: #241523;
+ --color-primary-text: #5bd0d6;
--color-primary-shadow: #000000;
--color-secondary: #293f52;
--color-secondary-foreground: #fffaff;
--color-secondary-border: #405567;
- --color-switch-active-track: #70b9ee;
+ --color-switch-active-track: #5bd0d6;
--color-switch-active-thumb: #241523;
--color-switch-inactive-track: #293f52;
--color-switch-inactive-thumb: #969ca6;
@@ -873,7 +1112,9 @@
--color-danger: #3c2630;
--color-danger-border: rgba(251, 65, 74, 0.32);
--color-danger-foreground: #ff6467;
- --color-input: #333b45;
+ --color-update: #345269;
+ --color-update-foreground: #a2d2f4;
+ --color-input: #17212b;
--color-input-border: #4f677b;
--color-sidebar-search: #424e5a;
--color-placeholder: #a4a4ac;
@@ -881,13 +1122,15 @@
--color-icon-muted: #8d8f97;
--color-icon-subtle: #8d8f97;
--color-header: rgba(23, 33, 43, 0.97);
+ --color-header-foreground: #fffaff;
--color-header-border: #36566f;
--color-glass-surface: rgba(65, 72, 81, 0.74);
+ --color-glass-fallback: rgba(23, 33, 43, 0.9);
--color-glass-tint: rgba(65, 72, 81, 0.22);
--color-status-bar: #17212b;
--color-md-body: #fffaff;
--color-md-strong: #fffaff;
- --color-md-link: #70b9ee;
+ --color-md-link: #5bd0d6;
--color-md-blockquote-border: #405567;
--color-md-blockquote-bg: #233544;
--color-md-code-bg: #252e38;
@@ -902,7 +1145,10 @@
--color-user-bubble-foreground-muted: rgba(255, 250, 255, 0.78);
--color-user-bubble-skill-foreground: #75d8dd;
--color-backdrop: rgba(0, 0, 0, 0.48);
- --color-drawer: rgba(30, 45, 59, 0.99);
+ --color-drawer: #1e2d3b;
+ --color-drawer-foreground: #fffaff;
+ --color-drawer-foreground-muted: #a2a5ae;
+ --color-drawer-border: #6d757f;
--color-drawer-shadow: rgba(0, 0, 0, 0.32);
--color-dot-separator: rgba(141, 143, 151, 0.35);
--color-wordmark: #fffaff;
@@ -964,32 +1210,36 @@
--color-adaptive-zinc-500-a12-a16: oklch(55.2% 0.016 285.938 / 16%);
--color-adaptive-zinc-500-400: oklch(70.5% 0.015 286.067);
--color-adaptive-zinc-600-300: oklch(87.1% 0.006 286.286);
- --color-clerk-page: #0e0e0e;
+ --color-clerk-page: #0a0a0a;
--color-clerk-foreground: #f5f5f5;
- --color-clerk-foreground-muted: #a3a3a3;
- --color-clerk-border: rgba(42, 42, 42, 0.06);
- --color-clerk-danger: #fca5a5;
+ --color-clerk-foreground-muted: #818181;
+ --color-clerk-border: #191919;
+ --color-clerk-danger: #ff6467;
}
@variant ember-light {
--color-screen: #f9f7f5;
--color-sheet: rgba(249, 247, 245, 0.98);
--color-sheet-solid: #f9f7f5;
- --color-card: #f1efee;
- --color-card-alt: #f9f7f5;
- --color-card-translucent: rgba(241, 239, 238, 0.8);
+ --color-card: #f9f7f5;
+ --color-grouped-card: #f9f7f5;
+ --color-card-alt: #f1efee;
+ --color-card-translucent: rgba(249, 247, 245, 0.8);
--color-thread-canvas: #f9f7f5;
- --color-thread-selected: #f1efee;
+ --color-thread-selected: #e5ccc0;
--color-thread-selected-foreground: #241523;
- --color-thread-selected-foreground-muted: #766c74;
+ --color-thread-selected-foreground-muted: #62575d;
+ --color-thread-hover: #ead8cf;
+ --color-row-hover: #eee0d9;
--color-composer-panel: rgba(249, 247, 245, 0.88);
- --color-composer-surface: rgba(241, 239, 238, 0.94);
+ --color-composer-surface: rgba(249, 247, 245, 0.94);
--color-composer-border: rgba(221, 210, 206, 0.54);
--color-foreground: #241523;
- --color-foreground-secondary: #766c74;
+ --color-foreground-secondary: #746a72;
--color-foreground-muted: #74686f;
--color-foreground-tertiary: #766c74;
--color-border: #ddd2ce;
+ --color-focus: #ae552a;
--color-border-subtle: rgba(221, 210, 206, 0.7);
--color-separator: rgba(221, 210, 206, 0.55);
--color-subtle: #f4ede9;
@@ -997,13 +1247,14 @@
--color-inline-skill-background: #eee0d9;
--color-inline-skill-border: rgba(174, 85, 42, 0.42);
--color-inline-skill-foreground: #241523;
- --color-primary: #ae552a;
+ --color-primary: #b23535;
--color-primary-foreground: #fffaff;
+ --color-primary-text: #b23535;
--color-primary-shadow: #000000;
--color-secondary: #f3eae5;
--color-secondary-foreground: #241523;
--color-secondary-border: #ddd2ce;
- --color-switch-active-track: #ae552a;
+ --color-switch-active-track: #b23535;
--color-switch-active-thumb: #fffaff;
--color-switch-inactive-track: #f3eae5;
--color-switch-inactive-thumb: #74686f;
@@ -1013,7 +1264,9 @@
--color-danger: #f9e7e6;
--color-danger-border: rgba(251, 44, 54, 0.32);
--color-danger-foreground: #c10007;
- --color-input: #f1efee;
+ --color-update: #edddd5;
+ --color-update-foreground: #71381b;
+ --color-input: #f9f7f5;
--color-input-border: #d4c6c1;
--color-sidebar-search: #e2d9d6;
--color-placeholder: #736971;
@@ -1021,13 +1274,15 @@
--color-icon-muted: #766c74;
--color-icon-subtle: #766c74;
--color-header: rgba(249, 247, 245, 0.97);
+ --color-header-foreground: #241523;
--color-header-border: #eee0d9;
--color-glass-surface: rgba(236, 233, 233, 0.74);
+ --color-glass-fallback: rgba(249, 247, 245, 0.94);
--color-glass-tint: rgba(236, 233, 233, 0.22);
--color-status-bar: #f9f7f5;
--color-md-body: #241523;
--color-md-strong: #241523;
- --color-md-link: #ae552a;
+ --color-md-link: #b23535;
--color-md-blockquote-border: #ddd2ce;
--color-md-blockquote-bg: #f4ede9;
--color-md-code-bg: #f3f1f0;
@@ -1042,7 +1297,10 @@
--color-user-bubble-foreground-muted: rgba(36, 21, 35, 0.78);
--color-user-bubble-skill-foreground: #b13535;
--color-backdrop: rgba(0, 0, 0, 0.22);
- --color-drawer: rgba(243, 234, 229, 0.99);
+ --color-drawer: #f3eae5;
+ --color-drawer-foreground: #241523;
+ --color-drawer-foreground-muted: #6a5d64;
+ --color-drawer-border: #dad0ce;
--color-drawer-shadow: rgba(0, 0, 0, 0.12);
--color-dot-separator: rgba(118, 108, 116, 0.35);
--color-wordmark: #241523;
@@ -1104,32 +1362,36 @@
--color-adaptive-zinc-500-a12-a16: oklch(55.2% 0.016 285.938 / 12%);
--color-adaptive-zinc-500-400: oklch(55.2% 0.016 285.938);
--color-adaptive-zinc-600-300: oklch(44.2% 0.017 285.786);
- --color-clerk-page: #f2f2f7;
- --color-clerk-foreground: #262626;
- --color-clerk-foreground-muted: #737373;
- --color-clerk-border: rgba(229, 229, 234, 0.06);
- --color-clerk-danger: #dc2626;
+ --color-clerk-page: #fcfcfc;
+ --color-clerk-foreground: #27272a;
+ --color-clerk-foreground-muted: #71717b;
+ --color-clerk-border: #e4e4e7;
+ --color-clerk-danger: #c10007;
}
@variant ember-dark {
--color-screen: #291e1a;
--color-sheet: rgba(41, 30, 26, 0.98);
--color-sheet-solid: #291e1a;
- --color-card: #433835;
- --color-card-alt: #291e1a;
- --color-card-translucent: rgba(67, 56, 53, 0.8);
+ --color-card: #291e1a;
+ --color-grouped-card: #291e1a;
+ --color-card-alt: #433835;
+ --color-card-translucent: rgba(41, 30, 26, 0.8);
--color-thread-canvas: #291e1a;
- --color-thread-selected: #433835;
+ --color-thread-selected: #5d3f2d;
--color-thread-selected-foreground: #fffaff;
- --color-thread-selected-foreground-muted: #968e8f;
+ --color-thread-selected-foreground-muted: #b9b1b0;
+ --color-thread-hover: #4f3528;
+ --color-row-hover: #644330;
--color-composer-panel: rgba(41, 30, 26, 0.92);
- --color-composer-surface: rgba(67, 56, 53, 0.9);
+ --color-composer-surface: rgba(41, 30, 26, 0.9);
--color-composer-border: rgba(102, 76, 63, 0.46);
--color-foreground: #fffaff;
- --color-foreground-secondary: #968e8f;
- --color-foreground-muted: #a59996;
+ --color-foreground-secondary: #a8a2a2;
+ --color-foreground-muted: #aca19f;
--color-foreground-tertiary: #968e8f;
--color-border: #664c3f;
+ --color-focus: #f09a64;
--color-border-subtle: rgba(102, 76, 63, 0.7);
--color-separator: rgba(102, 76, 63, 0.55);
--color-subtle: #432e23;
@@ -1137,13 +1399,14 @@
--color-inline-skill-background: #644330;
--color-inline-skill-border: rgba(240, 154, 100, 0.42);
--color-inline-skill-foreground: #fffaff;
- --color-primary: #f09a64;
+ --color-primary: #f78a7a;
--color-primary-foreground: #241523;
+ --color-primary-text: #f78a7a;
--color-primary-shadow: #000000;
--color-secondary: #513728;
--color-secondary-foreground: #fffaff;
--color-secondary-border: #664c3f;
- --color-switch-active-track: #f09a64;
+ --color-switch-active-track: #f78a7a;
--color-switch-active-thumb: #241523;
--color-switch-inactive-track: #513728;
--color-switch-inactive-thumb: #a59996;
@@ -1153,7 +1416,9 @@
--color-danger: #4a2321;
--color-danger-border: rgba(251, 65, 74, 0.32);
--color-danger-foreground: #ff6467;
- --color-input: #433835;
+ --color-update: #684631;
+ --color-update-foreground: #f5bd9a;
+ --color-input: #291e1a;
--color-input-border: #7a5d4d;
--color-sidebar-search: #584943;
--color-placeholder: #aba3a5;
@@ -1161,13 +1426,15 @@
--color-icon-muted: #968e8f;
--color-icon-subtle: #968e8f;
--color-header: rgba(41, 30, 26, 0.97);
+ --color-header-foreground: #fffaff;
--color-header-border: #6e4934;
--color-glass-surface: rgba(79, 69, 67, 0.74);
+ --color-glass-fallback: rgba(41, 30, 26, 0.9);
--color-glass-tint: rgba(79, 69, 67, 0.22);
--color-status-bar: #291e1a;
--color-md-body: #fffaff;
--color-md-strong: #fffaff;
- --color-md-link: #f09a64;
+ --color-md-link: #f78a7a;
--color-md-blockquote-border: #664c3f;
--color-md-blockquote-bg: #432e23;
--color-md-code-bg: #362b27;
@@ -1182,7 +1449,10 @@
--color-user-bubble-foreground-muted: rgba(255, 250, 255, 0.78);
--color-user-bubble-skill-foreground: #fab6ad;
--color-backdrop: rgba(0, 0, 0, 0.48);
- --color-drawer: rgba(57, 40, 31, 0.99);
+ --color-drawer: #39281f;
+ --color-drawer-foreground: #fffaff;
+ --color-drawer-foreground-muted: #aca2a1;
+ --color-drawer-border: #7e716e;
--color-drawer-shadow: rgba(0, 0, 0, 0.32);
--color-dot-separator: rgba(150, 142, 143, 0.35);
--color-wordmark: #fffaff;
@@ -1244,32 +1514,36 @@
--color-adaptive-zinc-500-a12-a16: oklch(55.2% 0.016 285.938 / 16%);
--color-adaptive-zinc-500-400: oklch(70.5% 0.015 286.067);
--color-adaptive-zinc-600-300: oklch(87.1% 0.006 286.286);
- --color-clerk-page: #0e0e0e;
+ --color-clerk-page: #0a0a0a;
--color-clerk-foreground: #f5f5f5;
- --color-clerk-foreground-muted: #a3a3a3;
- --color-clerk-border: rgba(42, 42, 42, 0.06);
- --color-clerk-danger: #fca5a5;
+ --color-clerk-foreground-muted: #818181;
+ --color-clerk-border: #191919;
+ --color-clerk-danger: #ff6467;
}
@variant iris-light {
--color-screen: #f8f7f9;
--color-sheet: rgba(248, 247, 249, 0.98);
--color-sheet-solid: #f8f7f9;
- --color-card: #f0eff2;
- --color-card-alt: #f8f7f9;
- --color-card-translucent: rgba(240, 239, 242, 0.8);
+ --color-card: #f8f7f9;
+ --color-grouped-card: #f8f7f9;
+ --color-card-alt: #f0eff2;
+ --color-card-translucent: rgba(248, 247, 249, 0.8);
--color-thread-canvas: #f8f7f9;
- --color-thread-selected: #f0eff2;
+ --color-thread-selected: #d4cce8;
--color-thread-selected-foreground: #241523;
- --color-thread-selected-foreground-muted: #766c76;
+ --color-thread-selected-foreground-muted: #605662;
+ --color-thread-hover: #ded8ed;
+ --color-row-hover: #e5e0f0;
--color-composer-panel: rgba(248, 247, 249, 0.88);
- --color-composer-surface: rgba(240, 239, 242, 0.94);
+ --color-composer-surface: rgba(248, 247, 249, 0.94);
--color-composer-border: rgba(214, 209, 222, 0.54);
--color-foreground: #241523;
- --color-foreground-secondary: #766c76;
+ --color-foreground-secondary: #746a74;
--color-foreground-muted: #726874;
--color-foreground-tertiary: #766c76;
--color-border: #d6d1de;
+ --color-focus: #7253b9;
--color-border-subtle: rgba(214, 209, 222, 0.7);
--color-separator: rgba(214, 209, 222, 0.55);
--color-subtle: #f0edf6;
@@ -1277,13 +1551,14 @@
--color-inline-skill-background: #e5e0f0;
--color-inline-skill-border: rgba(114, 83, 185, 0.42);
--color-inline-skill-foreground: #241523;
- --color-primary: #7253b9;
+ --color-primary: #a82c87;
--color-primary-foreground: #fffaff;
+ --color-primary-text: #a82c87;
--color-primary-shadow: #000000;
--color-secondary: #edeaf4;
--color-secondary-foreground: #241523;
--color-secondary-border: #d6d1de;
- --color-switch-active-track: #7253b9;
+ --color-switch-active-track: #a82c87;
--color-switch-active-thumb: #fffaff;
--color-switch-inactive-track: #edeaf4;
--color-switch-inactive-thumb: #726874;
@@ -1293,7 +1568,9 @@
--color-danger: #f8e6ea;
--color-danger-border: rgba(251, 44, 54, 0.32);
--color-danger-foreground: #c10007;
- --color-input: #f0eff2;
+ --color-update: #e2ddef;
+ --color-update-foreground: #4a3678;
+ --color-input: #f8f7f9;
--color-input-border: #ccc5d6;
--color-sidebar-search: #ddd9e3;
--color-placeholder: #736973;
@@ -1301,13 +1578,15 @@
--color-icon-muted: #766c76;
--color-icon-subtle: #766c76;
--color-header: rgba(248, 247, 249, 0.97);
+ --color-header-foreground: #241523;
--color-header-border: #e5e0f0;
--color-glass-surface: rgba(235, 233, 237, 0.74);
+ --color-glass-fallback: rgba(248, 247, 249, 0.94);
--color-glass-tint: rgba(235, 233, 237, 0.22);
--color-status-bar: #f8f7f9;
--color-md-body: #241523;
--color-md-strong: #241523;
- --color-md-link: #7253b9;
+ --color-md-link: #a82c87;
--color-md-blockquote-border: #d6d1de;
--color-md-blockquote-bg: #f0edf6;
--color-md-code-bg: #f2f1f4;
@@ -1322,7 +1601,10 @@
--color-user-bubble-foreground-muted: rgba(36, 21, 35, 0.78);
--color-user-bubble-skill-foreground: #a82c87;
--color-backdrop: rgba(0, 0, 0, 0.22);
- --color-drawer: rgba(237, 234, 244, 0.99);
+ --color-drawer: #edeaf4;
+ --color-drawer-foreground: #241523;
+ --color-drawer-foreground-muted: #685d6a;
+ --color-drawer-border: #d5d0db;
--color-drawer-shadow: rgba(0, 0, 0, 0.12);
--color-dot-separator: rgba(118, 108, 118, 0.35);
--color-wordmark: #241523;
@@ -1384,32 +1666,36 @@
--color-adaptive-zinc-500-a12-a16: oklch(55.2% 0.016 285.938 / 12%);
--color-adaptive-zinc-500-400: oklch(55.2% 0.016 285.938);
--color-adaptive-zinc-600-300: oklch(44.2% 0.017 285.786);
- --color-clerk-page: #f2f2f7;
- --color-clerk-foreground: #262626;
- --color-clerk-foreground-muted: #737373;
- --color-clerk-border: rgba(229, 229, 234, 0.06);
- --color-clerk-danger: #dc2626;
+ --color-clerk-page: #fcfcfc;
+ --color-clerk-foreground: #27272a;
+ --color-clerk-foreground-muted: #71717b;
+ --color-clerk-border: #e4e4e7;
+ --color-clerk-danger: #c10007;
}
@variant iris-dark {
--color-screen: #1d1929;
--color-sheet: rgba(29, 25, 41, 0.98);
--color-sheet-solid: #1d1929;
- --color-card: #383443;
- --color-card-alt: #1d1929;
- --color-card-translucent: rgba(56, 52, 67, 0.8);
+ --color-card: #1d1929;
+ --color-grouped-card: #1d1929;
+ --color-card-alt: #383443;
+ --color-card-translucent: rgba(29, 25, 41, 0.8);
--color-thread-canvas: #1d1929;
- --color-thread-selected: #383443;
+ --color-thread-selected: #3f345e;
--color-thread-selected-foreground: #fffaff;
- --color-thread-selected-foreground-muted: #8e8a95;
+ --color-thread-selected-foreground-muted: #a6a2ae;
+ --color-thread-hover: #352c4f;
+ --color-row-hover: #433765;
--color-composer-panel: rgba(29, 25, 41, 0.92);
- --color-composer-surface: rgba(56, 52, 67, 0.9);
+ --color-composer-surface: rgba(29, 25, 41, 0.9);
--color-composer-border: rgba(77, 67, 102, 0.46);
--color-foreground: #fffaff;
- --color-foreground-secondary: #8e8a95;
- --color-foreground-muted: #9690a1;
+ --color-foreground-secondary: #a09da6;
+ --color-foreground-muted: #a19cab;
--color-foreground-tertiary: #8e8a95;
--color-border: #4d4366;
+ --color-focus: #9d7df2;
--color-border-subtle: rgba(77, 67, 102, 0.7);
--color-separator: rgba(77, 67, 102, 0.55);
--color-subtle: #2d2643;
@@ -1417,13 +1703,14 @@
--color-inline-skill-background: #433765;
--color-inline-skill-border: rgba(157, 125, 242, 0.42);
--color-inline-skill-foreground: #fffaff;
- --color-primary: #9d7df2;
+ --color-primary: #f099d8;
--color-primary-foreground: #241523;
+ --color-primary-text: #f099d8;
--color-primary-shadow: #000000;
--color-secondary: #362d51;
--color-secondary-foreground: #fffaff;
--color-secondary-border: #4d4366;
- --color-switch-active-track: #9d7df2;
+ --color-switch-active-track: #f099d8;
--color-switch-active-thumb: #241523;
--color-switch-inactive-track: #362d51;
--color-switch-inactive-thumb: #9690a1;
@@ -1433,7 +1720,9 @@
--color-danger: #40202e;
--color-danger-border: rgba(251, 65, 74, 0.32);
--color-danger-foreground: #ff6467;
- --color-input: #383443;
+ --color-update: #463969;
+ --color-update-foreground: #bfabf7;
+ --color-input: #1d1929;
--color-input-border: #5d527b;
--color-sidebar-search: #494459;
--color-placeholder: #a29ea8;
@@ -1441,13 +1730,15 @@
--color-icon-muted: #8e8a95;
--color-icon-subtle: #8e8a95;
--color-header: rgba(29, 25, 41, 0.97);
+ --color-header-foreground: #fffaff;
--color-header-border: #4a3c70;
--color-glass-surface: rgba(69, 66, 80, 0.74);
+ --color-glass-fallback: rgba(29, 25, 41, 0.9);
--color-glass-tint: rgba(69, 66, 80, 0.22);
--color-status-bar: #1d1929;
--color-md-body: #fffaff;
--color-md-strong: #fffaff;
- --color-md-link: #9d7df2;
+ --color-md-link: #f099d8;
--color-md-blockquote-border: #4d4366;
--color-md-blockquote-bg: #2d2643;
--color-md-code-bg: #2a2736;
@@ -1462,7 +1753,10 @@
--color-user-bubble-foreground-muted: rgba(255, 250, 255, 0.78);
--color-user-bubble-skill-foreground: #f099d8;
--color-backdrop: rgba(0, 0, 0, 0.48);
- --color-drawer: rgba(39, 33, 57, 0.99);
+ --color-drawer: #272139;
+ --color-drawer-foreground: #fffaff;
+ --color-drawer-foreground-muted: #9b97a4;
+ --color-drawer-border: #736d7e;
--color-drawer-shadow: rgba(0, 0, 0, 0.32);
--color-dot-separator: rgba(142, 138, 149, 0.35);
--color-wordmark: #fffaff;
@@ -1524,11 +1818,11 @@
--color-adaptive-zinc-500-a12-a16: oklch(55.2% 0.016 285.938 / 16%);
--color-adaptive-zinc-500-400: oklch(70.5% 0.015 286.067);
--color-adaptive-zinc-600-300: oklch(87.1% 0.006 286.286);
- --color-clerk-page: #0e0e0e;
+ --color-clerk-page: #0a0a0a;
--color-clerk-foreground: #f5f5f5;
- --color-clerk-foreground-muted: #a3a3a3;
- --color-clerk-border: rgba(42, 42, 42, 0.06);
- --color-clerk-danger: #fca5a5;
+ --color-clerk-foreground-muted: #818181;
+ --color-clerk-border: #191919;
+ --color-clerk-danger: #ff6467;
}
}
}
diff --git a/apps/mobile/global.css b/apps/mobile/global.css
index 2f686e3a1fa..730b9e1a97f 100644
--- a/apps/mobile/global.css
+++ b/apps/mobile/global.css
@@ -8,228 +8,6 @@
@variant android {
--font-mono: "monospace";
}
-
- @variant light {
- /* Page backgrounds */
- --color-screen: #f2f2f7;
- --color-sheet: rgba(242, 242, 247, 0.98);
- --color-sheet-solid: #f2f2f7;
-
- /* Card / surface */
- --color-card: #ffffff;
- --color-card-alt: #f5f5f5;
- --color-card-translucent: rgba(255, 255, 255, 0.8);
- --color-thread-canvas: #f5f5f5;
- --color-thread-selected: #ffffff;
- --color-thread-selected-foreground: #262626;
- --color-thread-selected-foreground-muted: #737373;
- --color-composer-panel: rgba(245, 245, 245, 0.88);
- --color-composer-surface: rgba(255, 255, 255, 0.94);
- --color-composer-border: rgba(0, 0, 0, 0.1);
-
- /* Text */
- --color-foreground: #262626;
- --color-foreground-secondary: #525252;
- --color-foreground-muted: #737373;
- --color-foreground-tertiary: #8e8e93;
-
- /* Borders & separators */
- --color-border: rgba(0, 0, 0, 0.08);
- --color-border-subtle: rgba(0, 0, 0, 0.06);
- --color-separator: rgba(0, 0, 0, 0.04);
-
- /* Subtle backgrounds (badges, pills, overlays) */
- --color-subtle: rgba(0, 0, 0, 0.04);
- --color-subtle-strong: rgba(0, 0, 0, 0.08);
- --color-inline-skill-background: rgba(217, 70, 239, 0.12);
- --color-inline-skill-border: rgba(217, 70, 239, 0.25);
- --color-inline-skill-foreground: #a21caf;
-
- /* Primary action */
- --color-primary: #262626;
- --color-primary-foreground: #ffffff;
- --color-primary-shadow: #000000;
-
- /* Secondary action */
- --color-secondary: #ffffff;
- --color-secondary-foreground: #262626;
- --color-secondary-border: rgba(0, 0, 0, 0.08);
- --color-switch-active-track: #34c759;
- --color-switch-active-thumb: #ffffff;
- --color-switch-inactive-track: rgba(0, 0, 0, 0.08);
- --color-switch-inactive-thumb: #8e8e93;
-
- /* Warning */
- --color-warning: #fffbeb;
- --color-warning-border: #fde68a;
- --color-warning-foreground: #b45309;
-
- /* Danger */
- --color-danger: #fef2f2;
- --color-danger-border: rgba(239, 68, 68, 0.12);
- --color-danger-foreground: #dc2626;
-
- /* Inputs */
- --color-input: #ffffff;
- --color-input-border: rgba(0, 0, 0, 0.1);
- --color-sidebar-search: rgba(118, 118, 128, 0.12);
- --color-placeholder: #737373;
-
- /* Icons */
- --color-icon: #262626;
- --color-icon-muted: #525252;
- --color-icon-subtle: #a3a3a3;
-
- /* Header / glass chrome */
- --color-header: rgba(255, 255, 255, 0.97);
- --color-header-border: rgba(0, 0, 0, 0.06);
- --color-glass-surface: rgba(255, 255, 255, 0.72);
- --color-glass-tint: rgba(255, 255, 255, 0.18);
-
- /* StatusBar */
- --color-status-bar: #f2f2f7;
-
- /* Markdown */
- --color-md-body: #111111;
- --color-md-strong: #000000;
- --color-md-link: #2563eb;
- --color-md-blockquote-border: rgba(0, 0, 0, 0.08);
- --color-md-blockquote-bg: rgba(0, 0, 0, 0.02);
- --color-md-code-bg: rgba(0, 0, 0, 0.04);
- --color-md-code-text: #262626;
- --color-md-user-code-bg: rgba(0, 0, 0, 0.04);
- --color-md-user-code-text: #262626;
- --color-md-user-fence-bg: rgba(0, 0, 0, 0.06);
- --color-md-user-fence-text: #262626;
- --color-md-hr: rgba(0, 0, 0, 0.08);
-
- /* User bubble: a raised card on the thread canvas, matching web's message surface */
- --color-user-bubble: #ffffff;
- --color-user-bubble-foreground: #262626;
- --color-user-bubble-foreground-muted: rgba(38, 38, 38, 0.78);
- --color-user-bubble-skill-foreground: #2563eb;
-
- /* Drawer / modal backdrop */
- --color-backdrop: rgba(0, 0, 0, 0.22);
- --color-drawer: rgba(255, 255, 255, 0.99);
- --color-drawer-shadow: rgba(0, 0, 0, 0.12);
-
- /* Misc */
- --color-dot-separator: rgba(0, 0, 0, 0.2);
- --color-wordmark: #262626;
- --color-chevron: rgba(0, 0, 0, 0.2);
- }
-
- @variant dark {
- /* Page backgrounds */
- --color-screen: #0a0a0a;
- --color-sheet: rgba(14, 14, 14, 0.98);
- --color-sheet-solid: #0e0e0e;
-
- /* Card / surface */
- --color-card: #171717;
- --color-card-alt: #1c1c1c;
- --color-card-translucent: rgba(17, 17, 17, 0.8);
- --color-thread-canvas: #1c1c1c;
- --color-thread-selected: #171717;
- --color-thread-selected-foreground: #f5f5f5;
- --color-thread-selected-foreground-muted: #8e8e93;
- --color-composer-panel: rgba(28, 28, 28, 0.92);
- --color-composer-surface: rgba(23, 23, 23, 0.9);
- --color-composer-border: rgba(255, 255, 255, 0.08);
-
- /* Text */
- --color-foreground: #f5f5f5;
- --color-foreground-secondary: #a3a3a3;
- --color-foreground-muted: #8e8e93;
- --color-foreground-tertiary: #636366;
-
- /* Borders & separators */
- --color-border: rgba(255, 255, 255, 0.06);
- --color-border-subtle: rgba(255, 255, 255, 0.04);
- --color-separator: rgba(255, 255, 255, 0.03);
-
- /* Subtle backgrounds (badges, pills, overlays) */
- --color-subtle: rgba(255, 255, 255, 0.04);
- --color-subtle-strong: rgba(255, 255, 255, 0.08);
- --color-inline-skill-background: rgba(217, 70, 239, 0.12);
- --color-inline-skill-border: rgba(217, 70, 239, 0.25);
- --color-inline-skill-foreground: #f0abfc;
-
- /* Primary action */
- --color-primary: #f5f5f5;
- --color-primary-foreground: #0a0a0a;
- --color-primary-shadow: #000000;
-
- /* Secondary action */
- --color-secondary: rgba(255, 255, 255, 0.04);
- --color-secondary-foreground: #f5f5f5;
- --color-secondary-border: rgba(255, 255, 255, 0.06);
- --color-switch-active-track: #30d158;
- --color-switch-active-thumb: #ffffff;
- --color-switch-inactive-track: rgba(255, 255, 255, 0.06);
- --color-switch-inactive-thumb: #8e8e93;
-
- /* Warning */
- --color-warning: rgba(69, 26, 3, 0.4);
- --color-warning-border: rgba(120, 53, 15, 0.6);
- --color-warning-foreground: #fcd34d;
-
- /* Danger */
- --color-danger: rgba(239, 68, 68, 0.14);
- --color-danger-border: rgba(248, 113, 113, 0.18);
- --color-danger-foreground: #fca5a5;
-
- /* Inputs */
- --color-input: #141414;
- --color-input-border: rgba(255, 255, 255, 0.08);
- --color-sidebar-search: rgba(118, 118, 128, 0.24);
- --color-placeholder: #8e8e93;
-
- /* Icons */
- --color-icon: #f5f5f5;
- --color-icon-muted: #a3a3a3;
- --color-icon-subtle: #8e8e93;
-
- /* Header / glass chrome */
- --color-header: rgba(10, 10, 10, 0.97);
- --color-header-border: rgba(255, 255, 255, 0.06);
- --color-glass-surface: rgba(23, 23, 23, 0.78);
- --color-glass-tint: rgba(23, 23, 23, 0.24);
-
- /* StatusBar */
- --color-status-bar: #0a0a0a;
-
- /* Markdown */
- --color-md-body: #e5e5e5;
- --color-md-strong: #f5f5f5;
- --color-md-link: #60a5fa;
- --color-md-blockquote-border: rgba(255, 255, 255, 0.1);
- --color-md-blockquote-bg: rgba(255, 255, 255, 0.03);
- --color-md-code-bg: rgba(255, 255, 255, 0.06);
- --color-md-code-text: #e5e5e5;
- --color-md-user-code-bg: rgba(255, 255, 255, 0.06);
- --color-md-user-code-text: #e5e5e5;
- --color-md-user-fence-bg: rgba(255, 255, 255, 0.09);
- --color-md-user-fence-text: #e5e5e5;
- --color-md-hr: rgba(255, 255, 255, 0.08);
-
- /* User bubble: a raised card on the thread canvas, matching web's message surface */
- --color-user-bubble: #171717;
- --color-user-bubble-foreground: #f5f5f5;
- --color-user-bubble-foreground-muted: rgba(245, 245, 245, 0.78);
- --color-user-bubble-skill-foreground: #60a5fa;
-
- /* Drawer / modal backdrop */
- --color-backdrop: rgba(0, 0, 0, 0.48);
- --color-drawer: rgba(14, 14, 14, 0.99);
- --color-drawer-shadow: rgba(0, 0, 0, 0.32);
-
- /* Misc */
- --color-dot-separator: rgba(255, 255, 255, 0.2);
- --color-wordmark: #f5f5f5;
- --color-chevron: rgba(255, 255, 255, 0.2);
- }
}
}
diff --git a/apps/mobile/modules/t3-markdown-text/android/src/main/java/expo/modules/t3markdowntext/T3ContextChip.kt b/apps/mobile/modules/t3-markdown-text/android/src/main/java/expo/modules/t3markdowntext/T3ContextChip.kt
index 09b49c95640..df0dd88724e 100644
--- a/apps/mobile/modules/t3-markdown-text/android/src/main/java/expo/modules/t3markdowntext/T3ContextChip.kt
+++ b/apps/mobile/modules/t3-markdown-text/android/src/main/java/expo/modules/t3markdowntext/T3ContextChip.kt
@@ -114,7 +114,15 @@ class T3ContextChip(
fun color(
value: String,
fallback: Int
- ): Int = runCatching { Color.parseColor(value) }.getOrDefault(fallback)
+ ): Int = runCatching {
+ // React Native hex colors put alpha last; Android's parser puts it first.
+ val androidColor = if (value.length == 9 && value.startsWith("#")) {
+ "#${value.takeLast(2)}${value.substring(1, 7)}"
+ } else {
+ value
+ }
+ Color.parseColor(androidColor)
+ }.getOrDefault(fallback)
private fun blend(accent: Int, base: Int, weight: Float): Int = Color.rgb(
(Color.red(accent) * weight + Color.red(base) * (1 - weight)).toInt(),
diff --git a/apps/mobile/plugins/withAndroidModernAlertDialog.cjs b/apps/mobile/plugins/withAndroidModernAlertDialog.cjs
index 8c8b2b80006..1a677e35e80 100644
--- a/apps/mobile/plugins/withAndroidModernAlertDialog.cjs
+++ b/apps/mobile/plugins/withAndroidModernAlertDialog.cjs
@@ -1,5 +1,6 @@
const fs = require("node:fs");
const path = require("node:path");
+const themeVariables = require("../generated-uniwind-default-theme-variables.json");
const {
AndroidConfig,
withAndroidColors,
@@ -11,9 +12,10 @@ const {
// React Native's Alert renders an AppCompat AlertDialog on Android, which
// inherits the dated framework dialog chrome (square gray panel, teal
// all-caps buttons) from the app theme. These resources restyle it with the
-// app's uniwind tokens from global.css: --color-card panel, --color-foreground
-// text, --color-primary buttons, DM Sans type. The @font resources referenced
-// here are embedded by the expo-font plugin config in app.config.ts.
+// generated default palette: card panel, foreground text, readable primary
+// buttons, DM Sans type. Alert exposes no runtime custom-palette API, so these
+// build-time resources use the stock palette for each native appearance.
+// The fonts are embedded by the expo-font plugin config in app.config.ts.
// AppCompat's default dialog window background is an inset rounded rect, so
// the replacement keeps the same 16dp inset to preserve the dialog's margins.
@@ -30,21 +32,18 @@ const DIALOG_BACKGROUND_DRAWABLE = `<?xml version="1.0" encoding="utf-8"?>
</inset>
`;
-const COLORS = {
- light: {
- background: "#FFFFFF", // --color-card
- text: "#262626", // --color-foreground
- secondaryText: "#525252", // --color-foreground-secondary
- buttonText: "#262626", // --color-primary
- },
- night: {
- background: "#171717",
- text: "#F5F5F5",
- secondaryText: "#A3A3A3",
- buttonText: "#F5F5F5",
- },
+const colorsFor = (appearance) => {
+ const variables = themeVariables[appearance];
+ return {
+ background: variables["--color-card"],
+ text: variables["--color-foreground"],
+ secondaryText: variables["--color-foreground-secondary"],
+ buttonText: variables["--color-primary-text"],
+ };
};
+const COLORS = { light: colorsFor("light"), night: colorsFor("dark") };
+
function assignStyleItem(style, name, value) {
style.item = style.item ?? [];
const existing = style.item.find((item) => item.$?.name === name);
diff --git a/apps/mobile/scripts/generate-uniwind-themes.mts b/apps/mobile/scripts/generate-uniwind-themes.mts
index a5172845808..94643c3e413 100644
--- a/apps/mobile/scripts/generate-uniwind-themes.mts
+++ b/apps/mobile/scripts/generate-uniwind-themes.mts
@@ -5,17 +5,15 @@ import * as NodePath from "node:path";
import tailwindColors from "tailwindcss/colors";
import { BUILT_IN_THEME_IDS, type BuiltInThemeId } from "@t3tools/shared/themePalettes";
-import clerkTheme from "../clerk-theme.json" with { type: "json" };
import {
+ createMobileThemeVariables,
+ getMobileThemeColors,
getMobileThemeVariables,
- MOBILE_THEME_VARIABLE_NAMES,
- themeColorWithAlpha,
+ DEFAULT_MOBILE_THEME_ID,
type MobileThemeAppearance,
- type MobileThemeVariables,
} from "../src/lib/mobileTheme.ts";
const APPEARANCES = ["light", "dark"] as const;
-const GLOBAL_CSS_PATH = NodePath.resolve(import.meta.dirname, "../global.css");
const GENERATED_CSS_PATH = NodePath.resolve(import.meta.dirname, "../generated-uniwind-themes.css");
const GENERATED_NAMES_PATH = NodePath.resolve(
import.meta.dirname,
@@ -25,6 +23,7 @@ const GENERATED_DEFAULT_VARIABLES_PATH = NodePath.resolve(
import.meta.dirname,
"../generated-uniwind-default-theme-variables.json",
);
+const GENERATED_CLERK_THEME_PATH = NodePath.resolve(import.meta.dirname, "../clerk-theme.json");
type TailwindColorFamily = keyof typeof tailwindColors;
type TailwindColorShade = 50 | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | 950;
@@ -159,13 +158,38 @@ const variablesFor = (themeId: BuiltInThemeId, appearance: MobileThemeAppearance
// Clerk's native screens use one build-time palette per appearance. Custom
// profile pages must match it even when the rest of the app uses a named theme.
+const clerkColorsFor = (appearance: MobileThemeAppearance) => {
+ // Native authentication uses plain cards, rather than tonal settings groups.
+ const variables = createMobileThemeVariables(
+ getMobileThemeColors(DEFAULT_MOBILE_THEME_ID, appearance),
+ appearance,
+ );
+ return {
+ primary: variables["--color-primary"],
+ background: variables["--color-sheet-solid"],
+ input: variables["--color-input"],
+ danger: variables["--color-danger-foreground"],
+ success: appearance === "dark" ? "#34d399" : "#059669",
+ warning: variables["--color-warning-foreground"],
+ foreground: variables["--color-foreground"],
+ mutedForeground: variables["--color-foreground-muted"],
+ primaryForeground: variables["--color-primary-foreground"],
+ inputForeground: variables["--color-foreground"],
+ neutral: variables["--color-secondary"],
+ border: variables["--color-border"],
+ ring: variables["--color-focus"],
+ muted: variables["--color-subtle"],
+ shadow: variables["--color-primary-shadow"],
+ };
+};
+
const clerkVariablesFor = (appearance: MobileThemeAppearance) => {
- const colors = appearance === "dark" ? clerkTheme.darkColors : clerkTheme.colors;
+ const colors = clerkColorsFor(appearance);
return {
"--color-clerk-page": colors.background.toLowerCase(),
"--color-clerk-foreground": colors.foreground.toLowerCase(),
"--color-clerk-foreground-muted": colors.mutedForeground.toLowerCase(),
- "--color-clerk-border": themeColorWithAlpha(colors.border, 0.06),
+ "--color-clerk-border": colors.border,
"--color-clerk-danger": colors.danger.toLowerCase(),
};
};
@@ -181,6 +205,7 @@ export const renderUniwindThemesCSS = () => {
const variants = [
...APPEARANCES.map((appearance) =>
renderVariant(appearance, {
+ ...getMobileThemeVariables(DEFAULT_MOBILE_THEME_ID, appearance),
...adaptiveVariablesFor(appearance),
...clerkVariablesFor(appearance),
}),
@@ -202,50 +227,27 @@ export const renderUniwindThemesCSS = () => {
].join("\n");
};
-const readVariantBody = (css: string, appearance: MobileThemeAppearance): string => {
- const marker = `@variant ${appearance} {`;
- const markerIndex = css.indexOf(marker);
- if (markerIndex === -1) throw new Error(`Could not find ${marker} in global.css.`);
-
- const openingBraceIndex = css.indexOf("{", markerIndex);
- let depth = 0;
- for (let index = openingBraceIndex; index < css.length; index += 1) {
- if (css[index] === "{") depth += 1;
- if (css[index] !== "}") continue;
- depth -= 1;
- if (depth === 0) return css.slice(openingBraceIndex + 1, index);
- }
- throw new Error(`Could not find the end of ${marker} in global.css.`);
-};
-
-export const readDefaultThemeVariables = (css: string) =>
- Object.fromEntries(
- APPEARANCES.map((appearance) => {
- const body = readVariantBody(css, appearance);
- const variables = Object.fromEntries(
- MOBILE_THEME_VARIABLE_NAMES.map((name) => {
- const match = new RegExp(`^\\s*${name}:\\s*([^;]+);`, "mu").exec(body);
- if (!match?.[1]) {
- throw new Error(`Default ${appearance} theme is missing ${name}.`);
- }
- return [name, match[1].trim()];
- }),
- ) as MobileThemeVariables;
- return [appearance, variables];
- }),
- ) as Readonly<Record<MobileThemeAppearance, MobileThemeVariables>>;
-
-export const renderDefaultThemeVariablesJSON = (css: string) =>
- `${JSON.stringify(readDefaultThemeVariables(css), null, 2)}\n`;
+export const renderDefaultThemeVariablesJSON = () =>
+ `${JSON.stringify(
+ Object.fromEntries(
+ APPEARANCES.map((appearance) => [
+ appearance,
+ getMobileThemeVariables(DEFAULT_MOBILE_THEME_ID, appearance),
+ ]),
+ ),
+ null,
+ 2,
+ )}\n`;
export const getGeneratedUniwindThemeOutputs = (): ReadonlyArray<
readonly [filename: string, contents: string]
> => [
[GENERATED_CSS_PATH, renderUniwindThemesCSS()],
[GENERATED_NAMES_PATH, `${JSON.stringify(customThemeNames, null, 2)}\n`],
+ [GENERATED_DEFAULT_VARIABLES_PATH, renderDefaultThemeVariablesJSON()],
[
- GENERATED_DEFAULT_VARIABLES_PATH,
- renderDefaultThemeVariablesJSON(NodeFS.readFileSync(GLOBAL_CSS_PATH, "utf8")),
+ GENERATED_CLERK_THEME_PATH,
+ `${JSON.stringify({ colors: clerkColorsFor("light"), darkColors: clerkColorsFor("dark"), design: { borderRadius: 18 } }, null, 2)}\n`,
],
];
diff --git a/apps/mobile/scripts/generate-uniwind-themes.test.ts b/apps/mobile/scripts/generate-uniwind-themes.test.ts
index 31663b8de2f..a225b7087c8 100644
--- a/apps/mobile/scripts/generate-uniwind-themes.test.ts
+++ b/apps/mobile/scripts/generate-uniwind-themes.test.ts
@@ -5,9 +5,10 @@ import { describe, expect, it } from "vite-plus/test";
import {
customThemeNames,
getGeneratedUniwindThemeOutputs,
- readDefaultThemeVariables,
+ renderDefaultThemeVariablesJSON,
renderUniwindThemesCSS,
} from "./generate-uniwind-themes.mts";
+import { readDefaultMobileThemeVariables } from "../src/lib/mobileTheme.test-support";
describe("generate mobile Uniwind themes", () => {
it("keeps the committed outputs current", () => {
@@ -44,12 +45,15 @@ describe("generate mobile Uniwind themes", () => {
}
});
- it("generates the default runtime bridge from the authored CSS", () => {
- const css = NodeFS.readFileSync(NodePath.resolve(import.meta.dirname, "../global.css"), "utf8");
- const variables = readDefaultThemeVariables(css);
+ it("keeps the default runtime bridge and generated CSS on the same palette", () => {
+ const variables = JSON.parse(renderDefaultThemeVariablesJSON());
- expect(variables.light["--color-screen"]).toBe("#f2f2f7");
+ expect(variables.light).toEqual(readDefaultMobileThemeVariables("light"));
+ expect(variables.dark).toEqual(readDefaultMobileThemeVariables("dark"));
+ expect(variables.light["--color-screen"]).toBe("#fcfcfc");
+ expect(variables.light["--color-drawer"]).toBe("#fafafa");
expect(variables.dark["--color-screen"]).toBe("#0a0a0a");
+ expect(variables.dark["--color-drawer"]).toBe("#000000");
expect(Object.keys(variables.light)).toEqual(Object.keys(variables.dark));
});
@@ -77,11 +81,11 @@ describe("generate mobile Uniwind themes", () => {
),
name,
).toEqual({
- "--color-clerk-page": isDark ? "#0e0e0e" : "#f2f2f7",
- "--color-clerk-foreground": isDark ? "#f5f5f5" : "#262626",
- "--color-clerk-foreground-muted": isDark ? "#a3a3a3" : "#737373",
- "--color-clerk-border": isDark ? "rgba(42, 42, 42, 0.06)" : "rgba(229, 229, 234, 0.06)",
- "--color-clerk-danger": isDark ? "#fca5a5" : "#dc2626",
+ "--color-clerk-page": isDark ? "#0a0a0a" : "#fcfcfc",
+ "--color-clerk-foreground": isDark ? "#f5f5f5" : "#27272a",
+ "--color-clerk-foreground-muted": isDark ? "#818181" : "#71717b",
+ "--color-clerk-border": isDark ? "#191919" : "#e4e4e7",
+ "--color-clerk-danger": isDark ? "#ff6467" : "#c10007",
});
}
});
diff --git a/apps/mobile/src/components/AndroidScreenHeader.tsx b/apps/mobile/src/components/AndroidScreenHeader.tsx
index 2695eee5f01..537f628b4b3 100644
--- a/apps/mobile/src/components/AndroidScreenHeader.tsx
+++ b/apps/mobile/src/components/AndroidScreenHeader.tsx
@@ -25,7 +25,13 @@ export function AndroidHeaderIconButton(props: {
readonly disabled?: boolean;
readonly selected?: boolean;
}) {
- return <MaterialIconButton {...props} variant={props.selected ? "tonal" : "standard"} />;
+ return (
+ <MaterialIconButton
+ {...props}
+ tintColorClassName="accent-header-foreground"
+ variant={props.selected ? "tonal" : "standard"}
+ />
+ );
}
export function AndroidScreenHeader(props: {
@@ -65,6 +71,7 @@ export function AndroidScreenHeader(props: {
<MaterialIconButton
accessibilityLabel="Navigate up"
icon="arrow.left"
+ tintColorClassName="accent-header-foreground"
onPress={props.onBack}
/>
) : null}
@@ -72,7 +79,7 @@ export function AndroidScreenHeader(props: {
{props.leading}
<View className={cn("min-w-0 flex-1", !props.onBack && "pl-1")}>
- <Text numberOfLines={1} style={titleTypography} className="text-foreground">
+ <Text numberOfLines={1} style={titleTypography} className="text-header-foreground">
{props.title}
</Text>
{props.subtitle ? (
@@ -114,6 +121,7 @@ export function AndroidScreenHeader(props: {
<MaterialIconButton
accessibilityLabel="More actions"
icon="ellipsis"
+ tintColorClassName="accent-header-foreground"
onPress={open}
/>
)}
diff --git a/apps/mobile/src/components/AppText.tsx b/apps/mobile/src/components/AppText.tsx
index 805cdb66a3b..6f96f424695 100644
--- a/apps/mobile/src/components/AppText.tsx
+++ b/apps/mobile/src/components/AppText.tsx
@@ -18,7 +18,7 @@ export function AppText({ className, ...props }: AppTextProps) {
return (
<RNText
className={cn("font-sans text-foreground", className)}
- selectionColorClassName={Platform.OS === "android" ? "accent-primary/32" : undefined}
+ selectionColorClassName={Platform.OS === "android" ? "accent-focus/32" : undefined}
{...props}
/>
);
@@ -42,13 +42,9 @@ export function AppTextInput({ className, ref, ...props }: AppTextInputProps) {
className,
)}
placeholderTextColorClassName="accent-placeholder"
- selectionColorClassName={
- Platform.OS === "android" ? "accent-primary/32" : "accent-foreground-secondary"
- }
- cursorColorClassName={
- Platform.OS === "android" ? "accent-primary" : "accent-foreground-secondary"
- }
- selectionHandleColorClassName={Platform.OS === "android" ? "accent-primary" : undefined}
+ selectionColorClassName={"accent-focus/32"}
+ cursorColorClassName={"accent-focus"}
+ selectionHandleColorClassName={Platform.OS === "android" ? "accent-focus" : undefined}
{...props}
/>
);
diff --git a/apps/mobile/src/components/ComposerContextSheet.tsx b/apps/mobile/src/components/ComposerContextSheet.tsx
index 9fd307c9f52..9bdc10dced9 100644
--- a/apps/mobile/src/components/ComposerContextSheet.tsx
+++ b/apps/mobile/src/components/ComposerContextSheet.tsx
@@ -187,11 +187,9 @@ export function ComposerContextSheet(props: {
onRequestClose={props.onClose}
>
<View
- style={{
- flex: 1,
- justifyContent: "flex-end",
- backgroundColor: Platform.OS === "android" ? "#00000066" : undefined,
- }}
+ className={
+ Platform.OS === "android" ? "flex-1 justify-end bg-backdrop" : "flex-1 justify-end"
+ }
>
{Platform.OS === "android" ? (
<Pressable
diff --git a/apps/mobile/src/components/ControlPill.tsx b/apps/mobile/src/components/ControlPill.tsx
index 1a1a84c31bc..d8217ab67df 100644
--- a/apps/mobile/src/components/ControlPill.tsx
+++ b/apps/mobile/src/components/ControlPill.tsx
@@ -72,7 +72,9 @@ export function ControlPill(props: {
? props.disabled
? "text-foreground-muted"
: "text-primary-foreground"
- : "",
+ : variant === "danger"
+ ? "text-danger-foreground"
+ : "text-foreground",
);
if (
diff --git a/apps/mobile/src/components/FilePreview.tsx b/apps/mobile/src/components/FilePreview.tsx
index a255f50ccd2..337699e8a61 100644
--- a/apps/mobile/src/components/FilePreview.tsx
+++ b/apps/mobile/src/components/FilePreview.tsx
@@ -46,7 +46,7 @@ function DocumentPreview(props: {
}, [uri, name, props.source.mimeType, props.source.kind]);
return (
<Modal transparent animationType="fade" onRequestClose={props.onRequestClose}>
- <View className="flex-1 items-center justify-center bg-black/40 p-6">
+ <View className="flex-1 items-center justify-center bg-backdrop p-6">
<View className="w-full max-w-sm gap-4 rounded-2xl bg-sheet-solid p-6">
<Text className="font-t3-semibold text-foreground">Opening document…</Text>
<Text className="text-foreground-muted" numberOfLines={2}>
diff --git a/apps/mobile/src/components/GlassBackdrop.tsx b/apps/mobile/src/components/GlassBackdrop.tsx
index 27104f535dc..ea909f09173 100644
--- a/apps/mobile/src/components/GlassBackdrop.tsx
+++ b/apps/mobile/src/components/GlassBackdrop.tsx
@@ -6,12 +6,13 @@ import { themeColorWithAlpha } from "../lib/mobileTheme";
/** Frosted backdrop for containers that clip their children to their shape. */
export function GlassBackdrop(props: { readonly fallbackColor?: ColorValue }) {
- const { themeAppearance } = useAppearancePreferences();
+ const { themeAppearance, themeVariables } = useAppearancePreferences();
const supportsBlur = Platform.OS === "ios";
- const colorStyle =
- props.fallbackColor === undefined
- ? undefined
- : { backgroundColor: themeColorWithAlpha(String(props.fallbackColor), 1) };
+ const color = props.fallbackColor ?? themeVariables["--color-glass-fallback"];
+ const colorStyle = {
+ backgroundColor:
+ supportsBlur || typeof color !== "string" ? color : themeColorWithAlpha(color, 1),
+ };
return (
<>
@@ -25,11 +26,8 @@ export function GlassBackdrop(props: { readonly fallbackColor?: ColorValue }) {
) : null}
<View
pointerEvents="none"
- className="absolute inset-0 bg-card"
- style={[
- colorStyle,
- { opacity: supportsBlur ? (themeAppearance === "dark" ? 0.25 : 0.55) : 1 },
- ]}
+ className="absolute inset-0 bg-glass-fallback"
+ style={colorStyle}
/>
</>
);
diff --git a/apps/mobile/src/components/GlassSurface.tsx b/apps/mobile/src/components/GlassSurface.tsx
index bfbfff2c66c..4d899f18a4a 100644
--- a/apps/mobile/src/components/GlassSurface.tsx
+++ b/apps/mobile/src/components/GlassSurface.tsx
@@ -1,16 +1,10 @@
import { GlassView, isGlassEffectAPIAvailable } from "expo-glass-effect";
import type { ReactNode, Ref } from "react";
-import {
- Platform,
- useColorScheme,
- View,
- type ColorValue,
- type ViewProps,
- type ViewStyle,
-} from "react-native";
+import { Platform, View, type ColorValue, type ViewProps, type ViewStyle } from "react-native";
import { withUniwind } from "uniwind";
import { cn } from "../lib/cn";
+import { useAppearancePreferences } from "../features/settings/appearance/AppearancePreferencesProvider";
import { GlassBackdrop } from "./GlassBackdrop";
// Explicit mappings keep the native glassEffectStyle enum out of style-array conversion.
@@ -45,7 +39,8 @@ export function GlassSurface({
style,
...props
}: GlassSurfaceProps) {
- const isDarkMode = useColorScheme() === "dark";
+ const { themeAppearance } = useAppearancePreferences();
+ const isDarkMode = themeAppearance === "dark";
const supportsGlass = Platform.OS === "ios" && isGlassEffectAPIAvailable();
const hasShadow = chrome !== "none" && Platform.OS !== "android";
const surfaceStyle: ViewStyle = {
diff --git a/apps/mobile/src/components/MaterialButton.android.tsx b/apps/mobile/src/components/MaterialButton.android.tsx
index b5a8417fc79..f2df6464f10 100644
--- a/apps/mobile/src/components/MaterialButton.android.tsx
+++ b/apps/mobile/src/components/MaterialButton.android.tsx
@@ -35,7 +35,7 @@ export function MaterialButton(props: MaterialButtonProps) {
: tone === "danger"
? colors["--color-danger-foreground"]
: tone === "text"
- ? colors["--color-primary"]
+ ? colors["--color-primary-text"]
: colors["--color-secondary-foreground"];
return (
<View
diff --git a/apps/mobile/src/components/MaterialButton.tsx b/apps/mobile/src/components/MaterialButton.tsx
index f0ad4cb8f55..2649d762f9f 100644
--- a/apps/mobile/src/components/MaterialButton.tsx
+++ b/apps/mobile/src/components/MaterialButton.tsx
@@ -1,5 +1,6 @@
import { Pressable } from "react-native";
import { AppText } from "./AppText";
+import { cn } from "../lib/cn";
export interface MaterialButtonProps {
readonly label: string;
@@ -10,15 +11,36 @@ export interface MaterialButtonProps {
readonly fullWidth?: boolean;
}
+const TONE_CLASS_NAMES = {
+ primary: ["bg-primary", "text-primary-foreground"],
+ secondary: ["bg-secondary", "text-secondary-foreground"],
+ danger: ["bg-danger", "text-danger-foreground"],
+ text: ["bg-transparent", "text-primary-text"],
+} as const;
+
export function MaterialButton(props: MaterialButtonProps) {
+ const [containerClassName, labelClassName] = TONE_CLASS_NAMES[props.tone ?? "secondary"];
+ const disabled = Boolean(props.disabled || props.loading);
return (
<Pressable
accessibilityRole="button"
- disabled={props.disabled}
+ accessibilityState={{ disabled }}
+ disabled={disabled}
onPress={props.onPress}
- className="min-h-12 justify-center rounded-full bg-secondary px-6"
+ className={cn(
+ "min-h-12 justify-center rounded-full px-6 active:opacity-70",
+ props.fullWidth ? "w-full" : "self-start",
+ disabled ? "bg-subtle-strong" : containerClassName,
+ )}
>
- <AppText>{props.label}</AppText>
+ <AppText
+ className={cn(
+ "text-center font-t3-medium",
+ disabled ? "text-foreground-muted" : labelClassName,
+ )}
+ >
+ {props.label}
+ </AppText>
</Pressable>
);
}
diff --git a/apps/mobile/src/components/MaterialConfirmDialog.android.tsx b/apps/mobile/src/components/MaterialConfirmDialog.android.tsx
index 3e65d7185ec..35057ce10f5 100644
--- a/apps/mobile/src/components/MaterialConfirmDialog.android.tsx
+++ b/apps/mobile/src/components/MaterialConfirmDialog.android.tsx
@@ -58,9 +58,9 @@ export function MaterialConfirmDialog(props: MaterialConfirmDialogProps) {
colors={{
focusedTextColor: colors["--color-foreground"],
unfocusedTextColor: colors["--color-foreground"],
- focusedIndicatorColor: colors["--color-primary"],
+ focusedIndicatorColor: colors["--color-focus"],
unfocusedIndicatorColor: colors["--color-border"],
- cursorColor: colors["--color-primary"],
+ cursorColor: colors["--color-focus"],
}}
>
<OutlinedTextField.Label>
@@ -74,7 +74,10 @@ export function MaterialConfirmDialog(props: MaterialConfirmDialogProps) {
</AlertDialog.Text>
) : null}
<AlertDialog.DismissButton>
- <TextButton onClick={props.onCancel} colors={{ contentColor: colors["--color-primary"] }}>
+ <TextButton
+ onClick={props.onCancel}
+ colors={{ contentColor: colors["--color-primary-text"] }}
+ >
<Text style={bodyTypography}>{props.request.cancelText ?? "Cancel"}</Text>
</TextButton>
</AlertDialog.DismissButton>
@@ -84,7 +87,9 @@ export function MaterialConfirmDialog(props: MaterialConfirmDialogProps) {
enabled={!props.confirmDisabled}
colors={{
contentColor:
- colors[props.request.destructive ? "--color-danger" : "--color-primary"],
+ colors[
+ props.request.destructive ? "--color-danger-foreground" : "--color-primary-text"
+ ],
}}
>
<Text style={bodyTypography}>{props.request.confirmText}</Text>
diff --git a/apps/mobile/src/components/MaterialFloatingActionButton.android.tsx b/apps/mobile/src/components/MaterialFloatingActionButton.android.tsx
index 3978712683c..2882d0d91ec 100644
--- a/apps/mobile/src/components/MaterialFloatingActionButton.android.tsx
+++ b/apps/mobile/src/components/MaterialFloatingActionButton.android.tsx
@@ -25,9 +25,9 @@ export function MaterialFloatingActionButton(props: {
const { themeAppearance, themeVariables: colors } = useAppearancePreferences();
const typography = useScaledTextRole("footnote");
const primary = props.tone === "primary";
- const containerColor = colors[primary ? "--color-primary" : "--color-thread-selected"];
+ const containerColor = colors[primary ? "--color-primary" : "--color-secondary"];
const contentColor =
- colors[primary ? "--color-primary-foreground" : "--color-thread-selected-foreground"];
+ colors[primary ? "--color-primary-foreground" : "--color-secondary-foreground"];
const Component =
props.variant === "extended"
? ExtendedFloatingActionButton
@@ -76,9 +76,7 @@ export function MaterialFloatingActionButton(props: {
<SymbolView
name={props.icon}
size={iconSize}
- tintColorClassName={
- primary ? "accent-primary-foreground" : "accent-thread-selected-foreground"
- }
+ tintColorClassName={primary ? "accent-primary-foreground" : "accent-secondary-foreground"}
/>
</View>
</View>
diff --git a/apps/mobile/src/components/MaterialFloatingActionButton.tsx b/apps/mobile/src/components/MaterialFloatingActionButton.tsx
index eeed5fd1d13..53230804a4e 100644
--- a/apps/mobile/src/components/MaterialFloatingActionButton.tsx
+++ b/apps/mobile/src/components/MaterialFloatingActionButton.tsx
@@ -15,7 +15,7 @@ export function MaterialFloatingActionButton(
onPress={props.onPress}
className={cn(
"min-h-14 min-w-14 flex-row items-center justify-center gap-2 rounded-2xl px-4",
- props.tone === "primary" ? "bg-primary" : "bg-thread-selected",
+ props.tone === "primary" ? "bg-primary" : "bg-secondary",
props.className,
)}
style={props.style}
@@ -24,18 +24,14 @@ export function MaterialFloatingActionButton(
name={props.icon}
size={24}
tintColorClassName={
- props.tone === "primary"
- ? "accent-primary-foreground"
- : "accent-thread-selected-foreground"
+ props.tone === "primary" ? "accent-primary-foreground" : "accent-secondary-foreground"
}
/>
{props.variant === "extended" && props.expanded !== false ? (
<AppText
className={cn(
"text-sm",
- props.tone === "primary"
- ? "text-primary-foreground"
- : "text-thread-selected-foreground",
+ props.tone === "primary" ? "text-primary-foreground" : "text-secondary-foreground",
)}
>
{props.label}
diff --git a/apps/mobile/src/components/MaterialIconButton.android.tsx b/apps/mobile/src/components/MaterialIconButton.android.tsx
index 9cc6f5dc6ce..21284249f79 100644
--- a/apps/mobile/src/components/MaterialIconButton.android.tsx
+++ b/apps/mobile/src/components/MaterialIconButton.android.tsx
@@ -17,6 +17,7 @@ export function MaterialIconButton(props: {
readonly disabled?: boolean;
readonly selected?: boolean;
readonly variant?: "standard" | "primary" | "tonal" | "danger";
+ readonly tintColorClassName?: string;
}) {
const { themeAppearance, themeVariables: colors } = useAppearancePreferences();
const variant = props.variant ?? "standard";
@@ -40,7 +41,7 @@ export function MaterialIconButton(props: {
? "accent-danger-foreground"
: variant === "tonal"
? "accent-secondary-foreground"
- : "accent-foreground";
+ : (props.tintColorClassName ?? "accent-foreground");
return (
<View
accessible
diff --git a/apps/mobile/src/components/MaterialIconButton.tsx b/apps/mobile/src/components/MaterialIconButton.tsx
index 852889140ad..a788fdd5ea3 100644
--- a/apps/mobile/src/components/MaterialIconButton.tsx
+++ b/apps/mobile/src/components/MaterialIconButton.tsx
@@ -1,7 +1,15 @@
+import { cn } from "../lib/cn";
import { Pressable } from "react-native";
import { SymbolView, type AppSymbolName } from "./AppSymbol";
+const VARIANT_CLASS_NAMES = {
+ standard: ["", "accent-foreground"],
+ primary: ["rounded-full bg-primary", "accent-primary-foreground"],
+ danger: ["rounded-full bg-danger", "accent-danger-foreground"],
+ tonal: ["rounded-full bg-secondary", "accent-secondary-foreground"],
+} as const;
+
export function MaterialIconButton(props: {
readonly accessibilityLabel: string;
readonly icon: AppSymbolName;
@@ -9,15 +17,35 @@ export function MaterialIconButton(props: {
readonly disabled?: boolean;
readonly selected?: boolean;
readonly variant?: "standard" | "primary" | "tonal" | "danger";
+ readonly tintColorClassName?: string;
}) {
+ const variant = props.variant ?? "standard";
+ const [containerClassName, iconTintClassName] = VARIANT_CLASS_NAMES[variant];
return (
<Pressable
- {...props}
+ onPress={props.onPress}
+ disabled={props.disabled}
+ accessibilityLabel={props.accessibilityLabel}
accessibilityRole="button"
accessibilityState={{ disabled: Boolean(props.disabled), selected: props.selected }}
- className="size-12 items-center justify-center"
+ className={cn(
+ "size-12 items-center justify-center",
+ props.disabled && variant !== "standard"
+ ? "rounded-full bg-subtle-strong"
+ : containerClassName,
+ )}
>
- <SymbolView name={props.icon} size={24} tintColorClassName="accent-foreground" />
+ <SymbolView
+ name={props.icon}
+ size={24}
+ tintColorClassName={
+ props.disabled
+ ? "accent-icon-subtle"
+ : variant === "standard"
+ ? (props.tintColorClassName ?? iconTintClassName)
+ : iconTintClassName
+ }
+ />
</Pressable>
);
}
diff --git a/apps/mobile/src/components/MaterialSearchField.tsx b/apps/mobile/src/components/MaterialSearchField.tsx
index 5ed3945039d..ab96440f5f0 100644
--- a/apps/mobile/src/components/MaterialSearchField.tsx
+++ b/apps/mobile/src/components/MaterialSearchField.tsx
@@ -30,9 +30,9 @@ export function MaterialSearchField({
returnKeyType="search"
placeholder={placeholder}
placeholderTextColorClassName="accent-placeholder"
- selectionColorClassName="accent-primary/32"
- cursorColorClassName="accent-primary"
- selectionHandleColorClassName="accent-primary"
+ selectionColorClassName="accent-focus/32"
+ cursorColorClassName="accent-focus"
+ selectionHandleColorClassName="accent-focus"
className="min-w-0 flex-1 py-2 font-sans text-base text-foreground"
value={value}
onChangeText={onChangeText}
diff --git a/apps/mobile/src/components/RowPressable.tsx b/apps/mobile/src/components/RowPressable.tsx
index bd52fbe74f1..959a1a8aba9 100644
--- a/apps/mobile/src/components/RowPressable.tsx
+++ b/apps/mobile/src/components/RowPressable.tsx
@@ -9,22 +9,24 @@ import { useHoverGesture } from "../lib/useHoverGesture";
export function RowPressable({
children,
className,
- interactionClassName = "bg-primary",
+ interactionClassName = "bg-row-hover",
+ interactionOpacity = 1,
...props
}: Omit<ComponentProps<typeof Pressable>, "children"> & {
readonly children: ReactNode;
readonly interactionClassName?: string;
+ readonly interactionOpacity?: number;
}) {
const { hovered, hoverGesture } = useHoverGesture(props.disabled ?? false);
return (
<GestureDetector gesture={hoverGesture}>
<Pressable {...props} className={cn("relative overflow-hidden", className)}>
- {({ pressed }) => (
+ {() => (
<>
<View
pointerEvents="none"
className={cn("absolute inset-0", interactionClassName)}
- style={{ opacity: props.disabled || !hovered ? 0 : pressed ? 0.2 : 0.1 }}
+ style={{ opacity: props.disabled || !hovered ? 0 : interactionOpacity }}
/>
{children}
</>
diff --git a/apps/mobile/src/components/ScreenHeader.android.tsx b/apps/mobile/src/components/ScreenHeader.android.tsx
index f7b70e695ad..61a38c3a00c 100644
--- a/apps/mobile/src/components/ScreenHeader.android.tsx
+++ b/apps/mobile/src/components/ScreenHeader.android.tsx
@@ -53,7 +53,7 @@ export function ScreenHeader(props: ScreenHeaderProps) {
<SymbolView
name={menu.icon}
size={16}
- tintColorClassName="accent-icon"
+ tintColorClassName="accent-header-foreground"
type="monochrome"
/>
</Pressable>
@@ -95,7 +95,7 @@ export function ScreenHeader(props: ScreenHeaderProps) {
<SymbolView
name="chevron.left"
size={24}
- tintColorClassName="accent-foreground"
+ tintColorClassName="accent-header-foreground"
type="monochrome"
/>
</Pressable>
@@ -104,7 +104,7 @@ export function ScreenHeader(props: ScreenHeaderProps) {
<SymbolView
name="magnifyingglass"
size={17}
- tintColorClassName="accent-icon"
+ tintColorClassName="accent-header-foreground"
type="monochrome"
/>
<TextInput
@@ -114,7 +114,7 @@ export function ScreenHeader(props: ScreenHeaderProps) {
value={search.value}
placeholder={search.placeholder}
placeholderTextColorClassName="accent-placeholder"
- className="flex-1 py-2 text-base font-sans text-foreground"
+ className="flex-1 py-2 text-base font-sans text-header-foreground"
/>
</View>
{menuView}
diff --git a/apps/mobile/src/components/SegmentedControl.tsx b/apps/mobile/src/components/SegmentedControl.tsx
index 607062e0579..e1e61cda26d 100644
--- a/apps/mobile/src/components/SegmentedControl.tsx
+++ b/apps/mobile/src/components/SegmentedControl.tsx
@@ -40,7 +40,7 @@ export function SegmentedControl<Value extends number | string>(
layout={LinearTransition.duration(200)
.easing(Easing.out(Easing.cubic))
.reduceMotion(ReduceMotion.System)}
- className="absolute inset-y-0 rounded-full bg-subtle-strong"
+ className="absolute inset-y-0 rounded-full bg-secondary"
style={{
width: `${100 / props.options.length}%`,
start: `${
@@ -70,7 +70,7 @@ export function SegmentedControl<Value extends number | string>(
<Text
className={cn(
compact ? "text-xs" : "text-sm",
- active ? "font-t3-medium text-foreground" : "text-foreground-muted",
+ active ? "font-t3-medium text-secondary-foreground" : "text-foreground-muted",
)}
>
{option.label}
diff --git a/apps/mobile/src/features/connection/ConnectionStatusDot.tsx b/apps/mobile/src/features/connection/ConnectionStatusDot.tsx
index 43c61249a74..6c01bc8824a 100644
--- a/apps/mobile/src/features/connection/ConnectionStatusDot.tsx
+++ b/apps/mobile/src/features/connection/ConnectionStatusDot.tsx
@@ -10,10 +10,16 @@ import Animated, {
} from "react-native-reanimated";
import type { RemoteClientConnectionState } from "../../lib/connection";
+import { useAppearancePreferences } from "../settings/appearance/AppearancePreferencesProvider";
+import { themeColorWithAlpha, type MobileThemeVariables } from "../../lib/mobileTheme";
export type ConnectionStatusDotState = RemoteClientConnectionState;
-function statusDotTone(state: ConnectionStatusDotState): {
+function statusDotTone(
+ state: ConnectionStatusDotState,
+ theme: MobileThemeVariables,
+ dark: boolean,
+): {
readonly dotColor: string;
readonly haloColor: string;
} {
@@ -23,25 +29,25 @@ function statusDotTone(state: ConnectionStatusDotState): {
case "available":
case "unsupported":
return {
- dotColor: "#9ca3af",
- haloColor: "rgba(156,163,175,0.42)",
+ dotColor: theme["--color-icon-muted"],
+ haloColor: themeColorWithAlpha(theme["--color-icon-muted"], 0.42),
};
case "connected":
return {
- dotColor: "#34d399",
- haloColor: "rgba(52,211,153,0.48)",
+ dotColor: dark ? "#34d399" : "#059669",
+ haloColor: themeColorWithAlpha(dark ? "#34d399" : "#059669", 0.48),
};
case "connecting":
case "reconnecting":
return {
- dotColor: "#f59e0b",
- haloColor: "rgba(245,158,11,0.5)",
+ dotColor: theme["--color-warning-foreground"],
+ haloColor: themeColorWithAlpha(theme["--color-warning-foreground"], 0.5),
};
case "offline":
case "error":
return {
- dotColor: "#ef4444",
- haloColor: "rgba(239,68,68,0.48)",
+ dotColor: theme["--color-danger-foreground"],
+ haloColor: themeColorWithAlpha(theme["--color-danger-foreground"], 0.48),
};
}
}
@@ -78,7 +84,8 @@ export function ConnectionStatusDot(props: {
readonly size?: number;
}) {
const pulseProgress = usePulseAnimation(props.pulse);
- const tone = statusDotTone(props.state);
+ const { themeAppearance, themeVariables } = useAppearancePreferences();
+ const tone = statusDotTone(props.state, themeVariables, themeAppearance === "dark");
const dotSize = props.size ?? 10;
const haloSize = dotSize + 4;
const containerSize = haloSize + 4;
diff --git a/apps/mobile/src/features/connection/connectionTone.ts b/apps/mobile/src/features/connection/connectionTone.ts
index 05a65408567..a2d85096e35 100644
--- a/apps/mobile/src/features/connection/connectionTone.ts
+++ b/apps/mobile/src/features/connection/connectionTone.ts
@@ -18,8 +18,8 @@ export function connectionTone(state: RemoteClientConnectionState): StatusTone {
case "connecting":
return {
label: "Connecting",
- pillClassName: "bg-primary/10",
- textClassName: "text-foreground-secondary",
+ pillClassName: "bg-update",
+ textClassName: "text-update-foreground",
};
case "unsupported":
return {
diff --git a/apps/mobile/src/features/devices/DevicePreviewRouteScreen.tsx b/apps/mobile/src/features/devices/DevicePreviewRouteScreen.tsx
index 2d85a71f147..82b2b90feca 100644
--- a/apps/mobile/src/features/devices/DevicePreviewRouteScreen.tsx
+++ b/apps/mobile/src/features/devices/DevicePreviewRouteScreen.tsx
@@ -231,10 +231,10 @@ function DevicePreviewScreen({
</AppText>
<Pressable
accessibilityRole="button"
- className="rounded-full bg-subtle px-6 py-3"
+ className="rounded-full border border-secondary-border bg-secondary px-6 py-3"
onPress={state.refresh}
>
- <AppText>Retry</AppText>
+ <AppText className="text-secondary-foreground">Retry</AppText>
</Pressable>
</>
) : focused && foreground ? (
@@ -278,7 +278,9 @@ function OpenDevicePreview({
background: themeVariables["--color-sheet-solid"],
foreground: themeVariables["--color-foreground"],
muted: themeVariables["--color-foreground-muted"],
- buttonBackground: themeVariables["--color-subtle"],
+ buttonBackground: themeVariables["--color-secondary"],
+ buttonForeground: themeVariables["--color-secondary-foreground"],
+ buttonBorder: themeVariables["--color-secondary-border"],
}}
onUnauthorized={onUnauthorized}
onInputConnected={onInputConnected}
@@ -292,10 +294,10 @@ function OpenDevicePreview({
</AppText>
<Pressable
accessibilityRole="button"
- className="rounded-full bg-subtle px-6 py-3"
+ className="rounded-full border border-secondary-border bg-secondary px-6 py-3"
onPress={refresh}
>
- <AppText>Retry</AppText>
+ <AppText className="text-secondary-foreground">Retry</AppText>
</Pressable>
</>
) : (
diff --git a/apps/mobile/src/features/devices/device-stream-document.ts b/apps/mobile/src/features/devices/device-stream-document.ts
index a919e43218c..f3b753d5e99 100644
--- a/apps/mobile/src/features/devices/device-stream-document.ts
+++ b/apps/mobile/src/features/devices/device-stream-document.ts
@@ -10,6 +10,8 @@ export interface DeviceStreamConfiguration {
readonly foreground: string;
readonly muted: string;
readonly buttonBackground: string;
+ readonly buttonForeground: string;
+ readonly buttonBorder: string;
};
}
diff --git a/apps/mobile/src/features/devices/device-stream.browser.ts b/apps/mobile/src/features/devices/device-stream.browser.ts
index 727ea3e8fce..efa81d9a043 100644
--- a/apps/mobile/src/features/devices/device-stream.browser.ts
+++ b/apps/mobile/src/features/devices/device-stream.browser.ts
@@ -90,9 +90,9 @@ export function start(configuration: DeviceStreamConfiguration) {
Object.assign(retry.style, {
padding: "12px 24px",
borderRadius: "20px",
- border: "0",
+ border: `1px solid ${colors.buttonBorder}`,
background: colors.buttonBackground,
- color: colors.foreground,
+ color: colors.buttonForeground,
font: "inherit",
display: "none",
});
diff --git a/apps/mobile/src/features/files/SourceFileSurface.tsx b/apps/mobile/src/features/files/SourceFileSurface.tsx
index 76184972583..c7c2310ba93 100644
--- a/apps/mobile/src/features/files/SourceFileSurface.tsx
+++ b/apps/mobile/src/features/files/SourceFileSurface.tsx
@@ -74,7 +74,7 @@ const HighlightedSourceLine = memo(function HighlightedSourceLine(props: {
</NativeText>
<NativeText
selectable
- selectionColorClassName={Platform.OS === "android" ? "accent-primary/32" : undefined}
+ selectionColorClassName={Platform.OS === "android" ? "accent-focus/32" : undefined}
numberOfLines={props.wordBreak ? undefined : 1}
className="flex-1 font-normal text-foreground"
style={{
@@ -105,7 +105,7 @@ const HighlightedSourceLine = memo(function HighlightedSourceLine(props: {
key={`${start}:${token.content.length}:${token.color ?? ""}`}
selectable
selectionColorClassName={
- Platform.OS === "android" ? "accent-primary/32" : undefined
+ Platform.OS === "android" ? "accent-focus/32" : undefined
}
style={{
color: token.color ?? undefined,
@@ -279,7 +279,7 @@ function JavaScriptSourceFileSurface(props: SourceFileSurfaceProps) {
<MarkdownTextPrimitive
uiTextView
selectable
- selectionColorClassName={Platform.OS === "android" ? "accent-primary/32" : undefined}
+ selectionColorClassName={Platform.OS === "android" ? "accent-focus/32" : undefined}
style={{
color: foreground,
fontFamily: REVIEW_MONO_FONT_FAMILY,
diff --git a/apps/mobile/src/features/keyboard/CommandPalette.tsx b/apps/mobile/src/features/keyboard/CommandPalette.tsx
index a79e99fc212..32344ef3fda 100644
--- a/apps/mobile/src/features/keyboard/CommandPalette.tsx
+++ b/apps/mobile/src/features/keyboard/CommandPalette.tsx
@@ -20,6 +20,7 @@ import { GlassSurface } from "../../components/GlassSurface";
import { RowPressable } from "../../components/RowPressable";
import { AppText as Text } from "../../components/AppText";
import { SymbolView, type AppSymbolName } from "../../components/AppSymbol";
+import { cn } from "../../lib/cn";
import { scopedProjectKey, scopedThreadKey } from "../../lib/scopedEntities";
import { T3KeyboardCommands } from "../../native/T3KeyboardCommands";
import { useProjects, useThreadShell, useThreadShells } from "../../state/entities";
@@ -27,6 +28,7 @@ import { useThreadSearch } from "../../state/queries";
import { useWorkspaceState } from "../../state/workspace";
import { useSavedRemoteConnections } from "../../state/use-remote-environment-registry";
import { useAdaptiveWorkspaceLayout } from "../layout/AdaptiveWorkspaceLayout";
+import { useAppearancePreferences } from "../settings/appearance/AppearancePreferencesProvider";
import { ThreadSearchMatchExcerpt } from "../threads/thread-search-match";
import {
filterCommandPaletteItems,
@@ -74,35 +76,53 @@ function PaletteRow(props: {
readonly searchQuery: string;
readonly onSelect: () => void;
}) {
+ const foregroundClassName = props.selected
+ ? "text-thread-selected-foreground"
+ : "text-foreground";
+ const mutedForegroundClassName = props.selected
+ ? "text-thread-selected-foreground-muted"
+ : "text-foreground-muted";
return (
<RowPressable
accessibilityRole="button"
+ interactionOpacity={props.selected ? 0 : 1}
accessibilityState={{ selected: props.selected }}
onPress={props.onSelect}
className={
props.selected
- ? "mx-2 flex-row items-center gap-3 rounded-xl bg-primary/10 px-3"
+ ? "mx-2 flex-row items-center gap-3 rounded-xl bg-thread-selected px-3"
: "mx-2 flex-row items-center gap-3 rounded-xl px-3"
}
style={{ height: ROW_HEIGHT }}
>
<View className="w-7 items-center">
- <SymbolView name={itemIcon(props.item)} size={20} tintColorClassName="accent-icon" />
+ <SymbolView
+ name={itemIcon(props.item)}
+ size={20}
+ tintColorClassName={props.selected ? "accent-thread-selected-foreground" : "accent-icon"}
+ />
</View>
<View className="flex-1">
- <Text numberOfLines={1} className="text-base">
+ <Text numberOfLines={1} className={cn("text-base", foregroundClassName)}>
{props.item.title}
</Text>
{props.searchMatch ? (
- <ThreadSearchMatchExcerpt match={props.searchMatch} query={props.searchQuery} compact />
+ <ThreadSearchMatchExcerpt
+ match={props.searchMatch}
+ query={props.searchQuery}
+ selected={props.selected}
+ compact
+ />
) : props.item.detail ? (
- <Text numberOfLines={1} className="text-sm text-foreground-muted">
+ <Text numberOfLines={1} className={cn("text-sm", mutedForegroundClassName)}>
{props.item.detail}
</Text>
) : null}
</View>
{props.index < 9 ? (
- <NativeText className="w-8 shrink-0 text-right text-sm tabular-nums text-foreground-muted">
+ <NativeText
+ className={cn("w-8 shrink-0 text-right text-sm tabular-nums", mutedForegroundClassName)}
+ >
⌘{props.index + 1}
</NativeText>
) : null}
@@ -117,6 +137,7 @@ export function CommandPalette(props: {
readonly onCommand: (command: HardwareKeyboardCommand) => void;
}) {
const navigation = useNavigation();
+ const { themeVariables } = useAppearancePreferences();
const { selectThread } = useAdaptiveWorkspaceLayout();
const runCommand = props.onCommand;
const projects = useProjects();
@@ -392,14 +413,15 @@ export function CommandPalette(props: {
className="flex-1 items-center justify-center p-4"
>
<Pressable
- className="absolute inset-0 bg-black/15"
+ className="absolute inset-0 bg-backdrop"
accessibilityLabel="Close command palette"
onPress={() => close()}
/>
<GlassSurface
accessibilityViewIsModal
- className="bg-sheet/70"
+ className="bg-sheet"
tintColorClassName="accent-sheet/20"
+ fallbackColor={themeVariables["--color-sheet"]}
style={{
width: Math.min(600, width - 32),
height: Math.min(520, height - 80),
diff --git a/apps/mobile/src/features/projects/AddProjectScreen.tsx b/apps/mobile/src/features/projects/AddProjectScreen.tsx
index 4da58b3309e..84a2938785d 100644
--- a/apps/mobile/src/features/projects/AddProjectScreen.tsx
+++ b/apps/mobile/src/features/projects/AddProjectScreen.tsx
@@ -129,7 +129,7 @@ function SectionTitle(props: { readonly children: string }) {
<Text
className={
Platform.OS === "android"
- ? "px-4 text-sm font-t3-medium text-primary"
+ ? "px-4 text-sm font-t3-medium text-primary-text"
: "px-1 text-2xs font-t3-bold tracking-[0.7px] uppercase text-foreground-muted"
}
>
diff --git a/apps/mobile/src/features/review/ReviewSheet.tsx b/apps/mobile/src/features/review/ReviewSheet.tsx
index cb55570f911..2fac5376e5b 100644
--- a/apps/mobile/src/features/review/ReviewSheet.tsx
+++ b/apps/mobile/src/features/review/ReviewSheet.tsx
@@ -262,7 +262,7 @@ const ReviewFileNavigatorRow = memo(function ReviewFileNavigatorRow(props: {
Platform.OS === "android"
? cn(
"mt-1 min-h-12 justify-center rounded-[20px] px-3 py-2 active:bg-subtle",
- selected && "bg-thread-selected",
+ selected && "bg-subtle-strong",
)
: selected
? "mt-1 min-h-12 justify-center rounded-xl bg-subtle-strong px-3 py-2"
@@ -281,8 +281,10 @@ const ReviewFileNavigatorRow = memo(function ReviewFileNavigatorRow(props: {
{file.path}
</Text>
<View className="mt-1 flex-row gap-2">
- <Text className="text-2xs font-t3-bold text-emerald-600">+{file.additions}</Text>
- <Text className="text-2xs font-t3-bold text-rose-600">-{file.deletions}</Text>
+ <Text className="text-2xs font-t3-bold text-adaptive-emerald-700-300">
+ +{file.additions}
+ </Text>
+ <Text className="text-2xs font-t3-bold text-adaptive-rose-700-300">-{file.deletions}</Text>
</View>
</Pressable>
);
diff --git a/apps/mobile/src/features/review/nativeReviewDiffAdapter.test.ts b/apps/mobile/src/features/review/nativeReviewDiffAdapter.test.ts
index 21c86a2beab..6f55fef7c2a 100644
--- a/apps/mobile/src/features/review/nativeReviewDiffAdapter.test.ts
+++ b/apps/mobile/src/features/review/nativeReviewDiffAdapter.test.ts
@@ -97,6 +97,19 @@ function appTheme(themeId: MobileThemeId, appearance: MobileThemeAppearance) {
: getMobileThemeVariables(themeId, appearance);
}
+function contrastRatio(first: string, second: string): number {
+ const luminance = (hex: string) => {
+ const [red, green, blue] = [1, 3, 5].map((offset) => {
+ const channel = Number.parseInt(hex.slice(offset, offset + 2), 16) / 255;
+ return channel <= 0.04045 ? channel / 12.92 : ((channel + 0.055) / 1.055) ** 2.4;
+ });
+ return 0.2126 * red! + 0.7152 * green! + 0.0722 * blue!;
+ };
+ const a = luminance(first);
+ const b = luminance(second);
+ return (Math.max(a, b) + 0.05) / (Math.min(a, b) + 0.05);
+}
+
describe("getCachedNativeReviewDiffData", () => {
it.each([true, false])(
"preserves available diff rows before a notice (has excerpt: %s)",
@@ -251,6 +264,10 @@ describe("createNativeReviewDiffTheme", () => {
for (const color of Object.values(theme)) {
expect(color, `${themeId}/${appearance}`).toMatch(/^#[\da-f]{6}$/i);
}
+ expect(
+ contrastRatio(theme.hunkText, theme.hunkBackground),
+ `${themeId}/${appearance} hunk text`,
+ ).toBeGreaterThanOrEqual(4.5);
}
}
});
@@ -261,7 +278,7 @@ describe("createNativeReviewDiffTheme", () => {
const variables = {
...appTheme("material-you", appearance),
"--color-screen": "#101214FF",
- "--color-sheet": "#20222480",
+ "--color-md-code-bg": "#20222480",
"--color-md-code-text": "#E3E2E6FF",
"--color-foreground-muted": "#C7C5D080",
"--color-border": "#44464F80",
@@ -273,7 +290,7 @@ describe("createNativeReviewDiffTheme", () => {
expect(theme.text).toBe("#e3e2e6");
expect(theme.mutedText).toBe("#707076");
expect(theme.border).toBe("#2e3036");
- expect(theme.hunkText).toBe("#a8c7fa");
+ expect(contrastRatio(theme.hunkText, theme.hunkBackground)).toBeGreaterThanOrEqual(4.5);
for (const color of Object.values(theme)) {
expect(color).toMatch(/^#[\da-f]{6}$/i);
}
diff --git a/apps/mobile/src/features/review/nativeReviewDiffAdapter.ts b/apps/mobile/src/features/review/nativeReviewDiffAdapter.ts
index b35d561a249..8bea04c524d 100644
--- a/apps/mobile/src/features/review/nativeReviewDiffAdapter.ts
+++ b/apps/mobile/src/features/review/nativeReviewDiffAdapter.ts
@@ -177,20 +177,19 @@ export function createNativeReviewDiffTheme(
appTheme["--color-screen"],
scheme === "dark" ? "#000000" : "#ffffff",
);
- const background = opaqueNativeHexColor(appTheme["--color-sheet"], screen);
+ const background = opaqueNativeHexColor(appTheme["--color-md-code-bg"], screen);
const nativeColor = (color: string) => opaqueNativeHexColor(color, background);
if (scheme === "dark") {
return {
- // Match the app surface (--color-sheet) so code views blend with the rest of
- // the app instead of using a distinct code-editor background.
+ // Code surfaces share the desktop palette rather than the sheet behind them.
background,
text: nativeColor(appTheme["--color-md-code-text"]),
mutedText: nativeColor(appTheme["--color-foreground-muted"]),
headerBackground: background,
border: nativeColor(appTheme["--color-border"]),
hunkBackground: nativeColor(appTheme["--color-subtle-strong"]),
- hunkText: nativeColor(appTheme["--color-primary"]),
+ hunkText: nativeColor(appTheme["--color-foreground"]),
addBackground: "#0d2f28",
deleteBackground: "#391415",
addBar: "#00cab1",
@@ -201,15 +200,13 @@ export function createNativeReviewDiffTheme(
}
return {
- // Match the app surface (--color-sheet) so code views blend with the rest of the
- // app instead of using a distinct code-editor background.
background,
text: nativeColor(appTheme["--color-md-code-text"]),
mutedText: nativeColor(appTheme["--color-foreground-muted"]),
headerBackground: background,
border: nativeColor(appTheme["--color-border"]),
hunkBackground: nativeColor(appTheme["--color-subtle-strong"]),
- hunkText: nativeColor(appTheme["--color-primary"]),
+ hunkText: nativeColor(appTheme["--color-foreground"]),
addBackground: "#e5f8f5",
deleteBackground: "#ffe6e7",
addBar: "#00cab1",
diff --git a/apps/mobile/src/features/settings/SettingsOpenSourceLicensesRouteScreen.tsx b/apps/mobile/src/features/settings/SettingsOpenSourceLicensesRouteScreen.tsx
index efeca40e0ff..6ab20d03854 100644
--- a/apps/mobile/src/features/settings/SettingsOpenSourceLicensesRouteScreen.tsx
+++ b/apps/mobile/src/features/settings/SettingsOpenSourceLicensesRouteScreen.tsx
@@ -44,7 +44,7 @@ function LicenseRow(props: {
accessibilityLabel={`${props.entry.name}, ${props.entry.license}`}
accessibilityRole="button"
onPress={props.onPress}
- className="border-b border-border bg-card px-5 py-4 active:bg-card-alt"
+ className="border-b border-border bg-grouped-card px-5 py-4 active:bg-card-alt"
>
<View className="flex-row items-start gap-3">
<View className="min-w-0 flex-1 gap-1">
@@ -235,11 +235,11 @@ export function SettingsOpenSourceLicenseRouteScreen({ route }: LicenseDetailPro
onPress={() => void Linking.openURL(sourceUrl)}
className="min-h-12 flex-row items-center gap-2 self-start py-2 active:opacity-60"
>
- <Text className="font-t3-medium text-primary">Project source</Text>
+ <Text className="font-t3-medium text-primary-text">Project source</Text>
<SymbolView
name="arrow.up.right"
size={16}
- tintColorClassName={"accent-primary"}
+ tintColorClassName={"accent-primary-text"}
type="monochrome"
weight="semibold"
/>
@@ -247,7 +247,7 @@ export function SettingsOpenSourceLicenseRouteScreen({ route }: LicenseDetailPro
) : null}
</View>
- <View className="overflow-hidden rounded-[24px] border-continuous bg-card p-4">
+ <View className="overflow-hidden rounded-[24px] border-continuous bg-grouped-card p-4">
<Text selectable className="font-mono text-base leading-normal text-foreground">
{entry.noticeText}
</Text>
diff --git a/apps/mobile/src/features/settings/appearance/sections/ThemeAppearanceSection.tsx b/apps/mobile/src/features/settings/appearance/sections/ThemeAppearanceSection.tsx
index 788d04b047b..b3b76bda3a1 100644
--- a/apps/mobile/src/features/settings/appearance/sections/ThemeAppearanceSection.tsx
+++ b/apps/mobile/src/features/settings/appearance/sections/ThemeAppearanceSection.tsx
@@ -151,7 +151,7 @@ function ThemeCard(props: {
);
return (
- <View className="min-w-36 flex-1 basis-[47%] gap-3 rounded-[24px] border border-border bg-card px-2 py-4">
+ <View className="min-w-36 flex-1 basis-[47%] gap-3 rounded-[24px] border border-border bg-grouped-card px-2 py-4">
<Pressable
accessibilityHint="Sets both light and dark appearances"
accessibilityLabel={`${props.label} theme`}
@@ -259,7 +259,9 @@ function ModeCard(props: {
accessibilityState={{ checked: props.selected, disabled: props.disabled }}
className={cn(
"min-w-0 flex-1 gap-2 rounded-[24px] p-2 active:scale-[0.97]",
- props.selected ? "border-2 border-primary bg-subtle" : "border border-border bg-card",
+ props.selected
+ ? "border-2 border-primary bg-subtle"
+ : "border border-border bg-grouped-card",
)}
disabled={props.disabled}
onPress={props.onPress}
diff --git a/apps/mobile/src/features/settings/components/AutoSettleDaysField.ios.tsx b/apps/mobile/src/features/settings/components/AutoSettleDaysField.ios.tsx
index 2c77aa55571..d7734f5a923 100644
--- a/apps/mobile/src/features/settings/components/AutoSettleDaysField.ios.tsx
+++ b/apps/mobile/src/features/settings/components/AutoSettleDaysField.ios.tsx
@@ -44,7 +44,7 @@ export function AutoSettleDaysField(props: AutoSettleDaysFieldProps) {
disabled(props.disabled),
accessibilityLabel(`Days before auto-settle: ${props.value}`),
frame({ minWidth: 64, minHeight: 44 }),
- foregroundStyle(colors["--color-primary"]),
+ foregroundStyle(colors["--color-primary-text"]),
font({ size: appearance.baseFontSize }),
]}
>
@@ -78,7 +78,7 @@ export function AutoSettleDaysField(props: AutoSettleDaysFieldProps) {
<Button
label="Cancel"
onPress={() => setOpen(false)}
- modifiers={[foregroundStyle(colors["--color-primary"])]}
+ modifiers={[foregroundStyle(colors["--color-primary-text"])]}
/>
<Button
label="Done"
@@ -86,7 +86,7 @@ export function AutoSettleDaysField(props: AutoSettleDaysFieldProps) {
setOpen(false);
if (!props.disabled && draft !== props.value) props.onValueChange(draft);
}}
- modifiers={[foregroundStyle(colors["--color-primary"])]}
+ modifiers={[foregroundStyle(colors["--color-primary-text"])]}
/>
</HStack>
</VStack>
diff --git a/apps/mobile/src/features/settings/components/SettingsActionRow.tsx b/apps/mobile/src/features/settings/components/SettingsActionRow.tsx
index 9cf58effe50..98d5033ccbe 100644
--- a/apps/mobile/src/features/settings/components/SettingsActionRow.tsx
+++ b/apps/mobile/src/features/settings/components/SettingsActionRow.tsx
@@ -31,6 +31,7 @@ export function SettingsActionRow(props: {
if (Platform.OS === "android") {
return (
<MaterialListRow
+ className="bg-grouped-card"
title={props.label}
titleClassName={textClassName}
leading={icon}
diff --git a/apps/mobile/src/features/settings/components/SettingsProjectOverridesSection.tsx b/apps/mobile/src/features/settings/components/SettingsProjectOverridesSection.tsx
index c364e09e36e..b89ab845434 100644
--- a/apps/mobile/src/features/settings/components/SettingsProjectOverridesSection.tsx
+++ b/apps/mobile/src/features/settings/components/SettingsProjectOverridesSection.tsx
@@ -23,7 +23,7 @@ export function SettingsProjectOverridesSection(props: {
onPress={props.onClear}
className="px-2 py-2 active:opacity-70"
>
- <Text className="text-sm font-t3-medium text-primary">Use defaults</Text>
+ <Text className="text-sm font-t3-medium text-primary-text">Use defaults</Text>
</Pressable>
) : null}
</View>
diff --git a/apps/mobile/src/features/settings/components/SettingsRow.tsx b/apps/mobile/src/features/settings/components/SettingsRow.tsx
index 2aa457ceeca..53bf1b55b45 100644
--- a/apps/mobile/src/features/settings/components/SettingsRow.tsx
+++ b/apps/mobile/src/features/settings/components/SettingsRow.tsx
@@ -24,6 +24,7 @@ export function SettingsRow(props: {
if (Platform.OS === "android") {
return (
<MaterialListRow
+ className="bg-grouped-card"
title={props.label}
subtitle={props.valuePosition === "trailing" ? undefined : props.value}
accessibilityLabel={[props.label, props.value].filter(Boolean).join(", ")}
diff --git a/apps/mobile/src/features/settings/components/SettingsSection.tsx b/apps/mobile/src/features/settings/components/SettingsSection.tsx
index 05276b767fc..082fea82475 100644
--- a/apps/mobile/src/features/settings/components/SettingsSection.tsx
+++ b/apps/mobile/src/features/settings/components/SettingsSection.tsx
@@ -15,7 +15,7 @@ export function SettingsSection(props: {
<Text
className={
Platform.OS === "android"
- ? "px-4 text-sm font-t3-medium text-primary"
+ ? "px-4 text-sm font-t3-medium text-primary-text"
: "px-2 text-sm font-t3-medium text-foreground-muted"
}
>
@@ -27,8 +27,8 @@ export function SettingsSection(props: {
<View
className={
Platform.OS === "android"
- ? "overflow-hidden rounded-[28px] bg-card"
- : "overflow-hidden rounded-[24px] border-continuous bg-card"
+ ? "overflow-hidden rounded-[28px] bg-grouped-card"
+ : "overflow-hidden rounded-[24px] border-continuous bg-grouped-card"
}
>
{props.children}
diff --git a/apps/mobile/src/features/terminal/terminalTheme.test.ts b/apps/mobile/src/features/terminal/terminalTheme.test.ts
index 478ddc96d96..bf29f45abf1 100644
--- a/apps/mobile/src/features/terminal/terminalTheme.test.ts
+++ b/apps/mobile/src/features/terminal/terminalTheme.test.ts
@@ -6,20 +6,20 @@ import { themeColorToNativeColor } from "../../lib/mobileTheme";
import { buildGhosttyThemeConfig, getMobileTerminalTheme } from "./terminalTheme";
describe("getMobileTerminalTheme", () => {
- it("preserves the default light terminal palette", () => {
+ it("uses the shared default light terminal colors", () => {
expect(getMobileTerminalTheme("t3-code", "light")).toMatchObject({
- background: "#f2f2f7",
- foreground: "#6C6C71",
- cursorForeground: "#009fff",
- cursorBackground: "#f2f2f7",
+ background: "#fcfcfc",
+ foreground: "#27272a",
+ cursorForeground: "#26384e",
+ cursorBackground: "#fcfcfc",
});
});
- it("preserves the default dark terminal palette", () => {
+ it("uses the shared default dark terminal colors", () => {
expect(getMobileTerminalTheme("t3-code", "dark")).toMatchObject({
background: "#0a0a0a",
- foreground: "#adadb1",
- cursorForeground: "#009fff",
+ foreground: "#f5f5f5",
+ cursorForeground: "#b4cbff",
cursorBackground: "#0a0a0a",
});
});
@@ -48,8 +48,8 @@ describe("buildGhosttyThemeConfig", () => {
const config = buildGhosttyThemeConfig(getMobileTerminalTheme("t3-code", "dark"));
expect(config).toContain("background = #0a0a0a");
- expect(config).toContain("foreground = #adadb1");
- expect(config).toContain("cursor-color = #009fff");
+ expect(config).toContain("foreground = #f5f5f5");
+ expect(config).toContain("cursor-color = #b4cbff");
expect(config).toContain("palette = 0=#141415");
expect(config).toContain("palette = 15=#c6c6c8");
expect(config.endsWith("\n")).toBe(true);
diff --git a/apps/mobile/src/features/terminal/terminalTheme.ts b/apps/mobile/src/features/terminal/terminalTheme.ts
index f7d96b66861..450efd1c588 100644
--- a/apps/mobile/src/features/terminal/terminalTheme.ts
+++ b/apps/mobile/src/features/terminal/terminalTheme.ts
@@ -1,10 +1,5 @@
import {
- BUILT_IN_THEMES,
- T3_CHAT_THEME,
- getThemeColorsForAppearance,
-} from "@t3tools/shared/themePalettes";
-
-import {
+ getMobileThemeColors,
getMobileThemeVariables,
themeColorToNativeColor,
type MobileThemeId,
@@ -44,12 +39,12 @@ type TerminalPalette = readonly [
const PIERRE_LIGHT_THEME: TerminalTheme = {
// Pierre terminal palette with the app's shared screen background.
- background: "#f2f2f7",
+ background: "#fcfcfc",
foreground: "#6C6C71",
mutedForeground: "#8E8E95",
border: "#eeeeef",
cursorForeground: "#009fff",
- cursorBackground: "#f2f2f7",
+ cursorBackground: "#fcfcfc",
palette: [
"#1F1F21",
"#ff2e3f",
@@ -107,11 +102,9 @@ export function getMobileTerminalTheme(
scheme: TerminalAppearanceScheme,
): TerminalTheme {
const base = getPierreTerminalTheme(scheme);
- if (themeId === "t3-code" || themeId === "material-you") return base;
-
- const theme = BUILT_IN_THEMES.find((candidate) => candidate.id === themeId) ?? T3_CHAT_THEME;
- const palette = getThemeColorsForAppearance(theme, scheme) ?? theme.colors;
- const colors = getMobileThemeVariables(themeId, scheme);
+ const paletteId = themeId === "material-you" ? "t3-code" : themeId;
+ const palette = getMobileThemeColors(paletteId, scheme);
+ const colors = getMobileThemeVariables(paletteId, scheme);
const background = themeColorToNativeColor(palette.terminalBackground);
return {
...base,
diff --git a/apps/mobile/src/features/threads/CustomSnoozeSheet.shared.tsx b/apps/mobile/src/features/threads/CustomSnoozeSheet.shared.tsx
index 5fc60bc05df..d3ced2ce53c 100644
--- a/apps/mobile/src/features/threads/CustomSnoozeSheet.shared.tsx
+++ b/apps/mobile/src/features/threads/CustomSnoozeSheet.shared.tsx
@@ -31,7 +31,7 @@ export function CustomSnoozeSheet(props: {
return (
<Modal visible transparent animationType="fade" onRequestClose={props.onClose}>
<KeyboardAvoidingView
- className="flex-1 items-center justify-center bg-black/40 px-6"
+ className="flex-1 items-center justify-center bg-backdrop px-6"
behavior={Platform.OS === "ios" ? "padding" : undefined}
>
<ScrollView
diff --git a/apps/mobile/src/features/threads/NewTaskContextPickerScreens.tsx b/apps/mobile/src/features/threads/NewTaskContextPickerScreens.tsx
index b677a9353eb..7edb07f4e3d 100644
--- a/apps/mobile/src/features/threads/NewTaskContextPickerScreens.tsx
+++ b/apps/mobile/src/features/threads/NewTaskContextPickerScreens.tsx
@@ -66,7 +66,7 @@ function SelectionRow(props: {
}
trailing={
props.selected ? (
- <SymbolView name="checkmark" size={20} tintColorClassName="accent-primary" />
+ <SymbolView name="checkmark" size={20} tintColorClassName="accent-focus" />
) : null
}
accessibilityRole="radio"
@@ -482,9 +482,9 @@ export function NewTaskBranchPickerRouteScreen() {
autoCorrect={false}
accessibilityLabel="Find a branch"
className="h-12 rounded-full border border-input-border bg-input px-4 font-sans text-base text-foreground"
- selectionColorClassName="accent-primary/32"
- cursorColorClassName="accent-primary"
- selectionHandleColorClassName="accent-primary"
+ selectionColorClassName="accent-focus/32"
+ cursorColorClassName="accent-focus"
+ selectionHandleColorClassName="accent-focus"
onChangeText={flow.setBranchQuery}
placeholder="Find a branch"
placeholderTextColorClassName="accent-placeholder"
diff --git a/apps/mobile/src/features/threads/ThreadArrangementSheet.tsx b/apps/mobile/src/features/threads/ThreadArrangementSheet.tsx
index 5c9eb7e54a5..65816f3873f 100644
--- a/apps/mobile/src/features/threads/ThreadArrangementSheet.tsx
+++ b/apps/mobile/src/features/threads/ThreadArrangementSheet.tsx
@@ -379,7 +379,7 @@ export function ThreadArrangementSheet(props: { onClose: () => void }) {
onPress={props.onClose}
className="min-h-11 justify-center px-3"
>
- <Text className="text-base text-primary">Done</Text>
+ <Text className="text-base text-primary-text">Done</Text>
</Pressable>
</View>
<Text className="px-5 pb-3 text-sm text-foreground-muted">
diff --git a/apps/mobile/src/features/threads/ThreadComposer.tsx b/apps/mobile/src/features/threads/ThreadComposer.tsx
index 7fd517c4f3b..c747a4ed817 100644
--- a/apps/mobile/src/features/threads/ThreadComposer.tsx
+++ b/apps/mobile/src/features/threads/ThreadComposer.tsx
@@ -244,12 +244,8 @@ export function ComposerSurface(props: {
>
<AnimatedGlassSurface
chrome="none"
- fallbackColor={
- Platform.OS === "android" ? colors["--color-composer-surface"] : colors["--color-card"]
- }
- fallbackClassName={
- Platform.OS === "android" ? "border border-composer-border" : "border border-border"
- }
+ fallbackColor={colors["--color-composer-surface"]}
+ fallbackClassName="border border-composer-border"
glassEffectStyle="regular"
// The composer is a passive material containing interactive controls.
// Keep native glass out of the interactive content's layout path.
diff --git a/apps/mobile/src/features/threads/ThreadCreationFailedCard.tsx b/apps/mobile/src/features/threads/ThreadCreationFailedCard.tsx
index dce4cb3797b..436475db601 100644
--- a/apps/mobile/src/features/threads/ThreadCreationFailedCard.tsx
+++ b/apps/mobile/src/features/threads/ThreadCreationFailedCard.tsx
@@ -13,14 +13,14 @@ export function ThreadCreationFailedCard(props: {
readonly onEditTask: () => void;
}) {
return (
- <View className="gap-2.5 rounded-[20px] border border-adaptive-neutral-200-white-a6 bg-adaptive-neutral-100-900 p-4">
- <Text className="font-t3-bold text-2xs uppercase tracking-[1.1px] text-adaptive-rose-700-300">
+ <View className="gap-2.5 rounded-[20px] border border-border-subtle bg-card-alt p-4">
+ <Text className="font-t3-bold text-2xs uppercase tracking-[1.1px] text-danger-foreground">
Could not start task
</Text>
- <Text className="font-sans text-sm leading-normal text-adaptive-neutral-600-400">
+ <Text className="font-sans text-sm leading-normal text-foreground-secondary">
{props.reason}
</Text>
- <Text className="font-sans text-xs leading-normal text-adaptive-neutral-600-400">
+ <Text className="font-sans text-xs leading-normal text-foreground-secondary">
Your prompt was kept in the project draft.
</Text>
<View className="flex-row">
diff --git a/apps/mobile/src/features/threads/ThreadFeed.tsx b/apps/mobile/src/features/threads/ThreadFeed.tsx
index a860612cb92..20848cd2ad1 100644
--- a/apps/mobile/src/features/threads/ThreadFeed.tsx
+++ b/apps/mobile/src/features/threads/ThreadFeed.tsx
@@ -888,7 +888,7 @@ function MarkdownCodeBlock(props: {
>
<NativeText
selectable
- selectionColorClassName={Platform.OS === "android" ? "accent-primary/32" : undefined}
+ selectionColorClassName={Platform.OS === "android" ? "accent-focus/32" : undefined}
className="font-mono"
style={{
color: props.textColor,
@@ -1400,7 +1400,7 @@ function renderFeedEntry(
accessibilityState={{ expanded: entry.expanded }}
onPress={() => props.onToggleTurnFold(entry.turnId)}
hitSlop={4}
- className="mb-1 min-h-11 flex-row items-center gap-2 border-b border-adaptive-neutral-200-a80-white-a8 px-2"
+ className="mb-1 min-h-11 flex-row items-center gap-2 border-b border-border-subtle px-2"
style={{
minHeight: Math.max(TURN_FOLD_HEIGHT - 3.5, props.workRowSizing.estimatedRowHeight),
}}
@@ -1467,7 +1467,7 @@ function renderFeedEntry(
accessibilityLabel={label}
className="mb-3 flex-row items-center gap-3 px-1 py-1"
>
- <View className="h-px flex-1 bg-adaptive-neutral-200-a80-white-a8" />
+ <View className="h-px flex-1 bg-subtle" />
<View className="shrink-0 flex-row items-center gap-1.5">
<SymbolView
name="arrow.down.right.and.arrow.up.left"
@@ -1477,7 +1477,7 @@ function renderFeedEntry(
/>
<Text className="font-t3-medium text-xs text-foreground-muted">{label}</Text>
</View>
- <View className="h-px flex-1 bg-adaptive-neutral-200-a80-white-a8" />
+ <View className="h-px flex-1 bg-subtle" />
</View>
);
}
@@ -1599,8 +1599,8 @@ function renderFeedEntry(
mimeType={attachment.mimeType}
className={
inlineAttachmentIds.size
- ? "h-24 w-24 rounded-[14px] bg-white/15"
- : "aspect-[1.3] w-full rounded-[14px] bg-white/15"
+ ? "h-24 w-24 rounded-[14px] bg-user-bubble-foreground/15"
+ : "aspect-[1.3] w-full rounded-[14px] bg-user-bubble-foreground/15"
}
onPressPreview={props.onPressPreview}
/>
@@ -1636,7 +1636,7 @@ function renderFeedEntry(
) : null}
</View>
<View className="mt-1 flex-row items-center justify-end gap-1 pr-0.5">
- <Text className="font-t3-medium text-xs tabular-nums text-adaptive-neutral-600-400">
+ <Text className="font-t3-medium text-xs tabular-nums text-foreground-secondary">
{entry.pendingMessage && !entry.acknowledged ? "Pending" : timestampLabel}
</Text>
{entry.pendingMessage &&
@@ -1715,7 +1715,7 @@ function renderFeedEntry(
attachmentId={attachment.id}
name={attachment.name}
mimeType={attachment.mimeType}
- className="mt-1.5 aspect-[1.3] w-full rounded-[18px] bg-adaptive-neutral-200-800"
+ className="mt-1.5 aspect-[1.3] w-full rounded-[18px] bg-subtle-strong"
onPressPreview={props.onPressPreview}
/>
) : isFileAttachment(attachment) ? (
@@ -1739,7 +1739,7 @@ function renderFeedEntry(
buttonSize={28}
iconSize={13}
/>
- <Text className="font-t3-medium text-xs tabular-nums text-adaptive-neutral-600-400">
+ <Text className="font-t3-medium text-xs tabular-nums text-foreground-secondary">
{timestampLabel}
</Text>
</View>
diff --git a/apps/mobile/src/features/threads/ThreadNavigationSidebar.tsx b/apps/mobile/src/features/threads/ThreadNavigationSidebar.tsx
index f6ea5dcf48e..bf957ad5419 100644
--- a/apps/mobile/src/features/threads/ThreadNavigationSidebar.tsx
+++ b/apps/mobile/src/features/threads/ThreadNavigationSidebar.tsx
@@ -152,7 +152,7 @@ function ThreadNavigationSidebarPane(
props: ThreadNavigationSidebarProps & { readonly nativeChrome: boolean },
) {
const { themeVariables: materialTheme } = useAppearancePreferences();
- const screenColor = materialTheme["--color-screen"];
+ const drawerColor = materialTheme["--color-drawer"];
const insets = useSafeAreaInsets();
const projects = useProjects();
@@ -935,7 +935,7 @@ function ThreadNavigationSidebarPane(
}),
)}
searchQuery={props.searchQuery}
- pane={Platform.OS === "android" ? "screen" : "sidebar"}
+ pane="sidebar"
selected={
scopedThreadKey(thread.environmentId, thread.id) === props.selectedThreadKey
}
@@ -976,7 +976,7 @@ function ThreadNavigationSidebarPane(
disabled={!shelfPreferencesLoaded}
expanded={item.expanded}
onToggle={toggleSnoozedShelf}
- pane={Platform.OS === "android" ? "screen" : "sidebar"}
+ pane="sidebar"
/>
);
case "v2-settled-shelf":
@@ -986,17 +986,21 @@ function ThreadNavigationSidebarPane(
disabled={!shelfPreferencesLoaded}
expanded={item.expanded}
onToggle={toggleSettledShelf}
- pane={Platform.OS === "android" ? "screen" : "sidebar"}
+ pane="sidebar"
/>
);
case "v2-show-more":
return (
- <ThreadListV2ShowMoreRow hiddenCount={item.hiddenCount} onPress={showMoreSettled} />
+ <ThreadListV2ShowMoreRow
+ pane="sidebar"
+ hiddenCount={item.hiddenCount}
+ onPress={showMoreSettled}
+ />
);
case "header":
return (
<ThreadListGroupHeader
- variant={Platform.OS === "android" ? "compact" : "sidebar"}
+ variant="sidebar"
collapsed={item.collapsed}
isFirst={item.isFirst}
groupKey={item.group.key}
@@ -1014,7 +1018,7 @@ function ThreadNavigationSidebarPane(
case "pending-task":
return (
<PendingTaskListRow
- variant={Platform.OS === "android" ? "compact" : "sidebar"}
+ variant="sidebar"
pendingTask={item.pendingTask}
environmentLabel={
savedConnectionsById[item.pendingTask.environmentId]?.environmentLabel ?? null
@@ -1064,7 +1068,7 @@ function ThreadNavigationSidebarPane(
case "show-more":
return (
<ThreadListShowMoreRow
- variant={Platform.OS === "android" ? "compact" : "sidebar"}
+ variant="sidebar"
hiddenCount={item.hiddenCount}
canShowLess={item.canShowLess}
groupKey={item.groupKey}
@@ -1168,8 +1172,8 @@ function ThreadNavigationSidebarPane(
<Text
className={
Platform.OS === "android"
- ? "px-4 py-4 text-center text-sm text-foreground-muted"
- : "px-2 py-4 text-sm text-foreground-muted"
+ ? "px-4 py-4 text-center text-sm text-drawer-foreground-muted"
+ : "px-2 py-4 text-sm text-drawer-foreground-muted"
}
>
{catalogState.isLoadingConnections
@@ -1277,7 +1281,7 @@ function ThreadNavigationSidebarPane(
marginTop: stickyHeaderHeight,
marginHorizontal: 4,
paddingBottom: insets.bottom,
- backgroundColor: screenColor,
+ backgroundColor: drawerColor,
borderTopLeftRadius: 28,
borderTopRightRadius: 28,
overflow: "hidden",
@@ -1374,7 +1378,7 @@ function ThreadNavigationSidebarPane(
<SymbolView
name="magnifyingglass"
size={15}
- tintColorClassName="accent-foreground-muted"
+ tintColorClassName="accent-drawer-foreground-muted"
type="monochrome"
/>
<TextInput
@@ -1390,7 +1394,7 @@ function ThreadNavigationSidebarPane(
cursorColorClassName={undefined}
selectionHandleColorClassName={undefined}
returnKeyType="search"
- className="h-[34px] flex-1 px-0 py-0 font-sans text-base text-foreground"
+ className="h-[34px] flex-1 px-0 py-0 font-sans text-base text-drawer-foreground"
value={props.searchQuery}
/>
</View>
diff --git a/apps/mobile/src/features/threads/ThreadSettingsRows.android.tsx b/apps/mobile/src/features/threads/ThreadSettingsRows.android.tsx
index 98b414ef55d..52bee64271e 100644
--- a/apps/mobile/src/features/threads/ThreadSettingsRows.android.tsx
+++ b/apps/mobile/src/features/threads/ThreadSettingsRows.android.tsx
@@ -12,7 +12,7 @@ export function ModelRow(props: ModelRowProps) {
{...props}
labelNumberOfLines={2}
minimumHeight={56}
- selectedClassName={props.selected ? "bg-thread-selected" : undefined}
+ selectedClassName={props.selected ? "bg-secondary" : undefined}
leadingSelection={<MaterialRadioIndicator selected={props.selected} />}
/>
);
diff --git a/apps/mobile/src/features/threads/ThreadSettingsSheet.tsx b/apps/mobile/src/features/threads/ThreadSettingsSheet.tsx
index 7be5dc4bbdb..dc989a4de2d 100644
--- a/apps/mobile/src/features/threads/ThreadSettingsSheet.tsx
+++ b/apps/mobile/src/features/threads/ThreadSettingsSheet.tsx
@@ -896,9 +896,9 @@ function ThreadSettingsMainContent(props: {
onChangeText={session.setSearchQuery}
placeholder="Find a model"
placeholderTextColorClassName="accent-placeholder"
- selectionColorClassName="accent-primary/32"
- cursorColorClassName="accent-primary"
- selectionHandleColorClassName="accent-primary"
+ selectionColorClassName="accent-focus/32"
+ cursorColorClassName="accent-focus"
+ selectionHandleColorClassName="accent-focus"
value={session.searchQuery}
/>
{session.searchQuery.length > 0 ? (
diff --git a/apps/mobile/src/features/threads/floating-working-control.tsx b/apps/mobile/src/features/threads/floating-working-control.tsx
index d124b138676..9542b510b43 100644
--- a/apps/mobile/src/features/threads/floating-working-control.tsx
+++ b/apps/mobile/src/features/threads/floating-working-control.tsx
@@ -213,7 +213,7 @@ export function FloatingWorkingControl(props: {
<View pointerEvents="box-none" className="flex-row items-center gap-4">
<Animated.View
pointerEvents={capsuleInteractive ? "box-none" : "none"}
- className="h-11 items-center justify-center overflow-hidden rounded-full border border-border bg-card shadow-md shadow-black/10"
+ className="h-11 items-center justify-center overflow-hidden rounded-full border border-border bg-glass-fallback shadow-md shadow-black/10"
style={capsuleStyle}
>
{capsuleContent}
@@ -228,7 +228,7 @@ export function FloatingWorkingControl(props: {
<ControlPill
accessibilityLabel="Scroll to end"
activateOnPressIn
- className="h-11 w-11 border border-border bg-card shadow-md shadow-black/10"
+ className="h-11 w-11 border border-border bg-glass-fallback shadow-md shadow-black/10"
disabled={!props.showScrollToEnd}
icon={{ ios: "chevron.down", android: "keyboard_arrow_down" }}
onPress={props.onScrollToEnd}
@@ -248,7 +248,7 @@ export function FloatingWorkingControl(props: {
<ControlPill
accessibilityLabel="Scroll to end"
activateOnPressIn
- className="h-11 w-11 border border-border bg-card shadow-md shadow-black/10"
+ className="h-11 w-11 border border-border bg-glass-fallback shadow-md shadow-black/10"
icon={{ ios: "chevron.down", android: "keyboard_arrow_down" }}
onPress={props.onScrollToEnd}
/>
diff --git a/apps/mobile/src/features/threads/git/GitCommitSheet.tsx b/apps/mobile/src/features/threads/git/GitCommitSheet.tsx
index 7a64ac562b6..7f70a39d937 100644
--- a/apps/mobile/src/features/threads/git/GitCommitSheet.tsx
+++ b/apps/mobile/src/features/threads/git/GitCommitSheet.tsx
@@ -164,7 +164,7 @@ export function GitCommitSheet(_props: GitCommitSheetProps) {
<Text
className={
Platform.OS === "android"
- ? "text-primary text-sm font-t3-medium"
+ ? "text-primary-text text-sm font-t3-medium"
: "text-foreground text-2xs font-t3-bold uppercase"
}
>
@@ -183,7 +183,7 @@ export function GitCommitSheet(_props: GitCommitSheetProps) {
<Text
className={
Platform.OS === "android"
- ? "text-primary text-sm font-t3-medium"
+ ? "text-primary-text text-sm font-t3-medium"
: "text-foreground text-2xs font-t3-bold uppercase"
}
>
@@ -204,10 +204,12 @@ export function GitCommitSheet(_props: GitCommitSheetProps) {
<Text className="text-foreground flex-1 text-sm font-medium" numberOfLines={1}>
{file.path}
</Text>
- <Text className="text-xs font-t3-bold text-emerald-500">
+ <Text className="text-xs font-t3-bold text-adaptive-emerald-700-300">
+{file.insertions}
</Text>
- <Text className="text-xs font-t3-bold text-rose-500">-{file.deletions}</Text>
+ <Text className="text-xs font-t3-bold text-adaptive-rose-700-300">
+ -{file.deletions}
+ </Text>
</View>
))}
{selectedFiles.length > selectedFilePreview.length ? (
@@ -286,10 +288,10 @@ export function GitCommitSheet(_props: GitCommitSheetProps) {
) : null}
</View>
<View className="items-end gap-1">
- <Text className="text-xs font-t3-bold text-emerald-500">
+ <Text className="text-xs font-t3-bold text-adaptive-emerald-700-300">
+{file.insertions}
</Text>
- <Text className="text-xs font-t3-bold text-rose-500">
+ <Text className="text-xs font-t3-bold text-adaptive-rose-700-300">
-{file.deletions}
</Text>
</View>
diff --git a/apps/mobile/src/features/threads/sidebar-navigation-shell.tsx b/apps/mobile/src/features/threads/sidebar-navigation-shell.tsx
index e9e204e4777..1198b06cb6a 100644
--- a/apps/mobile/src/features/threads/sidebar-navigation-shell.tsx
+++ b/apps/mobile/src/features/threads/sidebar-navigation-shell.tsx
@@ -52,7 +52,7 @@ const SidebarStack = createNativeStackNavigator();
* navigation hooks used for header configuration inside the pane.
*/
export function SidebarNavigationShell(props: { readonly children: ReactNode }) {
- const navigationTheme = useMobileNavigationTheme();
+ const navigationTheme = useMobileNavigationTheme("sidebar");
return (
<NavigationIndependentTree>
diff --git a/apps/mobile/src/features/threads/thread-list-items.tsx b/apps/mobile/src/features/threads/thread-list-items.tsx
index 5ab2251875c..04d30a26a90 100644
--- a/apps/mobile/src/features/threads/thread-list-items.tsx
+++ b/apps/mobile/src/features/threads/thread-list-items.tsx
@@ -157,7 +157,7 @@ export const ThreadListGroupHeader = memo(function ThreadListGroupHeader(props:
className={
compact
? "flex-shrink text-base font-t3-bold tracking-[0.2px] text-foreground-muted"
- : "flex-shrink text-sm font-t3-bold tracking-[0.2px] text-foreground-muted"
+ : "flex-shrink text-sm font-t3-bold tracking-[0.2px] text-drawer-foreground-muted"
}
numberOfLines={1}
>
@@ -167,7 +167,7 @@ export const ThreadListGroupHeader = memo(function ThreadListGroupHeader(props:
className={
compact
? "flex-1 text-sm font-t3-medium text-foreground-tertiary"
- : "flex-1 text-xs font-t3-medium text-foreground-tertiary"
+ : "flex-1 text-xs font-t3-medium text-drawer-foreground-muted"
}
>
{props.threadCount}
@@ -241,7 +241,7 @@ export const ThreadListShowMoreRow = memo(function ThreadListShowMoreRow(props:
className={
compact
? "text-sm font-t3-medium text-foreground-muted"
- : "text-xs font-t3-medium text-foreground-muted"
+ : "text-xs font-t3-medium text-drawer-foreground-muted"
}
>
{label}
@@ -320,7 +320,14 @@ export const PendingTaskListRow = memo(function PendingTaskListRow(props: {
</View>
) : (
<View className="rounded-full bg-subtle px-1.5 py-0.5">
- <Text className="text-3xs font-t3-bold text-foreground-muted">Pending</Text>
+ <Text
+ className={cn(
+ "text-3xs font-t3-bold text-foreground-muted",
+ !compact && "text-drawer-foreground-muted",
+ )}
+ >
+ Pending
+ </Text>
</View>
);
@@ -330,21 +337,21 @@ export const PendingTaskListRow = memo(function PendingTaskListRow(props: {
<SymbolView
name={isDraft ? "square.and.pencil" : "tray.and.arrow.up"}
size={10}
- tintColorClassName={compact ? "accent-icon-subtle" : "accent-foreground-muted"}
+ tintColorClassName={compact ? "accent-icon-subtle" : "accent-drawer-foreground-muted"}
type="monochrome"
/>
{props.environmentLabel && props.environmentMachine ? (
<EnvironmentMachineSymbol
kind={props.environmentMachine}
size={compact ? 12 : 10}
- tintColorClassName={compact ? "accent-icon-subtle" : "accent-foreground-muted"}
+ tintColorClassName={compact ? "accent-icon-subtle" : "accent-drawer-foreground-muted"}
/>
) : null}
<Text
className={
compact
? "shrink text-sm text-foreground-muted"
- : "shrink text-xs text-foreground-muted"
+ : "shrink text-xs text-drawer-foreground-muted"
}
numberOfLines={1}
>
@@ -369,13 +376,26 @@ export const PendingTaskListRow = memo(function PendingTaskListRow(props: {
<View className="pr-[18px] pt-[10px]" style={{ paddingLeft: THREAD_LIST_COMPACT_INSET }}>
<View className={cn("gap-[3px] pb-[10px]", !props.isLast && "border-b border-separator")}>
<View className="flex-row items-center justify-between gap-2">
- <Text className="flex-1 text-lg font-t3-bold text-foreground" numberOfLines={1}>
+ <Text
+ className={cn(
+ "flex-1 text-lg font-t3-bold text-foreground",
+ !compact && "text-drawer-foreground",
+ )}
+ numberOfLines={1}
+ >
{pendingTask.title}
</Text>
<View className="flex-row items-center gap-2">
{statusPill}
{timestamp !== null ? (
- <Text className="text-base tabular-nums text-foreground-tertiary">{timestamp}</Text>
+ <Text
+ className={cn(
+ "text-base tabular-nums text-foreground-tertiary",
+ !compact && "text-drawer-foreground-muted",
+ )}
+ >
+ {timestamp}
+ </Text>
) : null}
<SymbolView
name="chevron.right"
@@ -395,6 +415,7 @@ export const PendingTaskListRow = memo(function PendingTaskListRow(props: {
accessibilityHint={accessibilityHint}
accessibilityLabel={pendingTask.title}
accessibilityRole="button"
+ interactionClassName="bg-thread-hover"
onPress={() => onSelectPendingTask(pendingTask)}
style={{
borderRadius: SIDEBAR_ROW_RADIUS,
@@ -406,13 +427,22 @@ export const PendingTaskListRow = memo(function PendingTaskListRow(props: {
>
<View className="gap-[3px]">
<View className="flex-row items-center justify-between gap-2">
- <Text className="flex-1 text-base font-t3-medium text-foreground" numberOfLines={1}>
+ <Text
+ className="flex-1 text-base font-t3-medium text-drawer-foreground"
+ numberOfLines={1}
+ >
{pendingTask.title}
</Text>
<View className="flex-row items-center gap-2">
{statusPill}
{timestamp !== null ? (
- <Text className="text-xs tabular-nums text-foreground-muted" numberOfLines={1}>
+ <Text
+ className={cn(
+ "text-xs tabular-nums text-foreground-muted",
+ !compact && "text-drawer-foreground-muted",
+ )}
+ numberOfLines={1}
+ >
{timestamp}
</Text>
) : null}
@@ -477,10 +507,7 @@ export const ThreadListRow = memo(function ThreadListRow(props: {
const theme = useUniwindTheme();
const screenColor = theme["--color-screen"];
const drawerColor = theme["--color-drawer"];
- const selectedBackgroundColor = theme["--color-user-bubble"];
- const materialSelectedBackgroundColor = theme["--color-thread-selected"];
- const materialSelectedForegroundColor = theme["--color-thread-selected-foreground"];
- const selectedForegroundColor = theme["--color-user-bubble-foreground"];
+ const selectedBackgroundColor = theme["--color-thread-selected"];
const {
thread,
@@ -508,24 +535,6 @@ export const ThreadListRow = memo(function ThreadListRow(props: {
);
const backgroundColor = compact ? screenColor : drawerColor;
- const effectiveSelectedBackground =
- Platform.OS === "android" ? materialSelectedBackgroundColor : selectedBackgroundColor;
- const effectiveSelectedForeground =
- Platform.OS === "android" ? materialSelectedForegroundColor : selectedForegroundColor;
- const effectiveStatus =
- visuallySelected && status
- ? {
- ...status,
- pillClassName:
- Platform.OS === "android"
- ? "bg-thread-selected-foreground/20"
- : "bg-user-bubble-foreground/20",
- textClassName:
- Platform.OS === "android"
- ? "text-thread-selected-foreground"
- : "text-user-bubble-foreground",
- }
- : status;
const handleDelete = useCallback(() => onDeleteThread(thread), [onDeleteThread, thread]);
const handleArchive = useCallback(() => onArchiveThread(thread), [onArchiveThread, thread]);
@@ -580,11 +589,9 @@ export const ThreadListRow = memo(function ThreadListRow(props: {
[handleArchive, handleDelete, handleRegenerateTitle, handleRename, onNewThreadOnBranch, thread],
);
- const statusPill = effectiveStatus ? (
- <View className={`${effectiveStatus.pillClassName} rounded-full px-1.5 py-0.5`}>
- <Text className={`text-3xs font-t3-bold ${effectiveStatus.textClassName}`}>
- {effectiveStatus.label}
- </Text>
+ const statusPill = status ? (
+ <View className={`${status.pillClassName} rounded-full px-1.5 py-0.5`}>
+ <Text className={`text-3xs font-t3-bold ${status.textClassName}`}>{status.label}</Text>
</View>
) : null;
@@ -601,10 +608,8 @@ export const ThreadListRow = memo(function ThreadListRow(props: {
compact
? "accent-icon-subtle"
: selected
- ? Platform.OS === "android"
- ? "accent-thread-selected-foreground-muted"
- : "accent-user-bubble-foreground-muted"
- : "accent-foreground-muted"
+ ? "accent-thread-selected-foreground-muted"
+ : "accent-drawer-foreground-muted"
}
/>
) : null}
@@ -613,10 +618,10 @@ export const ThreadListRow = memo(function ThreadListRow(props: {
"shrink",
compact ? "text-sm" : "text-xs",
visuallySelected
- ? Platform.OS === "android"
- ? "text-thread-selected-foreground-muted"
- : "text-user-bubble-foreground-muted"
- : "text-foreground-muted",
+ ? "text-thread-selected-foreground-muted"
+ : compact
+ ? "text-foreground-muted"
+ : "text-drawer-foreground-muted",
)}
numberOfLines={1}
>
@@ -633,30 +638,16 @@ export const ThreadListRow = memo(function ThreadListRow(props: {
<SymbolView
name="square.3.layers.3d"
size={compact ? 13 : 11}
- tintColor={
- visuallySelected
- ? String(effectiveSelectedForeground)
- : pullRequestTintColor(pr, colorScheme)
- }
+ tintColor={pullRequestTintColor(pr, colorScheme)}
/>
) : (
<PullRequestIcon
size={compact ? 13 : 11}
- color={
- visuallySelected
- ? String(effectiveSelectedForeground)
- : pullRequestTintColor(pr, colorScheme)
- }
+ color={pullRequestTintColor(pr, colorScheme)}
/>
)}
<Text
- className={`${compact ? "text-sm" : "text-xs"} font-t3-medium ${
- visuallySelected
- ? Platform.OS === "android"
- ? "text-thread-selected-foreground"
- : "text-user-bubble-foreground"
- : pr.textClassName
- }`}
+ className={`${compact ? "text-sm" : "text-xs"} font-t3-medium ${pr.textClassName}`}
>
{pr.label}
</Text>
@@ -669,13 +660,8 @@ export const ThreadListRow = memo(function ThreadListRow(props: {
compact ? (
<RowPressable
key={`${thread.environmentId}:${thread.id}`}
- interactionClassName={
- visuallySelected
- ? Platform.OS === "android"
- ? "bg-thread-selected-foreground"
- : "bg-user-bubble-foreground"
- : "bg-primary"
- }
+ interactionClassName="bg-row-hover"
+ interactionOpacity={visuallySelected ? 0 : 1}
accessibilityHint="Swipe left for archive and delete actions"
accessibilityLabel={threadAccessibilityLabel}
accessibilityRole="button"
@@ -683,7 +669,7 @@ export const ThreadListRow = memo(function ThreadListRow(props: {
style={
Platform.OS === "android"
? {
- backgroundColor: visuallySelected ? effectiveSelectedBackground : backgroundColor,
+ backgroundColor: visuallySelected ? selectedBackgroundColor : backgroundColor,
borderRadius: 20,
}
: undefined
@@ -705,10 +691,10 @@ export const ThreadListRow = memo(function ThreadListRow(props: {
className={cn(
"flex-1 text-lg font-t3-bold",
visuallySelected
- ? Platform.OS === "android"
- ? "text-thread-selected-foreground"
- : "text-user-bubble-foreground"
- : "text-foreground",
+ ? "text-thread-selected-foreground"
+ : compact
+ ? "text-foreground"
+ : "text-drawer-foreground",
)}
numberOfLines={1}
>
@@ -723,10 +709,8 @@ export const ThreadListRow = memo(function ThreadListRow(props: {
className={cn(
"text-base tabular-nums",
visuallySelected
- ? Platform.OS === "android"
- ? "text-thread-selected-foreground-muted"
- : "text-user-bubble-foreground-muted"
- : "text-foreground-tertiary",
+ ? "text-thread-selected-foreground-muted"
+ : "text-drawer-foreground-muted",
)}
>
{timestamp}
@@ -742,6 +726,7 @@ export const ThreadListRow = memo(function ThreadListRow(props: {
{props.searchMatch ? (
<ThreadSearchMatchExcerpt
compact
+ sidebar={!compact}
match={props.searchMatch}
query={props.searchQuery ?? ""}
selected={visuallySelected}
@@ -754,13 +739,8 @@ export const ThreadListRow = memo(function ThreadListRow(props: {
) : (
<RowPressable
key={`${thread.environmentId}:${thread.id}`}
- interactionClassName={
- visuallySelected
- ? Platform.OS === "android"
- ? "bg-thread-selected-foreground"
- : "bg-user-bubble-foreground"
- : "bg-primary"
- }
+ interactionClassName="bg-thread-hover"
+ interactionOpacity={visuallySelected ? 0 : 1}
accessibilityHint="Opens the thread"
accessibilityLabel={threadAccessibilityLabel}
accessibilityRole="button"
@@ -770,7 +750,7 @@ export const ThreadListRow = memo(function ThreadListRow(props: {
onSelectThread(thread);
}}
style={{
- backgroundColor: visuallySelected ? effectiveSelectedBackground : backgroundColor,
+ backgroundColor: visuallySelected ? selectedBackgroundColor : backgroundColor,
borderRadius: Platform.OS === "android" ? 20 : SIDEBAR_ROW_RADIUS,
minHeight: 64,
justifyContent: "center",
@@ -784,10 +764,10 @@ export const ThreadListRow = memo(function ThreadListRow(props: {
className={cn(
"flex-1 text-base font-t3-medium",
visuallySelected
- ? Platform.OS === "android"
- ? "text-thread-selected-foreground"
- : "text-user-bubble-foreground"
- : "text-foreground",
+ ? "text-thread-selected-foreground"
+ : compact
+ ? "text-foreground"
+ : "text-drawer-foreground",
)}
numberOfLines={1}
>
@@ -802,10 +782,10 @@ export const ThreadListRow = memo(function ThreadListRow(props: {
className={cn(
"text-xs tabular-nums",
visuallySelected
- ? Platform.OS === "android"
- ? "text-thread-selected-foreground-muted"
- : "text-user-bubble-foreground-muted"
- : "text-foreground-muted",
+ ? "text-thread-selected-foreground-muted"
+ : compact
+ ? "text-foreground-muted"
+ : "text-drawer-foreground-muted",
)}
numberOfLines={1}
>
@@ -815,6 +795,7 @@ export const ThreadListRow = memo(function ThreadListRow(props: {
</View>
{props.searchMatch ? (
<ThreadSearchMatchExcerpt
+ sidebar={!compact}
match={props.searchMatch}
query={props.searchQuery ?? ""}
selected={visuallySelected}
diff --git a/apps/mobile/src/features/threads/thread-list-v2-items.tsx b/apps/mobile/src/features/threads/thread-list-v2-items.tsx
index bd7b481c337..797781d16a4 100644
--- a/apps/mobile/src/features/threads/thread-list-v2-items.tsx
+++ b/apps/mobile/src/features/threads/thread-list-v2-items.tsx
@@ -64,7 +64,7 @@ const STATUS_LABEL_BY_STATUS: Partial<
Record<ThreadListV2Status, { label: string; className: string }>
> = {
approval: { label: "Approval", className: "text-warning-foreground" },
- input: { label: "Input", className: "text-foreground-secondary" },
+ input: { label: "Input", className: "text-adaptive-indigo-600-300" },
working: { label: "Working", className: "text-adaptive-sky-600-400" },
failed: { label: "Failed", className: "text-danger-foreground" },
};
@@ -112,6 +112,7 @@ function ThreadListV2Section(props: {
};
}) {
const snoozed = props.tone === "snoozed";
+ const sidebarPane = props.pane === "sidebar";
const className = cn(
"mb-1.5 mt-4 flex-row items-center gap-2.5",
props.pane === "sidebar" ? "px-3" : "px-5",
@@ -121,17 +122,32 @@ function ThreadListV2Section(props: {
<Text
className={cn(
"text-xs font-t3-medium",
- snoozed ? "text-foreground-secondary" : "text-foreground-tertiary",
+ sidebarPane
+ ? "text-drawer-foreground-muted"
+ : snoozed
+ ? "text-foreground-secondary"
+ : "text-foreground-tertiary",
)}
>
{props.label}
</Text>
- <View className={cn("h-px flex-1", snoozed ? "bg-primary/20" : "bg-border")} />
+ <View
+ className={cn(
+ "h-px flex-1",
+ snoozed ? "bg-primary/20" : sidebarPane ? "bg-drawer-border" : "bg-border",
+ )}
+ />
{props.disclosure ? (
<SymbolView
name="chevron.down"
size={10}
- tintColorClassName={snoozed ? "accent-icon-muted" : "accent-foreground-muted"}
+ tintColorClassName={
+ sidebarPane
+ ? "accent-drawer-foreground-muted"
+ : snoozed
+ ? "accent-icon-muted"
+ : "accent-foreground-muted"
+ }
type="monochrome"
style={{ transform: [{ rotate: props.disclosure.expanded ? "180deg" : "0deg" }] }}
/>
@@ -209,6 +225,7 @@ export const ThreadListV2SettledShelfHeader = memo(function ThreadListV2SettledS
});
export const ThreadListV2ShowMoreRow = memo(function ThreadListV2ShowMoreRow(props: {
+ readonly pane?: "screen" | "sidebar";
readonly hiddenCount: number;
readonly onPress: () => void;
}) {
@@ -220,7 +237,13 @@ export const ThreadListV2ShowMoreRow = memo(function ThreadListV2ShowMoreRow(pro
className="mx-4 mt-2 items-center rounded-lg border border-dashed border-border py-2.5"
style={({ pressed }) => ({ opacity: pressed ? 0.6 : 1 })}
>
- <Text className="text-xs font-t3-medium text-foreground-muted">
+ <Text
+ className={
+ props.pane === "sidebar"
+ ? "text-xs font-t3-medium text-drawer-foreground-muted"
+ : "text-xs font-t3-medium text-foreground-muted"
+ }
+ >
Show more ({props.hiddenCount} settled hidden)
</Text>
</Pressable>
@@ -282,7 +305,13 @@ export const ThreadListV2PendingRow = memo(function ThreadListV2PendingRow(props
workspaceRoot={props.project.workspaceRoot}
/>
) : null}
- <Text className="flex-1 text-sm font-t3-medium text-foreground-muted" numberOfLines={1}>
+ <Text
+ className={cn(
+ "flex-1 text-sm font-t3-medium text-foreground-muted",
+ sidebarPane && "text-drawer-foreground-muted",
+ )}
+ numberOfLines={1}
+ >
{projectTitle}
</Text>
{isDraft ? (
@@ -296,33 +325,67 @@ export const ThreadListV2PendingRow = memo(function ThreadListV2PendingRow(props
<Text className="text-xs text-adaptive-amber-700-300">Draft</Text>
</View>
) : (
- <Text className="text-xs text-foreground-tertiary">Sends on reconnect</Text>
+ <Text
+ className={cn(
+ "text-xs text-foreground-tertiary",
+ sidebarPane && "text-drawer-foreground-muted",
+ )}
+ >
+ Sends on reconnect
+ </Text>
)}
</View>
{/* One line, unlike the two an active row allows: a queued title is
derived from the whole prompt rather than written as a title, so the
second line is usually a stray word or emoji rather than meaning. */}
- <Text className="mt-1 text-base font-t3-medium text-foreground" numberOfLines={1}>
+ <Text
+ className={cn(
+ "mt-1 text-base font-t3-medium text-foreground",
+ sidebarPane && "text-drawer-foreground",
+ )}
+ numberOfLines={1}
+ >
{pendingTask.title}
</Text>
{branch || props.environmentLabel ? (
<View className="mt-1 flex-row items-center gap-1">
- <Text className="shrink text-xs text-foreground-muted" numberOfLines={1}>
+ <Text
+ className={cn(
+ "shrink text-xs text-foreground-muted",
+ sidebarPane && "text-drawer-foreground-muted",
+ )}
+ numberOfLines={1}
+ >
{branch ? (
- <Text className="text-xs text-foreground-muted" style={{ fontFamily: MONO_FONT }}>
+ <Text
+ className={cn(
+ "text-xs text-foreground-muted",
+ sidebarPane && "text-drawer-foreground-muted",
+ )}
+ style={{ fontFamily: MONO_FONT }}
+ >
{branch}
</Text>
) : null}
{branch && props.environmentLabel ? " · " : null}
{props.environmentLabel ? (
- <Text className="text-xs text-foreground-tertiary">{props.environmentLabel}</Text>
+ <Text
+ className={cn(
+ "text-xs text-foreground-tertiary",
+ sidebarPane && "text-drawer-foreground-muted",
+ )}
+ >
+ {props.environmentLabel}
+ </Text>
) : null}
</Text>
{props.environmentLabel && props.environmentMachine ? (
<EnvironmentMachineSymbol
kind={props.environmentMachine}
size={11}
- tintColorClassName="accent-foreground-tertiary"
+ tintColorClassName={
+ sidebarPane ? "accent-drawer-foreground-muted" : "accent-foreground-tertiary"
+ }
/>
) : null}
</View>
@@ -350,6 +413,7 @@ export const ThreadListV2PendingRow = memo(function ThreadListV2PendingRow(props
accessibilityRole="button"
key={pendingTask.key}
className={sidebarPane ? "bg-drawer" : "bg-screen"}
+ interactionClassName={sidebarPane ? "bg-thread-hover" : "bg-row-hover"}
onPress={() => onSelectPendingTask(pendingTask)}
style={
sidebarPane
@@ -759,8 +823,7 @@ export const ThreadListV2Row = memo(function ThreadListV2Row(props: {
? `Opens the thread. Swipe left to ${primaryAction.label.toLowerCase()}.`
: `Opens the thread. Swipe left for ${primaryAction.label.toLowerCase()} and snooze actions.`;
- // The sidebar pane fills selected rows with the theme's message surface, so
- // every piece of row text must use that surface's paired foreground.
+ // Sidebar rows use navigation foregrounds on their active and idle surfaces.
const cardContent = (
<>
<View className="flex-row items-center gap-1.5">
@@ -776,7 +839,9 @@ export const ThreadListV2Row = memo(function ThreadListV2Row(props: {
<Text
className={cn(
"flex-1 text-sm font-t3-medium",
- selected ? selectedThreadRowColors.mutedForegroundClassName : "text-foreground-muted",
+ selected
+ ? selectedThreadRowColors.mutedForegroundClassName
+ : rowAppearance.mutedForegroundClassName,
)}
numberOfLines={1}
>
@@ -787,16 +852,17 @@ export const ThreadListV2Row = memo(function ThreadListV2Row(props: {
<SymbolView
name="pin"
size={11}
- tintColorClassName="accent-foreground-muted"
+ tintColorClassName={rowAppearance.mutedIconTintClassName}
type="monochrome"
/>
) : null}
<Text
className={cn(
"text-xs tabular-nums",
- selected
- ? selectedThreadRowColors.foregroundClassName
- : (statusLabel?.className ?? "text-foreground-tertiary"),
+ statusLabel?.className ??
+ (selected
+ ? selectedThreadRowColors.foregroundClassName
+ : rowAppearance.tertiaryForegroundClassName),
)}
>
{statusLabel?.label ?? timeLabel}
@@ -805,7 +871,9 @@ export const ThreadListV2Row = memo(function ThreadListV2Row(props: {
<Text
className={cn(
"mt-1 text-base font-t3-medium",
- selected ? selectedThreadRowColors.foregroundClassName : "text-foreground",
+ selected
+ ? selectedThreadRowColors.foregroundClassName
+ : rowAppearance.foregroundClassName,
)}
numberOfLines={2}
>
@@ -814,6 +882,7 @@ export const ThreadListV2Row = memo(function ThreadListV2Row(props: {
{props.searchMatch ? (
<View className="mt-1">
<ThreadSearchMatchExcerpt
+ sidebar={sidebarPane}
match={props.searchMatch}
query={props.searchQuery ?? ""}
selected={selected}
@@ -846,7 +915,7 @@ export const ThreadListV2Row = memo(function ThreadListV2Row(props: {
"shrink text-xs",
selected
? selectedThreadRowColors.mutedForegroundClassName
- : "text-foreground-muted",
+ : rowAppearance.mutedForegroundClassName,
)}
numberOfLines={1}
>
@@ -856,7 +925,7 @@ export const ThreadListV2Row = memo(function ThreadListV2Row(props: {
"text-xs",
selected
? selectedThreadRowColors.mutedForegroundClassName
- : "text-foreground-muted",
+ : rowAppearance.mutedForegroundClassName,
)}
style={{ fontFamily: MONO_FONT }}
>
@@ -870,7 +939,7 @@ export const ThreadListV2Row = memo(function ThreadListV2Row(props: {
"text-xs",
selected
? selectedThreadRowColors.mutedForegroundClassName
- : "text-foreground-tertiary",
+ : rowAppearance.tertiaryForegroundClassName,
)}
>
{props.environmentLabel}
@@ -884,7 +953,7 @@ export const ThreadListV2Row = memo(function ThreadListV2Row(props: {
tintColorClassName={
selected
? selectedThreadRowColors.mutedIconTintClassName
- : "accent-foreground-tertiary"
+ : rowAppearance.tertiaryIconTintClassName
}
/>
) : null}
@@ -899,24 +968,19 @@ export const ThreadListV2Row = memo(function ThreadListV2Row(props: {
name={pr.kind === "stack" ? "square.3.layers.3d" : "arrow.triangle.pull"}
size={12}
tintColorClassName={
- selected
- ? selectedThreadRowColors.iconTintClassName
- : pr.state === null || pr.isDraft
- ? "accent-foreground-muted"
- : pr.state === "open"
- ? "accent-adaptive-emerald-600-400"
- : pr.state === "closed"
- ? "accent-adaptive-rose-600-400"
- : "accent-adaptive-violet-600-400"
+ pr.state === null || pr.isDraft
+ ? rowAppearance.mutedIconTintClassName
+ : pr.state === "open"
+ ? "accent-adaptive-emerald-600-400"
+ : pr.state === "closed"
+ ? "accent-adaptive-rose-600-400"
+ : "accent-adaptive-violet-600-400"
}
/>
) : null}
<Text
accessibilityLabel={pr.accessibilityLabel}
- className={cn(
- "text-xs",
- selected ? selectedThreadRowColors.foregroundClassName : pr.textClassName,
- )}
+ className={cn("text-xs", pr.textClassName)}
style={{ fontFamily: MONO_FONT }}
>
{pr.kind === "stack" || pr.others > 0 ? pr.label : `#${pr.label}`}
@@ -942,6 +1006,7 @@ export const ThreadListV2Row = memo(function ThreadListV2Row(props: {
<RowPressable
key={`${thread.environmentId}:${thread.id}`}
interactionClassName={rowAppearance.interactionClassName}
+ interactionOpacity={rowAppearance.interactionOpacity}
className={rowAppearance.className}
accessibilityHint={swipeAccessibilityHint}
accessibilityLabel={
@@ -974,6 +1039,7 @@ export const ThreadListV2Row = memo(function ThreadListV2Row(props: {
<RowPressable
key={`${thread.environmentId}:${thread.id}`}
interactionClassName={rowAppearance.interactionClassName}
+ interactionOpacity={rowAppearance.interactionOpacity}
accessibilityHint={swipeAccessibilityHint}
accessibilityLabel={
props.hasQueuedMessages ? `${thread.title}, messages queued to send` : thread.title
@@ -1009,7 +1075,9 @@ export const ThreadListV2Row = memo(function ThreadListV2Row(props: {
<Text
className={cn(
"text-base",
- selected ? selectedThreadRowColors.foregroundClassName : "text-foreground-muted",
+ selected
+ ? selectedThreadRowColors.foregroundClassName
+ : rowAppearance.mutedForegroundClassName,
)}
numberOfLines={1}
>
@@ -1017,6 +1085,7 @@ export const ThreadListV2Row = memo(function ThreadListV2Row(props: {
</Text>
{props.searchMatch ? (
<ThreadSearchMatchExcerpt
+ sidebar={sidebarPane}
match={props.searchMatch}
query={props.searchQuery ?? ""}
selected={selected}
@@ -1030,8 +1099,8 @@ export const ThreadListV2Row = memo(function ThreadListV2Row(props: {
selected
? selectedThreadRowColors.mutedForegroundClassName
: snoozedRow
- ? "text-foreground-secondary"
- : "text-foreground-tertiary",
+ ? rowAppearance.mutedForegroundClassName
+ : rowAppearance.tertiaryForegroundClassName,
)}
style={{ fontFamily: MONO_FONT }}
>
diff --git a/apps/mobile/src/features/threads/thread-list-v2-row-appearance.android.ts b/apps/mobile/src/features/threads/thread-list-v2-row-appearance.android.ts
index 36f78011aa8..8be6b240755 100644
--- a/apps/mobile/src/features/threads/thread-list-v2-row-appearance.android.ts
+++ b/apps/mobile/src/features/threads/thread-list-v2-row-appearance.android.ts
@@ -22,8 +22,9 @@ export function getThreadListV2RowAppearance(
selected: boolean,
) {
const selectedBackgroundColor = theme["--color-thread-selected"];
+ const backgroundColor = theme[sidebarPane ? "--color-drawer" : "--color-screen"];
const style: ViewStyle = {
- backgroundColor: selected ? selectedBackgroundColor : theme["--color-screen"],
+ backgroundColor: selected ? selectedBackgroundColor : backgroundColor,
borderRadius: 20,
};
const swipeContainerStyle: ViewStyle = {
@@ -35,12 +36,25 @@ export function getThreadListV2RowAppearance(
return {
className: undefined,
- interactionClassName: selected ? "bg-thread-selected-foreground" : "bg-primary",
+ interactionClassName: sidebarPane ? "bg-thread-hover" : "bg-row-hover",
+ interactionOpacity: selected ? 0 : 1,
+ foregroundClassName: sidebarPane ? "text-drawer-foreground" : "text-foreground",
+ mutedForegroundClassName: sidebarPane
+ ? "text-drawer-foreground-muted"
+ : "text-foreground-muted",
+ tertiaryForegroundClassName: sidebarPane
+ ? "text-drawer-foreground-muted"
+ : "text-foreground-tertiary",
+ mutedIconTintClassName: sidebarPane
+ ? "accent-drawer-foreground-muted"
+ : "accent-foreground-muted",
+ tertiaryIconTintClassName: sidebarPane
+ ? "accent-drawer-foreground-muted"
+ : "accent-foreground-tertiary",
style,
cardStyle: sidebarPane ? { ...style, paddingHorizontal: 12, paddingVertical: 10 } : style,
swipeContainerStyle,
- swipeBackgroundColor: theme["--color-screen"],
- providerIconSurfaceColor:
- sidebarPane && selected ? selectedBackgroundColor : theme["--color-screen"],
+ swipeBackgroundColor: backgroundColor,
+ providerIconSurfaceColor: selected ? selectedBackgroundColor : backgroundColor,
};
}
diff --git a/apps/mobile/src/features/threads/thread-list-v2-row-appearance.test.ts b/apps/mobile/src/features/threads/thread-list-v2-row-appearance.test.ts
new file mode 100644
index 00000000000..0052629d03a
--- /dev/null
+++ b/apps/mobile/src/features/threads/thread-list-v2-row-appearance.test.ts
@@ -0,0 +1,37 @@
+import { describe, expect, it } from "vite-plus/test";
+import { MOBILE_THEME_IDS } from "@t3tools/shared/themePalettes";
+
+import { getMobileThemeVariables } from "../../lib/mobileTheme";
+import { getThreadListV2RowAppearance as iosAppearance } from "./thread-list-v2-row-appearance";
+import { getThreadListV2RowAppearance as androidAppearance } from "./thread-list-v2-row-appearance.android";
+
+describe.each([
+ ["ios", iosAppearance],
+ ["android", androidAppearance],
+] as const)("%s thread row colors", (_platform, appearanceFor) => {
+ it.each(MOBILE_THEME_IDS)(
+ "preserves active selection and uses neutral hover for %s",
+ (themeId) => {
+ for (const appearance of ["light", "dark"] as const) {
+ const theme = getMobileThemeVariables(themeId, appearance);
+ const idle = appearanceFor(theme, true, false);
+ const active = appearanceFor(theme, true, true);
+
+ expect(idle.style?.backgroundColor).toBe(theme["--color-drawer"]);
+ expect(idle.interactionClassName).toBe("bg-thread-hover");
+ expect(idle.interactionOpacity).toBe(1);
+ expect(active.style?.backgroundColor).toBe(theme["--color-thread-selected"]);
+ // Pointer feedback must not mix a second color into the active background.
+ expect(active.interactionOpacity).toBe(0);
+ expect(active.providerIconSurfaceColor).toBe(active.style?.backgroundColor);
+ expect(idle.foregroundClassName).toBe("text-drawer-foreground");
+ expect(idle.mutedForegroundClassName).toBe("text-drawer-foreground-muted");
+
+ const phone = appearanceFor(theme, false, false);
+ expect(phone.swipeBackgroundColor).toBe(theme["--color-screen"]);
+ expect(phone.interactionClassName).toBe("bg-row-hover");
+ expect(phone.foregroundClassName).toBe("text-foreground");
+ }
+ },
+ );
+});
diff --git a/apps/mobile/src/features/threads/thread-list-v2-row-appearance.ts b/apps/mobile/src/features/threads/thread-list-v2-row-appearance.ts
index a9c1bfb408e..b73f87b86a2 100644
--- a/apps/mobile/src/features/threads/thread-list-v2-row-appearance.ts
+++ b/apps/mobile/src/features/threads/thread-list-v2-row-appearance.ts
@@ -6,10 +6,10 @@ export const THREAD_LIST_V2_ROW_CONTENT_CLASS_NAME = "px-5 py-2.5";
export const THREAD_LIST_V2_ROW_DIVIDERS = true;
export const selectedThreadRowColors = {
- foregroundClassName: "text-user-bubble-foreground",
- mutedForegroundClassName: "text-user-bubble-foreground-muted",
- iconTintClassName: "accent-user-bubble-foreground",
- mutedIconTintClassName: "accent-user-bubble-foreground-muted",
+ foregroundClassName: "text-thread-selected-foreground",
+ mutedForegroundClassName: "text-thread-selected-foreground-muted",
+ iconTintClassName: "accent-thread-selected-foreground",
+ mutedIconTintClassName: "accent-thread-selected-foreground-muted",
};
export function getThreadListV2NewBranchMenuTitle(_branch: string) {
@@ -21,7 +21,7 @@ export function getThreadListV2RowAppearance(
sidebarPane: boolean,
selected: boolean,
) {
- const selectedBackgroundColor = theme["--color-user-bubble"];
+ const selectedBackgroundColor = theme["--color-thread-selected"];
const style: ViewStyle | undefined = sidebarPane
? {
backgroundColor: selected ? selectedBackgroundColor : theme["--color-drawer"],
@@ -34,7 +34,21 @@ export function getThreadListV2RowAppearance(
return {
className: sidebarPane ? undefined : "bg-screen",
- interactionClassName: selected && sidebarPane ? "bg-user-bubble-foreground" : "bg-primary",
+ interactionClassName: sidebarPane ? "bg-thread-hover" : "bg-row-hover",
+ interactionOpacity: selected ? 0 : 1,
+ foregroundClassName: sidebarPane ? "text-drawer-foreground" : "text-foreground",
+ mutedForegroundClassName: sidebarPane
+ ? "text-drawer-foreground-muted"
+ : "text-foreground-muted",
+ tertiaryForegroundClassName: sidebarPane
+ ? "text-drawer-foreground-muted"
+ : "text-foreground-tertiary",
+ mutedIconTintClassName: sidebarPane
+ ? "accent-drawer-foreground-muted"
+ : "accent-foreground-muted",
+ tertiaryIconTintClassName: sidebarPane
+ ? "accent-drawer-foreground-muted"
+ : "accent-foreground-tertiary",
style,
cardStyle: sidebarPane ? { ...style, paddingHorizontal: 12, paddingVertical: 10 } : undefined,
swipeContainerStyle,
diff --git a/apps/mobile/src/features/threads/thread-search-match.tsx b/apps/mobile/src/features/threads/thread-search-match.tsx
index 618cf15ee14..553160dbdd8 100644
--- a/apps/mobile/src/features/threads/thread-search-match.tsx
+++ b/apps/mobile/src/features/threads/thread-search-match.tsx
@@ -1,4 +1,3 @@
-import { Platform } from "react-native";
import type { EnvironmentThreadSearchMatch } from "@t3tools/client-runtime/state/thread-search";
import { AppText as Text } from "../../components/AppText";
@@ -49,6 +48,7 @@ export function ThreadSearchMatchExcerpt(props: {
readonly query: string;
readonly selected?: boolean;
readonly compact?: boolean;
+ readonly sidebar?: boolean;
}) {
const isUser = props.match.source === "user";
const parts = splitHighlightParts(props.match.snippet, props.query);
@@ -57,10 +57,10 @@ export function ThreadSearchMatchExcerpt(props: {
className={cn(
props.compact ? "text-sm" : "text-xs",
props.selected
- ? Platform.OS === "android"
- ? "text-thread-selected-foreground-muted"
- : "text-user-bubble-foreground-muted"
- : "text-foreground-muted",
+ ? "text-thread-selected-foreground-muted"
+ : props.sidebar
+ ? "text-drawer-foreground-muted"
+ : "text-foreground-muted",
)}
numberOfLines={1}
>
@@ -68,11 +68,11 @@ export function ThreadSearchMatchExcerpt(props: {
className={cn(
props.compact ? "text-sm font-t3-medium" : "text-xs font-t3-medium",
props.selected
- ? Platform.OS === "android"
- ? "text-thread-selected-foreground"
- : "text-user-bubble-foreground"
+ ? "text-thread-selected-foreground"
: isUser
- ? "text-foreground-secondary"
+ ? props.sidebar
+ ? "text-drawer-foreground-muted"
+ : "text-foreground-secondary"
: "text-adaptive-emerald-600-400",
)}
>
@@ -84,12 +84,14 @@ export function ThreadSearchMatchExcerpt(props: {
props.compact ? "text-sm" : "text-xs",
part.highlighted && "font-t3-bold",
props.selected
- ? Platform.OS === "android"
- ? "text-thread-selected-foreground"
- : "text-user-bubble-foreground"
+ ? "text-thread-selected-foreground"
: part.highlighted
- ? "text-foreground"
- : "text-foreground-muted",
+ ? props.sidebar
+ ? "text-drawer-foreground"
+ : "text-foreground"
+ : props.sidebar
+ ? "text-drawer-foreground-muted"
+ : "text-foreground-muted",
)}
key={part.start}
>
diff --git a/apps/mobile/src/features/threads/thread-work-log.tsx b/apps/mobile/src/features/threads/thread-work-log.tsx
index e5e7ad15070..d227a72a2c7 100644
--- a/apps/mobile/src/features/threads/thread-work-log.tsx
+++ b/apps/mobile/src/features/threads/thread-work-log.tsx
@@ -882,7 +882,7 @@ const ThreadWorkLogRow = memo(function ThreadWorkLogRow(
entering={WORK_LOG_DETAIL_ENTER_TRANSITION}
exiting={WORK_LOG_DETAIL_EXIT_TRANSITION}
layout={WORK_LOG_LAYOUT_TRANSITION}
- className="ml-7 border-l border-adaptive-neutral-300-a60-white-a12 pb-1 pl-3 pt-0.5"
+ className="ml-7 border-l border-border pb-1 pl-3 pt-0.5"
>
{row.workEntry.questionAnswer ? (
<QuestionAnswerHistory
@@ -1037,7 +1037,7 @@ export const ThreadAgentSpawnCard = memo(function ThreadAgentSpawnCard(props: {
props.onToggle();
}}
onLongPress={props.onCopy}
- className="rounded-xl border border-adaptive-neutral-200-a80-white-a8 bg-card px-2.5 py-2 active:bg-subtle"
+ className="rounded-xl border border-border-subtle bg-card px-2.5 py-2 active:bg-subtle"
>
<View className="flex-row items-center gap-2">
<View className="h-6 w-6 shrink-0 items-center justify-center">
@@ -1094,7 +1094,7 @@ export const ThreadAgentSpawnCard = memo(function ThreadAgentSpawnCard(props: {
entering={WORK_LOG_DETAIL_ENTER_TRANSITION}
exiting={WORK_LOG_DETAIL_EXIT_TRANSITION}
layout={WORK_LOG_LAYOUT_TRANSITION}
- className="ml-8 mt-1.5 gap-1.5 border-l border-adaptive-neutral-300-a60-white-a12 pl-3"
+ className="ml-8 mt-1.5 gap-1.5 border-l border-border pl-3"
>
{summary.members.map((member) => (
<View key={member.title} className="gap-px">
diff --git a/apps/mobile/src/features/threads/threadPresentation.ts b/apps/mobile/src/features/threads/threadPresentation.ts
index dcff521342c..b5f286937e0 100644
--- a/apps/mobile/src/features/threads/threadPresentation.ts
+++ b/apps/mobile/src/features/threads/threadPresentation.ts
@@ -12,10 +12,6 @@ export type ThreadStatusKind =
export interface ThreadStatusPresentation extends StatusTone {
readonly kind: ThreadStatusKind;
- /** Foreground color for the leading status icon. */
- readonly iconColor: string;
- /** Background color for the leading status icon circle. */
- readonly iconBackground: string;
/** Whether the indicator represents in-flight activity. */
readonly pulse: boolean;
}
@@ -44,8 +40,6 @@ export function resolveThreadStatus(
label: "Needs Approval",
pillClassName: "bg-warning",
textClassName: "text-warning-foreground",
- iconColor: "#ff9f0a",
- iconBackground: "rgba(255,159,10,0.22)",
pulse: false,
};
}
@@ -54,10 +48,8 @@ export function resolveThreadStatus(
return {
kind: "awaiting-input",
label: "Awaiting Input",
- pillClassName: "bg-primary/10",
- textClassName: "text-foreground-secondary",
- iconColor: "#5e5ce6",
- iconBackground: "rgba(94,92,230,0.22)",
+ pillClassName: "bg-adaptive-indigo-500-a12-a16",
+ textClassName: "text-adaptive-indigo-600-300",
pulse: false,
};
}
@@ -66,10 +58,8 @@ export function resolveThreadStatus(
return {
kind: "working",
label: "Working",
- pillClassName: "bg-primary/10",
+ pillClassName: "bg-adaptive-sky-500-a12-a16",
textClassName: "text-adaptive-sky-600-400",
- iconColor: "#0a84ff",
- iconBackground: "rgba(10,132,255,0.22)",
pulse: true,
};
}
@@ -78,10 +68,8 @@ export function resolveThreadStatus(
return {
kind: "connecting",
label: "Connecting",
- pillClassName: "bg-primary/10",
- textClassName: "text-foreground-secondary",
- iconColor: "#0a84ff",
- iconBackground: "rgba(10,132,255,0.22)",
+ pillClassName: "bg-adaptive-sky-500-a12-a16",
+ textClassName: "text-adaptive-sky-600-400",
pulse: true,
};
}
@@ -92,8 +80,6 @@ export function resolveThreadStatus(
label: "Error",
pillClassName: "bg-danger",
textClassName: "text-danger-foreground",
- iconColor: "#ff453a",
- iconBackground: "rgba(255,69,58,0.22)",
pulse: false,
};
}
@@ -106,10 +92,8 @@ export function resolveThreadStatus(
return {
kind: "plan-ready",
label: "Plan Ready",
- pillClassName: "bg-primary/10",
- textClassName: "text-foreground-secondary",
- iconColor: "#bf5af2",
- iconBackground: "rgba(191,90,242,0.22)",
+ pillClassName: "bg-adaptive-violet-500-a12-a16",
+ textClassName: "text-adaptive-violet-600-400",
pulse: false,
};
}
diff --git a/apps/mobile/src/features/threads/worktree-setup-card.tsx b/apps/mobile/src/features/threads/worktree-setup-card.tsx
index 52154bcc8bc..86b71992710 100644
--- a/apps/mobile/src/features/threads/worktree-setup-card.tsx
+++ b/apps/mobile/src/features/threads/worktree-setup-card.tsx
@@ -72,7 +72,7 @@ export function WorktreeSetupCard(props: WorktreeSetupCardProps) {
/>
{!handedOff ? (
<Text
- className="text-2xs text-adaptive-neutral-600-400"
+ className="text-2xs text-foreground-secondary"
style={{ fontVariant: ["tabular-nums"] }}
>
{elapsed(snapshot.startedAt, snapshot.endedAt, now)}
@@ -99,25 +99,21 @@ export function WorktreeSetupCard(props: WorktreeSetupCardProps) {
{backgroundSetup ? (
<ActivityIndicator
size="small"
- colorClassName="accent-adaptive-neutral-500-400"
+ colorClassName="accent-icon-muted"
style={{ width: 12, height: 12, transform: [{ scale: 0.65 }] }}
/>
) : failed ? (
<SymbolView
name="exclamationmark.circle"
size={12}
- tintColorClassName="accent-adaptive-rose-700-300"
+ tintColorClassName="accent-danger-foreground"
/>
) : null}
- <Text numberOfLines={1} className="shrink text-2xs text-adaptive-neutral-600-400">
+ <Text numberOfLines={1} className="shrink text-2xs text-foreground-secondary">
{backgroundSetup ? scriptName : "Details"}
</Text>
{!backgroundSetup ? (
- <SymbolView
- name="chevron.right"
- size={10}
- tintColorClassName="accent-adaptive-neutral-500-400"
- />
+ <SymbolView name="chevron.right" size={10} tintColorClassName="accent-icon-muted" />
) : null}
</View>
</Pressable>
@@ -166,14 +162,19 @@ function HeaderLabel({
failed?: boolean;
}) {
return active ? (
- <ShimmeringWorkContent icon="clock" iconSubtleColor="#737373" label={label} showIcon={false} />
+ <ShimmeringWorkContent
+ icon="clock"
+ iconSubtleColor="transparent"
+ label={label}
+ showIcon={false}
+ />
) : (
<Text
numberOfLines={1}
className={
failed
- ? "flex-1 text-sm text-adaptive-rose-700-300"
- : "flex-1 text-sm text-adaptive-neutral-600-400"
+ ? "flex-1 text-sm text-danger-foreground"
+ : "flex-1 text-sm text-foreground-secondary"
}
style={{ fontVariant: ["tabular-nums"] }}
>
@@ -232,7 +233,7 @@ function SetupDetailsSheet({
</View>
))}
{snapshot.phase === "failed" && snapshot.error ? (
- <Text selectable className="ml-8 mt-2 text-xs text-adaptive-rose-700-300">
+ <Text selectable className="ml-8 mt-2 text-xs text-danger-foreground">
{snapshot.error}
</Text>
) : null}
@@ -303,7 +304,7 @@ function StageRow({
{stage.status === "running" && animate ? (
<ActivityIndicator
size="small"
- colorClassName="accent-adaptive-neutral-500-400"
+ colorClassName="accent-icon-muted"
style={{ transform: [{ scale: 0.75 }] }}
/>
) : (
@@ -312,10 +313,10 @@ function StageRow({
size={14}
tintColorClassName={
stage.status === "failed"
- ? "accent-adaptive-rose-700-300"
+ ? "accent-danger-foreground"
: stage.status === "warning"
? "accent-warning-foreground"
- : "accent-adaptive-neutral-500-400"
+ : "accent-icon-muted"
}
/>
)}
@@ -323,7 +324,7 @@ function StageRow({
{stage.status === "running" && animate ? (
<ShimmeringWorkContent
icon="clock"
- iconSubtleColor="#737373"
+ iconSubtleColor="transparent"
label={label}
showIcon={false}
/>
@@ -332,24 +333,21 @@ function StageRow({
numberOfLines={1}
className={
stage.status === "failed"
- ? "flex-1 text-sm text-adaptive-rose-700-300"
- : "flex-1 text-sm text-adaptive-neutral-600-400"
+ ? "flex-1 text-sm text-danger-foreground"
+ : "flex-1 text-sm text-foreground-secondary"
}
>
{label}
</Text>
)}
{detail ? (
- <Text
- numberOfLines={1}
- className="max-w-[25%] shrink text-2xs text-adaptive-neutral-600-400"
- >
+ <Text numberOfLines={1} className="max-w-[25%] shrink text-2xs text-foreground-secondary">
{detail}
</Text>
) : null}
{stage.status !== "pending" && stage.status !== "skipped" ? (
<Text
- className="text-2xs text-adaptive-neutral-600-400"
+ className="text-2xs text-foreground-secondary"
style={{ fontVariant: ["tabular-nums"] }}
>
{elapsed(stage.startedAt, stage.endedAt, now)}
@@ -368,8 +366,8 @@ function OutputTail({ lines, failed }: { lines: ReadonlyArray<string>; failed: b
accessibilityLabel="Setup script output"
className={
failed
- ? "mb-2 ml-8 rounded-md border border-adaptive-rose-700-300/20 bg-adaptive-rose-50-950 px-3 py-2"
- : "mb-2 ml-8 rounded-md border border-border bg-adaptive-neutral-100-900 px-3 py-2"
+ ? "mb-2 ml-8 rounded-md border border-danger-border bg-danger px-3 py-2"
+ : "mb-2 ml-8 rounded-md border border-border bg-card-alt px-3 py-2"
}
>
{OUTPUT_TAIL_SLOTS.map((slot) => (
@@ -379,8 +377,8 @@ function OutputTail({ lines, failed }: { lines: ReadonlyArray<string>; failed: b
numberOfLines={1}
className={
failed
- ? "text-2xs leading-5 text-adaptive-rose-700-300 ios:font-[family-name:Menlo] android:font-mono"
- : "text-2xs leading-5 text-adaptive-neutral-600-400 ios:font-[family-name:Menlo] android:font-mono"
+ ? "text-2xs leading-5 text-danger-foreground ios:font-[family-name:Menlo] android:font-mono"
+ : "text-2xs leading-5 text-foreground-secondary ios:font-[family-name:Menlo] android:font-mono"
}
>
{lines[lines.length - OUTPUT_TAIL_SLOTS.length + slot] || "\u00a0"}
diff --git a/apps/mobile/src/features/voice-input/ComposerDictationControl.tsx b/apps/mobile/src/features/voice-input/ComposerDictationControl.tsx
index 93838440ad6..602cbb158b5 100644
--- a/apps/mobile/src/features/voice-input/ComposerDictationControl.tsx
+++ b/apps/mobile/src/features/voice-input/ComposerDictationControl.tsx
@@ -300,7 +300,7 @@ export function ComposerDictationStatus(props: {
<View className="relative h-11 min-w-0 flex-1 justify-center">
{isError ? (
<View className="min-w-0 flex-row items-center gap-1.5 px-2">
- <Text className="min-w-0 flex-1 text-sm text-red-400" numberOfLines={2}>
+ <Text className="min-w-0 flex-1 text-sm text-danger-foreground" numberOfLines={2}>
{props.presentation.statusLabel}
</Text>
<Pressable
diff --git a/apps/mobile/src/lib/materialYouTheme.android.ts b/apps/mobile/src/lib/materialYouTheme.android.ts
index ce16b23c89e..311518428ef 100644
--- a/apps/mobile/src/lib/materialYouTheme.android.ts
+++ b/apps/mobile/src/lib/materialYouTheme.android.ts
@@ -36,12 +36,15 @@ export function materialYouPaletteToMobileThemeVariables(
"--color-sheet": withAlpha(palette.surfaceContainerLow, 0.98),
"--color-sheet-solid": palette.surfaceContainerLow,
"--color-card": palette.surfaceContainer,
+ "--color-grouped-card": palette.surfaceContainer,
"--color-card-alt": palette.surfaceContainerHigh,
"--color-card-translucent": withAlpha(palette.surfaceContainer, 0.8),
"--color-thread-canvas": palette.surfaceContainerLow,
"--color-thread-selected": palette.surfaceContainer,
"--color-thread-selected-foreground": palette.onSurface,
"--color-thread-selected-foreground-muted": palette.onSurfaceVariant,
+ "--color-thread-hover": palette.surfaceContainerHigh,
+ "--color-row-hover": palette.surfaceContainerHigh,
"--color-composer-panel": withAlpha(palette.surfaceContainerLow, dark ? 0.92 : 0.88),
"--color-composer-surface": withAlpha(palette.surfaceContainerHigh, dark ? 0.9 : 0.94),
"--color-composer-border": withAlpha(palette.outlineVariant, dark ? 0.34 : 0.46),
@@ -50,6 +53,7 @@ export function materialYouPaletteToMobileThemeVariables(
"--color-foreground-muted": palette.onSurfaceVariant,
"--color-foreground-tertiary": withAlpha(palette.onSurfaceVariant, 0.58),
"--color-border": withAlpha(palette.outlineVariant, dark ? 0.5 : 0.65),
+ "--color-focus": palette.primary,
"--color-border-subtle": withAlpha(palette.outlineVariant, dark ? 0.34 : 0.46),
"--color-separator": withAlpha(palette.outlineVariant, dark ? 0.24 : 0.34),
"--color-subtle": withAlpha(palette.onSurface, 0.05),
@@ -59,6 +63,7 @@ export function materialYouPaletteToMobileThemeVariables(
"--color-inline-skill-foreground": palette.onTertiaryContainer,
"--color-primary": palette.primary,
"--color-primary-foreground": palette.onPrimary,
+ "--color-primary-text": palette.primary,
"--color-primary-shadow": withAlpha(palette.scrim, dark ? 0.22 : 0.18),
"--color-secondary": palette.secondaryContainer,
"--color-secondary-foreground": palette.onSecondaryContainer,
@@ -70,6 +75,8 @@ export function materialYouPaletteToMobileThemeVariables(
"--color-danger": palette.errorContainer,
"--color-danger-border": withAlpha(palette.onErrorContainer, dark ? 0.42 : 0.5),
"--color-danger-foreground": palette.onErrorContainer,
+ "--color-update": palette.primaryContainer,
+ "--color-update-foreground": palette.onPrimaryContainer,
"--color-input": palette.surfaceContainerLowest,
"--color-input-border": withAlpha(palette.outline, dark ? 0.42 : 0.5),
"--color-sidebar-search": palette.surfaceContainerLowest,
@@ -78,8 +85,10 @@ export function materialYouPaletteToMobileThemeVariables(
"--color-icon-muted": palette.onSurfaceVariant,
"--color-icon-subtle": withAlpha(palette.onSurfaceVariant, 0.68),
"--color-header": palette.surfaceContainerHigh,
+ "--color-header-foreground": palette.onSurface,
"--color-header-border": withAlpha(palette.outlineVariant, dark ? 0.36 : 0.48),
"--color-glass-surface": withAlpha(palette.surfaceContainerHigh, dark ? 0.78 : 0.72),
+ "--color-glass-fallback": withAlpha(palette.surfaceContainerHigh, dark ? 0.9 : 0.94),
"--color-glass-tint": withAlpha(palette.primaryContainer, dark ? 0.24 : 0.18),
"--color-status-bar": palette.surfaceContainerLow,
"--color-md-body": materialTone(palette.onSurfaceVariant, dark ? 90 : 10),
@@ -100,6 +109,9 @@ export function materialYouPaletteToMobileThemeVariables(
"--color-user-bubble-skill-foreground": userBubbleForeground,
"--color-backdrop": withAlpha(palette.scrim, dark ? 0.48 : 0.22),
"--color-drawer": palette.surface,
+ "--color-drawer-foreground": palette.onSurface,
+ "--color-drawer-foreground-muted": palette.onSurfaceVariant,
+ "--color-drawer-border": withAlpha(palette.outlineVariant, dark ? 0.36 : 0.48),
"--color-drawer-shadow": withAlpha(palette.scrim, dark ? 0.32 : 0.12),
"--color-dot-separator": withAlpha(palette.onSurface, 0.2),
"--color-wordmark": palette.onSurface,
diff --git a/apps/mobile/src/lib/materialYouTheme.test.ts b/apps/mobile/src/lib/materialYouTheme.test.ts
index dc99f9badec..d803a161ad8 100644
--- a/apps/mobile/src/lib/materialYouTheme.test.ts
+++ b/apps/mobile/src/lib/materialYouTheme.test.ts
@@ -54,6 +54,7 @@ describe("Material You system colors", () => {
expect(variables["--color-thread-canvas"]).toBe(palette.surfaceContainerLow);
expect(variables["--color-thread-selected"]).toBe(palette.surfaceContainer);
expect(variables["--color-header"]).toBe(palette.surfaceContainerHigh);
+ expect(variables["--color-grouped-card"]).toBe(palette.surfaceContainer);
expect(variables["--color-primary"]).toBe(palette.primary);
expect(variables["--color-placeholder"]).toBe("#1C1B1F9E");
});
diff --git a/apps/mobile/src/lib/mobileTheme.test-support.ts b/apps/mobile/src/lib/mobileTheme.test-support.ts
index 1e47b0f0ed4..c363c4a559c 100644
--- a/apps/mobile/src/lib/mobileTheme.test-support.ts
+++ b/apps/mobile/src/lib/mobileTheme.test-support.ts
@@ -1,20 +1,29 @@
import * as NodeFS from "node:fs";
-import type { MobileThemeAppearance, MobileThemeVariables } from "./mobileTheme";
+import {
+ MOBILE_THEME_VARIABLE_NAMES,
+ type MobileThemeAppearance,
+ type MobileThemeVariables,
+} from "./mobileTheme";
export function readDefaultMobileThemeVariables(
appearance: MobileThemeAppearance,
): MobileThemeVariables {
- const stylesheet = NodeFS.readFileSync(new URL("../../global.css", import.meta.url), "utf8");
+ const stylesheet = NodeFS.readFileSync(
+ new URL("../../generated-uniwind-themes.css", import.meta.url),
+ "utf8",
+ );
const variant = new RegExp(`@variant ${appearance} \\{([\\s\\S]*?)\\n \\}`, "u").exec(
stylesheet,
)?.[1];
- if (variant === undefined) throw new Error(`Missing default ${appearance} theme in global.css.`);
+ if (variant === undefined) throw new Error(`Missing generated default ${appearance} theme.`);
return Object.fromEntries(
Array.from(variant.matchAll(/(--color-[a-z0-9-]+):\s*([^;]+);/gu), ([, name, value]) => [
name,
(value ?? "").trim(),
- ]),
+ ]).filter(([name]) =>
+ MOBILE_THEME_VARIABLE_NAMES.includes(name as (typeof MOBILE_THEME_VARIABLE_NAMES)[number]),
+ ),
) as MobileThemeVariables;
}
diff --git a/apps/mobile/src/lib/mobileTheme.test.ts b/apps/mobile/src/lib/mobileTheme.test.ts
index 64c27e7d870..1c7643f9895 100644
--- a/apps/mobile/src/lib/mobileTheme.test.ts
+++ b/apps/mobile/src/lib/mobileTheme.test.ts
@@ -1,12 +1,22 @@
import { describe, expect, it } from "vite-plus/test";
-import { BUILT_IN_THEME_IDS, BUILT_IN_THEMES, T3_CHAT_THEME } from "@t3tools/shared/themePalettes";
+import {
+ BUILT_IN_THEME_IDS,
+ BUILT_IN_THEMES,
+ T3_CHAT_THEME,
+ T3_CODE_LIGHT_THEME_COLORS,
+ T3_CODE_DARK_THEME_COLORS,
+ MOBILE_THEME_IDS,
+ getThemeColorsForAppearance,
+} from "@t3tools/shared/themePalettes";
import { readDefaultMobileThemeVariables } from "./mobileTheme.test-support";
+import { getMobileThemeRuntimeVariables } from "./mobileThemeVariables";
import {
createMobileThemePairPatch,
createMobileThemeSelectionPatch,
createMobileThemeVariables,
DEFAULT_MOBILE_THEME_ID,
+ flattenThemeColor,
getMobileThemePreviewColors,
getMobileThemeVariables,
normalizeMobileThemeId,
@@ -66,12 +76,86 @@ describe("mobile themes", () => {
}
});
- it("preserves the existing mobile palette as the default", () => {
- expect(readDefaultMobileThemeVariables("light")["--color-screen"]).toBe("#f2f2f7");
- expect(readDefaultMobileThemeVariables("dark")["--color-screen"]).toBe("#0a0a0a");
- expect(readDefaultMobileThemeVariables("light")["--color-user-bubble-skill-foreground"]).toBe(
- "#2563eb",
- );
+ it.each(MOBILE_THEME_IDS)("uses the web color roles for %s in both appearances", (themeId) => {
+ for (const appearance of ["light", "dark"] as const) {
+ const theme = BUILT_IN_THEMES.find((candidate) => candidate.id === themeId);
+ const colors = theme
+ ? getThemeColorsForAppearance(theme, appearance)!
+ : appearance === "dark"
+ ? T3_CODE_DARK_THEME_COLORS
+ : T3_CODE_LIGHT_THEME_COLORS;
+ const variables =
+ themeId === DEFAULT_MOBILE_THEME_ID
+ ? readDefaultMobileThemeVariables(appearance)
+ : getMobileThemeVariables(themeId, appearance);
+ expect(variables["--color-screen"]).toBe(themeColorToNativeColor(colors.canvas));
+ expect(variables["--color-thread-canvas"]).toBe(variables["--color-screen"]);
+ expect(variables["--color-drawer"]).toBe(themeColorToNativeColor(colors.sidebar));
+ expect(variables["--color-thread-hover"]).toBe(
+ themeColorToNativeColor(colors.sidebarRowHover),
+ );
+ expect(variables["--color-card"]).toBe(themeColorToNativeColor(colors.surface));
+ expect(variables["--color-composer-surface"]).toBe(
+ themeColorWithAlpha(
+ themeId === DEFAULT_MOBILE_THEME_ID
+ ? variables["--color-grouped-card"]
+ : themeColorToNativeColor(colors.surface),
+ appearance === "dark" ? 0.9 : 0.94,
+ ),
+ );
+ expect(variables["--color-thread-selected"]).toBe(
+ themeColorToNativeColor(colors.sidebarRowActive),
+ );
+ expect(variables["--color-thread-selected-foreground"]).toBe(
+ themeColorToNativeColor(colors.sidebarForeground),
+ );
+ expect(variables["--color-primary"]).toBe(themeColorToNativeColor(colors.messageAction));
+ if (themeId !== DEFAULT_MOBILE_THEME_ID) {
+ expect(variables["--color-user-bubble"]).toBe(
+ themeColorToNativeColor(colors.messageSurface),
+ );
+ }
+ expect(
+ contrastRatio(variables["--color-foreground"], variables["--color-screen"]),
+ ).toBeGreaterThanOrEqual(4.5);
+ for (const [foreground, surface] of [
+ ["--color-drawer-foreground", "--color-drawer"],
+ ["--color-drawer-foreground-muted", "--color-drawer"],
+ ["--color-drawer-foreground", "--color-thread-hover"],
+ ["--color-drawer-foreground-muted", "--color-thread-hover"],
+ ["--color-thread-selected-foreground-muted", "--color-thread-selected"],
+ ["--color-primary-foreground", "--color-primary"],
+ ["--color-primary-text", "--color-screen"],
+ ["--color-primary-text", "--color-card"],
+ ["--color-primary-text", "--color-card-alt"],
+ ["--color-primary-text", "--color-sheet-solid"],
+ ["--color-foreground", "--color-sheet-solid"],
+ ["--color-foreground-muted", "--color-sheet-solid"],
+ ["--color-primary-text", "--color-grouped-card"],
+ ["--color-foreground", "--color-grouped-card"],
+ ["--color-foreground-muted", "--color-grouped-card"],
+ ["--color-placeholder", "--color-grouped-card"],
+ ["--color-secondary-foreground", "--color-secondary"],
+ ["--color-user-bubble-foreground", "--color-user-bubble"],
+ ["--color-warning-foreground", "--color-warning"],
+ ["--color-danger-foreground", "--color-danger"],
+ ["--color-md-body", "--color-screen"],
+ ["--color-md-strong", "--color-screen"],
+ ["--color-md-link", "--color-screen"],
+ ["--color-md-code-text", "--color-md-code-bg"],
+ ] as const) {
+ expect(
+ contrastRatio(variables[foreground], variables[surface]),
+ `${appearance}: ${foreground} on ${surface}`,
+ ).toBeGreaterThanOrEqual(4.5);
+ }
+ expect(
+ contrastRatio(
+ variables["--color-thread-selected-foreground"],
+ variables["--color-thread-selected"],
+ ),
+ ).toBeGreaterThanOrEqual(4.5);
+ }
});
it("applies palette overrides on top of the selected built-in theme", () => {
@@ -83,6 +167,62 @@ describe("mobile themes", () => {
expect(variables["--color-screen"]).toMatch(/^#/);
});
+ it.each(["light", "dark"] as const)(
+ "separates default settings groups from their %s background",
+ (appearance) => {
+ const variables = getMobileThemeVariables("t3-code", appearance);
+ expect(
+ contrastRatio(variables["--color-grouped-card"], variables["--color-sheet-solid"]),
+ ).toBeGreaterThanOrEqual(1.06);
+ expect(variables["--color-grouped-card"]).not.toBe(variables["--color-card"]);
+ for (const platform of ["ios", "android"]) {
+ const runtime = getMobileThemeRuntimeVariables("t3-code", appearance, platform);
+ const sidebar = flattenThemeColor(runtime["--color-drawer"], runtime["--color-screen"]);
+ const chrome = flattenThemeColor(
+ runtime[platform === "android" ? "--color-header" : "--color-drawer"],
+ runtime["--color-screen"],
+ );
+ expect(relativeLuminance(sidebar)).toBeLessThan(
+ relativeLuminance(runtime["--color-thread-canvas"]),
+ );
+ expect(contrastRatio(chrome, runtime["--color-screen"])).toBeGreaterThanOrEqual(1.06);
+ const foregroundRoles =
+ platform === "android"
+ ? (["--color-header-foreground", "--color-foreground-muted"] as const)
+ : (["--color-drawer-foreground", "--color-drawer-foreground-muted"] as const);
+ for (const role of foregroundRoles) {
+ expect(contrastRatio(runtime[role], chrome)).toBeGreaterThanOrEqual(4.5);
+ }
+ }
+ },
+ );
+
+ it.each(["light", "dark"] as const)(
+ "slightly strengthens default %s messages and separates fallback materials",
+ (appearance) => {
+ const variables = getMobileThemeVariables("t3-code", appearance);
+ const desktop =
+ appearance === "dark" ? T3_CODE_DARK_THEME_COLORS : T3_CODE_LIGHT_THEME_COLORS;
+ const bubbleContrast = contrastRatio(
+ variables["--color-user-bubble"],
+ variables["--color-screen"],
+ );
+ expect(bubbleContrast).toBeGreaterThan(contrastRatio(desktop.messageSurface, desktop.canvas));
+ expect(bubbleContrast).toBeLessThan(1.2);
+ for (const role of ["--color-composer-surface", "--color-glass-fallback"] as const) {
+ const surface = flattenThemeColor(variables[role], variables["--color-screen"]);
+ expect(contrastRatio(surface, variables["--color-screen"])).toBeGreaterThanOrEqual(1.06);
+ for (const foreground of [
+ "--color-foreground",
+ "--color-placeholder",
+ "--color-primary-text",
+ ] as const) {
+ expect(contrastRatio(variables[foreground], surface)).toBeGreaterThanOrEqual(4.5);
+ }
+ }
+ },
+ );
+
it("uses the same preview roles and standard artwork as desktop", () => {
expect(getMobileThemePreviewColors(DEFAULT_MOBILE_THEME_ID, "light")).toEqual({
canvas: "#fcfcfc",
@@ -153,7 +293,6 @@ describe("mobile themes", () => {
it("maps semantic palette roles onto every mobile color variable", () => {
const variables = createMobileThemeVariables(T3_CHAT_THEME.colors, "light");
- expect(Object.keys(variables)).toHaveLength(75);
expect(variables["--color-sheet-solid"]).toBe(
themeColorToNativeColor(T3_CHAT_THEME.colors.chrome),
);
@@ -219,8 +358,6 @@ describe("mobile themes", () => {
}
});
- // The default palette lives in global.css rather than BUILT_IN_THEMES, so the loops above
- // never reached it; it kept an unreadable hardcoded bubble until this covered it.
it("keeps the default user bubble readable in both appearances", () => {
for (const appearance of ["light", "dark"] as const) {
const variables = readDefaultMobileThemeVariables(appearance);
diff --git a/apps/mobile/src/lib/mobileTheme.ts b/apps/mobile/src/lib/mobileTheme.ts
index 3b22ac8b583..80453f61a01 100644
--- a/apps/mobile/src/lib/mobileTheme.ts
+++ b/apps/mobile/src/lib/mobileTheme.ts
@@ -1,10 +1,11 @@
import {
BUILT_IN_THEMES,
T3_CHAT_THEME,
+ T3_CODE_LIGHT_THEME_COLORS,
+ T3_CODE_DARK_THEME_COLORS,
getThemeColorsForAppearance,
MOBILE_DEFAULT_THEME_ID,
MOBILE_THEME_IDS as SHARED_MOBILE_THEME_IDS,
- type BuiltInThemeId,
type MobileThemeId as SharedMobileThemeId,
type ThemeAppearance,
type ThemeColors,
@@ -138,7 +139,7 @@ function withAlpha(color: string, alpha: number): string {
}
function rgbChannels(color: string): readonly [number, number, number] | null {
- const match = /^#([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i.exec(color);
+ const match = /^#([\da-f]{2})([\da-f]{2})([\da-f]{2})(?:[\da-f]{2})?$/i.exec(color);
if (!match) return null;
const [, red = "0", green = "0", blue = "0"] = match;
return [Number.parseInt(red, 16), Number.parseInt(green, 16), Number.parseInt(blue, 16)];
@@ -150,6 +151,14 @@ function rgbChannels(color: string): readonly [number, number, number] | null {
* colour asked for — so a translucent role like `--color-border` has to be flattened first.
*/
export function flattenThemeColor(color: string, surface: string): string {
+ const alphaHex = /^#([\da-f]{6})([\da-f]{2})$/i.exec(color);
+ if (alphaHex) {
+ const channels = rgbChannels(color)!;
+ return flattenThemeColor(
+ `rgba(${channels[0]}, ${channels[1]}, ${channels[2]}, ${Number.parseInt(alphaHex[2]!, 16) / 255})`,
+ surface,
+ );
+ }
const match = /^rgba?\(\s*(\d+)[,\s]+(\d+)[,\s]+(\d+)(?:[,\s/]+([\d.]+))?\s*\)$/i.exec(
color.trim(),
);
@@ -182,22 +191,21 @@ function contrastRatio(
);
}
-/** Preserve the theme's action hue while making it readable as skill text on a message bubble. */
-function readableMessageAccent(accent: string, surface: string): string {
+/** Preserve the color's hue while giving text 4.5:1 contrast on every supplied surface. */
+function readableTextColor(accent: string, surface: string | ReadonlyArray<string>): string {
const accentChannels = rgbChannels(accent);
- const surfaceChannels = rgbChannels(surface);
- if (
- !accentChannels ||
- !surfaceChannels ||
- contrastRatio(accentChannels, surfaceChannels) >= 4.5
- ) {
+ const surfaceChannels = (typeof surface === "string" ? [surface] : surface)
+ .map(rgbChannels)
+ .filter((channels) => channels !== null);
+ const minimumContrast = (channels: readonly [number, number, number]) =>
+ Math.min(...surfaceChannels.map((surface) => contrastRatio(channels, surface)));
+ if (!accentChannels || surfaceChannels.length === 0 || minimumContrast(accentChannels) >= 4.5) {
return accent;
}
const black = [0, 0, 0] as const;
const white = [255, 255, 255] as const;
- const target =
- contrastRatio(black, surfaceChannels) >= contrastRatio(white, surfaceChannels) ? black : white;
+ const target = minimumContrast(black) >= minimumContrast(white) ? black : white;
let readable: readonly [number, number, number] = target;
let lowerAmount = 0;
let upperAmount = 1;
@@ -208,7 +216,7 @@ function readableMessageAccent(accent: string, surface: string): string {
Math.round(accentChannels[1] + (target[1] - accentChannels[1]) * amount),
Math.round(accentChannels[2] + (target[2] - accentChannels[2]) * amount),
];
- if (contrastRatio(candidate, surfaceChannels) >= 4.5) {
+ if (minimumContrast(candidate) >= 4.5) {
readable = candidate;
upperAmount = amount;
} else {
@@ -227,30 +235,46 @@ export function themeColorWithAlpha(color: string, alpha: number): string {
return rgb ? `rgba(${rgb[1]}, ${rgb[2]}, ${rgb[3]}, ${alpha})` : color;
}
-export function createMobileThemeVariables(colors: ThemeColors, appearance: MobileThemeAppearance) {
+export function createMobileThemeVariables(
+ colors: ThemeColors,
+ appearance: MobileThemeAppearance,
+ groupedCardColor = colors.surface,
+) {
const c = nativeColors(colors);
+ const groupedCard = themeColorToNativeColor(groupedCardColor);
+ const textSurfaces = [c.canvas, c.surface, c.surfaceRaised, c.chrome, groupedCard];
return {
"--color-screen": c.canvas,
"--color-sheet": withAlpha(c.chrome, 0.98),
"--color-sheet-solid": c.chrome,
- "--color-card": c.surfaceRaised,
- "--color-card-alt": c.surface,
- "--color-card-translucent": withAlpha(c.surfaceRaised, 0.8),
- "--color-thread-canvas": c.surface,
- "--color-thread-selected": c.surfaceRaised,
- "--color-thread-selected-foreground": c.text,
- "--color-thread-selected-foreground-muted": c.textMuted,
- "--color-composer-panel": themeColorWithAlpha(c.surface, appearance === "dark" ? 0.92 : 0.88),
+ "--color-card": c.surface,
+ "--color-grouped-card": groupedCard,
+ "--color-card-alt": c.surfaceRaised,
+ "--color-card-translucent": withAlpha(c.surface, 0.8),
+ "--color-thread-canvas": c.canvas,
+ "--color-thread-selected": c.sidebarRowActive,
+ "--color-thread-selected-foreground": c.sidebarForeground,
+ "--color-thread-selected-foreground-muted": readableTextColor(
+ c.sidebarMutedForeground,
+ c.sidebarRowActive,
+ ),
+ "--color-thread-hover": c.sidebarRowHover,
+ "--color-row-hover": c.toolbarControlHover,
+ "--color-composer-panel": themeColorWithAlpha(c.canvas, appearance === "dark" ? 0.92 : 0.88),
"--color-composer-surface": themeColorWithAlpha(
- c.surfaceRaised,
+ groupedCard,
appearance === "dark" ? 0.9 : 0.94,
),
- "--color-composer-border": themeColorWithAlpha(c.border, appearance === "dark" ? 0.46 : 0.54),
+ "--color-composer-border": themeColorWithAlpha(
+ c.border,
+ groupedCard === c.surface ? (appearance === "dark" ? 0.46 : 0.54) : 0.8,
+ ),
"--color-foreground": c.text,
- "--color-foreground-secondary": c.textMuted,
- "--color-foreground-muted": c.mutedForeground,
+ "--color-foreground-secondary": readableTextColor(c.textMuted, textSurfaces),
+ "--color-foreground-muted": readableTextColor(c.mutedForeground, textSurfaces),
"--color-foreground-tertiary": c.secondaryLabel,
"--color-border": c.border,
+ "--color-focus": c.focus,
"--color-border-subtle": withAlpha(c.border, 0.7),
"--color-separator": withAlpha(c.border, 0.55),
"--color-subtle": c.muted,
@@ -258,14 +282,15 @@ export function createMobileThemeVariables(colors: ThemeColors, appearance: Mobi
"--color-inline-skill-background": c.accentSurface,
"--color-inline-skill-border": withAlpha(c.accent, 0.42),
"--color-inline-skill-foreground": c.accentSurfaceForeground,
- "--color-primary": c.accent,
- "--color-primary-foreground": c.accentForeground,
+ "--color-primary": c.messageAction,
+ "--color-primary-foreground": c.messageActionForeground,
+ "--color-primary-text": readableTextColor(c.messageAction, textSurfaces),
"--color-primary-shadow": "#000000",
"--color-secondary": c.secondary,
"--color-secondary-foreground": c.secondaryForeground,
"--color-secondary-border": c.border,
- "--color-switch-active-track": c.accent,
- "--color-switch-active-thumb": c.accentForeground,
+ "--color-switch-active-track": c.messageAction,
+ "--color-switch-active-thumb": c.messageActionForeground,
"--color-switch-inactive-track": c.secondary,
"--color-switch-inactive-thumb": c.mutedForeground,
"--color-warning": c.warningSurface,
@@ -274,21 +299,25 @@ export function createMobileThemeVariables(colors: ThemeColors, appearance: Mobi
"--color-danger": c.errorSurface,
"--color-danger-border": withAlpha(c.error, 0.32),
"--color-danger-foreground": c.errorForeground,
- "--color-input": c.surfaceRaised,
+ "--color-update": c.updateSurface,
+ "--color-update-foreground": c.updateForeground,
+ "--color-input": c.surface,
"--color-input-border": c.input,
"--color-sidebar-search": c.sidebarControlSurface,
- "--color-placeholder": c.placeholder,
+ "--color-placeholder": readableTextColor(c.placeholder, textSurfaces),
"--color-icon": c.text,
"--color-icon-muted": c.iconMuted,
"--color-icon-subtle": c.secondaryLabel,
"--color-header": withAlpha(c.toolbar, 0.97),
+ "--color-header-foreground": c.toolbarForeground,
"--color-header-border": c.toolbarBorder,
"--color-glass-surface": withAlpha(c.surfaceOverlay, 0.74),
+ "--color-glass-fallback": themeColorWithAlpha(groupedCard, appearance === "dark" ? 0.9 : 0.94),
"--color-glass-tint": withAlpha(c.surfaceOverlay, 0.22),
"--color-status-bar": c.canvas,
"--color-md-body": c.text,
- "--color-md-strong": c.toolbarForeground,
- "--color-md-link": c.accent,
+ "--color-md-strong": c.text,
+ "--color-md-link": readableTextColor(c.messageAction, c.canvas),
"--color-md-blockquote-border": c.border,
"--color-md-blockquote-bg": c.muted,
"--color-md-code-bg": c.codeBackground,
@@ -301,12 +330,15 @@ export function createMobileThemeVariables(colors: ThemeColors, appearance: Mobi
"--color-user-bubble": c.messageSurface,
"--color-user-bubble-foreground": c.messageForeground,
"--color-user-bubble-foreground-muted": withAlpha(c.messageForeground, 0.78),
- "--color-user-bubble-skill-foreground": readableMessageAccent(
- c.messageAction,
- c.messageSurface,
- ),
+ "--color-user-bubble-skill-foreground": readableTextColor(c.messageAction, c.messageSurface),
"--color-backdrop": withAlpha("#000000", appearance === "dark" ? 0.48 : 0.22),
- "--color-drawer": withAlpha(c.sidebar, 0.99),
+ "--color-drawer": c.sidebar,
+ "--color-drawer-foreground": c.sidebarForeground,
+ "--color-drawer-foreground-muted": readableTextColor(c.sidebarMutedForeground, [
+ c.sidebar,
+ c.sidebarRowHover,
+ ]),
+ "--color-drawer-border": c.sidebarBorder,
"--color-drawer-shadow": withAlpha("#000000", appearance === "dark" ? 0.32 : 0.12),
"--color-dot-separator": withAlpha(c.textMuted, 0.35),
"--color-wordmark": c.text,
@@ -318,14 +350,45 @@ export const MOBILE_THEME_VARIABLE_NAMES = Object.keys(
createMobileThemeVariables(T3_CHAT_THEME.colors, "light"),
) as ReadonlyArray<MobileThemeVariable>;
+export function getMobileThemeColors(
+ themeId: SharedMobileThemeId,
+ appearance: MobileThemeAppearance,
+): ThemeColors {
+ if (themeId === DEFAULT_MOBILE_THEME_ID) {
+ return appearance === "dark" ? T3_CODE_DARK_THEME_COLORS : T3_CODE_LIGHT_THEME_COLORS;
+ }
+ const theme = BUILT_IN_THEMES.find((candidate) => candidate.id === themeId) ?? T3_CHAT_THEME;
+ return getThemeColorsForAppearance(theme, appearance) ?? theme.colors;
+}
+
export function getMobileThemeVariables(
- themeId: BuiltInThemeId,
+ themeId: SharedMobileThemeId,
appearance: MobileThemeAppearance,
overrides: Partial<MobileThemeVariables> | null = null,
): MobileThemeVariables {
- const theme = BUILT_IN_THEMES.find((candidate) => candidate.id === themeId) ?? T3_CHAT_THEME;
- const colors = getThemeColorsForAppearance(theme, appearance) ?? theme.colors;
- const baseVariables = createMobileThemeVariables(colors, appearance);
+ const colors = getMobileThemeColors(themeId, appearance);
+ // Mobile settings groups and fallback materials use tonal fills where desktop
+ // uses outlined cards. Regular cards retain their shared desktop surface.
+ const groupedCard =
+ themeId === DEFAULT_MOBILE_THEME_ID
+ ? appearance === "light"
+ ? colors.toolbarControlHover
+ : colors.sidebarRowActive
+ : colors.surface;
+ const mobileColors =
+ themeId === DEFAULT_MOBILE_THEME_ID
+ ? {
+ ...colors,
+ messageSurface: flattenThemeColor(
+ themeColorWithAlpha(
+ appearance === "dark" ? colors.sidebarRowActive : colors.border,
+ 0.3,
+ ),
+ colors.messageSurface,
+ ),
+ }
+ : colors;
+ const baseVariables = createMobileThemeVariables(mobileColors, appearance, groupedCard);
// The complete base record guarantees that optional overrides cannot leave a token undefined.
return overrides ? ({ ...baseVariables, ...overrides } as MobileThemeVariables) : baseVariables;
diff --git a/apps/mobile/src/lib/mobileThemeVariables.test.ts b/apps/mobile/src/lib/mobileThemeVariables.test.ts
index 6cd457d899d..1fecf3074b4 100644
--- a/apps/mobile/src/lib/mobileThemeVariables.test.ts
+++ b/apps/mobile/src/lib/mobileThemeVariables.test.ts
@@ -5,11 +5,11 @@ import { getMobileThemeVariables, MOBILE_THEME_IDS, themeColorWithAlpha } from "
import { getMobileThemeRuntimeVariables } from "./mobileThemeVariables";
describe("mobile theme runtime variables", () => {
- it("derives the standard runtime palette from global.css", () => {
- expect(getMobileThemeRuntimeVariables("t3-code", "light", "ios")).toEqual(
+ it("matches the standard base palette to the generated stylesheet", () => {
+ expect(getMobileThemeRuntimeVariables("t3-code", "light", "web")).toEqual(
readDefaultMobileThemeVariables("light"),
);
- expect(getMobileThemeRuntimeVariables("t3-code", "dark", "ios")).toEqual(
+ expect(getMobileThemeRuntimeVariables("t3-code", "dark", "web")).toEqual(
readDefaultMobileThemeVariables("dark"),
);
});
@@ -27,18 +27,22 @@ describe("mobile theme runtime variables", () => {
"keeps %s colors on Android with an opaque Material frame",
(themeId) => {
for (const appearance of ["light", "dark"] as const) {
- const ios = getMobileThemeRuntimeVariables(themeId, appearance, "ios");
+ const base = getMobileThemeVariables(
+ themeId === "material-you" ? "t3-code" : themeId,
+ appearance,
+ );
const android = getMobileThemeRuntimeVariables(themeId, appearance, "android");
expect(android).toEqual({
- ...ios,
+ ...base,
"--color-header": themeColorWithAlpha(
- ios[
+ base[
themeId === "t3-code" || themeId === "material-you"
- ? "--color-card"
+ ? "--color-row-hover"
: "--color-drawer"
],
1,
),
+ "--color-header-foreground": base["--color-drawer-foreground"],
});
expect(android["--color-header"]).toMatch(/^rgba\(\d+, \d+, \d+, 1\)$/);
}
@@ -46,13 +50,52 @@ describe("mobile theme runtime variables", () => {
);
it.each(["t3-code", "material-you"] as const)(
- "keeps the %s default dark frame distinct from the rounded settings body",
+ "keeps the %s default Material frame distinct in both appearances",
+ (themeId) => {
+ for (const appearance of ["light", "dark"] as const) {
+ const variables = getMobileThemeRuntimeVariables(themeId, appearance, "android");
+ expect(variables["--color-header"]).toBe(
+ appearance === "light" ? "rgba(244, 244, 245, 1)" : "rgba(20, 20, 20, 1)",
+ );
+ for (const pane of ["--color-screen", "--color-sheet-solid", "--color-drawer"] as const) {
+ expect(variables["--color-header"]).not.toBe(themeColorWithAlpha(variables[pane], 1));
+ }
+ }
+ },
+ );
+
+ it.each(["t3-code", "material-you"] as const)(
+ "adapts %s iPad chrome without reversing the dark desktop hierarchy",
(themeId) => {
- const variables = getMobileThemeRuntimeVariables(themeId, "dark", "android");
- expect(variables["--color-header"]).toBe("rgba(23, 23, 23, 1)");
- expect(variables["--color-header"]).not.toBe(
- themeColorWithAlpha(variables["--color-sheet-solid"], 1),
- );
+ for (const appearance of ["light", "dark"] as const) {
+ const ios = getMobileThemeRuntimeVariables(themeId, appearance, "ios");
+ const android = getMobileThemeRuntimeVariables(themeId, appearance, "android");
+ if (appearance === "light") {
+ expect(ios["--color-drawer"]).toBe(android["--color-header"]);
+ expect(ios["--color-header"]).toBe(android["--color-header"]);
+ expect(ios["--color-header-foreground"]).toBe(ios["--color-drawer-foreground"]);
+ } else {
+ expect(ios).toEqual(getMobileThemeVariables("t3-code", appearance));
+ expect(ios["--color-drawer"]).toBe(android["--color-drawer"]);
+ expect(ios["--color-drawer"]).toBe("#000000");
+ expect(ios["--color-thread-canvas"]).toBe("#0a0a0a");
+ }
+ expect(themeColorWithAlpha(ios["--color-thread-hover"], 1)).not.toBe(
+ themeColorWithAlpha(ios["--color-drawer"], 1),
+ );
+ expect(themeColorWithAlpha(ios["--color-thread-hover"], 1)).not.toBe(
+ themeColorWithAlpha(ios["--color-thread-selected"], 1),
+ );
+ for (const role of [
+ "--color-screen",
+ "--color-thread-canvas",
+ "--color-card",
+ "--color-composer-surface",
+ "--color-grouped-card",
+ ] as const) {
+ expect(ios[role]).toBe(android[role]);
+ }
+ }
},
);
});
diff --git a/apps/mobile/src/lib/mobileThemeVariables.ts b/apps/mobile/src/lib/mobileThemeVariables.ts
index a623c1df379..15096c0fd1b 100644
--- a/apps/mobile/src/lib/mobileThemeVariables.ts
+++ b/apps/mobile/src/lib/mobileThemeVariables.ts
@@ -14,8 +14,8 @@ const defaults = defaultThemeVariables as Readonly<
/**
* Complete palette for native and third-party APIs that cannot consume a
- * Uniwind className. The standard palette is generated from global.css; custom
- * palettes share the same source that generates their registered CSS themes.
+ * Uniwind className. Every palette shares the source that generates its
+ * registered CSS theme.
*/
export function getMobileThemeRuntimeVariables(
themeId: MobileThemeId,
@@ -26,16 +26,27 @@ export function getMobileThemeRuntimeVariables(
const variables = usesDefaultPalette
? defaults[appearance]
: getMobileThemeVariables(themeId, appearance);
+ // Android's frame surrounds the sidebar and chat panes. Light iPad sidebars
+ // reuse that stronger tonal fill; dark sidebars retain the shared black pane
+ // beneath the near-black chat canvas. System colors replace these roles later.
+ const frame = themeColorWithAlpha(
+ variables[usesDefaultPalette ? "--color-row-hover" : "--color-drawer"],
+ 1,
+ );
+ if (platform === "ios" && usesDefaultPalette && appearance === "light") {
+ return {
+ ...variables,
+ "--color-header": frame,
+ "--color-header-foreground": variables["--color-drawer-foreground"],
+ "--color-drawer": frame,
+ "--color-drawer-foreground-muted": variables["--color-foreground-muted"],
+ };
+ }
if (platform !== "android") return variables;
- // Rounded panes share one opaque frame. The default dark drawer matches the
- // settings body, so use its card tone to keep the rounded edge visible.
- // System colors replace this with their own surfaceContainerHigh afterwards.
return {
...variables,
- "--color-header": themeColorWithAlpha(
- variables[usesDefaultPalette ? "--color-card" : "--color-drawer"],
- 1,
- ),
+ "--color-header": frame,
+ "--color-header-foreground": variables["--color-drawer-foreground"],
};
}
diff --git a/apps/mobile/src/lib/nativeComposerTheme.test.ts b/apps/mobile/src/lib/nativeComposerTheme.test.ts
new file mode 100644
index 00000000000..785293b9642
--- /dev/null
+++ b/apps/mobile/src/lib/nativeComposerTheme.test.ts
@@ -0,0 +1,32 @@
+import { describe, expect, it } from "vite-plus/test";
+import { MOBILE_THEME_IDS } from "@t3tools/shared/themePalettes";
+
+import { getMobileThemeVariables } from "./mobileTheme";
+import { createNativeComposerTheme } from "./nativeComposerTheme";
+
+describe("native composer colors", () => {
+ it.each(MOBILE_THEME_IDS)("delivers parsable colors for %s in both appearances", (themeId) => {
+ for (const appearance of ["light", "dark"] as const) {
+ const variables = getMobileThemeVariables(themeId, appearance);
+ const theme = createNativeComposerTheme(variables);
+ for (const color of Object.values(theme)) expect(color).toMatch(/^#[\da-f]{6}$/i);
+ expect(theme.text).toBe(variables["--color-foreground"]);
+ expect(theme.skillBorder).not.toBe(theme.skillBackground);
+ }
+ });
+
+ it("flattens Material You alpha colors over the composer rather than falling back to defaults", () => {
+ const theme = createNativeComposerTheme({
+ ...getMobileThemeVariables("t3-code", "light"),
+ "--color-screen": "#ffffffff",
+ "--color-composer-surface": "#ffffffff",
+ "--color-subtle": "#0000000d",
+ "--color-placeholder": "#0000009e",
+ "--color-inline-skill-background": "#ffffffff",
+ "--color-inline-skill-border": "#00000080",
+ });
+ expect(theme.chipBackground).toBe("#f2f2f2");
+ expect(theme.placeholder).toBe("#616161");
+ expect(theme.skillBorder).toBe("#7f7f7f");
+ });
+});
diff --git a/apps/mobile/src/lib/nativeComposerTheme.ts b/apps/mobile/src/lib/nativeComposerTheme.ts
new file mode 100644
index 00000000000..80e252f0d23
--- /dev/null
+++ b/apps/mobile/src/lib/nativeComposerTheme.ts
@@ -0,0 +1,19 @@
+import { flattenThemeColor, type MobileThemeVariables } from "./mobileTheme";
+
+/** Native chip parsers need opaque hex instead of CSS rgba or platform-specific alpha order. */
+export function createNativeComposerTheme(theme: MobileThemeVariables) {
+ const surface = flattenThemeColor(theme["--color-composer-surface"], theme["--color-screen"]);
+ const chipBackground = flattenThemeColor(theme["--color-subtle"], surface);
+ const skillBackground = flattenThemeColor(theme["--color-inline-skill-background"], surface);
+ return {
+ text: flattenThemeColor(theme["--color-foreground"], surface),
+ placeholder: flattenThemeColor(theme["--color-placeholder"], surface),
+ chipBackground,
+ chipBorder: flattenThemeColor(theme["--color-border"], chipBackground),
+ chipText: flattenThemeColor(theme["--color-foreground"], chipBackground),
+ skillBackground,
+ skillBorder: flattenThemeColor(theme["--color-inline-skill-border"], skillBackground),
+ skillText: flattenThemeColor(theme["--color-inline-skill-foreground"], skillBackground),
+ fileTint: flattenThemeColor(theme["--color-icon-muted"], chipBackground),
+ };
+}
diff --git a/apps/mobile/src/lib/useMobileNavigationTheme.ts b/apps/mobile/src/lib/useMobileNavigationTheme.ts
index 7b7a1fdf3cf..5565c7aefd0 100644
--- a/apps/mobile/src/lib/useMobileNavigationTheme.ts
+++ b/apps/mobile/src/lib/useMobileNavigationTheme.ts
@@ -10,7 +10,7 @@ import { useUniwindTheme } from "./useUniwindTheme";
* preferences provider applies the registered Uniwind theme first, then
* publishes this matching navigation palette through React.
*/
-export function useMobileNavigationTheme(): Theme {
+export function useMobileNavigationTheme(surface: "screen" | "sidebar" = "screen"): Theme {
const { themeAppearance: appearance } = useAppearancePreferences();
const variables = useUniwindTheme();
return useMemo(() => {
@@ -19,13 +19,16 @@ export function useMobileNavigationTheme(): Theme {
...base,
colors: {
...base.colors,
- primary: variables["--color-primary"],
- background: variables["--color-screen"],
- card: variables["--color-sheet-solid"],
- text: variables["--color-foreground"],
- border: variables["--color-header-border"],
+ primary: variables["--color-primary-text"],
+ background: variables[surface === "sidebar" ? "--color-drawer" : "--color-screen"],
+ card: variables[surface === "sidebar" ? "--color-drawer" : "--color-sheet-solid"],
+ text: variables[
+ surface === "sidebar" ? "--color-drawer-foreground" : "--color-header-foreground"
+ ],
+ border:
+ variables[surface === "sidebar" ? "--color-drawer-border" : "--color-header-border"],
notification: variables["--color-danger-foreground"],
},
};
- }, [appearance, variables]);
+ }, [appearance, surface, variables]);
}
diff --git a/apps/mobile/src/native/SelectableMarkdownText.android.tsx b/apps/mobile/src/native/SelectableMarkdownText.android.tsx
index 35586489623..17788da414e 100644
--- a/apps/mobile/src/native/SelectableMarkdownText.android.tsx
+++ b/apps/mobile/src/native/SelectableMarkdownText.android.tsx
@@ -24,8 +24,8 @@ export function hasNativeSelectableMarkdownText(): boolean {
export function SelectableMarkdownText(props: MobileSelectableMarkdownTextProps) {
const theme = useUniwindTheme();
- const selectionColor = themeColorWithAlpha(theme["--color-primary"], 0.32);
- const selectionHandleColor = theme["--color-primary"];
+ const selectionColor = themeColorWithAlpha(theme["--color-focus"], 0.32);
+ const selectionHandleColor = theme["--color-focus"];
const textStyle = useMemo(
() => ({ selectionColor, selectionHandleColor, ...props.textStyle }),
[props.textStyle, selectionColor, selectionHandleColor],
diff --git a/apps/mobile/src/native/T3ComposerEditor.ios.tsx b/apps/mobile/src/native/T3ComposerEditor.ios.tsx
index 30bc42f93e4..5b1a28d5df1 100644
--- a/apps/mobile/src/native/T3ComposerEditor.ios.tsx
+++ b/apps/mobile/src/native/T3ComposerEditor.ios.tsx
@@ -22,7 +22,7 @@ import {
} from "@t3tools/mobile-markdown-text/markdown";
import { resolveMarkdownFileIcon } from "@t3tools/mobile-markdown-text/links";
import { useUniwindTheme } from "../lib/useUniwindTheme";
-import { flattenThemeColor } from "../lib/mobileTheme";
+import { createNativeComposerTheme } from "../lib/nativeComposerTheme";
import { useFontFamily } from "../lib/useFontFamily";
import { useScaledTextRole } from "../features/settings/appearance/useScaledTextRole";
import {
@@ -257,18 +257,7 @@ export function ComposerEditor({
},
[],
);
- const themeJson = JSON.stringify({
- text: theme["--color-foreground"],
- placeholder: theme["--color-placeholder"],
- chipBackground: theme["--color-subtle"],
- // Native chip drawing parses opaque hex only, and this role is translucent.
- chipBorder: flattenThemeColor(theme["--color-border"], theme["--color-user-bubble"]),
- chipText: theme["--color-foreground"],
- skillBackground: theme["--color-inline-skill-background"],
- skillBorder: theme["--color-inline-skill-border"],
- skillText: theme["--color-inline-skill-foreground"],
- fileTint: theme["--color-icon-muted"],
- });
+ const themeJson = JSON.stringify(createNativeComposerTheme(theme));
const resolvedTextStyle = StyleSheet.flatten(textStyle) ?? {};
return (
<NativeView
diff --git a/apps/mobile/src/native/T3ComposerEditor.native.tsx b/apps/mobile/src/native/T3ComposerEditor.native.tsx
index 490f47bd8a2..7f18bae0570 100644
--- a/apps/mobile/src/native/T3ComposerEditor.native.tsx
+++ b/apps/mobile/src/native/T3ComposerEditor.native.tsx
@@ -27,7 +27,7 @@ import { useNativePaste } from "../lib/useNativePaste";
import { useFontFamily } from "../lib/useFontFamily";
import { useAppearancePreferences } from "../features/settings/appearance/AppearancePreferencesProvider";
import { useUniwindTheme } from "../lib/useUniwindTheme";
-import { flattenThemeColor } from "../lib/mobileTheme";
+import { createNativeComposerTheme } from "../lib/nativeComposerTheme";
import {
acknowledgeComposerNativeEvent,
assumeComposerControlledState,
@@ -259,17 +259,8 @@ export function ComposerEditor({
);
const { systemColorsActive } = useAppearancePreferences();
const themeJson = JSON.stringify({
- selection: Platform.OS === "android" || systemColorsActive ? theme["--color-primary"] : null,
- text: theme["--color-foreground"],
- placeholder: theme["--color-placeholder"],
- chipBackground: theme["--color-subtle"],
- // Native chip drawing parses opaque hex only, and this role is translucent.
- chipBorder: flattenThemeColor(theme["--color-border"], theme["--color-user-bubble"]),
- chipText: theme["--color-foreground"],
- skillBackground: theme["--color-inline-skill-background"],
- skillBorder: theme["--color-inline-skill-border"],
- skillText: theme["--color-inline-skill-foreground"],
- fileTint: theme["--color-icon-muted"],
+ ...createNativeComposerTheme(theme),
+ selection: Platform.OS === "android" || systemColorsActive ? theme["--color-focus"] : null,
});
const resolvedTextStyle = StyleSheet.flatten(textStyle) ?? {};
const regularFontFamily = useFontFamily("regular");
diff --git a/apps/web/src/themePalette.test.ts b/apps/web/src/themePalette.test.ts
index e1d9bfb74ca..de26d531c6f 100644
--- a/apps/web/src/themePalette.test.ts
+++ b/apps/web/src/themePalette.test.ts
@@ -103,6 +103,21 @@ describe("theme files", () => {
});
});
+ it("keeps the stock sidebar and chat on distinct surfaces in both appearances", () => {
+ expectThemeColors(getStandardThemeColors("light"), {
+ canvas: "#fcfcfc",
+ sidebar: "#fafafa",
+ sidebarRowActive: "#ffffff",
+ messageSurface: "#f4f4f5",
+ });
+ expectThemeColors(getStandardThemeColors("dark"), {
+ canvas: "#0a0a0a",
+ sidebar: "#000000",
+ sidebarRowActive: "#1a1b1b",
+ messageSurface: "#141414",
+ });
+ });
+
it("derives readable, distinctive vivid palettes from exact seeds", () => {
const seeds: ReadonlyArray<["light" | "dark", string, string]> = [
["light", "#f4f9f2", "#1d8a4e"],
diff --git a/apps/web/src/themePalette.ts b/apps/web/src/themePalette.ts
index 4de6dd7bd53..d4a1c4e8cc0 100644
--- a/apps/web/src/themePalette.ts
+++ b/apps/web/src/themePalette.ts
@@ -9,6 +9,8 @@ import {
IRIS_THEME,
OCEAN_THEME,
T3_CHAT_THEME,
+ T3_CODE_LIGHT_THEME_COLORS,
+ T3_CODE_DARK_THEME_COLORS,
RESERVED_THEME_IDS,
THEME_COLOR_ROLES,
type ThemeAppearance,
@@ -326,133 +328,6 @@ function legacyThemeMode(theme: ThemePreference): ThemeAppearance | null {
return theme === LEGACY_T3_CHAT_DARK_THEME_ID ? "dark" : null;
}
-/**
- * The palette T3 Code wears with no theme installed, captured from the app's
- * stock tokens (index.css) so a draft seeded from the default look paints the
- * pixels the user is already seeing. Alpha-bearing tokens are flattened over
- * their real backdrops (canvas, or the sidebar for its rows) because theme
- * colors are stored as opaque OKLCH tokens.
- */
-const T3_CODE_LIGHT_THEME_COLORS: ThemeColors = {
- canvas: "#fcfcfc",
- chrome: "#fcfcfc",
- toolbar: "#fcfcfc",
- toolbarForeground: "#27272a",
- toolbarBorder: "#e4e4e7",
- toolbarControl: "#ffffff",
- toolbarControlForeground: "#27272a",
- toolbarControlHover: "#f4f4f5",
- surface: "#ffffff",
- surfaceRaised: "#fcfcfc",
- surfaceOverlay: "#ffffff",
- text: "#27272a",
- textMuted: "#71717b",
- border: "#e4e4e7",
- input: "#d4d4d8",
- focus: "#1b4ed8",
- accent: "#1b4ed8",
- accentForeground: "#ffffff",
- secondary: "#fafafa",
- secondaryForeground: "#27272a",
- muted: "#fafafa",
- mutedForeground: "#71717b",
- placeholder: "#71717b",
- secondaryLabel: "#71717b",
- iconMuted: "#71717b",
- error: "#fb2c36",
- errorForeground: "#c10007",
- errorSurface: "#fcebec",
- warning: "#fe9a00",
- warningForeground: "#bb4d00",
- warningSurface: "#fcf4e8",
- update: "#1b4ed8",
- updateForeground: "#1b4ed8",
- updateSurface: "#e0e6f7",
- accentSurface: "#f4f4f5",
- accentSurfaceForeground: "#18181b",
- messageSurface: "#f4f4f5",
- messageForeground: "#27272a",
- messageAction: "#1b4ed8",
- messageActionForeground: "#ffffff",
- messageActionHover: "#3160db",
- codeBackground: "#ffffff",
- codeForeground: "#27272a",
- sidebar: "#fafafa",
- sidebarForeground: "#27272a",
- sidebarMutedForeground: "#71717b",
- sidebarControlSurface: "#f4f4f5",
- sidebarRowHover: "#fcfcfc",
- sidebarRowActive: "#ffffff",
- sidebarRowSelected: "#ffffff",
- sidebarBorder: "#e4e4e7",
- terminalBackground: "#fcfcfc",
- terminalForeground: "#27272a",
- terminalCursor: "#26384e",
- terminalSelection: "#d0d6dd",
- terminalScrollbar: "#d6d6d6",
- terminalScrollbarHover: "#bdbdbd",
-};
-
-const T3_CODE_DARK_THEME_COLORS: ThemeColors = {
- canvas: "#0a0a0a",
- chrome: "#0a0a0a",
- toolbar: "#0a0a0a",
- toolbarForeground: "#f5f5f5",
- toolbarBorder: "#191919",
- toolbarControl: "#111111",
- toolbarControlForeground: "#f5f5f5",
- toolbarControlHover: "#141414",
- surface: "#111111",
- surfaceRaised: "#111111",
- surfaceOverlay: "#111111",
- text: "#f5f5f5",
- textMuted: "#818181",
- border: "#191919",
- input: "#1e1e1e",
- focus: "#346bf1",
- accent: "#346bf1",
- accentForeground: "#ffffff",
- secondary: "#111111",
- secondaryForeground: "#f5f5f5",
- muted: "#111111",
- mutedForeground: "#818181",
- placeholder: "#818181",
- secondaryLabel: "#818181",
- iconMuted: "#818181",
- error: "#fb414a",
- errorForeground: "#ff6467",
- errorSurface: "#301214",
- warning: "#fe9a00",
- warningForeground: "#ffb900",
- warningSurface: "#312108",
- update: "#346bf1",
- updateForeground: "#51a2ff",
- updateSurface: "#121b34",
- accentSurface: "#141414",
- accentSurfaceForeground: "#f5f5f5",
- messageSurface: "#141414",
- messageForeground: "#f5f5f5",
- messageAction: "#346bf1",
- messageActionForeground: "#ffffff",
- messageActionHover: "#3061d9",
- codeBackground: "#111111",
- codeForeground: "#f5f5f5",
- sidebar: "#000000",
- sidebarForeground: "#f1f3f7",
- sidebarMutedForeground: "#a3a3a3",
- sidebarControlSurface: "#0a0a0a",
- sidebarRowHover: "#131313",
- sidebarRowActive: "#1a1b1b",
- sidebarRowSelected: "#111111",
- sidebarBorder: "#141414",
- terminalBackground: "#0a0a0a",
- terminalForeground: "#f5f5f5",
- terminalCursor: "#b4cbff",
- terminalSelection: "#343a47",
- terminalScrollbar: "#222222",
- terminalScrollbarHover: "#363636",
-};
-
/**
* The standard T3 Code look as a theme palette, for seeding a new theme when
* no theme is installed. Distinct from {@link getDefaultThemeColors}, which
diff --git a/packages/shared/src/themePalettes.ts b/packages/shared/src/themePalettes.ts
index 73b73a4de91..b26244c0464 100644
--- a/packages/shared/src/themePalettes.ts
+++ b/packages/shared/src/themePalettes.ts
@@ -1,6 +1,6 @@
export const BUILT_IN_THEME_IDS = ["t3-chat", "grove", "ocean", "ember", "iris"] as const;
-/** The mobile app's own hand-tuned palette, which is not part of the built-in library. */
+/** The standard T3 Code palette, kept separate from the optional built-in theme library. */
export const MOBILE_DEFAULT_THEME_ID = "t3-code";
/**
@@ -121,6 +121,133 @@ export type ThemeDefinition = Readonly<{
managed?: boolean;
}>;
+/**
+ * The palette T3 Code wears with no theme installed, captured from the app's
+ * stock tokens (index.css) so a draft seeded from the default look paints the
+ * pixels the user is already seeing. Alpha-bearing tokens are flattened over
+ * their real backdrops (canvas, or the sidebar for its rows) because theme
+ * colors are stored as opaque OKLCH tokens.
+ */
+export const T3_CODE_LIGHT_THEME_COLORS: ThemeColors = {
+ canvas: "#fcfcfc",
+ chrome: "#fcfcfc",
+ toolbar: "#fcfcfc",
+ toolbarForeground: "#27272a",
+ toolbarBorder: "#e4e4e7",
+ toolbarControl: "#ffffff",
+ toolbarControlForeground: "#27272a",
+ toolbarControlHover: "#f4f4f5",
+ surface: "#ffffff",
+ surfaceRaised: "#fcfcfc",
+ surfaceOverlay: "#ffffff",
+ text: "#27272a",
+ textMuted: "#71717b",
+ border: "#e4e4e7",
+ input: "#d4d4d8",
+ focus: "#1b4ed8",
+ accent: "#1b4ed8",
+ accentForeground: "#ffffff",
+ secondary: "#fafafa",
+ secondaryForeground: "#27272a",
+ muted: "#fafafa",
+ mutedForeground: "#71717b",
+ placeholder: "#71717b",
+ secondaryLabel: "#71717b",
+ iconMuted: "#71717b",
+ error: "#fb2c36",
+ errorForeground: "#c10007",
+ errorSurface: "#fcebec",
+ warning: "#fe9a00",
+ warningForeground: "#bb4d00",
+ warningSurface: "#fcf4e8",
+ update: "#1b4ed8",
+ updateForeground: "#1b4ed8",
+ updateSurface: "#e0e6f7",
+ accentSurface: "#f4f4f5",
+ accentSurfaceForeground: "#18181b",
+ messageSurface: "#f4f4f5",
+ messageForeground: "#27272a",
+ messageAction: "#1b4ed8",
+ messageActionForeground: "#ffffff",
+ messageActionHover: "#3160db",
+ codeBackground: "#ffffff",
+ codeForeground: "#27272a",
+ sidebar: "#fafafa",
+ sidebarForeground: "#27272a",
+ sidebarMutedForeground: "#71717b",
+ sidebarControlSurface: "#f4f4f5",
+ sidebarRowHover: "#fcfcfc",
+ sidebarRowActive: "#ffffff",
+ sidebarRowSelected: "#ffffff",
+ sidebarBorder: "#e4e4e7",
+ terminalBackground: "#fcfcfc",
+ terminalForeground: "#27272a",
+ terminalCursor: "#26384e",
+ terminalSelection: "#d0d6dd",
+ terminalScrollbar: "#d6d6d6",
+ terminalScrollbarHover: "#bdbdbd",
+};
+
+export const T3_CODE_DARK_THEME_COLORS: ThemeColors = {
+ canvas: "#0a0a0a",
+ chrome: "#0a0a0a",
+ toolbar: "#0a0a0a",
+ toolbarForeground: "#f5f5f5",
+ toolbarBorder: "#191919",
+ toolbarControl: "#111111",
+ toolbarControlForeground: "#f5f5f5",
+ toolbarControlHover: "#141414",
+ surface: "#111111",
+ surfaceRaised: "#111111",
+ surfaceOverlay: "#111111",
+ text: "#f5f5f5",
+ textMuted: "#818181",
+ border: "#191919",
+ input: "#1e1e1e",
+ focus: "#346bf1",
+ accent: "#346bf1",
+ accentForeground: "#ffffff",
+ secondary: "#111111",
+ secondaryForeground: "#f5f5f5",
+ muted: "#111111",
+ mutedForeground: "#818181",
+ placeholder: "#818181",
+ secondaryLabel: "#818181",
+ iconMuted: "#818181",
+ error: "#fb414a",
+ errorForeground: "#ff6467",
+ errorSurface: "#301214",
+ warning: "#fe9a00",
+ warningForeground: "#ffb900",
+ warningSurface: "#312108",
+ update: "#346bf1",
+ updateForeground: "#51a2ff",
+ updateSurface: "#121b34",
+ accentSurface: "#141414",
+ accentSurfaceForeground: "#f5f5f5",
+ messageSurface: "#141414",
+ messageForeground: "#f5f5f5",
+ messageAction: "#346bf1",
+ messageActionForeground: "#ffffff",
+ messageActionHover: "#3061d9",
+ codeBackground: "#111111",
+ codeForeground: "#f5f5f5",
+ sidebar: "#000000",
+ sidebarForeground: "#f1f3f7",
+ sidebarMutedForeground: "#a3a3a3",
+ sidebarControlSurface: "#0a0a0a",
+ sidebarRowHover: "#131313",
+ sidebarRowActive: "#1a1b1b",
+ sidebarRowSelected: "#111111",
+ sidebarBorder: "#141414",
+ terminalBackground: "#0a0a0a",
+ terminalForeground: "#f5f5f5",
+ terminalCursor: "#b4cbff",
+ terminalSelection: "#343a47",
+ terminalScrollbar: "#222222",
+ terminalScrollbarHover: "#363636",
+};
+
export const T3_CHAT_THEME: ThemeDefinition = {
id: "t3-chat",
label: "T3 Chat",