-
Notifications
You must be signed in to change notification settings - Fork 106
Expand file tree
/
Copy pathindex.tsx
More file actions
49 lines (43 loc) · 1.39 KB
/
index.tsx
File metadata and controls
49 lines (43 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import * as React from 'react';
import {createRoot} from 'react-dom/client';
import {HashRouter} from 'react-router-dom';
import * as vega from 'vega';
import * as vegaLite from 'vega-lite';
import AppShell from './components/app-shell';
import {AppContextProvider} from './context/app-context';
import setupMonaco from './utils/monaco';
console.log('Vega Editor initializing...');
if (typeof window !== 'undefined') {
const w = window as any;
w.VEGA_DEBUG = w.VEGA_DEBUG ?? {};
w.VEGA_DEBUG = {};
w.VEGA_DEBUG.vega = vega;
w.VEGA_DEBUG.vegaLite = vegaLite;
w.VEGA_DEBUG.VEGA_VERSION = vega.version;
w.VEGA_DEBUG.VEGA_LITE_VERSION = vegaLite.version;
console.log('Vega versions set on window.VEGA_DEBUG');
}
try {
console.log('Setting up Monaco editor...');
setupMonaco();
console.log('Monaco editor setup complete');
} catch (error) {
console.error('Error during setup of Monaco editor:', error);
}
const container = document.getElementById('root');
if (container) {
const root = createRoot(container);
root.render(
<HashRouter>
<AppContextProvider>
<AppShell />
</AppContextProvider>
</HashRouter>,
);
}
/* tslint:disable */
console.log('%cWelcome to the Vega-Editor!', 'font-size: 16px; font-weight: bold;');
console.log(
'You can access the Vega view with VEGA_DEBUG. Learn more at https://vega.github.io/vega/docs/api/debugging/.',
);
/* tslint:enable */