Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
223 changes: 147 additions & 76 deletions packages/ui/src/styles/animations.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,30 @@
/* ============================================
OpenCode Animation System
Refined micro-interactions & motion design
============================================ */

:root {
/* Animation tokens */
--ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
--ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
--ease-in-out-quart: cubic-bezier(0.76, 0, 0.24, 1);
--ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
--ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);

/* Duration tokens */
--duration-instant: 75ms;
--duration-fast: 120ms;
--duration-normal: 200ms;
--duration-slow: 300ms;
--duration-slower: 450ms;

/* Existing pulse animations */
--animate-pulse: pulse-opacity 2s ease-in-out infinite;
--animate-pulse-scale: pulse-scale 1.2s ease-in-out infinite;
}

/* ---- Pulse animations ---- */

@keyframes pulse-opacity {
0%,
100% {
Expand Down Expand Up @@ -33,6 +55,8 @@
}
}

/* ---- Entrance animations ---- */

@keyframes fadeUp {
from {
opacity: 0;
Expand All @@ -44,98 +68,145 @@
}
}

.fade-up-text {
animation: fadeUp 0.4s ease-out forwards;
opacity: 0;

&:nth-child(1) {
animation-delay: 0.1s;
}
&:nth-child(2) {
animation-delay: 0.2s;
}
&:nth-child(3) {
animation-delay: 0.3s;
}
&:nth-child(4) {
animation-delay: 0.4s;
}
&:nth-child(5) {
animation-delay: 0.5s;
}
&:nth-child(6) {
animation-delay: 0.6s;
}
&:nth-child(7) {
animation-delay: 0.7s;
}
&:nth-child(8) {
animation-delay: 0.8s;
}
&:nth-child(9) {
animation-delay: 0.9s;
}
&:nth-child(10) {
animation-delay: 1s;
}
&:nth-child(11) {
animation-delay: 1.1s;
}
&:nth-child(12) {
animation-delay: 1.2s;
}
&:nth-child(13) {
animation-delay: 1.3s;
@keyframes fadeIn {
from {
opacity: 0;
}
&:nth-child(14) {
animation-delay: 1.4s;
to {
opacity: 1;
}
&:nth-child(15) {
animation-delay: 1.5s;
}

@keyframes fadeInScale {
from {
opacity: 0;
transform: scale(0.95);
}
&:nth-child(16) {
animation-delay: 1.6s;
to {
opacity: 1;
transform: scale(1);
}
&:nth-child(17) {
animation-delay: 1.7s;
}

@keyframes slideInFromRight {
from {
opacity: 0;
transform: translateX(8px);
}
&:nth-child(18) {
animation-delay: 1.8s;
to {
opacity: 1;
transform: translateX(0);
}
&:nth-child(19) {
animation-delay: 1.9s;
}

@keyframes slideInFromLeft {
from {
opacity: 0;
transform: translateX(-8px);
}
&:nth-child(20) {
animation-delay: 2s;
to {
opacity: 1;
transform: translateX(0);
}
&:nth-child(21) {
animation-delay: 2.1s;
}

@keyframes slideInFromBottom {
from {
opacity: 0;
transform: translateY(12px);
}
&:nth-child(22) {
animation-delay: 2.2s;
to {
opacity: 1;
transform: translateY(0);
}
&:nth-child(23) {
animation-delay: 2.3s;
}

/* ---- Subtle glow for active/focus states ---- */

@keyframes subtleGlow {
0%,
100% {
box-shadow: 0 0 0 0 transparent;
}
&:nth-child(24) {
animation-delay: 2.4s;
50% {
box-shadow: 0 0 8px 2px color-mix(in srgb, var(--border-selected) 25%, transparent);
}
&:nth-child(25) {
animation-delay: 2.5s;
}

/* ---- Shimmer for loading states ---- */

@keyframes shimmer {
0% {
background-position: -200% 0;
}
&:nth-child(26) {
animation-delay: 2.6s;
100% {
background-position: 200% 0;
}
&:nth-child(27) {
animation-delay: 2.7s;
}

/* ---- Spin ---- */

@keyframes spin {
from {
transform: rotate(0deg);
}
&:nth-child(28) {
animation-delay: 2.8s;
to {
transform: rotate(360deg);
}
&:nth-child(29) {
animation-delay: 2.9s;
}

/* ---- Staggered fade-up text ---- */

.fade-up-text {
animation: fadeUp 0.4s var(--ease-out-expo) forwards;
opacity: 0;

&:nth-child(1) { animation-delay: 0.05s; }
&:nth-child(2) { animation-delay: 0.1s; }
&:nth-child(3) { animation-delay: 0.15s; }
&:nth-child(4) { animation-delay: 0.2s; }
&:nth-child(5) { animation-delay: 0.25s; }
&:nth-child(6) { animation-delay: 0.3s; }
&:nth-child(7) { animation-delay: 0.35s; }
&:nth-child(8) { animation-delay: 0.4s; }
&:nth-child(9) { animation-delay: 0.45s; }
&:nth-child(10) { animation-delay: 0.5s; }
&:nth-child(11) { animation-delay: 0.55s; }
&:nth-child(12) { animation-delay: 0.6s; }
&:nth-child(13) { animation-delay: 0.65s; }
&:nth-child(14) { animation-delay: 0.7s; }
&:nth-child(15) { animation-delay: 0.75s; }
&:nth-child(16) { animation-delay: 0.8s; }
&:nth-child(17) { animation-delay: 0.85s; }
&:nth-child(18) { animation-delay: 0.9s; }
&:nth-child(19) { animation-delay: 0.95s; }
&:nth-child(20) { animation-delay: 1s; }
&:nth-child(21) { animation-delay: 1.05s; }
&:nth-child(22) { animation-delay: 1.1s; }
&:nth-child(23) { animation-delay: 1.15s; }
&:nth-child(24) { animation-delay: 1.2s; }
&:nth-child(25) { animation-delay: 1.25s; }
&:nth-child(26) { animation-delay: 1.3s; }
&:nth-child(27) { animation-delay: 1.35s; }
&:nth-child(28) { animation-delay: 1.4s; }
&:nth-child(29) { animation-delay: 1.45s; }
&:nth-child(30) { animation-delay: 1.5s; }
}

/* ---- Reduced motion preference ---- */

@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
scroll-behavior: auto !important;
}
&:nth-child(30) {
animation-delay: 3s;

.fade-up-text {
opacity: 1;
animation: none;
}
}
36 changes: 36 additions & 0 deletions packages/ui/src/styles/aurora.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/* ================================================================
AURORA DESIGN SYSTEM — "Code illuminated from within"
================================================================

This file previously contained 1174 lines of !important overrides
for the Aurora theme. Those have been absorbed into the native
architecture:

Token pipeline (resolve.ts):
--accent-*, --glow-*, --glass-*, --border-accent-*, --card-*,
--message-*, --prompt-*, --dialog-*, --popover-*, --code-*,
--scroll-*, --selection-*, --thinking-*, --progress-*,
--empty-bg, --permission-glow, --radius-*, --ease-*, --duration-*

Component CSS files (23 files):
button, icon-button, dialog, card, dock-surface, session-turn,
popover, dropdown-menu, context-menu, text-field, checkbox,
switch, progress, spinner, tooltip, toast, collapsible,
accordion, tag, hover-card, logo, keybind, resize-handle

Global styles (base.css):
::selection, :focus-visible, cursor:pointer, prefers-reduced-motion

Typography + spacing (theme.css):
--font-family-display, --text-xs through --text-4xl,
--space-*, --gap-*, --padding-*, --max-prose-width

================================================================ */

/* Aurora-specific font override: prefer JetBrains Mono Nerd Font for full
Unicode coverage (arrows ←→↑↓, box-drawing ╭╮╰╯, math ∑∫≤≥±√∞, icons) */
html[data-theme="aurora"] {
--font-family-mono:
"JetBrains Mono Nerd Font Mono", "JetBrains Mono", "GeistMono Nerd Font Mono", "SF Mono", "Fira Code",
"CaskaydiaCove Nerd Font Mono", "IBM Plex Mono", ui-monospace, monospace;
}
40 changes: 40 additions & 0 deletions packages/ui/src/styles/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ html,
font-feature-settings: var(--font-family-sans--font-feature-settings, normal); /* 5 */
font-variation-settings: var(--font-family-sans--font-variation-settings, normal); /* 6 */
-webkit-tap-highlight-color: transparent; /* 7 */
-webkit-font-smoothing: antialiased; /* 8 - Crisp font rendering */
-moz-osx-font-smoothing: grayscale; /* 8 */
text-rendering: optimizeLegibility; /* 9 - Better kerning */
scroll-behavior: smooth; /* 10 - Smooth scrolling */
}

/*
Expand Down Expand Up @@ -402,3 +406,39 @@ input:where([type="button"], [type="reset"], [type="submit"]),
font-size: 16px !important;
}
}

/* ─── Aurora: Global selection accent ─── */
::selection {
background: var(--selection-accent);
color: inherit;
}

/* ─── Aurora: Focus-visible accent ─── */
:focus-visible {
outline: 2px solid var(--accent-base);
outline-offset: 2px;
}

:focus:not(:focus-visible) {
outline: none;
}

/* ─── Aurora: Cursor mandate for interactive elements ─── */
button,
[role="button"],
a,
summary {
cursor: pointer;
}

/* ─── Aurora: Reduced motion ─── */
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
scroll-behavior: auto !important;
}
}
1 change: 1 addition & 0 deletions packages/ui/src/styles/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,4 @@

@import "./utilities.css" layer(utilities);
@import "./animations.css" layer(utilities);
@import "./aurora.css" layer(utilities);
Loading
Loading