@skyhook-io/radar-app 1.9.4 → 1.9.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/main.tsx CHANGED
@@ -153,8 +153,14 @@ window.addEventListener('mouseup', (e: MouseEvent) => {
153
153
  // tab, so it opts into per-view document.title. Library consumers (e.g.
154
154
  // radar-hub-web) render <RadarApp apiBase="..." basename="..." /> WITHOUT this
155
155
  // flag, keeping their own tab title.
156
+ const runtimeConfig = window.__RADAR_RUNTIME_CONFIG__
157
+
156
158
  ReactDOM.createRoot(document.getElementById('radar')!).render(
157
159
  <React.StrictMode>
158
- <RadarApp manageDocumentTitle />
160
+ <RadarApp
161
+ apiBase={runtimeConfig?.apiBase}
162
+ basename={runtimeConfig?.basePath}
163
+ manageDocumentTitle
164
+ />
159
165
  </React.StrictMode>
160
166
  )
package/src/vite-env.d.ts CHANGED
@@ -1 +1,9 @@
1
1
  /// <reference types="vite/client" />
2
+
3
+ interface Window {
4
+ __RADAR_RUNTIME_CONFIG__?: {
5
+ basePath?: string
6
+ apiBase?: string
7
+ assetBase?: string
8
+ }
9
+ }