2023-03-24 04:33:39 +00:00
|
|
|
// Portions of this file are Copyright 2021 Google LLC, and licensed under GPL2+. See COPYING.
|
|
|
|
|
|
2023-03-25 11:59:50 +00:00
|
|
|
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api';
|
|
|
|
|
|
|
|
|
|
import { createContext } from "react"
|
|
|
|
|
import { Model } from "./model"
|
|
|
|
|
|
2023-03-24 04:33:39 +00:00
|
|
|
export interface State {
|
2023-03-25 11:59:50 +00:00
|
|
|
params: {
|
|
|
|
|
source: string,
|
2023-03-24 04:33:39 +00:00
|
|
|
},
|
2023-03-25 11:59:50 +00:00
|
|
|
checkerRun?: {
|
|
|
|
|
logText: string,
|
|
|
|
|
markers: monaco.editor.IMarkerData[]
|
|
|
|
|
}
|
2023-03-24 04:33:39 +00:00
|
|
|
output?: {
|
|
|
|
|
path: string,
|
|
|
|
|
timestamp: number,
|
|
|
|
|
sizeBytes: number,
|
|
|
|
|
formattedSize: string,
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
|
2023-03-25 11:59:50 +00:00
|
|
|
export const ModelContext = createContext(new Model(
|
|
|
|
|
{
|
|
|
|
|
params: {
|
|
|
|
|
source: ''
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
() => { throw new Error('Not implemented'); }
|
|
|
|
|
));
|
|
|
|
|
|