@@ -8,16 +8,16 @@ import "./index.scss";
88
99import Navigation from "./components/Navigation" ;
1010import SplitEditor from "./components/SplitEditor" ;
11- import { getLastState , mergeStates , saveLastEngine } from "./config" ;
12- import { FileSaver } from "./FileSaver" ;
13- import { exportAs , type SupportedEngine , saveSource } from "./rendering" ;
14- import { tutorial } from "./samples" ;
15- import { copyToClipboard , getShareUrl , getSourceFromUrl } from "./utils" ;
11+ import { getLastState , mergeStates , saveLastEngine } from "./config.js " ;
12+ import { FileSaver } from "./FileSaver.js " ;
13+ import { exportAs , type SupportedEngine , saveSource } from "./rendering.js " ;
14+ import { tutorial } from "./samples/index.js " ;
15+ import { copyToClipboard , getShareUrl , getSourceFromUrl } from "./utils.js " ;
1616import {
1717 type ExportableFormat ,
1818 sourceFormatExtension ,
1919 supportedEngines ,
20- } from "./viz" ;
20+ } from "./viz.js " ;
2121
2222const defaultEngine = supportedEngines [ 1 ] ;
2323
@@ -31,9 +31,10 @@ interface Props {
3131
3232const defaultSource = tutorial ;
3333
34+ const saver = new FileSaver ( ) ;
35+
3436class App extends Component < Props , State > {
3537 #currentSource: string | undefined = undefined ;
36- #saver: FileSaver = new FileSaver ( ) ;
3738 #editorRef: RefObject < import ( "./components/SplitEditor" ) . default | null > =
3839 createRef ( ) ;
3940
@@ -68,9 +69,9 @@ class App extends Component<Props, State> {
6869 const dotSrc = this . #currentSource;
6970 if ( dotSrc ) {
7071 if ( format === sourceFormatExtension ) {
71- saveSource ( dotSrc , this . # saver) ;
72+ saveSource ( dotSrc , saver ) ;
7273 } else {
73- exportAs ( dotSrc , format , this . state , this . # saver) ;
74+ exportAs ( dotSrc , format , this . state , saver ) ;
7475 }
7576 }
7677 } ;
0 commit comments