File size: 2,472 Bytes
af1bee9
 
589f639
 
0d811c3
fb43301
 
 
 
 
 
 
 
 
 
 
 
589f639
fb43301
af1bee9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
734c950
af1bee9
 
 
 
 
 
 
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
import '@mantine/core/styles.css';
import '@mantine/notifications/styles.css';
import '@fontsource-variable/manrope/wght.css';
import '@fontsource-variable/space-grotesk/wght.css';
import '@fontsource-variable/geist-mono/wght.css';   // monospace for identifiers
import './styles/00-tokens.css';   // design tokens: the one source of colour, type, space and size (docs/DESIGN_SYSTEM.md)
import './styles/01-base.css';
import './styles/10-apple.css';
import './styles/11-apple-components.css';
import './styles/12-apple-screens.css';
import './styles/13-apple-run.css';
import './styles/14-apple-pages.css';
import './styles/20-surfaces.css';   // shared pw-* surface utilities (cards, stat cards, status pills, tables)
import './styles/21-type.css';   // the display-mono type layer on top of the surfaces
import './styles/30-tailwind.css';   // beUI / shadcn layer on the app's tokens (Tailwind 4 theme + utilities, no reset)
import './styles/40-layout.css';   // the layout layer: framed buttons, cards that hold their content, every screen size
import './styles/50-run-polish.css';   // the test run page in the reviewed design (one alignment line, one button system)
import './components/wensity/wensity.css';   // Wensity UI components take the app's tokens
import './styles/90-theme.css';   // the current look (Astra, CES blue): loaded last; see web/README.md "Styling"
import { MantineProvider } from '@mantine/core';
import { Notifications } from '@mantine/notifications';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import { StrictMode } from 'react';
import { createRoot } from 'react-dom/client';
import { BrowserRouter } from 'react-router-dom';
import { ApiError } from './api/client';
import { App } from './App';
import { theme } from './theme';

const qc = new QueryClient({
  defaultOptions: {
    queries: { retry: (n, e) => !(e instanceof ApiError && [401, 403, 404].includes(e.status)) && n < 2, refetchOnWindowFocus: false, staleTime: 2000 },
  },
});

createRoot(document.getElementById('root')!).render(
  <StrictMode>

    <MantineProvider theme={theme} defaultColorScheme="dark">

      <QueryClientProvider client={qc}>

        {/* toasts inside the router: a toast may carry a link ("Watch live"), which needs the router to render */}

        <BrowserRouter><Notifications /><App /></BrowserRouter>

      </QueryClientProvider>

    </MantineProvider>

  </StrictMode>,
);