File size: 986 Bytes
092334a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client'
import './index.css'
import App, { HOSTED } from './App.tsx'
import { installStandaloneBridge } from './customer-grid/apiBridge'
import { initializeHostBridge } from './customer-grid/hostBridge'
initializeHostBridge()
// EXIT wave 1 (X2): the standalone write path. THE ONE WIRING POINT — the embed
// bundle runs this file too, and the branch below is the whole of the wave's
// "standalone-only branches" promise. `HOSTED` is App.tsx's own constant, not a
// second copy of the predicate: a component-mode page must never register an
// HTTP sink for events that belong to the Streamlit value slot, and the two
// halves of that rule have to be reading the same answer. Ordered BEFORE render
// so the sink exists by the time the grid's first effect can emit.
if (!HOSTED) installStandaloneBridge()
createRoot(document.getElementById('root')!).render(
<StrictMode>
<App />
</StrictMode>,
)
|