Spaces:
Sleeping
Sleeping
File size: 9,216 Bytes
1ee2bb3 a4eeda5 8f72426 a4eeda5 1ee2bb3 a4eeda5 8f72426 a4eeda5 8f72426 a4eeda5 1ee2bb3 a4eeda5 1ee2bb3 a4eeda5 1ee2bb3 11a5446 1ee2bb3 11a5446 1ee2bb3 11a5446 1ee2bb3 66f5aac 11a5446 66f5aac 1ee2bb3 11a5446 1ee2bb3 a4eeda5 1ee2bb3 a4eeda5 1ee2bb3 a4eeda5 1ee2bb3 a4eeda5 1ee2bb3 a4eeda5 1ee2bb3 a4eeda5 1ee2bb3 a4eeda5 1ee2bb3 a4eeda5 1ee2bb3 a4eeda5 1ee2bb3 a4eeda5 1ee2bb3 524287c 5c7eb51 524287c | 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 | @tailwind base;
@tailwind components;
@tailwind utilities;
/* ============================================================
* Theme tokens
*
* Default is "light" — CSS variables on `:root` are the light palette,
* so the app renders correctly even before any JS runs (no flash of
* unthemed content on first paint, SSR-safe, accessibility-friendly).
* data-theme="dark" : original navy + cyan palette
* data-theme="gmu" : GMU Mason green canvas + Mason gold primary
*
* Values are `R G B` triplets so Tailwind's `/ <alpha-value>` syntax
* works uniformly: `bg-canvas/80` → rgb(var(--color-canvas) / 0.8).
* ============================================================ */
@layer base {
:root {
color-scheme: light;
/* LIGHT (default) — white background with soft accents */
--color-canvas: 246 247 251;
--color-surface: 255 255 255;
--color-surfaceAlt: 240 243 249;
--color-edge: 216 222 232;
--color-mute: 100 116 139;
--color-ink: 15 23 42;
--color-accent: 2 132 199;
--color-accent2: 124 58 237;
--color-accent3: 219 39 119;
--color-accent4: 5 150 105;
--color-warn: 217 119 6;
--color-danger: 220 38 38;
--color-ok: 5 150 105;
--body-bg:
radial-gradient(1200px 600px at 80% -10%, rgb(124 58 237 / 0.08), transparent 70%),
radial-gradient(1000px 500px at 0% 110%, rgb(2 132 199 / 0.08), transparent 70%),
rgb(var(--color-canvas));
--scrollbar-thumb: rgb(var(--color-edge));
--rf-edge-stroke: 148 163 184; /* slate-400 */
--rf-edge-selected: var(--color-accent);
}
[data-theme="dark"] {
color-scheme: dark;
--color-canvas: 11 16 32;
--color-surface: 17 24 48;
--color-surfaceAlt: 21 29 56;
--color-edge: 31 42 74;
--color-mute: 132 146 199;
--color-ink: 230 235 255;
--color-accent: 76 201 240;
--color-accent2: 123 92 255;
--color-accent3: 247 37 133;
--color-accent4: 6 214 160;
--color-warn: 244 162 97;
--color-danger: 239 71 111;
--color-ok: 45 212 191;
--body-bg:
radial-gradient(1200px 600px at 80% -10%, rgb(123 92 255 / 0.12), transparent 70%),
radial-gradient(1000px 500px at 0% 110%, rgb(76 201 240 / 0.10), transparent 70%),
rgb(var(--color-canvas));
--scrollbar-thumb: rgb(var(--color-edge));
--rf-edge-stroke: 74 90 138; /* #4a5a8a */
--rf-edge-selected: var(--color-accent);
}
[data-theme="gmu"] {
color-scheme: dark;
/* Mason Green canvas + Mason Gold primary accent */
--color-canvas: 10 24 18;
--color-surface: 19 46 31;
--color-surfaceAlt: 26 61 40;
--color-edge: 43 89 57;
--color-mute: 137 178 154;
--color-ink: 255 248 225;
--color-accent: 255 199 44; /* Mason Gold #FFC72C */
--color-accent2: 0 163 81; /* bright Mason Green */
--color-accent3: 232 74 95; /* warm contrast red */
--color-accent4: 109 195 213; /* soft Patriot teal */
--color-warn: 255 152 0;
--color-danger: 229 57 53;
--color-ok: 0 200 83;
--body-bg:
radial-gradient(1200px 600px at 80% -10%, rgb(255 199 44 / 0.10), transparent 70%),
radial-gradient(1000px 500px at 0% 110%, rgb(0 102 51 / 0.14), transparent 70%),
rgb(var(--color-canvas));
--scrollbar-thumb: rgb(var(--color-edge));
--rf-edge-stroke: 90 130 100;
--rf-edge-selected: var(--color-accent);
}
html, body, #root {
height: 100%;
}
body {
background: var(--body-bg);
}
*::-webkit-scrollbar {
width: 10px;
height: 10px;
}
*::-webkit-scrollbar-thumb {
background: var(--scrollbar-thumb);
border-radius: 5px;
}
*::-webkit-scrollbar-track {
background: transparent;
}
}
@layer components {
.panel {
@apply bg-surface border border-edge rounded-xl shadow-card;
}
.panel-alt {
@apply bg-surfaceAlt border border-edge rounded-xl shadow-card;
}
.chip {
@apply inline-flex items-center gap-1 px-2 py-0.5 text-xs rounded-full border border-edge bg-surfaceAlt text-mute;
}
/* All four button variants carry `whitespace-nowrap` so their labels
(e.g. "Auto-connect", "Load preset", "Run pipeline") never wrap onto
a second line when a sibling element — typically a long status
message in the toolbar — squeezes the button container. If the
surrounding layout runs out of horizontal room, the button keeps
its single-line label and it is the label's `hidden sm:inline` wrap
in the component that drops the text to icon-only instead. */
.btn {
@apply inline-flex items-center gap-2 px-3 py-1.5 rounded-lg border border-edge bg-surfaceAlt text-ink hover:border-accent/60 hover:text-accent transition-colors text-sm whitespace-nowrap;
}
.btn-primary {
@apply inline-flex items-center gap-2 px-3 py-1.5 rounded-lg font-medium text-sm whitespace-nowrap
bg-gradient-to-r from-accent/90 to-accent2/90 text-canvas shadow-glow
hover:from-accent hover:to-accent2 transition;
}
/* Secondary filled button. Tinted accent2 background so it reads as a
discoverable action next to the subtle outline `btn`, but is clearly
not the primary `btn-primary` (which owns the Run-pipeline gradient). */
.btn-secondary {
@apply inline-flex items-center gap-2 px-3 py-1.5 rounded-lg text-sm font-medium whitespace-nowrap
bg-accent2/15 border border-accent2/50 text-accent2
hover:bg-accent2/25 hover:border-accent2 transition-colors;
}
.btn-ghost {
@apply inline-flex items-center gap-2 px-2 py-1 rounded-md text-xs text-mute hover:text-ink hover:bg-surfaceAlt transition-colors whitespace-nowrap;
}
.node-card {
@apply panel-alt px-3 py-2 min-w-[180px] text-sm;
}
.kbd {
@apply px-1.5 py-0.5 rounded border border-edge bg-surface text-[11px] font-mono text-mute;
}
}
/* React Flow overrides — read from theme variables so colors travel with
the active theme. Hex values used to be hard-coded here. */
.react-flow__background {
background-color: transparent;
}
.react-flow__pane {
cursor: default;
}
.react-flow__edge-path {
stroke: rgb(var(--rf-edge-stroke));
stroke-width: 1.5;
}
.react-flow__edge.selected .react-flow__edge-path {
stroke: rgb(var(--color-accent));
}
.react-flow__arrowhead {
fill: rgb(var(--rf-edge-stroke));
}
.react-flow__handle {
background: rgb(var(--color-accent));
border: 2px solid rgb(var(--color-canvas));
width: 10px;
height: 10px;
}
.react-flow__controls {
background: rgb(var(--color-surfaceAlt));
border: 1px solid rgb(var(--color-edge));
border-radius: 8px;
overflow: hidden;
}
.react-flow__controls-button {
background: transparent !important;
color: rgb(var(--color-mute)) !important;
border-bottom: 1px solid rgb(var(--color-edge)) !important;
}
.react-flow__controls-button:hover {
background: rgb(var(--color-edge)) !important;
color: rgb(var(--color-ink)) !important;
}
.react-flow__minimap {
background: rgb(var(--color-surfaceAlt)) !important;
border: 1px solid rgb(var(--color-edge)) !important;
border-radius: 8px !important;
}
.react-flow__attribution {
background: transparent !important;
color: rgb(var(--rf-edge-stroke)) !important;
font-size: 10px !important;
}
/* ----- Touch + viewport polish ---------------------------------------
*
* touch-action: none on the React Flow canvas wrapper hands all touch
* gestures (pan, pinch, two-finger drag) to React Flow's own handler.
* Without this, iOS Safari intercepts two-finger pinches as page zoom
* BEFORE React Flow ever sees the event, breaking canvas pinch-zoom.
*
* The inner React Flow elements re-enable touch as needed via their
* own handlers; this only affects the wrapper's default routing.
*/
.qf-canvas-wrapper {
touch-action: none;
}
/* iOS magnifier / "callout" suppression for elements that participate
* in our custom touch drag (palette tiles, draggable nodes). Without
* this, a long press on a tile triggers the system text magnifier
* and steals the gesture from our PointerEvent handler. */
.qf-no-callout {
-webkit-user-select: none;
user-select: none;
-webkit-touch-callout: none;
}
/* Slightly bigger zoom / fit / pan buttons on the React Flow Controls,
* matching the 44 CSS-px Material/iOS hit target on touch breakpoints.
* Desktop keeps the compact 26px sizing. */
@media (pointer: coarse) {
.react-flow__controls-button {
width: 44px !important;
height: 44px !important;
}
}
/* ----- prefers-reduced-motion ----------------------------------------
* Honor the OS-level "reduce motion" setting. Without this rule the
* default React Flow `animated` edges loop a stroke-dash forever, and
* the various spinners / pulse loaders run regardless of user
* preference. We keep transitions essentially instant so the UI is
* still responsive but without continuous 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;
}
.react-flow__edge-path {
stroke-dasharray: none !important;
animation: none !important;
}
}
|