@dodona/papyros 3.0.2 → 4.0.0-beta.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/README.md +133 -72
- package/dist/Components.d.ts +4 -0
- package/dist/Components.js +5 -0
- package/dist/Components.js.map +1 -0
- package/dist/Papyros.d.ts +18 -127
- package/dist/Papyros.js +39 -211
- package/dist/Papyros.js.map +1 -1
- package/dist/{Backend.d.ts → backend/Backend.d.ts} +3 -12
- package/dist/{Backend.js → backend/Backend.js} +4 -17
- package/dist/backend/Backend.js.map +1 -0
- package/dist/{workers → backend/workers}/javascript/JavaScriptWorker.js +1 -1
- package/dist/backend/workers/javascript/JavaScriptWorker.js.map +1 -0
- package/dist/backend/workers/javascript/worker.js.map +1 -0
- package/dist/{workers → backend/workers}/python/PythonWorker.d.ts +2 -2
- package/dist/{workers → backend/workers}/python/PythonWorker.js +2 -2
- 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.js.map +1 -0
- package/dist/communication/BackendEvent.js.map +1 -0
- package/dist/{BackendEventQueue.d.ts → communication/BackendEventQueue.d.ts} +1 -36
- package/dist/{BackendEventQueue.js → communication/BackendEventQueue.js} +2 -45
- package/dist/communication/BackendEventQueue.js.map +1 -0
- package/dist/{BackendManager.d.ts → communication/BackendManager.d.ts} +2 -2
- package/dist/{BackendManager.js → communication/BackendManager.js} +4 -4
- package/dist/communication/BackendManager.js.map +1 -0
- package/dist/communication/InputServiceWorker.js +37 -0
- package/dist/communication/InputServiceWorker.js.map +1 -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 +62 -0
- package/dist/frontend/components/Debugger.js.map +1 -0
- package/dist/frontend/components/Input.d.ts +17 -0
- package/dist/frontend/components/Input.js +73 -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 +154 -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 +204 -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 +35 -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 +35 -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 +39 -0
- package/dist/frontend/components/app/ProgrammingLanguagePicker.js.map +1 -0
- package/dist/frontend/components/app/examples/JavaScriptExamples.js.map +1 -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 +47 -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 +43 -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 +54 -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 +206 -0
- package/dist/frontend/components/code_mirror/CodeEditor.js.map +1 -0
- package/dist/frontend/components/code_mirror/CodeMirrorEditor.d.ts +20 -0
- package/dist/frontend/components/code_mirror/CodeMirrorEditor.js +99 -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 +169 -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 +109 -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 +76 -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 +46 -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 +19 -0
- package/dist/frontend/components/input/BatchInput.js +92 -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 +73 -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 +108 -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 +80 -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 +55 -0
- package/dist/frontend/state/InputOutput.js +93 -0
- package/dist/frontend/state/InputOutput.js.map +1 -0
- package/dist/frontend/state/Runner.d.ts +118 -0
- package/dist/frontend/state/Runner.js +334 -0
- package/dist/frontend/state/Runner.js.map +1 -0
- package/dist/frontend/state/Test.d.ts +11 -0
- package/dist/frontend/state/Test.js +59 -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 +188 -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 +55 -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 +55 -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 +55 -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 +55 -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 +55 -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 +55 -0
- package/dist/frontend/state/themes/red-light.js.map +1 -0
- package/dist/util/Util.d.ts +1 -4
- package/dist/util/Util.js +7 -8
- package/dist/util/Util.js.map +1 -1
- package/package.json +13 -21
- package/dist/App.d.ts +0 -1
- package/dist/App.js +0 -76
- package/dist/App.js.map +0 -1
- package/dist/Backend.js.map +0 -1
- package/dist/BackendEvent.js.map +0 -1
- package/dist/BackendEventQueue.js.map +0 -1
- package/dist/BackendManager.js.map +0 -1
- package/dist/CodeRunner.d.ts +0 -188
- package/dist/CodeRunner.js +0 -548
- package/dist/CodeRunner.js.map +0 -1
- package/dist/Constants.d.ts +0 -31
- package/dist/Constants.js +0 -36
- package/dist/Constants.js.map +0 -1
- package/dist/Debugger.d.ts +0 -18
- package/dist/Debugger.js +0 -86
- package/dist/Debugger.js.map +0 -1
- package/dist/InputManager.d.ts +0 -38
- package/dist/InputManager.js +0 -101
- package/dist/InputManager.js.map +0 -1
- package/dist/InputServiceWorker.js.map +0 -1
- package/dist/Library.d.ts +0 -12
- package/dist/Library.js +0 -9
- package/dist/Library.js.map +0 -1
- package/dist/OutputManager.d.ts +0 -90
- package/dist/OutputManager.js +0 -172
- package/dist/OutputManager.js.map +0 -1
- package/dist/Papyros.css +0 -657
- package/dist/Translations.d.ts +0 -180
- package/dist/Translations.js +0 -191
- package/dist/Translations.js.map +0 -1
- package/dist/editor/BatchInputEditor.d.ts +0 -41
- package/dist/editor/BatchInputEditor.js +0 -80
- package/dist/editor/BatchInputEditor.js.map +0 -1
- package/dist/editor/CodeEditor.d.ts +0 -81
- package/dist/editor/CodeEditor.js +0 -213
- package/dist/editor/CodeEditor.js.map +0 -1
- package/dist/editor/CodeMirrorEditor.d.ts +0 -133
- package/dist/editor/CodeMirrorEditor.js +0 -169
- package/dist/editor/CodeMirrorEditor.js.map +0 -1
- package/dist/editor/DarkTheme.d.ts +0 -1
- package/dist/editor/DarkTheme.js +0 -72
- package/dist/editor/DarkTheme.js.map +0 -1
- package/dist/editor/DebugExtension.d.ts +0 -11
- package/dist/editor/DebugExtension.js +0 -70
- package/dist/editor/DebugExtension.js.map +0 -1
- package/dist/editor/Gutters.d.ts +0 -109
- package/dist/editor/Gutters.js +0 -201
- package/dist/editor/Gutters.js.map +0 -1
- package/dist/editor/LineEffectExtension.d.ts +0 -13
- package/dist/editor/LineEffectExtension.js +0 -48
- package/dist/editor/LineEffectExtension.js.map +0 -1
- package/dist/editor/TestCodeExtension.d.ts +0 -21
- package/dist/editor/TestCodeExtension.js +0 -134
- package/dist/editor/TestCodeExtension.js.map +0 -1
- package/dist/examples/Examples.d.ts +0 -6
- package/dist/examples/Examples.js +0 -23
- package/dist/examples/Examples.js.map +0 -1
- package/dist/examples/JavaScriptExamples.js.map +0 -1
- package/dist/examples/PythonExamples.js.map +0 -1
- package/dist/input/BatchInputHandler.d.ts +0 -55
- package/dist/input/BatchInputHandler.js +0 -131
- package/dist/input/BatchInputHandler.js.map +0 -1
- package/dist/input/InteractiveInputHandler.d.ts +0 -27
- package/dist/input/InteractiveInputHandler.js +0 -89
- package/dist/input/InteractiveInputHandler.js.map +0 -1
- package/dist/input/UserInputHandler.d.ts +0 -68
- package/dist/input/UserInputHandler.js +0 -39
- package/dist/input/UserInputHandler.js.map +0 -1
- package/dist/util/HTMLShapes.d.ts +0 -15
- package/dist/util/HTMLShapes.js +0 -25
- package/dist/util/HTMLShapes.js.map +0 -1
- package/dist/util/Rendering.d.ts +0 -120
- package/dist/util/Rendering.js +0 -142
- package/dist/util/Rendering.js.map +0 -1
- package/dist/workers/input/InputWorker.js.map +0 -1
- package/dist/workers/javascript/JavaScriptWorker.js.map +0 -1
- package/dist/workers/javascript/worker.js.map +0 -1
- package/dist/workers/python/PythonWorker.js.map +0 -1
- package/dist/workers/python/python_package.tar.gz.load_by_url +0 -0
- package/dist/workers/python/worker.js.map +0 -1
- /package/dist/{workers → backend/workers}/javascript/JavaScriptWorker.d.ts +0 -0
- /package/dist/{workers → backend/workers}/javascript/worker.d.ts +0 -0
- /package/dist/{workers → backend/workers}/javascript/worker.js +0 -0
- /package/dist/{workers → backend/workers}/python/worker.d.ts +0 -0
- /package/dist/{workers → backend/workers}/python/worker.js +0 -0
- /package/dist/{BackendEvent.d.ts → communication/BackendEvent.d.ts} +0 -0
- /package/dist/{BackendEvent.js → communication/BackendEvent.js} +0 -0
- /package/dist/{InputServiceWorker.d.ts → communication/InputServiceWorker.d.ts} +0 -0
- /package/dist/{workers/input → communication}/InputWorker.d.ts +0 -0
- /package/dist/{workers/input → communication}/InputWorker.js +0 -0
- /package/dist/{examples → frontend/components/app/examples}/JavaScriptExamples.d.ts +0 -0
- /package/dist/{examples → frontend/components/app/examples}/JavaScriptExamples.js +0 -0
- /package/dist/{examples → frontend/components/app/examples}/PythonExamples.d.ts +0 -0
- /package/dist/{examples → frontend/components/app/examples}/PythonExamples.js +0 -0
package/dist/Translations.d.ts
DELETED
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
export declare const TRANSLATIONS: {
|
|
2
|
-
en: {
|
|
3
|
-
Papyros: {
|
|
4
|
-
Papyros: string;
|
|
5
|
-
code: string;
|
|
6
|
-
code_placeholder: string;
|
|
7
|
-
input: string;
|
|
8
|
-
input_placeholder: {
|
|
9
|
-
interactive: string;
|
|
10
|
-
batch: string;
|
|
11
|
-
};
|
|
12
|
-
input_disabled: string;
|
|
13
|
-
output: string;
|
|
14
|
-
output_placeholder: string;
|
|
15
|
-
stop: string;
|
|
16
|
-
finished: string;
|
|
17
|
-
interrupted: string;
|
|
18
|
-
states: {
|
|
19
|
-
running: string;
|
|
20
|
-
stopping: string;
|
|
21
|
-
loading: string;
|
|
22
|
-
awaiting_input: string;
|
|
23
|
-
ready: string;
|
|
24
|
-
};
|
|
25
|
-
programming_language: string;
|
|
26
|
-
programming_languages: {
|
|
27
|
-
Python: string;
|
|
28
|
-
JavaScript: string;
|
|
29
|
-
};
|
|
30
|
-
locales: {
|
|
31
|
-
en: string;
|
|
32
|
-
nl: string;
|
|
33
|
-
};
|
|
34
|
-
switch_input_mode_to: {
|
|
35
|
-
interactive: string;
|
|
36
|
-
batch: string;
|
|
37
|
-
};
|
|
38
|
-
enter: string;
|
|
39
|
-
examples: string;
|
|
40
|
-
dark_mode: string;
|
|
41
|
-
output_overflow: string;
|
|
42
|
-
output_overflow_download: string;
|
|
43
|
-
no_output: string;
|
|
44
|
-
service_worker_error: string;
|
|
45
|
-
launch_error: string;
|
|
46
|
-
loading: string;
|
|
47
|
-
run_modes: {
|
|
48
|
-
doctest: string;
|
|
49
|
-
debug: string;
|
|
50
|
-
run: string;
|
|
51
|
-
};
|
|
52
|
-
used_input: string;
|
|
53
|
-
used_input_with_prompt: string;
|
|
54
|
-
debugger: {
|
|
55
|
-
title: string;
|
|
56
|
-
text_1: string;
|
|
57
|
-
text_2: string;
|
|
58
|
-
};
|
|
59
|
-
editor: {
|
|
60
|
-
test_code: {
|
|
61
|
-
description: string;
|
|
62
|
-
edit: string;
|
|
63
|
-
remove: string;
|
|
64
|
-
};
|
|
65
|
-
};
|
|
66
|
-
debug: {
|
|
67
|
-
stop: string;
|
|
68
|
-
};
|
|
69
|
-
};
|
|
70
|
-
};
|
|
71
|
-
nl: {
|
|
72
|
-
Papyros: {
|
|
73
|
-
Papyros: string;
|
|
74
|
-
code: string;
|
|
75
|
-
code_placeholder: string;
|
|
76
|
-
input: string;
|
|
77
|
-
input_placeholder: {
|
|
78
|
-
interactive: string;
|
|
79
|
-
batch: string;
|
|
80
|
-
};
|
|
81
|
-
input_disabled: string;
|
|
82
|
-
output: string;
|
|
83
|
-
output_placeholder: string;
|
|
84
|
-
stop: string;
|
|
85
|
-
states: {
|
|
86
|
-
running: string;
|
|
87
|
-
stopping: string;
|
|
88
|
-
loading: string;
|
|
89
|
-
awaiting_input: string;
|
|
90
|
-
ready: string;
|
|
91
|
-
};
|
|
92
|
-
finished: string;
|
|
93
|
-
interrupted: string;
|
|
94
|
-
programming_language: string;
|
|
95
|
-
programming_languages: {
|
|
96
|
-
Python: string;
|
|
97
|
-
JavaScript: string;
|
|
98
|
-
};
|
|
99
|
-
locales: {
|
|
100
|
-
en: string;
|
|
101
|
-
nl: string;
|
|
102
|
-
};
|
|
103
|
-
switch_input_mode_to: {
|
|
104
|
-
interactive: string;
|
|
105
|
-
batch: string;
|
|
106
|
-
};
|
|
107
|
-
enter: string;
|
|
108
|
-
examples: string;
|
|
109
|
-
dark_mode: string;
|
|
110
|
-
output_overflow: string;
|
|
111
|
-
output_overflow_download: string;
|
|
112
|
-
no_output: string;
|
|
113
|
-
service_worker_error: string;
|
|
114
|
-
launch_error: string;
|
|
115
|
-
loading: string;
|
|
116
|
-
run_modes: {
|
|
117
|
-
doctest: string;
|
|
118
|
-
debug: string;
|
|
119
|
-
run: string;
|
|
120
|
-
};
|
|
121
|
-
used_input: string;
|
|
122
|
-
used_input_with_prompt: string;
|
|
123
|
-
debugger: {
|
|
124
|
-
title: string;
|
|
125
|
-
text_1: string;
|
|
126
|
-
text_2: string;
|
|
127
|
-
};
|
|
128
|
-
editor: {
|
|
129
|
-
test_code: {
|
|
130
|
-
description: string;
|
|
131
|
-
edit: string;
|
|
132
|
-
remove: string;
|
|
133
|
-
};
|
|
134
|
-
};
|
|
135
|
-
debug: {
|
|
136
|
-
stop: string;
|
|
137
|
-
};
|
|
138
|
-
};
|
|
139
|
-
};
|
|
140
|
-
};
|
|
141
|
-
export declare const CODE_MIRROR_TRANSLATIONS: {
|
|
142
|
-
en: {
|
|
143
|
-
"Go to line": string;
|
|
144
|
-
go: string;
|
|
145
|
-
Find: string;
|
|
146
|
-
Replace: string;
|
|
147
|
-
next: string;
|
|
148
|
-
previous: string;
|
|
149
|
-
all: string;
|
|
150
|
-
"match case": string;
|
|
151
|
-
replace: string;
|
|
152
|
-
"replace all": string;
|
|
153
|
-
close: string;
|
|
154
|
-
};
|
|
155
|
-
nl: {
|
|
156
|
-
"Control character": string;
|
|
157
|
-
"Folded lines": string;
|
|
158
|
-
"Unfolded lines": string;
|
|
159
|
-
to: string;
|
|
160
|
-
"folded code": string;
|
|
161
|
-
unfold: string;
|
|
162
|
-
"Fold line": string;
|
|
163
|
-
"Unfold line": string;
|
|
164
|
-
"Go to line": string;
|
|
165
|
-
go: string;
|
|
166
|
-
Find: string;
|
|
167
|
-
Replace: string;
|
|
168
|
-
next: string;
|
|
169
|
-
previous: string;
|
|
170
|
-
all: string;
|
|
171
|
-
"match case": string;
|
|
172
|
-
replace: string;
|
|
173
|
-
"replace all": string;
|
|
174
|
-
close: string;
|
|
175
|
-
"current match": string;
|
|
176
|
-
"on line": string;
|
|
177
|
-
Diagnostics: string;
|
|
178
|
-
"No diagnostics": string;
|
|
179
|
-
};
|
|
180
|
-
};
|
package/dist/Translations.js
DELETED
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
// Empty strings are considered missing by i18n-extract
|
|
2
|
-
// Therefore the ready-key is an explicit space now, which is still invisible
|
|
3
|
-
const ENGLISH_TRANSLATION = {
|
|
4
|
-
"Papyros": "Papyros",
|
|
5
|
-
"code": "Code",
|
|
6
|
-
"code_placeholder": "Write your %{programmingLanguage} code here and click 'Run' to execute...",
|
|
7
|
-
"input": "Input",
|
|
8
|
-
"input_placeholder": {
|
|
9
|
-
"interactive": "Provide input and press enter to send",
|
|
10
|
-
"batch": "Provide all input required by your code here.\n" +
|
|
11
|
-
"You can enter multiple lines by pressing enter."
|
|
12
|
-
},
|
|
13
|
-
"input_disabled": "You can only provide input when your code requires it in interactive mode",
|
|
14
|
-
"output": "Output",
|
|
15
|
-
"output_placeholder": "The output of your code will appear here.",
|
|
16
|
-
"stop": "Stop",
|
|
17
|
-
"finished": "Code executed in %{time} s",
|
|
18
|
-
"interrupted": "Code interrupted after %{time} s",
|
|
19
|
-
"states": {
|
|
20
|
-
"running": "Running",
|
|
21
|
-
"stopping": "Stopping",
|
|
22
|
-
"loading": "Loading",
|
|
23
|
-
"awaiting_input": "Awaiting input",
|
|
24
|
-
"ready": "",
|
|
25
|
-
},
|
|
26
|
-
"programming_language": "Programming language",
|
|
27
|
-
"programming_languages": {
|
|
28
|
-
"Python": "Python",
|
|
29
|
-
"JavaScript": "JavaScript"
|
|
30
|
-
},
|
|
31
|
-
"locales": {
|
|
32
|
-
"en": "English",
|
|
33
|
-
"nl": "Nederlands"
|
|
34
|
-
},
|
|
35
|
-
"switch_input_mode_to": {
|
|
36
|
-
"interactive": "Switch to interactive mode",
|
|
37
|
-
"batch": "Switch to batch input"
|
|
38
|
-
},
|
|
39
|
-
"enter": "Enter",
|
|
40
|
-
"examples": "Examples",
|
|
41
|
-
"dark_mode": "Dark mode",
|
|
42
|
-
"output_overflow": "Output truncated. No more results will be shown.",
|
|
43
|
-
"output_overflow_download": "Click here to download the results.",
|
|
44
|
-
"no_output": "The code did not produce any output.",
|
|
45
|
-
"service_worker_error": "The service worker failed to load.",
|
|
46
|
-
"launch_error": "Papyros failed to load. Do you want to reload?",
|
|
47
|
-
"loading": "Loading %{packages}.",
|
|
48
|
-
"run_modes": {
|
|
49
|
-
"doctest": "Run doctests",
|
|
50
|
-
"debug": "Debug",
|
|
51
|
-
"run": "Run"
|
|
52
|
-
},
|
|
53
|
-
"used_input": "This line has already been used as input.",
|
|
54
|
-
"used_input_with_prompt": "This line was used as input for the following prompt: %{prompt}",
|
|
55
|
-
"debugger": {
|
|
56
|
-
"title": "Drag the slider to walk through your code.",
|
|
57
|
-
"text_1": "This window shows how your program works step by step. Explore to see how your program builds and stores information.",
|
|
58
|
-
"text_2": "You can also use the %{previous} and %{next} buttons to go to the previous or next step. The %{first} and %{last} buttons can be used to directly jump to the first or last step respectively."
|
|
59
|
-
},
|
|
60
|
-
"editor": {
|
|
61
|
-
"test_code": {
|
|
62
|
-
"description": "# Appended testcase code for debugging purposes",
|
|
63
|
-
"edit": "Edit",
|
|
64
|
-
"remove": "Remove"
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
"debug": {
|
|
68
|
-
"stop": "Stop debugging"
|
|
69
|
-
},
|
|
70
|
-
};
|
|
71
|
-
const DUTCH_TRANSLATION = {
|
|
72
|
-
"Papyros": "Papyros",
|
|
73
|
-
"code": "Code",
|
|
74
|
-
"code_placeholder": "Schrijf hier je %{programmingLanguage} code en klik op 'Uitvoeren' om uit te voeren...",
|
|
75
|
-
"input": "Invoer",
|
|
76
|
-
"input_placeholder": {
|
|
77
|
-
"interactive": "Geef invoer in en druk op enter",
|
|
78
|
-
"batch": "Geef hier alle invoer die je code nodig heeft vooraf in.\n" +
|
|
79
|
-
"Je kan verschillende lijnen ingeven door op enter te drukken."
|
|
80
|
-
},
|
|
81
|
-
"input_disabled": "Je kan enkel invoer invullen als je code erom vraagt in interactieve modus",
|
|
82
|
-
"output": "Uitvoer",
|
|
83
|
-
"output_placeholder": "Hier komt de uitvoer van je code.",
|
|
84
|
-
"stop": "Stop",
|
|
85
|
-
"states": {
|
|
86
|
-
"running": "Aan het uitvoeren",
|
|
87
|
-
"stopping": "Aan het stoppen",
|
|
88
|
-
"loading": "Aan het laden",
|
|
89
|
-
"awaiting_input": "Aan het wachten op invoer",
|
|
90
|
-
"ready": "",
|
|
91
|
-
},
|
|
92
|
-
"finished": "Code uitgevoerd in %{time} s",
|
|
93
|
-
"interrupted": "Code onderbroken na %{time} s",
|
|
94
|
-
"programming_language": "Programmeertaal",
|
|
95
|
-
"programming_languages": {
|
|
96
|
-
"Python": "Python",
|
|
97
|
-
"JavaScript": "JavaScript"
|
|
98
|
-
},
|
|
99
|
-
"locales": {
|
|
100
|
-
"en": "English",
|
|
101
|
-
"nl": "Nederlands"
|
|
102
|
-
},
|
|
103
|
-
"switch_input_mode_to": {
|
|
104
|
-
"interactive": "Wisselen naar interactieve invoer",
|
|
105
|
-
"batch": "Geef invoer vooraf in"
|
|
106
|
-
},
|
|
107
|
-
"enter": "Enter",
|
|
108
|
-
"examples": "Voorbeelden",
|
|
109
|
-
"dark_mode": "Donkere modus",
|
|
110
|
-
"output_overflow": "Uitvoer ingekort. Er zullen geen nieuwe resultaten getoond worden.",
|
|
111
|
-
"output_overflow_download": "Klik hier om de resultaten te downloaden.",
|
|
112
|
-
"no_output": "De code produceerde geen uitvoer.",
|
|
113
|
-
"service_worker_error": "Er liep iets fout bij het laden van de service worker.",
|
|
114
|
-
"launch_error": "Er liep iets fout bij het laden van Papyros. Wil je herladen?",
|
|
115
|
-
"loading": "Bezig met het installeren van %{packages}.",
|
|
116
|
-
"run_modes": {
|
|
117
|
-
"doctest": "Doctests uitvoeren",
|
|
118
|
-
"debug": "Debuggen",
|
|
119
|
-
"run": "Uitvoeren"
|
|
120
|
-
},
|
|
121
|
-
"used_input": "Deze regel werd al gebruikt als invoer.",
|
|
122
|
-
"used_input_with_prompt": "Deze regel werd gebruikt als invoer voor de volgende vraag: %{prompt}",
|
|
123
|
-
"debugger": {
|
|
124
|
-
"title": "Verken je code stap voor stap",
|
|
125
|
-
"text_1": "Dit venster toont de werking van je programma in detail. Ontdek hoe je programma informatie opbouwt en bewaart.",
|
|
126
|
-
"text_2": "Gebruik de schuifbalk om door je code te wandelen. Je kan ook de %{previous} en %{next} knoppen gebruiken om naar de vorige of volgende stap te gaan. De %{first} en %{last} knoppen kunnen gebruikt worden om direct naar de eerste of laatste stap te gaan."
|
|
127
|
-
},
|
|
128
|
-
"editor": {
|
|
129
|
-
"test_code": {
|
|
130
|
-
"description": "# Toegevoegde testcase code voor debugdoeleinden",
|
|
131
|
-
"edit": "Bewerk",
|
|
132
|
-
"remove": "Verwijder"
|
|
133
|
-
}
|
|
134
|
-
},
|
|
135
|
-
"debug": {
|
|
136
|
-
"stop": "Stop debugger"
|
|
137
|
-
},
|
|
138
|
-
};
|
|
139
|
-
// Override some default English phrases to also use capitalized text
|
|
140
|
-
const ENGLISH_PHRASES = {
|
|
141
|
-
// @codemirror/search
|
|
142
|
-
"Go to line": "Go to line",
|
|
143
|
-
"go": "OK",
|
|
144
|
-
"Find": "Find",
|
|
145
|
-
"Replace": "Replace",
|
|
146
|
-
"next": "Next",
|
|
147
|
-
"previous": "Previous",
|
|
148
|
-
"all": "All",
|
|
149
|
-
"match case": "match case",
|
|
150
|
-
"replace": "Replace",
|
|
151
|
-
"replace all": "Replace all",
|
|
152
|
-
"close": "Sluiten",
|
|
153
|
-
};
|
|
154
|
-
const DUTCH_PHRASES = {
|
|
155
|
-
// @codemirror/view
|
|
156
|
-
"Control character": "Controlekarakter",
|
|
157
|
-
// @codemirror/fold
|
|
158
|
-
"Folded lines": "Ingeklapte regels",
|
|
159
|
-
"Unfolded lines": "Uitgeklapte regels",
|
|
160
|
-
"to": "tot",
|
|
161
|
-
"folded code": "ingeklapte code",
|
|
162
|
-
"unfold": "uitklappen",
|
|
163
|
-
"Fold line": "Regel inklappen",
|
|
164
|
-
"Unfold line": "Regel uitklappen",
|
|
165
|
-
// @codemirror/search
|
|
166
|
-
"Go to line": "Spring naar regel",
|
|
167
|
-
"go": "OK",
|
|
168
|
-
"Find": "Zoeken",
|
|
169
|
-
"Replace": "Vervangen",
|
|
170
|
-
"next": "Volgende",
|
|
171
|
-
"previous": "Vorige",
|
|
172
|
-
"all": "Alle",
|
|
173
|
-
"match case": "hoofdlettergevoelig",
|
|
174
|
-
"replace": "Vervangen",
|
|
175
|
-
"replace all": "Alles vervangen",
|
|
176
|
-
"close": "Sluiten",
|
|
177
|
-
"current match": "huidige overeenkomst",
|
|
178
|
-
"on line": "op regel",
|
|
179
|
-
// @codemirror/lint
|
|
180
|
-
"Diagnostics": "Problemen",
|
|
181
|
-
"No diagnostics": "Geen problemen",
|
|
182
|
-
};
|
|
183
|
-
export const TRANSLATIONS = {
|
|
184
|
-
"en": { "Papyros": ENGLISH_TRANSLATION },
|
|
185
|
-
"nl": { "Papyros": DUTCH_TRANSLATION }
|
|
186
|
-
};
|
|
187
|
-
export const CODE_MIRROR_TRANSLATIONS = {
|
|
188
|
-
"en": ENGLISH_PHRASES,
|
|
189
|
-
"nl": DUTCH_PHRASES
|
|
190
|
-
};
|
|
191
|
-
//# sourceMappingURL=Translations.js.map
|
package/dist/Translations.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Translations.js","sourceRoot":"","sources":["../src/Translations.ts"],"names":[],"mappings":"AACA,uDAAuD;AACvD,6EAA6E;AAE7E,MAAM,mBAAmB,GAAG;IACxB,SAAS,EAAE,SAAS;IACpB,MAAM,EAAE,MAAM;IACd,kBAAkB,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,iBAAiB;IAChC,OAAO,EAAE,SAAS;IAClB,eAAe,EAAE,sBAAsB;IACvC,SAAS,EAAE,UAAU;IACrB,mBAAmB;IACnB,aAAa,EAAE,WAAW;IAC1B,gBAAgB,EAAE,gBAAgB;CACrC,CAAA;AAED,MAAM,CAAC,MAAM,YAAY,GAAG;IACxB,IAAI,EAAE,EAAE,SAAS,EAAE,mBAAmB,EAAE;IACxC,IAAI,EAAE,EAAE,SAAS,EAAE,iBAAiB,EAAE;CACzC,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACpC,IAAI,EAAE,eAAe;IACrB,IAAI,EAAE,aAAa;CACtB,CAAC"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { CodeMirrorEditor } from "./CodeMirrorEditor";
|
|
2
|
-
import { UsedInputGutterInfo } from "./Gutters";
|
|
3
|
-
import { ViewUpdate } from "@codemirror/view";
|
|
4
|
-
/**
|
|
5
|
-
* Arguments used to higlight lines in the Editor
|
|
6
|
-
*/
|
|
7
|
-
interface HighlightArgs {
|
|
8
|
-
/**
|
|
9
|
-
* Whether the user's code is currently running and using input
|
|
10
|
-
*/
|
|
11
|
-
running: boolean;
|
|
12
|
-
/**
|
|
13
|
-
* Function to obtain gutter info per line (1-based indexing)
|
|
14
|
-
*/
|
|
15
|
-
getInfo: (lineInfo: number) => UsedInputGutterInfo;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Editor to handle and highlight user input
|
|
19
|
-
*/
|
|
20
|
-
export declare class BatchInputEditor extends CodeMirrorEditor {
|
|
21
|
-
/**
|
|
22
|
-
* Gutters to show which lines were used
|
|
23
|
-
*/
|
|
24
|
-
private usedInputGutters;
|
|
25
|
-
private lastHighlightArgs?;
|
|
26
|
-
constructor();
|
|
27
|
-
private getLastHighlightArgs;
|
|
28
|
-
protected onViewUpdate(v: ViewUpdate): void;
|
|
29
|
-
/**
|
|
30
|
-
* Apply highlighting to the lines in the Editor
|
|
31
|
-
* @param {HightlightArgs} args Arguments for highlighting
|
|
32
|
-
* @param {Array<string>} highlightClasses HTML classes to use for consumed lines
|
|
33
|
-
*/
|
|
34
|
-
highlight(args: HighlightArgs, highlightClasses?: string[]): void;
|
|
35
|
-
/**
|
|
36
|
-
* @return {Array<string>} Array of valid user input
|
|
37
|
-
* Data in the last line that is not terminated by a newline is omitted
|
|
38
|
-
*/
|
|
39
|
-
getLines(): Array<string>;
|
|
40
|
-
}
|
|
41
|
-
export {};
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { CodeMirrorEditor } from "./CodeMirrorEditor";
|
|
2
|
-
import { UsedInputGutters } from "./Gutters";
|
|
3
|
-
import { keymap } from "@codemirror/view";
|
|
4
|
-
import { insertNewline } from "@codemirror/commands";
|
|
5
|
-
/**
|
|
6
|
-
* Editor to handle and highlight user input
|
|
7
|
-
*/
|
|
8
|
-
export class BatchInputEditor extends CodeMirrorEditor {
|
|
9
|
-
constructor() {
|
|
10
|
-
super(new Set([CodeMirrorEditor.PLACEHOLDER, CodeMirrorEditor.STYLE]), {
|
|
11
|
-
classes: ["papyros-input-editor", "_tw-overflow-auto",
|
|
12
|
-
"_tw-border-solid", "_tw-border-gray-200", "_tw-border-2", "_tw-rounded-lg",
|
|
13
|
-
"dark:_tw-bg-dark-mode-bg", "dark:_tw-border-dark-mode-content",
|
|
14
|
-
"focus:_tw-outline-none", "focus:_tw-ring-1", "focus:_tw-ring-blue-500"],
|
|
15
|
-
minHeight: "10vh",
|
|
16
|
-
maxHeight: "20vh",
|
|
17
|
-
theme: {}
|
|
18
|
-
});
|
|
19
|
-
this.usedInputGutters = new UsedInputGutters();
|
|
20
|
-
this.addExtension(this.usedInputGutters.toExtension());
|
|
21
|
-
this.addExtension([
|
|
22
|
-
keymap.of([
|
|
23
|
-
{
|
|
24
|
-
key: "Enter", run: insertNewline
|
|
25
|
-
}
|
|
26
|
-
]),
|
|
27
|
-
]);
|
|
28
|
-
}
|
|
29
|
-
getLastHighlightArgs() {
|
|
30
|
-
return this.lastHighlightArgs || {
|
|
31
|
-
running: false,
|
|
32
|
-
getInfo: lineNr => {
|
|
33
|
-
return {
|
|
34
|
-
lineNr,
|
|
35
|
-
on: false,
|
|
36
|
-
title: ""
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
onViewUpdate(v) {
|
|
42
|
-
super.onViewUpdate(v);
|
|
43
|
-
// Ensure that highlighting occurs after CodeMirrors internal update
|
|
44
|
-
// so that the style classes are not overwritten
|
|
45
|
-
setTimeout(() => {
|
|
46
|
-
this.highlight(this.getLastHighlightArgs());
|
|
47
|
-
}, 10);
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Apply highlighting to the lines in the Editor
|
|
51
|
-
* @param {HightlightArgs} args Arguments for highlighting
|
|
52
|
-
* @param {Array<string>} highlightClasses HTML classes to use for consumed lines
|
|
53
|
-
*/
|
|
54
|
-
highlight(args, highlightClasses = ["_tw-bg-slate-200", "dark:_tw-bg-slate-500"]) {
|
|
55
|
-
this.lastHighlightArgs = args;
|
|
56
|
-
const { running, getInfo } = args;
|
|
57
|
-
let nextLineToUse = 0;
|
|
58
|
-
this.editorView.dom.querySelectorAll(".cm-line").forEach((line, i) => {
|
|
59
|
-
const info = getInfo(i + 1);
|
|
60
|
-
if (info.on) {
|
|
61
|
-
nextLineToUse += 1;
|
|
62
|
-
}
|
|
63
|
-
line.classList.toggle("cm-activeLine", running && i === nextLineToUse);
|
|
64
|
-
highlightClasses.forEach(className => {
|
|
65
|
-
line.classList.toggle(className, i !== nextLineToUse && info.on);
|
|
66
|
-
});
|
|
67
|
-
line.setAttribute("contenteditable", "" + (!running || !info.on));
|
|
68
|
-
this.usedInputGutters.setMarker(this.editorView, info);
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* @return {Array<string>} Array of valid user input
|
|
73
|
-
* Data in the last line that is not terminated by a newline is omitted
|
|
74
|
-
*/
|
|
75
|
-
getLines() {
|
|
76
|
-
const lines = this.editorView.state.doc.toString().split("\n");
|
|
77
|
-
return lines.slice(0, lines.length - 1);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
//# sourceMappingURL=BatchInputEditor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BatchInputEditor.js","sourceRoot":"","sources":["../../src/editor/BatchInputEditor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAuB,MAAM,WAAW,CAAC;AAClE,OAAO,EAAE,MAAM,EAAc,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAerD;;GAEG;AACH,MAAM,OAAO,gBAAiB,SAAQ,gBAAgB;IAOlD;QACI,KAAK,CAAC,IAAI,GAAG,CAAC,CAAC,gBAAgB,CAAC,WAAW,EAAE,gBAAgB,CAAC,KAAK,CAAC,CAAC,EAAE;YACnE,OAAO,EAAE,CAAC,sBAAsB,EAAE,mBAAmB;gBACjD,kBAAkB,EAAE,qBAAqB,EAAE,cAAc,EAAE,gBAAgB;gBAC3E,0BAA0B,EAAE,mCAAmC;gBAC/D,wBAAwB,EAAE,kBAAkB,EAAE,yBAAyB,CAAC;YAC5E,SAAS,EAAE,MAAM;YACjB,SAAS,EAAE,MAAM;YACjB,KAAK,EAAE,EAAE;SACZ,CAAC,CAAC;QACH,IAAI,CAAC,gBAAgB,GAAG,IAAI,gBAAgB,EAAE,CAAC;QAC/C,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,gBAAgB,CAAC,WAAW,EAAE,CAAC,CAAC;QACvD,IAAI,CAAC,YAAY,CAAC;YACd,MAAM,CAAC,EAAE,CAAC;gBACN;oBACI,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,aAAa;iBACnC;aACJ,CAAC;SACL,CAAC,CAAC;IACP,CAAC;IAEO,oBA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;YACrE,CAAC,CAAC,CAAC;YACH,IAAI,CAAC,YAAY,CAAC,iBAAiB,EAAE,EAAE,GAAG,CAAC,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;YAClE,IAAI,CAAC,gBAAgB,CAAC,SAAS,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;QAC3D,CAAC,CAAC,CAAC;IACP,CAAC;IAED;;;OAGG;IACI,QAAQ;QACX,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC/D,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAC5C,CAAC;CACJ"}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { ProgrammingLanguage } from "../ProgrammingLanguage";
|
|
2
|
-
import { EditorView } from "@codemirror/view";
|
|
3
|
-
import { Diagnostic } from "@codemirror/lint";
|
|
4
|
-
import { CodeMirrorEditor } from "./CodeMirrorEditor";
|
|
5
|
-
/**
|
|
6
|
-
* Component that provides useful features to users writing code
|
|
7
|
-
*/
|
|
8
|
-
export declare class CodeEditor extends CodeMirrorEditor {
|
|
9
|
-
static PROGRAMMING_LANGUAGE: string;
|
|
10
|
-
static INDENTATION: string;
|
|
11
|
-
static PANEL: string;
|
|
12
|
-
static AUTOCOMPLETION: string;
|
|
13
|
-
static LINTING: string;
|
|
14
|
-
static DEBUGGING: string;
|
|
15
|
-
private debugExtension;
|
|
16
|
-
private testCodeExtension;
|
|
17
|
-
/**
|
|
18
|
-
* Construct a new CodeEditor
|
|
19
|
-
* @param {Function} onRunRequest Callback for when the user wants to run the code
|
|
20
|
-
* @param {string} initialCode The initial code to display
|
|
21
|
-
* @param {number} indentLength The length in spaces for the indent unit
|
|
22
|
-
*/
|
|
23
|
-
constructor(onRunRequest: () => void, initialCode?: string, indentLength?: number);
|
|
24
|
-
set debugMode(value: boolean);
|
|
25
|
-
set testCode(code: string);
|
|
26
|
-
getText(): string;
|
|
27
|
-
getCode(): string;
|
|
28
|
-
setDarkMode(darkMode: boolean): void;
|
|
29
|
-
/**
|
|
30
|
-
* @param {ProgrammingLanguage} language The language to use
|
|
31
|
-
*/
|
|
32
|
-
setProgrammingLanguage(language: ProgrammingLanguage): void;
|
|
33
|
-
/**
|
|
34
|
-
* @param {LintSource} lintSource Function to obtain linting results
|
|
35
|
-
*/
|
|
36
|
-
setLintingSource(lintSource: (view: EditorView) => readonly Diagnostic[] | Promise<readonly Diagnostic[]>): void;
|
|
37
|
-
/**
|
|
38
|
-
* @param {number} indentLength The number of spaces to use for indentation
|
|
39
|
-
*/
|
|
40
|
-
setIndentLength(indentLength: number): void;
|
|
41
|
-
/**
|
|
42
|
-
* @param {HTMLElement} panel The panel to display at the bottom of the editor
|
|
43
|
-
*/
|
|
44
|
-
setPanel(panel: HTMLElement): void;
|
|
45
|
-
/**
|
|
46
|
-
* @param {number} indentLength The amount of spaces to use
|
|
47
|
-
* @return {string} The indentation unit to be used by CodeMirror
|
|
48
|
-
*/
|
|
49
|
-
private static getIndentUnit;
|
|
50
|
-
/**
|
|
51
|
-
* @param {ProgrammingLanguage} language The language to support
|
|
52
|
-
* @return {LanguageSupport} CodeMirror LanguageSupport for the language
|
|
53
|
-
*/
|
|
54
|
-
private static getLanguageSupport;
|
|
55
|
-
/**
|
|
56
|
-
* - line numbers
|
|
57
|
-
* - special character highlighting
|
|
58
|
-
* - the undo history
|
|
59
|
-
* - a fold gutter
|
|
60
|
-
* - custom selection drawing
|
|
61
|
-
* - multiple selections
|
|
62
|
-
* - reindentation on input
|
|
63
|
-
* - bracket matching
|
|
64
|
-
* - bracket closing
|
|
65
|
-
* - autocompletion
|
|
66
|
-
* - rectangular selection
|
|
67
|
-
* - active line highlighting
|
|
68
|
-
* - active line gutter highlighting
|
|
69
|
-
* - selection match highlighting
|
|
70
|
-
* - gutter for linting
|
|
71
|
-
* Keymaps:
|
|
72
|
-
* - the default command bindings
|
|
73
|
-
* - bracket closing
|
|
74
|
-
* - searching
|
|
75
|
-
* - linting
|
|
76
|
-
* - completion
|
|
77
|
-
* - indenting with tab
|
|
78
|
-
* @return {Array<Extension} Default extensions to use
|
|
79
|
-
*/
|
|
80
|
-
private static getExtensions;
|
|
81
|
-
}
|