The redesign proposed after the anti-slop audit (anti-slop/audit-001) is now an opt-in design layer. The "New design" switch at the bottom of the sidebar sets data-design="calm" on <html> and remembers it; theme-init.js applies the stored choice before the first paint. The classic look stays the default and is unchanged. styles/calm.css, scoped to that attribute, keeps the Hive DS colors and: bundles Hanken Grotesk and JetBrains Mono (@fontsource-variable, OFL-1.1); uses three radii (6 / 10 / 14 px); drops the honeycomb wallpaper, gradient fills, glass, glows and pulsing dots; keeps shadows only on menus and dialogs; shows labels as written instead of tracked capitals; and marks the active sidebar item with fill, a 1px line and weight instead of a stripe. Screen layouts are unchanged.
28 lines
1.0 KiB
TypeScript
28 lines
1.0 KiB
TypeScript
import { createRoot } from 'react-dom/client';
|
|
import { flushSync } from 'react-dom';
|
|
import App from './App.tsx';
|
|
import './index.css';
|
|
// Bundled fonts and the opt-in calm design layer (src/lib/design-mode.ts).
|
|
import '@fontsource-variable/hanken-grotesk';
|
|
import '@fontsource-variable/jetbrains-mono';
|
|
import './styles/calm.css';
|
|
import { applyStoredThemeEarly } from '@/providers/ThemeProvider';
|
|
|
|
export function mountApp(): void {
|
|
// Apply the persisted theme before first paint to avoid a flash of the wrong
|
|
// theme (warm graphite/dark default; warm paper for light).
|
|
applyStoredThemeEarly();
|
|
|
|
const rootElement = document.getElementById('root');
|
|
if (!rootElement) throw new Error('Waggle root element is missing');
|
|
flushSync(() => {
|
|
createRoot(rootElement).render(<App />);
|
|
});
|
|
rootElement.dataset.waggleUiReady = 'ready';
|
|
|
|
// Initialize PostHog cloud analytics (DAY0-04). Keep it off the startup path.
|
|
void import('@/lib/posthog')
|
|
.then(({ initPostHog }) => initPostHog())
|
|
.catch(() => {});
|
|
}
|