@dodona/papyros 0.3.5 → 0.3.8
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/LICENSE +0 -0
- package/README.md +0 -0
- package/dist/App.d.ts +0 -0
- package/dist/Backend.d.ts +2 -1
- package/dist/BackendEvent.d.ts +0 -0
- package/dist/BackendEventQueue.d.ts +11 -2
- package/dist/BackendManager.d.ts +0 -0
- package/dist/CodeEditor.d.ts +0 -0
- package/dist/CodeRunner.d.ts +9 -0
- package/dist/Constants.d.ts +0 -0
- package/dist/InputManager.d.ts +0 -0
- package/dist/InputServiceWorker.d.ts +0 -0
- package/dist/Library.d.ts +0 -0
- package/dist/Library.js +1 -1
- package/dist/OutputManager.d.ts +13 -0
- package/dist/Papyros.d.ts +0 -5
- package/dist/ProgrammingLanguage.d.ts +0 -0
- package/dist/examples/Examples.d.ts +0 -0
- package/dist/examples/JavaScriptExamples.d.ts +0 -0
- package/dist/examples/PythonExamples.d.ts +0 -0
- package/dist/input/BatchInputHandler.d.ts +0 -0
- package/dist/input/InteractiveInputHandler.d.ts +0 -0
- package/dist/input/UserInputHandler.d.ts +0 -0
- package/dist/util/HTMLShapes.d.ts +0 -0
- package/dist/util/Logging.d.ts +0 -0
- package/dist/util/Rendering.d.ts +0 -0
- package/dist/util/Util.d.ts +0 -0
- package/dist/workers/input/InputWorker.d.ts +0 -0
- package/dist/workers/input/InputWorker.js +0 -0
- package/dist/workers/javascript/JavaScriptWorker.worker.d.ts +0 -0
- package/dist/workers/python/PythonWorker.worker.d.ts +0 -0
- package/package.json +4 -4
package/LICENSE
CHANGED
|
File without changes
|
package/README.md
CHANGED
|
File without changes
|
package/dist/App.d.ts
CHANGED
|
File without changes
|
package/dist/Backend.d.ts
CHANGED
|
@@ -89,9 +89,10 @@ export declare abstract class Backend<Extras extends SyncExtras = SyncExtras> {
|
|
|
89
89
|
/**
|
|
90
90
|
* Initialize the backend by doing all setup-related work
|
|
91
91
|
* @param {function(BackendEvent):void} onEvent Callback for when events occur
|
|
92
|
+
* @param {function():void} onOverflow Callback for when overflow occurs
|
|
92
93
|
* @return {Promise<void>} Promise of launching
|
|
93
94
|
*/
|
|
94
|
-
launch(onEvent: (e: BackendEvent) => void): Promise<void>;
|
|
95
|
+
launch(onEvent: (e: BackendEvent) => void, onOverflow: () => void): Promise<void>;
|
|
95
96
|
/**
|
|
96
97
|
* Executes the given code
|
|
97
98
|
* @param {Extras} extras Helper properties to run code
|
package/dist/BackendEvent.d.ts
CHANGED
|
File without changes
|
|
@@ -25,6 +25,14 @@ export declare class BackendEventQueue {
|
|
|
25
25
|
* Queue storing Output-events after overflowing
|
|
26
26
|
*/
|
|
27
27
|
private overflow;
|
|
28
|
+
/**
|
|
29
|
+
* Callback for when overflow occurs
|
|
30
|
+
*/
|
|
31
|
+
private onOverflow;
|
|
32
|
+
/**
|
|
33
|
+
* Keep track whether the queue reached its limit this run
|
|
34
|
+
*/
|
|
35
|
+
private overflown;
|
|
28
36
|
/**
|
|
29
37
|
* Time in milliseconds when the last flush occurred
|
|
30
38
|
*/
|
|
@@ -38,11 +46,12 @@ export declare class BackendEventQueue {
|
|
|
38
46
|
*/
|
|
39
47
|
private decoder;
|
|
40
48
|
/**
|
|
41
|
-
* @param {
|
|
49
|
+
* @param {function(BackendEvent):void} callback Function to process events in the queue
|
|
50
|
+
* @param {function():void} onOverflow Callback for when overflow occurs
|
|
42
51
|
* @param {number} limit The maximal amount of output lines to send before overflowing
|
|
43
52
|
* @param {number} flushTime The time in milliseconds before sending events through
|
|
44
53
|
*/
|
|
45
|
-
constructor(callback: (e: BackendEvent) => void, limit?: number, flushTime?: number);
|
|
54
|
+
constructor(callback: (e: BackendEvent) => void, onOverflow: () => void, limit?: number, flushTime?: number);
|
|
46
55
|
/**
|
|
47
56
|
* Add an element to the queue
|
|
48
57
|
* @param {BackendEventType} type The type of the event
|
package/dist/BackendManager.d.ts
CHANGED
|
File without changes
|
package/dist/CodeEditor.d.ts
CHANGED
|
File without changes
|
package/dist/CodeRunner.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { CodeEditor } from "./CodeEditor";
|
|
|
2
2
|
import { InputManager } from "./InputManager";
|
|
3
3
|
import { ProgrammingLanguage } from "./ProgrammingLanguage";
|
|
4
4
|
import { RenderOptions, ButtonOptions, Renderable } from "./util/Rendering";
|
|
5
|
+
import { OutputManager } from "./OutputManager";
|
|
5
6
|
interface CodeRunnerRenderOptions {
|
|
6
7
|
/**
|
|
7
8
|
* Options for rendering the panel
|
|
@@ -15,6 +16,10 @@ interface CodeRunnerRenderOptions {
|
|
|
15
16
|
* Options for rendering the editor
|
|
16
17
|
*/
|
|
17
18
|
codeEditorOptions: RenderOptions;
|
|
19
|
+
/**
|
|
20
|
+
* RenderOptions for the output field
|
|
21
|
+
*/
|
|
22
|
+
outputOptions: RenderOptions;
|
|
18
23
|
}
|
|
19
24
|
/**
|
|
20
25
|
* Enum representing the possible states while processing code
|
|
@@ -55,6 +60,10 @@ export declare class CodeRunner extends Renderable<CodeRunnerRenderOptions> {
|
|
|
55
60
|
* Component to request and handle input from the user
|
|
56
61
|
*/
|
|
57
62
|
readonly inputManager: InputManager;
|
|
63
|
+
/**
|
|
64
|
+
* Component to handle output generated by the user's code
|
|
65
|
+
*/
|
|
66
|
+
readonly outputManager: OutputManager;
|
|
58
67
|
/**
|
|
59
68
|
* The backend that executes the code asynchronously
|
|
60
69
|
*/
|
package/dist/Constants.d.ts
CHANGED
|
File without changes
|
package/dist/InputManager.d.ts
CHANGED
|
File without changes
|
|
File without changes
|
package/dist/Library.d.ts
CHANGED
|
File without changes
|