Spaces:
Running
Running
File size: 9,959 Bytes
3f49e8f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 | @import "./highlight-js.css" layer(base);
@import "tailwindcss";
@plugin "tailwind-scrollbar" {
nocompatible: true;
}
@plugin "@tailwindcss/typography";
@custom-variant dark (&:where(.dark, .dark *));
@theme {
--color-gray-50: #fafafa;
--color-gray-100: #f5f5f5;
--color-gray-200: #e5e5e5;
--color-gray-300: #d4d4d4;
--color-gray-400: #a3a3a3;
--color-gray-500: #737373;
--color-gray-600: #454545;
--color-gray-700: #2e2e2e;
--color-gray-800: #1a1a1a;
--color-gray-900: #0a0a0a;
--color-gray-950: #000000;
--text-xxs: 0.625rem;
--text-smd: 0.94rem;
}
/*
The default border color has changed to `currentcolor` in Tailwind CSS v4,
so we've added these compatibility styles to make sure everything still
looks the same as it did with Tailwind CSS v3.
If we ever want to remove these styles, we need to add an explicit border
color utility to any element that depends on these defaults.
*/
@layer base {
*,
::after,
::before,
::backdrop,
::file-selector-button {
border-color: var(--color-gray-200, currentcolor);
}
button:not(:disabled),
[role="button"]:not(:disabled) {
cursor: pointer;
}
::placeholder {
color: var(--color-gray-400);
opacity: 1;
}
}
html,
body {
overscroll-behavior: none;
touch-action: pan-x pan-y;
}
@utility btn {
@apply inline-flex shrink-0 cursor-pointer items-center justify-center whitespace-nowrap outline-hidden transition-all select-none focus:ring-3 focus:ring-blue-500/50 disabled:cursor-default;
}
@utility active-model {
/* Ensure active border wins over defaults/utilities in both themes */
@apply border-black! dark:border-white/60!;
}
@utility file-hoverable {
@apply hover:bg-gray-500/10;
}
@utility base-tool {
@apply flex h-[1.6rem] items-center gap-[.2rem] border border-transparent text-xs whitespace-nowrap outline-hidden transition-all focus:outline-hidden active:outline-hidden sm:hover:text-purple-600 dark:hover:text-gray-300;
}
@utility active-tool {
@apply rounded-full border-purple-200! bg-purple-100 pr-2 pl-1 text-purple-600 hover:text-purple-600 dark:border-purple-700! dark:bg-purple-600/40 dark:text-purple-200;
}
@utility scrollbar-custom {
@apply scrollbar-thin scrollbar-thumb-black/10 scrollbar-track-transparent scrollbar-thumb-rounded-full dark:scrollbar-thumb-white/10 scrollbar-hover:scrollbar-thumb-black/20 dark:scrollbar-hover:scrollbar-thumb-white/20;
&::-webkit-scrollbar {
background-color: transparent;
width: 8px;
height: 8px;
}
&::-webkit-scrollbar-thumb {
background-color: rgba(0, 0, 0, 0.1);
border-radius: 9999px;
}
.dark &::-webkit-scrollbar {
background-color: rgba(17, 17, 17, 0.85);
}
.dark &::-webkit-scrollbar-thumb {
background-color: rgba(255, 255, 255, 0.1);
}
/* Rounded top/bottom caps for vertical scrollbars (Chrome/Edge/Safari) */
&::-webkit-scrollbar-track {
@apply rounded-full bg-clip-padding; /* clip bg to padding so caps look round */
/* space for the end caps — tweak with Tailwind spacing */
border-top: --spacing(2) solid transparent; /* 0.5rem */
border-bottom: --spacing(2) solid transparent; /* 0.5rem */
}
/* Rounded left/right caps for horizontal scrollbars */
&::-webkit-scrollbar-track:horizontal {
@apply rounded-full bg-clip-padding;
border-left: --spacing(2) solid transparent;
border-right: --spacing(2) solid transparent;
border-top-width: 0;
border-bottom-width: 0;
}
}
@utility no-scrollbar {
@apply [scrollbar-width:none] [-ms-overflow-style:none] [&::-ms-scrollbar]:hidden [&::-webkit-scrollbar]:hidden;
}
/*
Typography overrides, previously theme.extend.typography in tailwind.config.cjs plus
prose tweaks in @layer utilities. They live OUTSIDE Tailwind's cascade layers on purpose:
unlayered rules beat the layered plugin defaults, which restores the v3 cascade where the
config values were merged into the generated `.prose` class itself.
*/
.prose {
--tw-prose-body: var(--color-gray-700);
--tw-prose-headings: var(--color-gray-900);
--tw-prose-lead: var(--color-gray-600);
--tw-prose-links: var(--color-gray-900);
--tw-prose-bold: var(--color-gray-900);
--tw-prose-counters: var(--color-gray-500);
--tw-prose-bullets: var(--color-gray-300);
--tw-prose-hr: var(--color-gray-200);
--tw-prose-quotes: var(--color-gray-900);
--tw-prose-quote-borders: var(--color-gray-200);
--tw-prose-captions: var(--color-gray-500);
--tw-prose-kbd: var(--color-gray-900);
--tw-prose-kbd-shadows: 10 10 10;
--tw-prose-code: var(--color-gray-900);
--tw-prose-pre-code: var(--color-gray-200);
--tw-prose-pre-bg: var(--color-gray-800);
--tw-prose-th-borders: var(--color-gray-300);
--tw-prose-td-borders: var(--color-gray-200);
/* gray-300 reads too bright for body text on dark backgrounds, but gray-400 is
too dim — split the difference (~#bcbcbc). */
--tw-prose-invert-body: color-mix(in srgb, var(--color-gray-300) 50%, var(--color-gray-400));
/* The plugin defaults headings/links/bold/code/kbd to pure white in dark mode,
which glows against the dimmed body — cap the emphasis tier at gray-200. */
--tw-prose-invert-headings: var(--color-gray-200);
--tw-prose-invert-lead: var(--color-gray-400);
--tw-prose-invert-links: var(--color-gray-200);
--tw-prose-invert-bold: var(--color-gray-200);
--tw-prose-invert-counters: var(--color-gray-400);
--tw-prose-invert-bullets: var(--color-gray-600);
--tw-prose-invert-hr: var(--color-gray-700);
--tw-prose-invert-quotes: var(--color-gray-200);
--tw-prose-invert-quote-borders: var(--color-gray-700);
--tw-prose-invert-captions: var(--color-gray-400);
--tw-prose-invert-kbd: var(--color-gray-200);
--tw-prose-invert-code: var(--color-gray-200);
--tw-prose-invert-pre-code: var(--color-gray-300);
--tw-prose-invert-th-borders: var(--color-gray-600);
--tw-prose-invert-td-borders: var(--color-gray-700);
}
/*
The unlayered `.prose` override above would otherwise beat the plugin's layered
`prose-invert` remap, so restate it here (after the override) at the same level.
This app only uses the `dark:` variant form, but cover the bare class too.
*/
.prose-invert,
.dark\:prose-invert:where(.dark, .dark *) {
--tw-prose-body: var(--tw-prose-invert-body);
--tw-prose-headings: var(--tw-prose-invert-headings);
--tw-prose-lead: var(--tw-prose-invert-lead);
--tw-prose-links: var(--tw-prose-invert-links);
--tw-prose-bold: var(--tw-prose-invert-bold);
--tw-prose-counters: var(--tw-prose-invert-counters);
--tw-prose-bullets: var(--tw-prose-invert-bullets);
--tw-prose-hr: var(--tw-prose-invert-hr);
--tw-prose-quotes: var(--tw-prose-invert-quotes);
--tw-prose-quote-borders: var(--tw-prose-invert-quote-borders);
--tw-prose-captions: var(--tw-prose-invert-captions);
--tw-prose-kbd: var(--tw-prose-invert-kbd);
--tw-prose-kbd-shadows: var(--tw-prose-invert-kbd-shadows);
--tw-prose-code: var(--tw-prose-invert-code);
--tw-prose-pre-code: var(--tw-prose-invert-pre-code);
--tw-prose-pre-bg: var(--tw-prose-invert-pre-bg);
--tw-prose-th-borders: var(--tw-prose-invert-th-borders);
--tw-prose-td-borders: var(--tw-prose-invert-td-borders);
}
.prose :where(h2):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
margin-top: 1em;
}
.prose :where(h3):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
margin-top: 0.8em;
}
.prose table {
@apply scrollbar-thin block max-w-full scrollbar-thumb-black/10 scrollbar-track-transparent overflow-x-auto scrollbar-thumb-rounded-full dark:scrollbar-thumb-white/10 scrollbar-hover:scrollbar-thumb-black/20 dark:scrollbar-hover:scrollbar-thumb-white/20;
}
/* Prevent columns from squishing on narrow viewports; long content wraps instead of dominating. */
.prose :is(th, td) {
min-width: 6rem;
max-width: 16rem;
}
.prose hr {
@apply my-4;
}
.prose strong {
@apply font-medium;
}
.prose pre {
/* font-mono restated because the typography plugin makes `pre code` inherit from `pre`,
and base-layer element styles (ChatInput) would otherwise turn `pre` sans-serif */
@apply border-[0.5px] bg-white font-mono text-gray-600 dark:border-gray-700 dark:bg-gray-900! dark:bg-inherit dark:text-inherit;
}
.prose code:not(pre code) {
@apply rounded-md bg-gray-200/60 px-[0.4em] py-[0.2em] text-[85%] dark:bg-gray-700;
}
.prose code:not(pre code)::before,
.prose code:not(pre code)::after {
content: none;
}
/* Override prose-sm title sizes - 75% of original */
.prose-sm :where(h1):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
font-size: 1.6em; /* 75% */
@apply font-semibold;
}
.prose-sm :where(h2):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
font-size: 1.07em; /* 75% */
@apply font-semibold;
}
.prose-sm :where(h3):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
font-size: 0.96em; /* 75% */
@apply font-semibold;
}
.prose-sm :where(h4):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
font-size: 0.8em; /* 75% */
@apply font-semibold;
}
.prose-sm :where(h5):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
font-size: 0.75em; /* 75% */
@apply font-semibold;
}
.prose-sm :where(h6):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
font-size: 0.7em; /* 75% */
@apply font-semibold;
}
.katex-display {
overflow: auto hidden;
}
.router-shimmer {
display: inline-block;
background-image: linear-gradient(
90deg,
rgba(156, 163, 175, 1) 0%,
rgba(156, 163, 175, 0.6) 10%,
rgba(156, 163, 175, 0.6) 50%,
rgba(156, 163, 175, 0.6) 90%,
rgba(156, 163, 175, 1) 100%
);
background-size: 220% 100%;
animation: router-shimmer 2.8s linear infinite;
background-clip: text;
-webkit-background-clip: text;
color: transparent;
-webkit-text-fill-color: transparent;
}
.dark .router-shimmer {
background-image: linear-gradient(
90deg,
rgba(255, 255, 255, 0.15) 0%,
rgba(255, 255, 255, 0.7) 50%,
rgba(255, 255, 255, 0.15) 100%
);
}
@keyframes router-shimmer {
0% {
background-position: 200% 0;
}
100% {
background-position: -200% 0;
}
}
|