mirror of
https://github.com/olehomelchenko/astrolabe.git
synced 2026-08-08 02:02:33 +00:00
19 lines
739 B
TypeScript
19 lines
739 B
TypeScript
import { createRoot } from 'react-dom/client';
|
|
import { App } from './app/App';
|
|
import { initApp } from './app/orchestration/startup';
|
|
import { initTheme, wireTheme } from './app/orchestration/theme';
|
|
import '../styles/base.css';
|
|
|
|
// Hydrate the persisted theme onto <html data-theme> before first paint (no
|
|
// FOUC), then keep store ↔ DOM ↔ localStorage in sync. Store stays DOM-free;
|
|
// all browser access funnels through the orchestration + adapter.
|
|
initTheme();
|
|
wireTheme();
|
|
|
|
// Load the library from IndexedDB (seeding a sample on first run) and wire
|
|
// persistence. Fire-and-forget: the UI renders immediately and fills in when
|
|
// hydration resolves.
|
|
void initApp();
|
|
|
|
createRoot(document.getElementById('app')!).render(<App />);
|