mirror of
https://github.com/AgentSeal/codeburn.git
synced 2026-08-04 13:51:50 +00:00
macOS uses titleBarStyle hiddenInset so the traffic lights float over the sidebar (Linear/Hermes-style), with the sidebar top inset to clear them and the top chrome marked -webkit-app-region: drag (interactive controls stay no-drag). Windows/Linux keep their native frame + controls. Exposes process.platform through the bridge and tags <html data-platform> so CSS adapts per OS. typecheck + 82 tests green.
20 lines
610 B
TypeScript
20 lines
610 B
TypeScript
import { StrictMode } from 'react'
|
|
import { createRoot } from 'react-dom/client'
|
|
|
|
import { App } from './App'
|
|
import './styles/indigo.css'
|
|
import './styles/plain.css'
|
|
|
|
const root = document.getElementById('root')
|
|
if (!root) throw new Error('#root not found')
|
|
|
|
// Tag the platform so CSS can adapt native chrome (macOS hiddenInset insets +
|
|
// drag regions); harmless when the bridge is absent (tests/jsdom).
|
|
document.documentElement.dataset.platform =
|
|
(window as unknown as { codeburn?: { platform?: string } }).codeburn?.platform ?? ''
|
|
|
|
createRoot(root).render(
|
|
<StrictMode>
|
|
<App />
|
|
</StrictMode>,
|
|
)
|