@dodona/papyros 4.1.1 → 4.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Library.d.ts +11 -0
- package/dist/Library.js +11 -0
- package/dist/Library.js.map +1 -0
- package/dist/ProgrammingLanguage.d.ts +7 -0
- package/dist/ProgrammingLanguage.js +9 -0
- package/dist/ProgrammingLanguage.js.map +1 -0
- package/dist/backend/Backend.d.ts +92 -0
- package/dist/backend/Backend.js +79 -0
- package/dist/backend/Backend.js.map +1 -0
- package/dist/backend/workers/javascript/JavaScriptWorker.d.ts +39 -0
- package/dist/backend/workers/javascript/JavaScriptWorker.js +158 -0
- package/dist/backend/workers/javascript/JavaScriptWorker.js.map +1 -0
- package/dist/backend/workers/javascript/worker.d.ts +1 -0
- package/dist/backend/workers/javascript/worker.js +5 -0
- package/dist/backend/workers/javascript/worker.js.map +1 -0
- package/dist/backend/workers/python/PythonWorker.d.ts +32 -0
- package/dist/backend/workers/python/PythonWorker.js +117 -0
- package/dist/backend/workers/python/PythonWorker.js.map +1 -0
- package/dist/backend/workers/python/python_package.tar.gz.load_by_url +0 -0
- package/dist/backend/workers/python/worker.d.ts +1 -0
- package/dist/backend/workers/python/worker.js +5 -0
- package/dist/backend/workers/python/worker.js.map +1 -0
- package/dist/communication/BackendEvent.d.ts +33 -0
- package/dist/communication/BackendEvent.js +18 -0
- package/dist/communication/BackendEvent.js.map +1 -0
- package/dist/communication/BackendEventQueue.d.ts +59 -0
- package/dist/communication/BackendEventQueue.js +96 -0
- package/dist/communication/BackendEventQueue.js.map +1 -0
- package/dist/communication/BackendManager.d.ts +68 -0
- package/dist/communication/BackendManager.js +99 -0
- package/dist/communication/BackendManager.js.map +1 -0
- package/dist/communication/InputServiceWorker.d.ts +1 -0
- package/dist/communication/InputServiceWorker.js +37 -0
- package/dist/communication/InputServiceWorker.js.map +1 -0
- package/dist/communication/InputWorker.d.ts +22 -0
- package/dist/communication/InputWorker.js +63 -0
- package/dist/communication/InputWorker.js.map +1 -0
- package/dist/frontend/components/CodeRunner.d.ts +9 -0
- package/dist/frontend/components/CodeRunner.js +60 -0
- package/dist/frontend/components/CodeRunner.js.map +1 -0
- package/dist/frontend/components/Debugger.d.ts +7 -0
- package/dist/frontend/components/Debugger.js +75 -0
- package/dist/frontend/components/Debugger.js.map +1 -0
- package/dist/frontend/components/Input.d.ts +13 -0
- package/dist/frontend/components/Input.js +60 -0
- package/dist/frontend/components/Input.js.map +1 -0
- package/dist/frontend/components/Output.d.ts +14 -0
- package/dist/frontend/components/Output.js +157 -0
- package/dist/frontend/components/Output.js.map +1 -0
- package/dist/frontend/components/PapyrosElement.d.ts +8 -0
- package/dist/frontend/components/PapyrosElement.js +24 -0
- package/dist/frontend/components/PapyrosElement.js.map +1 -0
- package/dist/frontend/components/app/App.d.ts +24 -0
- package/dist/frontend/components/app/App.js +207 -0
- package/dist/frontend/components/app/App.js.map +1 -0
- package/dist/frontend/components/app/ExamplePicker.d.ts +7 -0
- package/dist/frontend/components/app/ExamplePicker.js +36 -0
- package/dist/frontend/components/app/ExamplePicker.js.map +1 -0
- package/dist/frontend/components/app/LanguagePicker.d.ts +7 -0
- package/dist/frontend/components/app/LanguagePicker.js +33 -0
- package/dist/frontend/components/app/LanguagePicker.js.map +1 -0
- package/dist/frontend/components/app/ProgrammingLanguagePicker.d.ts +7 -0
- package/dist/frontend/components/app/ProgrammingLanguagePicker.js +38 -0
- package/dist/frontend/components/app/ProgrammingLanguagePicker.js.map +1 -0
- package/dist/frontend/components/app/examples/JavaScriptExamples.d.ts +5 -0
- package/dist/frontend/components/app/examples/JavaScriptExamples.js +16 -0
- package/dist/frontend/components/app/examples/JavaScriptExamples.js.map +1 -0
- package/dist/frontend/components/app/examples/PythonExamples.d.ts +14 -0
- package/dist/frontend/components/app/examples/PythonExamples.js +163 -0
- package/dist/frontend/components/app/examples/PythonExamples.js.map +1 -0
- package/dist/frontend/components/app/themes/ThemePicker.d.ts +11 -0
- package/dist/frontend/components/app/themes/ThemePicker.js +48 -0
- package/dist/frontend/components/app/themes/ThemePicker.js.map +1 -0
- package/dist/frontend/components/app/themes/ThemedButton.d.ts +9 -0
- package/dist/frontend/components/app/themes/ThemedButton.js +53 -0
- package/dist/frontend/components/app/themes/ThemedButton.js.map +1 -0
- package/dist/frontend/components/code_mirror/BatchInputEditor.d.ts +8 -0
- package/dist/frontend/components/code_mirror/BatchInputEditor.js +51 -0
- package/dist/frontend/components/code_mirror/BatchInputEditor.js.map +1 -0
- package/dist/frontend/components/code_mirror/CodeEditor.d.ts +24 -0
- package/dist/frontend/components/code_mirror/CodeEditor.js +204 -0
- package/dist/frontend/components/code_mirror/CodeEditor.js.map +1 -0
- package/dist/frontend/components/code_mirror/CodeMirrorEditor.d.ts +22 -0
- package/dist/frontend/components/code_mirror/CodeMirrorEditor.js +111 -0
- package/dist/frontend/components/code_mirror/CodeMirrorEditor.js.map +1 -0
- package/dist/frontend/components/code_mirror/Extensions.d.ts +15 -0
- package/dist/frontend/components/code_mirror/Extensions.js +164 -0
- package/dist/frontend/components/code_mirror/Extensions.js.map +1 -0
- package/dist/frontend/components/code_mirror/MaterialTheme.d.ts +5 -0
- package/dist/frontend/components/code_mirror/MaterialTheme.js +115 -0
- package/dist/frontend/components/code_mirror/MaterialTheme.js.map +1 -0
- package/dist/frontend/components/code_runner/ButtonLint.d.ts +9 -0
- package/dist/frontend/components/code_runner/ButtonLint.js +72 -0
- package/dist/frontend/components/code_runner/ButtonLint.js.map +1 -0
- package/dist/frontend/components/code_runner/Code.d.ts +7 -0
- package/dist/frontend/components/code_runner/Code.js +48 -0
- package/dist/frontend/components/code_runner/Code.js.map +1 -0
- package/dist/frontend/components/code_runner/RunState.d.ts +7 -0
- package/dist/frontend/components/code_runner/RunState.js +41 -0
- package/dist/frontend/components/code_runner/RunState.js.map +1 -0
- package/dist/frontend/components/input/BatchInput.d.ts +9 -0
- package/dist/frontend/components/input/BatchInput.js +53 -0
- package/dist/frontend/components/input/BatchInput.js.map +1 -0
- package/dist/frontend/components/input/InteractiveInput.d.ts +13 -0
- package/dist/frontend/components/input/InteractiveInput.js +71 -0
- package/dist/frontend/components/input/InteractiveInput.js.map +1 -0
- package/dist/frontend/state/Constants.d.ts +38 -0
- package/dist/frontend/state/Constants.js +111 -0
- package/dist/frontend/state/Constants.js.map +1 -0
- package/dist/frontend/state/Debugger.d.ts +23 -0
- package/dist/frontend/state/Debugger.js +86 -0
- package/dist/frontend/state/Debugger.js.map +1 -0
- package/dist/frontend/state/Examples.d.ts +11 -0
- package/dist/frontend/state/Examples.js +36 -0
- package/dist/frontend/state/Examples.js.map +1 -0
- package/dist/frontend/state/I18n.d.ts +16 -0
- package/dist/frontend/state/I18n.js +75 -0
- package/dist/frontend/state/I18n.js.map +1 -0
- package/dist/frontend/state/InputOutput.d.ts +64 -0
- package/dist/frontend/state/InputOutput.js +146 -0
- package/dist/frontend/state/InputOutput.js.map +1 -0
- package/dist/frontend/state/Papyros.d.ts +40 -0
- package/dist/frontend/state/Papyros.js +115 -0
- package/dist/frontend/state/Papyros.js.map +1 -0
- package/dist/frontend/state/Runner.d.ts +123 -0
- package/dist/frontend/state/Runner.js +372 -0
- package/dist/frontend/state/Runner.js.map +1 -0
- package/dist/frontend/state/Test.d.ts +10 -0
- package/dist/frontend/state/Test.js +43 -0
- package/dist/frontend/state/Test.js.map +1 -0
- package/dist/frontend/state/Translations.d.ts +178 -0
- package/dist/frontend/state/Translations.js +187 -0
- package/dist/frontend/state/Translations.js.map +1 -0
- package/dist/frontend/state/themes/blue-dark.d.ts +2 -0
- package/dist/frontend/state/themes/blue-dark.js +56 -0
- package/dist/frontend/state/themes/blue-dark.js.map +1 -0
- package/dist/frontend/state/themes/blue-light.d.ts +2 -0
- package/dist/frontend/state/themes/blue-light.js +56 -0
- package/dist/frontend/state/themes/blue-light.js.map +1 -0
- package/dist/frontend/state/themes/green-dark.d.ts +2 -0
- package/dist/frontend/state/themes/green-dark.js +56 -0
- package/dist/frontend/state/themes/green-dark.js.map +1 -0
- package/dist/frontend/state/themes/green-light.d.ts +2 -0
- package/dist/frontend/state/themes/green-light.js +56 -0
- package/dist/frontend/state/themes/green-light.js.map +1 -0
- package/dist/frontend/state/themes/red-dark.d.ts +2 -0
- package/dist/frontend/state/themes/red-dark.js +56 -0
- package/dist/frontend/state/themes/red-dark.js.map +1 -0
- package/dist/frontend/state/themes/red-light.d.ts +2 -0
- package/dist/frontend/state/themes/red-light.js +56 -0
- package/dist/frontend/state/themes/red-light.js.map +1 -0
- package/dist/util/Logging.d.ts +15 -0
- package/dist/util/Logging.js +30 -0
- package/dist/util/Logging.js.map +1 -0
- package/dist/util/Util.d.ts +8 -0
- package/dist/util/Util.js +48 -0
- package/dist/util/Util.js.map +1 -0
- package/package.json +1 -1
- package/dist/assets/__vite-browser-external-9wXp6ZBx.js +0 -1
- package/dist/assets/__vite-browser-external-BIHI7g3E.js +0 -1
- package/dist/assets/index-C1AWjGcU.js +0 -2202
- package/dist/assets/manifest-BaVmi6rC.json +0 -15
- package/dist/assets/python_package.tar.gz-B8aMWvGt.load_by_url +0 -0
- package/dist/assets/worker-BhABRh01.js +0 -5
- package/dist/assets/worker-C2Ju1j5g.js +0 -110
- package/dist/index.html +0 -26
- package/dist/manifest.json +0 -15
- package/dist/robots.txt +0 -3
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { EditorView } from "@codemirror/view";
|
|
2
|
+
import { HighlightStyle, syntaxHighlighting } from "@codemirror/language";
|
|
3
|
+
import { tags } from "@lezer/highlight";
|
|
4
|
+
export const materialTheme = EditorView.theme({
|
|
5
|
+
".cm-scroller": { overflow: "auto" },
|
|
6
|
+
"&": {
|
|
7
|
+
height: "100%", // use full height of host
|
|
8
|
+
width: "100%", // use full width of host
|
|
9
|
+
"font-size": "14px", // use proper size to align gutters with editor
|
|
10
|
+
backgroundColor: "var(--md-sys-color-surface-container-highest)",
|
|
11
|
+
color: "var(--md-sys-color-on-background)",
|
|
12
|
+
},
|
|
13
|
+
".cm-gutters": {
|
|
14
|
+
backgroundColor: "var(--md-sys-color-surface-container)",
|
|
15
|
+
color: "var(--md-sys-color-on-surface-variant)",
|
|
16
|
+
border: "none",
|
|
17
|
+
fontSize: "12px",
|
|
18
|
+
},
|
|
19
|
+
".cm-content": {
|
|
20
|
+
color: "var(--md-sys-color-on-background)",
|
|
21
|
+
},
|
|
22
|
+
".cm-activeLine, .cm-activeLineGutter": {
|
|
23
|
+
backgroundColor: "color-mix(in srgb, var(--md-sys-color-primary) 10%, transparent) !important",
|
|
24
|
+
},
|
|
25
|
+
"&.cm-focused": {
|
|
26
|
+
outline: "none",
|
|
27
|
+
},
|
|
28
|
+
".cm-selectionBackground": {
|
|
29
|
+
backgroundColor: "color-mix(in srgb, var(--md-sys-color-primary) 30%, transparent) !important",
|
|
30
|
+
},
|
|
31
|
+
".cm-cursor, .cm-dropCursor": {
|
|
32
|
+
borderLeft: "1.2px solid var(--md-sys-color-secondary) !important",
|
|
33
|
+
},
|
|
34
|
+
".cm-tooltip": {
|
|
35
|
+
backgroundColor: "var(--md-sys-color-surface)",
|
|
36
|
+
border: "none",
|
|
37
|
+
boxShadow: "0px 2px 6px rgba(0,0,0,0.2)",
|
|
38
|
+
"& li[aria-selected]": {
|
|
39
|
+
backgroundColor: "var(--md-sys-color-secondary)",
|
|
40
|
+
color: "var(--md-sys-color-on-secondary)",
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
".cm-panels": {
|
|
44
|
+
backgroundColor: "var(--md-sys-color-surface-container)",
|
|
45
|
+
color: "var(--md-sys-color-on-surface)",
|
|
46
|
+
border: "none",
|
|
47
|
+
},
|
|
48
|
+
".cm-searchMatch": {
|
|
49
|
+
backgroundColor: "color-mix(in srgb, var(--md-sys-color-secondary) 30%, transparent)",
|
|
50
|
+
},
|
|
51
|
+
".cm-searchMatch.cm-searchMatch-selected": {
|
|
52
|
+
backgroundColor: "color-mix(in srgb, var(--md-sys-color-surface-variant) 30%, transparent)",
|
|
53
|
+
outline: "1px solid var(--md-sys-color-outline)",
|
|
54
|
+
},
|
|
55
|
+
".cm-selectionMatch": {
|
|
56
|
+
backgroundColor: "color-mix(in srgb, var(--md-sys-color-secondary) 30%, transparent)",
|
|
57
|
+
},
|
|
58
|
+
".cm-button": {
|
|
59
|
+
background: "var(--md-sys-color-surface-variant)",
|
|
60
|
+
color: "var(--md-sys-color-on-surface-variant)",
|
|
61
|
+
border: "none",
|
|
62
|
+
},
|
|
63
|
+
".cm-button:hover": {
|
|
64
|
+
background: "var(--md-sys-color-secondary)",
|
|
65
|
+
color: "var(--md-sys-color-on-secondary)",
|
|
66
|
+
},
|
|
67
|
+
".cm-textfield": {
|
|
68
|
+
background: "var(--md-sys-color-surface-variant)",
|
|
69
|
+
color: "var(--md-sys-color-on-surface-variant)",
|
|
70
|
+
border: "none",
|
|
71
|
+
},
|
|
72
|
+
".cm-textfield:focus": {
|
|
73
|
+
outline: "none",
|
|
74
|
+
border: "none",
|
|
75
|
+
boxShadow: "0 0 0 2px var(--md-sys-color-primary)",
|
|
76
|
+
},
|
|
77
|
+
}, { dark: false });
|
|
78
|
+
export const materialHighlight = HighlightStyle.define([
|
|
79
|
+
// Comments
|
|
80
|
+
{
|
|
81
|
+
tag: [tags.comment, tags.lineComment, tags.blockComment, tags.docComment],
|
|
82
|
+
color: "var(--md-sys-color-on-surface-variant)",
|
|
83
|
+
},
|
|
84
|
+
// Keywords & operators
|
|
85
|
+
{
|
|
86
|
+
tag: [tags.keyword, tags.self, tags.controlKeyword, tags.operatorKeyword, tags.operator],
|
|
87
|
+
color: "var(--md-sys-color-primary)",
|
|
88
|
+
},
|
|
89
|
+
{ tag: [tags.definitionKeyword, tags.moduleKeyword], color: "var(--md-sys-color-primary)", fontStyle: "italic" },
|
|
90
|
+
// Names
|
|
91
|
+
{ tag: [tags.variableName, tags.className, tags.namespace], color: "var(--md-sys-color-on-background)" },
|
|
92
|
+
{ tag: tags.standard(tags.variableName), color: "var(--md-sys-color-tertiary)", fontStyle: "italic" },
|
|
93
|
+
{ tag: [tags.function(tags.variableName), tags.attributeName], color: "var(--md-sys-color-tertiary)" },
|
|
94
|
+
{ tag: tags.typeName, color: "var(--md-sys-color-primary)" },
|
|
95
|
+
{ tag: tags.labelName, color: "var(--md-sys-color-primary)", fontStyle: "italic" },
|
|
96
|
+
// Literals
|
|
97
|
+
{ tag: tags.string, color: "var(--md-sys-color-secondary)" },
|
|
98
|
+
{ tag: tags.number, color: "var(--md-sys-color-secondary)" },
|
|
99
|
+
{ tag: tags.regexp, color: "var(--md-sys-color-secondary)" },
|
|
100
|
+
{ tag: tags.atom, color: "var(--md-sys-color-secondary)" },
|
|
101
|
+
{ tag: tags.bool, color: "var(--md-sys-color-secondary)" },
|
|
102
|
+
// Emphasis / headings
|
|
103
|
+
{ tag: tags.emphasis, textDecoration: "underline" },
|
|
104
|
+
{ tag: tags.strong, fontWeight: "bold" },
|
|
105
|
+
{ tag: tags.strikethrough, textDecoration: "line-through" },
|
|
106
|
+
{ tag: tags.heading, fontWeight: "bold", color: "var(--md-sys-color-on-background)" },
|
|
107
|
+
// Errors / diffs
|
|
108
|
+
{ tag: tags.invalid, color: "var(--md-sys-color-error)" },
|
|
109
|
+
{ tag: tags.deleted, color: "var(--md-sys-color-error)" },
|
|
110
|
+
{ tag: tags.inserted, color: "var(--md-sys-color-on-background)", fontWeight: "bold" },
|
|
111
|
+
// Punctuation
|
|
112
|
+
{ tag: [tags.punctuation, tags.separator, tags.bracket], color: "var(--md-sys-color-on-background)" },
|
|
113
|
+
]);
|
|
114
|
+
export const material = [materialTheme, syntaxHighlighting(materialHighlight)];
|
|
115
|
+
//# sourceMappingURL=MaterialTheme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MaterialTheme.js","sourceRoot":"","sources":["../../../../src/frontend/components/code_mirror/MaterialTheme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAA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K,EAAE,2BAA2B,EAAE;IACzD,EAAE,GAAG,EAAE,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAE,mCAAmC,EAAE,UAAU,EAAE,MAAM,EAAE;IAEtF,cAAc;IACd,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,mCAAmC,EAAE;CACxG,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,QAAQ,GAAc,CAAC,aAAa,EAAE,kBAAkB,CAAC,iBAAiB,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CSSResult, TemplateResult } from "lit";
|
|
2
|
+
import { PapyrosElement } from "../PapyrosElement";
|
|
3
|
+
import "@material/web/button/filled-button";
|
|
4
|
+
import "@material/web/button/outlined-button";
|
|
5
|
+
export declare class ButtonLint extends PapyrosElement {
|
|
6
|
+
static get styles(): CSSResult;
|
|
7
|
+
get buttons(): TemplateResult | TemplateResult[];
|
|
8
|
+
protected render(): TemplateResult;
|
|
9
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { customElement } from "lit/decorators.js";
|
|
8
|
+
import { css, html } from "lit";
|
|
9
|
+
import { RunState } from "../../state/Runner";
|
|
10
|
+
import { PapyrosElement } from "../PapyrosElement";
|
|
11
|
+
import { RunMode } from "../../../backend/Backend";
|
|
12
|
+
import "@material/web/button/filled-button";
|
|
13
|
+
import "@material/web/button/outlined-button";
|
|
14
|
+
let ButtonLint = class ButtonLint extends PapyrosElement {
|
|
15
|
+
static get styles() {
|
|
16
|
+
return css `
|
|
17
|
+
:host {
|
|
18
|
+
display: flex;
|
|
19
|
+
justify-content: space-between;
|
|
20
|
+
height: fit-content;
|
|
21
|
+
padding: 0.5rem;
|
|
22
|
+
gap: 1rem;
|
|
23
|
+
flex-wrap: wrap;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.buttons {
|
|
27
|
+
display: flex;
|
|
28
|
+
gap: 0.5rem;
|
|
29
|
+
flex-wrap: wrap;
|
|
30
|
+
}
|
|
31
|
+
`;
|
|
32
|
+
}
|
|
33
|
+
get buttons() {
|
|
34
|
+
if (this.papyros.runner.state === RunState.Ready) {
|
|
35
|
+
if (this.papyros.debugger.active) {
|
|
36
|
+
return html ` <md-outlined-button @click=${() => (this.papyros.debugger.active = false)}>
|
|
37
|
+
<span slot="icon">${this.papyros.constants.icons.stopDebug}</span>
|
|
38
|
+
${this.t("Papyros.debug.stop")}
|
|
39
|
+
</md-outlined-button>`;
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
return [
|
|
43
|
+
html ` <md-filled-button @click=${() => this.papyros.runner.start(RunMode.Run)}>
|
|
44
|
+
<span slot="icon">${this.papyros.constants.icons[RunMode.Run]}</span>
|
|
45
|
+
${this.t(`Papyros.run_modes.${RunMode.Run}`)}
|
|
46
|
+
</md-filled-button>`,
|
|
47
|
+
...this.papyros.runner.runModes.map((mode) => html ` <md-outlined-button @click=${() => this.papyros.runner.start(mode)}>
|
|
48
|
+
<span slot="icon">${this.papyros.constants.icons[mode]}</span>
|
|
49
|
+
${this.t(`Papyros.run_modes.${mode}`)}
|
|
50
|
+
</md-outlined-button>`),
|
|
51
|
+
];
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
return html ` <md-filled-button @click=${() => this.papyros.runner.stop()}>
|
|
56
|
+
<span slot="icon">${this.papyros.constants.icons.stop}</span>
|
|
57
|
+
${this.t("Papyros.stop")}
|
|
58
|
+
</md-filled-button>`;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
render() {
|
|
62
|
+
return html `
|
|
63
|
+
<div class="buttons">${this.buttons}</div>
|
|
64
|
+
<div class="buttons"><slot></slot></div>
|
|
65
|
+
`;
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
ButtonLint = __decorate([
|
|
69
|
+
customElement("p-button-lint")
|
|
70
|
+
], ButtonLint);
|
|
71
|
+
export { ButtonLint };
|
|
72
|
+
//# sourceMappingURL=ButtonLint.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonLint.js","sourceRoot":"","sources":["../../../../src/frontend/components/code_runner/ButtonLint.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,GAAG,EAAa,IAAI,EAAkB,MAAM,KAAK,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,oCAAoC,CAAC;AAC5C,OAAO,sCAAsC,CAAC;AAGvC,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,cAAc;IAC1C,MAAM,KAAK,MAAM;QACb,OAAO,GAAG,CAAA;;;;;;;;;;;;;;;SAeT,CAAC;IACN,CAAC;IAED,IAAI,OAAO;QACP,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,KAAK,QAAQ,CAAC,KAAK,EAAE,CAAC;YAC/C,IAAI,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;gBAC/B,OAA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AO;;SAEtC,CAAC;IACN,CAAC;CACJ,CAAA;AAxDY,UAAU;IADtB,aAAa,CAAC,eAAe,CAAC;GAClB,UAAU,CAwDtB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CSSResult, TemplateResult } from "lit";
|
|
2
|
+
import "../code_mirror/CodeEditor";
|
|
3
|
+
import { PapyrosElement } from "../PapyrosElement";
|
|
4
|
+
export declare class Code extends PapyrosElement {
|
|
5
|
+
static get styles(): CSSResult;
|
|
6
|
+
protected render(): TemplateResult;
|
|
7
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { css, html } from "lit";
|
|
8
|
+
import "../code_mirror/CodeEditor";
|
|
9
|
+
import { customElement } from "lit/decorators.js";
|
|
10
|
+
import { PapyrosElement } from "../PapyrosElement";
|
|
11
|
+
let Code = class Code extends PapyrosElement {
|
|
12
|
+
static get styles() {
|
|
13
|
+
return css `
|
|
14
|
+
:host {
|
|
15
|
+
width: 100%;
|
|
16
|
+
height: 100%;
|
|
17
|
+
}
|
|
18
|
+
`;
|
|
19
|
+
}
|
|
20
|
+
render() {
|
|
21
|
+
return html `
|
|
22
|
+
<p-code-editor
|
|
23
|
+
.testLineCount=${this.papyros.test.testLineCount}
|
|
24
|
+
.programmingLanguage=${this.papyros.runner.programmingLanguage}
|
|
25
|
+
.debug=${this.papyros.debugger.active}
|
|
26
|
+
.debugLine=${this.papyros.debugger.debugLine}
|
|
27
|
+
.value=${this.papyros.runner.effectiveCode}
|
|
28
|
+
.lintingSource=${this.papyros.runner.lintSource.bind(this.papyros.runner)}
|
|
29
|
+
.indentLength=${this.papyros.constants.indentationSize}
|
|
30
|
+
.translations=${this.papyros.i18n.getTranslations("CodeMirror")}
|
|
31
|
+
.theme=${this.papyros.constants.CodeMirrorTheme}
|
|
32
|
+
.placeholder=${this.t("Papyros.code_placeholder", {
|
|
33
|
+
programmingLanguage: this.papyros.runner.programmingLanguage,
|
|
34
|
+
})}
|
|
35
|
+
.testLines=${this.papyros.test.testLines}
|
|
36
|
+
.testTranslations=${this.papyros.i18n.getTranslations("Papyros.editor.test_code")}
|
|
37
|
+
@edit-test-code=${() => this.papyros.test.editTestCode()}
|
|
38
|
+
@remove-test-code=${() => (this.papyros.test.testCode = undefined)}
|
|
39
|
+
@change=${(e) => (this.papyros.runner.effectiveCode = e.detail)}
|
|
40
|
+
></p-code-editor>
|
|
41
|
+
`;
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
Code = __decorate([
|
|
45
|
+
customElement("p-code")
|
|
46
|
+
], Code);
|
|
47
|
+
export { Code };
|
|
48
|
+
//# sourceMappingURL=Code.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Code.js","sourceRoot":"","sources":["../../../../src/frontend/components/code_runner/Code.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,GAAG,EAAa,IAAI,EAAkB,MAAM,KAAK,CAAC;AAC3D,OAAO,2BAA2B,CAAC;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAG5C,IAAM,IAAI,GAAV,MAAM,IAAK,SAAQ,cAAc;IACpC,MAAM,KAAK,MAAM;QACb,OAAO,GAAG,CAAA;;;;;SAKT,CAAC;IACN,CAAC;IAEkB,MAAM;QACrB,OAAO,IA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|
+
import { CSSResult, TemplateResult } from "lit";
|
|
3
|
+
import "@material/web/progress/circular-progress";
|
|
4
|
+
export declare class RunStateEl extends PapyrosElement {
|
|
5
|
+
static get styles(): CSSResult;
|
|
6
|
+
protected render(): TemplateResult;
|
|
7
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { customElement } from "lit/decorators.js";
|
|
8
|
+
import { PapyrosElement } from "../PapyrosElement";
|
|
9
|
+
import { RunState } from "../../state/Runner";
|
|
10
|
+
import { css, html } from "lit";
|
|
11
|
+
import "@material/web/progress/circular-progress";
|
|
12
|
+
let RunStateEl = class RunStateEl extends PapyrosElement {
|
|
13
|
+
static get styles() {
|
|
14
|
+
return css `
|
|
15
|
+
:host {
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
gap: 0.5rem;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
md-circular-progress {
|
|
22
|
+
--md-circular-progress-size: 2rem;
|
|
23
|
+
}
|
|
24
|
+
`;
|
|
25
|
+
}
|
|
26
|
+
render() {
|
|
27
|
+
if (!this.papyros.runner.stateMessage)
|
|
28
|
+
return html ``;
|
|
29
|
+
return html `
|
|
30
|
+
${this.papyros.runner.state === RunState.Ready
|
|
31
|
+
? ""
|
|
32
|
+
: html ` <md-circular-progress indeterminate></md-circular-progress> `}
|
|
33
|
+
${this.papyros.runner.stateMessage}
|
|
34
|
+
`;
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
RunStateEl = __decorate([
|
|
38
|
+
customElement("p-run-state")
|
|
39
|
+
], RunStateEl);
|
|
40
|
+
export { RunStateEl };
|
|
41
|
+
//# sourceMappingURL=RunState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RunState.js","sourceRoot":"","sources":["../../../../src/frontend/components/code_runner/RunState.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,GAAG,EAAa,IAAI,EAAkB,MAAM,KAAK,CAAC;AAC3D,OAAO,0CAA0C,CAAC;AAG3C,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,cAAc;IAC1C,MAAM,KAAK,MAAM;QACb,OAAO,GAAG,CAAA;;;;;;;;;;SAUT,CAAC;IACN,CAAC;IAEkB,MAAM;QACrB,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,YAAY;YAAE,OAAO,IAAI,CAAA,EAAE,CAAC;QAErD,OAAO,IAAI,CAAA;cACL,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,KAAK,QAAQ,CAAC,KAAK;YAC1C,CAAC,CAAC,EAAE;YACJ,CAAC,CAAC,IAAI,CAAA,+DAA+D;cACvE,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,YAAY;SACrC,CAAC;IACN,CAAC;CACJ,CAAA;AAzBY,UAAU;IADtB,aAAa,CAAC,aAAa,CAAC;GAChB,UAAU,CAyBtB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CSSResult, TemplateResult } from "lit";
|
|
2
|
+
import "../code_mirror/BatchInputEditor";
|
|
3
|
+
import { PapyrosElement } from "../PapyrosElement";
|
|
4
|
+
export declare class BatchInput extends PapyrosElement {
|
|
5
|
+
static get styles(): CSSResult;
|
|
6
|
+
get usedLines(): number | undefined;
|
|
7
|
+
get placeholder(): string;
|
|
8
|
+
protected render(): TemplateResult;
|
|
9
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { customElement } from "lit/decorators.js";
|
|
8
|
+
import { css, html } from "lit";
|
|
9
|
+
import "../code_mirror/BatchInputEditor";
|
|
10
|
+
import { RunState } from "../../state/Runner";
|
|
11
|
+
import { PapyrosElement } from "../PapyrosElement";
|
|
12
|
+
let BatchInput = class BatchInput extends PapyrosElement {
|
|
13
|
+
static get styles() {
|
|
14
|
+
return css `
|
|
15
|
+
:host {
|
|
16
|
+
width: 100%;
|
|
17
|
+
height: 100%;
|
|
18
|
+
overflow: auto;
|
|
19
|
+
display: block;
|
|
20
|
+
}
|
|
21
|
+
`;
|
|
22
|
+
}
|
|
23
|
+
get usedLines() {
|
|
24
|
+
if (this.papyros.debugger.active && this.papyros.debugger.debugUsedInputs !== undefined) {
|
|
25
|
+
return this.papyros.debugger.debugUsedInputs;
|
|
26
|
+
}
|
|
27
|
+
return this.papyros.io.inputs.length;
|
|
28
|
+
}
|
|
29
|
+
get placeholder() {
|
|
30
|
+
if (this.papyros.io.prompt) {
|
|
31
|
+
return this.papyros.io.prompt;
|
|
32
|
+
}
|
|
33
|
+
return this.t("Papyros.input_placeholder.batch");
|
|
34
|
+
}
|
|
35
|
+
render() {
|
|
36
|
+
return html `
|
|
37
|
+
<p-batch-input-editor
|
|
38
|
+
.value=${this.papyros.io.inputBuffer}
|
|
39
|
+
.usedLines=${this.usedLines}
|
|
40
|
+
.readOnly=${this.papyros.debugger.active && this.papyros.runner.state === RunState.Ready}
|
|
41
|
+
.placeholder=${this.placeholder}
|
|
42
|
+
.translations=${this.papyros.i18n.getTranslations("CodeMirror")}
|
|
43
|
+
.theme=${this.papyros.constants.CodeMirrorTheme}
|
|
44
|
+
@change=${(e) => (this.papyros.io.inputBuffer = e.detail)}
|
|
45
|
+
></p-batch-input-editor>
|
|
46
|
+
`;
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
BatchInput = __decorate([
|
|
50
|
+
customElement("p-batch-input")
|
|
51
|
+
], BatchInput);
|
|
52
|
+
export { BatchInput };
|
|
53
|
+
//# sourceMappingURL=BatchInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BatchInput.js","sourceRoot":"","sources":["../../../../src/frontend/components/input/BatchInput.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,GAAG,EAAa,IAAI,EAAkB,MAAM,KAAK,CAAC;AAC3D,OAAO,iCAAiC,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAG5C,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,cAAc;IAC1C,MAAM,KAAK,MAAM;QACb,OAAO,GAAG,CAAA;;;;;;;SAOT,CAAC;IACN,CAAC;IAED,IAAI,SAAS;QACT,IAAI,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,IAAI,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,eAAe,KAAK,SAAS,EAAE,CAAC;YACtF,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAC;QACjD,CAAC;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC;IACzC,CAAC;IAED,IAAI,WAAW;QACX,IAAI,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC;YACzB,OAAO,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,MAAM,CAAC;QAClC,CAAC;QACD,OAAO,IAAI,CAAC,CAAC,CAAC,iCAAiC,CAAC,CAAC;IACrD,CAAC;IAEkB,MAAM;QACrB,OAAO,IAAI,CAAA;;yBAEM,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,WAAW;6BACvB,IAAI,CAAC,SAAS;4BACf,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,KAAK,QAAQ,CAAC,KAAK;+BACzE,IAAI,CAAC,WAAW;gCACf,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC;yBACtD,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,eAAe;0BACrC,CAAC,CAAc,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;;SAE7E,CAAC;IACN,CAAC;CACJ,CAAA;AAvCY,UAAU;IADtB,aAAa,CAAC,eAAe,CAAC;GAClB,UAAU,CAuCtB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Ref } from "lit/directives/ref.js";
|
|
2
|
+
import { CSSResult, PropertyValues, TemplateResult } from "lit";
|
|
3
|
+
import { PapyrosElement } from "../PapyrosElement";
|
|
4
|
+
import "@material/web/textfield/outlined-text-field";
|
|
5
|
+
import "@material/web/button/outlined-button";
|
|
6
|
+
export declare class InteractiveInput extends PapyrosElement {
|
|
7
|
+
value: string;
|
|
8
|
+
inputRef: Ref<HTMLInputElement>;
|
|
9
|
+
static get styles(): CSSResult;
|
|
10
|
+
provideInput(): void;
|
|
11
|
+
protected updated(_changedProperties: PropertyValues): void;
|
|
12
|
+
protected render(): TemplateResult;
|
|
13
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { customElement, property } from "lit/decorators.js";
|
|
8
|
+
import { createRef, ref } from "lit/directives/ref.js";
|
|
9
|
+
import { css, html } from "lit";
|
|
10
|
+
import { PapyrosElement } from "../PapyrosElement";
|
|
11
|
+
import "@material/web/textfield/outlined-text-field";
|
|
12
|
+
import "@material/web/button/outlined-button";
|
|
13
|
+
let InteractiveInput = class InteractiveInput extends PapyrosElement {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
this.value = "";
|
|
17
|
+
this.inputRef = createRef();
|
|
18
|
+
}
|
|
19
|
+
static get styles() {
|
|
20
|
+
return css `
|
|
21
|
+
:host {
|
|
22
|
+
width: 100%;
|
|
23
|
+
display: flex;
|
|
24
|
+
gap: 0.5rem;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
md-outlined-text-field {
|
|
28
|
+
flex-grow: 1;
|
|
29
|
+
}
|
|
30
|
+
`;
|
|
31
|
+
}
|
|
32
|
+
provideInput() {
|
|
33
|
+
this.papyros.io.provideInput(this.value);
|
|
34
|
+
this.value = "";
|
|
35
|
+
}
|
|
36
|
+
updated(_changedProperties) {
|
|
37
|
+
super.updated(_changedProperties);
|
|
38
|
+
if (this.papyros.io.awaitingInput) {
|
|
39
|
+
this.inputRef.value.focus();
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
render() {
|
|
43
|
+
return html `
|
|
44
|
+
<md-outlined-text-field
|
|
45
|
+
type="text"
|
|
46
|
+
.value=${this.value}
|
|
47
|
+
@input=${(e) => (this.value = e.target.value)}
|
|
48
|
+
@keydown=${(e) => {
|
|
49
|
+
if (e.key === "Enter") {
|
|
50
|
+
e.preventDefault();
|
|
51
|
+
this.provideInput();
|
|
52
|
+
}
|
|
53
|
+
}}
|
|
54
|
+
placeholder=${this.papyros.io.prompt || this.t("Papyros.input_placeholder.interactive")}
|
|
55
|
+
?disabled=${!this.papyros.io.awaitingInput}
|
|
56
|
+
${ref(this.inputRef)}
|
|
57
|
+
></md-outlined-text-field>
|
|
58
|
+
<md-outlined-button @click=${() => this.provideInput()} ?disabled=${!this.papyros.io.awaitingInput}>
|
|
59
|
+
${this.t("Papyros.enter")}
|
|
60
|
+
</md-outlined-button>
|
|
61
|
+
`;
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
__decorate([
|
|
65
|
+
property({ state: true })
|
|
66
|
+
], InteractiveInput.prototype, "value", void 0);
|
|
67
|
+
InteractiveInput = __decorate([
|
|
68
|
+
customElement("p-interactive-input")
|
|
69
|
+
], InteractiveInput);
|
|
70
|
+
export { InteractiveInput };
|
|
71
|
+
//# sourceMappingURL=InteractiveInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InteractiveInput.js","sourceRoot":"","sources":["../../../../src/frontend/components/input/InteractiveInput.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAO,GAAG,EAAE,MAAM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,CAAC;4BAC3E,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,aAAa;kBACxC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;;yCAEK,GAAG,EAAE,CAAC,IAAI,CAAC,YAAY,EAAE,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,aAAa;kBAC5F,IAAI,CAAC,CAAC,CAAC,eAAe,CAAC;;SAEhC,CAAC;IACN,CAAC;CACJ,CAAA;AAlD8B;IAA1B,QAAQ,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;+CAAoB;AADrC,gBAAgB;IAD5B,aAAa,CAAC,qBAAqB,CAAC;GACxB,gBAAgB,CAmD5B"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { State } from "@dodona/lit-state";
|
|
2
|
+
import { CSSResult } from "lit";
|
|
3
|
+
import { Extension } from "@codemirror/state";
|
|
4
|
+
export type ThemeOption = {
|
|
5
|
+
theme: CSSResult;
|
|
6
|
+
dark: boolean;
|
|
7
|
+
name: string;
|
|
8
|
+
};
|
|
9
|
+
export declare class Constants extends State {
|
|
10
|
+
/**
|
|
11
|
+
* The maximum length of the output (in lines).
|
|
12
|
+
* Default is 1000 lines.
|
|
13
|
+
* If the output exceeds this length, it will be truncated.
|
|
14
|
+
* Overflowing output will be downloadable.
|
|
15
|
+
*/
|
|
16
|
+
maxOutputLength: number;
|
|
17
|
+
/**
|
|
18
|
+
* The maximum number of debug frames
|
|
19
|
+
* Default is 10000 frames.
|
|
20
|
+
* If the number of frames exceeds this limit, execution will be stopped.
|
|
21
|
+
*/
|
|
22
|
+
maxDebugFrames: number;
|
|
23
|
+
icons: {
|
|
24
|
+
debug: import("lit-html").TemplateResult<1>;
|
|
25
|
+
run: import("lit-html").TemplateResult<1>;
|
|
26
|
+
doctest: import("lit-html").TemplateResult<1>;
|
|
27
|
+
stop: import("lit-html").TemplateResult<1>;
|
|
28
|
+
stopDebug: import("lit-html").TemplateResult<1>;
|
|
29
|
+
info: import("lit-html").TemplateResult<1>;
|
|
30
|
+
help: import("lit-html").TemplateResult<1>;
|
|
31
|
+
};
|
|
32
|
+
indentationSize: number;
|
|
33
|
+
CodeMirrorTheme: Extension;
|
|
34
|
+
themes: Record<string, ThemeOption>;
|
|
35
|
+
private _activeThemeName;
|
|
36
|
+
get activeTheme(): ThemeOption;
|
|
37
|
+
set activeTheme(value: ThemeOption);
|
|
38
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { State, stateProperty } from "@dodona/lit-state";
|
|
8
|
+
import { RunMode } from "../../backend/Backend";
|
|
9
|
+
import { html } from "lit";
|
|
10
|
+
import { material } from "../components/code_mirror/MaterialTheme";
|
|
11
|
+
import blueLight from "./themes/blue-light";
|
|
12
|
+
import blueDark from "./themes/blue-dark";
|
|
13
|
+
import greenLight from "./themes/green-light";
|
|
14
|
+
import greenDark from "./themes/green-dark";
|
|
15
|
+
import redLight from "./themes/red-light";
|
|
16
|
+
import redDark from "./themes/red-dark";
|
|
17
|
+
export class Constants extends State {
|
|
18
|
+
constructor() {
|
|
19
|
+
super(...arguments);
|
|
20
|
+
/**
|
|
21
|
+
* The maximum length of the output (in lines).
|
|
22
|
+
* Default is 1000 lines.
|
|
23
|
+
* If the output exceeds this length, it will be truncated.
|
|
24
|
+
* Overflowing output will be downloadable.
|
|
25
|
+
*/
|
|
26
|
+
this.maxOutputLength = 1000;
|
|
27
|
+
/**
|
|
28
|
+
* The maximum number of debug frames
|
|
29
|
+
* Default is 10000 frames.
|
|
30
|
+
* If the number of frames exceeds this limit, execution will be stopped.
|
|
31
|
+
*/
|
|
32
|
+
this.maxDebugFrames = 10000;
|
|
33
|
+
this.icons = {
|
|
34
|
+
[RunMode.Debug]: html ` <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
|
35
|
+
<path
|
|
36
|
+
d="M19 7H16.19C15.74 6.2 15.12 5.5 14.37 5L16 3.41L14.59 2L12.42 4.17C11.96 4.06 11.5 4 11 4S10.05 4.06 9.59 4.17L7.41 2L6 3.41L7.62 5C6.87 5.5 6.26 6.21 5.81 7H3V9H5.09C5.03 9.33 5 9.66 5 10V11H3V13H5V14C5 14.34 5.03 14.67 5.09 15H3V17H5.81C7.26 19.5 10.28 20.61 13 19.65V19C13 18.43 13.09 17.86 13.25 17.31C12.59 17.76 11.8 18 11 18C8.79 18 7 16.21 7 14V10C7 7.79 8.79 6 11 6S15 7.79 15 10V14C15 14.19 15 14.39 14.95 14.58C15.54 14.04 16.24 13.62 17 13.35V13H19V11H17V10C17 9.66 16.97 9.33 16.91 9H19V7M13 9V11H9V9H13M13 13V15H9V13H13M17 16V22L22 19L17 16Z"
|
|
37
|
+
/>
|
|
38
|
+
</svg>`,
|
|
39
|
+
[RunMode.Run]: html ` <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
|
40
|
+
<path d="M8,5.14V19.14L19,12.14L8,5.14Z" />
|
|
41
|
+
</svg>`,
|
|
42
|
+
[RunMode.Doctest]: html ` <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
|
43
|
+
<path d="M8,5.14V19.14L19,12.14L8,5.14Z" />
|
|
44
|
+
</svg>`,
|
|
45
|
+
stop: html ` <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
|
46
|
+
<path d="M18,18H6V6H18V18Z" />
|
|
47
|
+
</svg>`,
|
|
48
|
+
stopDebug: html ` <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
|
49
|
+
<path
|
|
50
|
+
d="M19 7H16.19C15.74 6.2 15.12 5.5 14.37 5L16 3.41L14.59 2L12.42 4.17C11.96 4.06 11.5 4 11 4S10.05 4.06 9.59 4.17L7.41 2L6 3.41L7.62 5C6.87 5.5 6.26 6.21 5.81 7H3V9H5.09C5.03 9.33 5 9.66 5 10V11H3V13H5V14C5 14.34 5.03 14.67 5.09 15H3V17H5.81C7.26 19.5 10.28 20.61 13 19.65V19C13 18.43 13.09 17.86 13.25 17.31C12.59 17.76 11.8 18 11 18C8.79 18 7 16.21 7 14V10C7 7.79 8.79 6 11 6S15 7.79 15 10V14C15 14.19 15 14.39 14.95 14.58C15.54 14.04 16.24 13.62 17 13.35V13H19V11H17V10C17 9.66 16.97 9.33 16.91 9H19V7M13 9V11H9V9H13M13 13V15H9V13H13M16 16H22V22H16V16Z"
|
|
51
|
+
/>
|
|
52
|
+
</svg>`,
|
|
53
|
+
info: html `
|
|
54
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="currentColor">
|
|
55
|
+
<path
|
|
56
|
+
d="M440-280h80v-240h-80v240Zm40-320q17 0 28.5-11.5T520-640q0-17-11.5-28.5T480-680q-17 0-28.5 11.5T440-640q0 17 11.5 28.5T480-600Zm0 520q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z"
|
|
57
|
+
/>
|
|
58
|
+
</svg>
|
|
59
|
+
`,
|
|
60
|
+
help: html `
|
|
61
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="currentColor">
|
|
62
|
+
<path
|
|
63
|
+
d="M478-240q21 0 35.5-14.5T528-290q0-21-14.5-35.5T478-340q-21 0-35.5 14.5T428-290q0 21 14.5 35.5T478-240Zm-36-154h74q0-33 7.5-52t42.5-52q26-26 41-49.5t15-56.5q0-56-41-86t-97-30q-57 0-92.5 30T342-618l66 26q5-18 22.5-39t53.5-21q32 0 48 17.5t16 38.5q0 20-12 37.5T506-526q-44 39-54 59t-10 73Zm38 314q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z"
|
|
64
|
+
/>
|
|
65
|
+
</svg>
|
|
66
|
+
`,
|
|
67
|
+
};
|
|
68
|
+
this.indentationSize = 4;
|
|
69
|
+
this.CodeMirrorTheme = material;
|
|
70
|
+
this.themes = {
|
|
71
|
+
"Blue Light": { theme: blueLight, dark: false, name: "Blue Light" },
|
|
72
|
+
"Blue Dark": { theme: blueDark, dark: true, name: "Blue Dark" },
|
|
73
|
+
"Green Light": { theme: greenLight, dark: false, name: "Green Light" },
|
|
74
|
+
"Green Dark": { theme: greenDark, dark: true, name: "Green Dark" },
|
|
75
|
+
"Red Light": { theme: redLight, dark: false, name: "Red Light" },
|
|
76
|
+
"Red Dark": { theme: redDark, dark: true, name: "Red Dark" },
|
|
77
|
+
};
|
|
78
|
+
this._activeThemeName = "Blue Light";
|
|
79
|
+
}
|
|
80
|
+
get activeTheme() {
|
|
81
|
+
return this.themes[this._activeThemeName];
|
|
82
|
+
}
|
|
83
|
+
set activeTheme(value) {
|
|
84
|
+
this._activeThemeName = value.name;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
__decorate([
|
|
88
|
+
stateProperty
|
|
89
|
+
], Constants.prototype, "maxOutputLength", void 0);
|
|
90
|
+
__decorate([
|
|
91
|
+
stateProperty
|
|
92
|
+
], Constants.prototype, "maxDebugFrames", void 0);
|
|
93
|
+
__decorate([
|
|
94
|
+
stateProperty
|
|
95
|
+
], Constants.prototype, "icons", void 0);
|
|
96
|
+
__decorate([
|
|
97
|
+
stateProperty
|
|
98
|
+
], Constants.prototype, "indentationSize", void 0);
|
|
99
|
+
__decorate([
|
|
100
|
+
stateProperty
|
|
101
|
+
], Constants.prototype, "CodeMirrorTheme", void 0);
|
|
102
|
+
__decorate([
|
|
103
|
+
stateProperty
|
|
104
|
+
], Constants.prototype, "themes", void 0);
|
|
105
|
+
__decorate([
|
|
106
|
+
stateProperty
|
|
107
|
+
], Constants.prototype, "_activeThemeName", void 0);
|
|
108
|
+
__decorate([
|
|
109
|
+
stateProperty
|
|
110
|
+
], Constants.prototype, "activeTheme", null);
|
|
111
|
+
//# sourceMappingURL=Constants.js.map
|