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';
|
|
|
|
|
|
2023-03-26 07:48:04 +01:00
|
|
|
export type MultiLayoutComponentId = 'editor' | 'viewer' | 'customizer';
|
|
|
|
|
export type SingleLayoutComponentId = MultiLayoutComponentId;
|
|
|
|
|
|
2023-03-24 04:33:39 +00:00
|
|
|
export interface State {
|
2023-03-25 11:59:50 +00:00
|
|
|
params: {
|
2023-03-26 07:48:04 +01:00
|
|
|
sourcePath: string,
|
2023-03-25 11:59:50 +00:00
|
|
|
source: string,
|
2023-03-25 15:23:54 +00:00
|
|
|
features: string[],
|
2023-03-24 04:33:39 +00:00
|
|
|
},
|
2023-03-26 07:48:04 +01:00
|
|
|
|
|
|
|
|
view: {
|
|
|
|
|
logs?: boolean,
|
|
|
|
|
layout: {
|
|
|
|
|
mode: 'single',
|
|
|
|
|
focus: SingleLayoutComponentId,
|
|
|
|
|
} | ({
|
|
|
|
|
mode: 'multi',
|
|
|
|
|
} & { [K in MultiLayoutComponentId]: boolean })
|
|
|
|
|
}
|
|
|
|
|
|
2023-03-25 15:23:54 +00:00
|
|
|
lastCheckerRun?: {
|
2023-03-25 11:59:50 +00:00
|
|
|
logText: string,
|
|
|
|
|
markers: monaco.editor.IMarkerData[]
|
|
|
|
|
}
|
2023-03-25 15:23:54 +00:00
|
|
|
rendering?: boolean,
|
|
|
|
|
previewing?: boolean,
|
|
|
|
|
checkingSyntax?: boolean,
|
|
|
|
|
|
2023-03-26 07:48:04 +01:00
|
|
|
error?: string,
|
2023-03-24 04:33:39 +00:00
|
|
|
output?: {
|
2023-03-25 19:30:34 +00:00
|
|
|
isPreview: boolean,
|
2023-03-25 15:23:54 +00:00
|
|
|
stlFile: File,
|
|
|
|
|
stlFileURL: string,
|
2023-03-25 20:41:16 +00:00
|
|
|
elapsedMillis: number,
|
|
|
|
|
formattedElapsedMillis: string,
|
|
|
|
|
formattedStlFileSize: string,
|
2023-03-26 15:28:05 +01:00
|
|
|
// path: string,
|
|
|
|
|
// timestamp: number,
|
|
|
|
|
// sizeBytes: number,
|
|
|
|
|
// formattedSize: string,
|
2023-03-24 04:33:39 +00:00
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
|
2023-03-26 15:28:05 +01:00
|
|
|
export {}
|