codeburn/app/renderer/main.tsx
iamtoruk 6775592716 feat(app): native integrated title bar + draggable chrome
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.
2026-07-11 08:51:24 -07:00

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>,
)