@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 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
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 {Function} callback Function to process events in the queue
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
File without changes
File without changes
@@ -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
  */
File without changes
File without changes
File without changes
package/dist/Library.d.ts CHANGED
File without changes