| version | 1.0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| name | GuEarth Design System | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| description | Monochrome ChatGPT-inspired visual language built on Base UI (@base-ui/react), Tailwind CSS v4, and Lucide icons. UI panels float over the 3D CesiumJS viewport with crisp neutral contrast in both Light and Dark themes. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| colors |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| typography |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| rounded |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| spacing |
|
GuEarth is a desktop "digital earth" for geography teaching. Its interface floats over a full-screen 3D CesiumJS globe like calm, modern monochrome instruments — inspired by ChatGPT's restrained black-and-white aesthetic. The 3D terrain and scientific geography overlays are the visual focus; UI chrome stays quiet, crisp, and neutral.
The UI layer is built on Base UI (@base-ui/react), Tailwind CSS v4, class-variance-authority, CSS Modules, and lucide-react icons. All interactive primitives live in src/renderer/src/components/ui/ and are consumed consistently across the globe shell, drawers, settings, teaching lab panels, and EOQ assistant.
GuEarth supports three theme modes persisted in settings.json (themeMode: 'light' | 'dark' | 'system', default 'light'):
- Light (default): pure white surfaces (
#ffffff), subtle#f9f9f9secondary backgrounds,#0d0d0dprimary ink & buttons. - Dark: charcoal
#171717surfaces,#212121elevated popups,#ecececprimary ink,#ffffffprimary buttons with#0d0d0dtext. - System: follows OS
prefers-color-schemeand syncs ElectronnativeTheme.themeSource.
The active resolved theme toggles .dark on document.documentElement. All CSS Modules and Base UI primitives consume CSS variables (var(--surface), var(--elevated), var(--subtle), var(--muted), var(--ink), var(--ink-secondary), var(--ink-tertiary), var(--hairline), var(--border-strong), var(--primary), var(--primary-foreground), var(--hover-fill), var(--active-fill), var(--shadow-panel), var(--shadow-popup), var(--shadow-dialog)).
UI chrome is strictly monochrome. Semantic colors appear only in two places:
- Status feedback:
--destructive(errors, destructive confirmations),--warning(degraded terrain/cache notices, unsaved changes, mirror fallbacks),--success(verified credentials, active mirror acceleration, saved indicators), and--info(active toggles, in-progress states, live informational notices) — always paired with text or icons. Passive helper notices (Alert type="neutral") and static category tags (Tag tone="neutral") stay monochrome. - Scientific geography encodings: Cesium thematic layers, legends, SVG physics diagrams (
diagramTheme.ts), and ECharts data series (warm/cold fronts, ocean currents, Köppen zones, SST anomalies, elevation/population ramps, age pyramids). Neutral diagram axes, strokes, gridlines, and ECharts tooltips adapt dynamically to Light and Dark themes.
- Root setup:
main.tsxwraps<App />withCSPProvider disableStyleElements(for strict Electron CSP),TooltipProvider,ToastProvider, andConfirmDialogProvider.#appusesisolation: isolateandbodyusesposition: relativeso Base UI portals stack cleanly above the Cesium canvas. - Non-modal drawers:
Draweruses Base UI Dialog withmodal={false}anddisablePointerDismissalso the 3D globe remains interactive while Layer, Annotation, Bookmarks, or EOQ drawers are open. - Buttons:
Buttonsupportsvariant(primary | default | ghost | dashed | link),size(sm | md | lg),shape(default | circle),danger,block,loading, andicon. Every<Button loading={...}>MUST pass its icon via theiconprop so the loading spinner cleanly replaces it (enforced bytests/button-loading-icon.test.mjs). - Form controls:
Input,PasswordInput,TextArea,NumberInput,Select(plus Base UIComboboxwhensearchable),Switch,Slider(withmarks),Checkbox,RadioGroup,Segmented, andMonthDayPicker. - Overlays & feedback:
Modal,useConfirm(),Tooltip,Popover,Popconfirm,DropdownMenu,Tabs,Accordion,Pagination,Alert,Tag,Badge,Spinner,Progress,Empty,Avatar,Separator, andappToast(Toast.createToastManager()).
- Every interactive control displays a
:focus-visiblering usingvar(--ring)and respectsprefers-reduced-motion. - Touch mode (
html.touch-uiintouch.css) enlarges controls via[data-slot]selectors (button,input,select-trigger,segmented,switch) for classroom touchscreens. - Icon-only buttons always carry
aria-labeland tooltips.