()
| 144 | } |
| 145 | |
| 146 | function initPreview() { |
| 147 | installPreviewElectronApi(); |
| 148 | const initOpts = { |
| 149 | tabId: PreviewTabId, |
| 150 | windowId: PreviewWindowId, |
| 151 | clientId: PreviewClientId, |
| 152 | environment: "renderer", |
| 153 | platform: "darwin", |
| 154 | isPreview: true, |
| 155 | } as GlobalInitOptions; |
| 156 | initGlobalAtoms(initOpts); |
| 157 | globalStore.set(getAtoms().fullConfigAtom, {} as FullConfigType); |
| 158 | GlobalModel.getInstance().initialize(initOpts); |
| 159 | loadFonts(); |
| 160 | const container = document.getElementById("main")!; |
| 161 | let root = (container as any).__reactRoot; |
| 162 | if (!root) { |
| 163 | root = createRoot(container); |
| 164 | (container as any).__reactRoot = root; |
| 165 | } |
| 166 | root.render(<PreviewRoot />); |
| 167 | } |
| 168 | |
| 169 | initPreview(); |
no test coverage detected