@@ -18,72 +18,67 @@ const MINIMAL = `\\documentclass{article}
18
18
const HELP_URL = "https://doc.cocalc.com/latex.html" ;
19
19
20
20
const VIEWERS = [ "pdfjs_canvas" , "pdf_embed" , "build" ] as const ;
21
+
21
22
import { delay } from "awaiting" ;
22
23
import * as CodeMirror from "codemirror" ;
23
- import { normalize as path_normalize } from "path" ;
24
- import { debounce , union } from "lodash" ;
25
- import { reuseInFlight } from "@cocalc/util/reuse-in-flight" ;
26
24
import { fromJS , List , Map } from "immutable" ;
27
- import { once } from "@cocalc/util/async-utils" ;
28
- import { project_api } from "../generic/client" ;
25
+ import { debounce , union } from "lodash" ;
26
+ import { normalize as path_normalize } from "path" ;
27
+
28
+ import { Store } from "@cocalc/frontend/app-framework" ;
29
+ import {
30
+ TableOfContentsEntry ,
31
+ TableOfContentsEntryList ,
32
+ } from "@cocalc/frontend/components" ;
29
33
import {
30
34
Actions as BaseActions ,
31
35
CodeEditorState ,
32
- } from "../code-editor/actions" ;
36
+ } from "@cocalc/frontend/frame-editors/code-editor/actions" ;
37
+ import { print_html } from "@cocalc/frontend/frame-editors/frame-tree/print" ;
38
+ import { FrameTree } from "@cocalc/frontend/frame-editors/frame-tree/types" ;
39
+ import { raw_url } from "@cocalc/frontend/frame-editors/frame-tree/util" ;
33
40
import {
34
- latexmk ,
35
- build_command ,
36
- Engine ,
37
- get_engine_from_config ,
38
- } from "./latexmk" ;
39
- import { sagetex , sagetex_hash , sagetex_errors } from "./sagetex" ;
40
- import { pythontex , pythontex_errors } from "./pythontex" ;
41
- import { knitr , patch_synctex , knitr_errors } from "./knitr" ;
42
- import * as synctex from "./synctex" ;
43
- import { bibtex } from "./bibtex" ;
44
- import { count_words } from "./count_words" ;
45
- import { server_time , ExecOutput } from "../generic/client" ;
46
- import { clean } from "./clean" ;
47
- import { LatexParser , IProcessedLatexLog } from "./latex-log-parser" ;
48
- import { update_gutters } from "./gutters" ;
49
- import { ensureTargetPathIsCorrect , pdf_path } from "./util" ;
50
- import { KNITR_EXTS } from "./constants" ;
51
- import { forgetDocument , url_to_pdf } from "./pdfjs-doc-cache" ;
52
- import { FrameTree } from "../frame-tree/types" ;
53
- import { Store } from "../../app-framework" ;
54
- import { createTypedMap , TypedMap } from "../../app-framework" ;
55
- import { print_html } from "../frame-tree/print" ;
56
- import { raw_url } from "../frame-tree/util" ;
41
+ project_api ,
42
+ server_time ,
43
+ } from "@cocalc/frontend/frame-editors/generic/client" ;
44
+ import { open_new_tab } from "@cocalc/frontend/misc" ;
45
+ import { once } from "@cocalc/util/async-utils" ;
57
46
import {
47
+ change_filename_extension ,
58
48
path_split ,
59
49
separate_file_extension ,
50
+ sha1 ,
60
51
splitlines ,
61
52
startswith ,
62
- change_filename_extension ,
63
- sha1 ,
64
53
} from "@cocalc/util/misc" ;
54
+ import { reuseInFlight } from "@cocalc/util/reuse-in-flight" ;
55
+
56
+ import { bibtex } from "./bibtex" ;
65
57
import { IBuildSpecs } from "./build" ;
66
- import { open_new_tab } from "@cocalc/frontend/misc" ;
58
+ import { clean } from "./clean" ;
59
+ import { KNITR_EXTS } from "./constants" ;
60
+ import { count_words } from "./count_words" ;
61
+ import { update_gutters } from "./gutters" ;
62
+ import { knitr , knitr_errors , patch_synctex } from "./knitr" ;
63
+ import { IProcessedLatexLog , LatexParser } from "./latex-log-parser" ;
64
+ import {
65
+ build_command ,
66
+ Engine ,
67
+ get_engine_from_config ,
68
+ latexmk ,
69
+ } from "./latexmk" ;
70
+ import { forgetDocument , url_to_pdf } from "./pdfjs-doc-cache" ;
71
+ import { pythontex , pythontex_errors } from "./pythontex" ;
72
+ import { sagetex , sagetex_errors , sagetex_hash } from "./sagetex" ;
73
+ import * as synctex from "./synctex" ;
67
74
import { parseTableOfContents } from "./table-of-contents" ;
68
75
import {
69
- TableOfContentsEntryList ,
70
- TableOfContentsEntry ,
71
- } from "@cocalc/frontend/components" ;
72
-
73
- export interface BuildLog extends ExecOutput {
74
- parse ?: IProcessedLatexLog ;
75
- }
76
-
77
- export type BuildLogs = Map < string , Map < string , any > > ;
78
-
79
- interface ScrollIntoViewParams {
80
- page : number ;
81
- y : number ;
82
- id : string ;
83
- }
84
-
85
- export const ScrollIntoViewRecord = createTypedMap < ScrollIntoViewParams > ( ) ;
86
- export type ScrollIntoViewMap = TypedMap < ScrollIntoViewParams > ;
76
+ BuildLog ,
77
+ BuildLogs ,
78
+ ScrollIntoViewMap ,
79
+ ScrollIntoViewRecord ,
80
+ } from "./types" ;
81
+ import { ensureTargetPathIsCorrect , pdf_path } from "./util" ;
87
82
88
83
interface LatexEditorState extends CodeEditorState {
89
84
build_logs : BuildLogs ;
0 commit comments