@dodona/papyros 0.1.57 → 0.1.58
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/Backend.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { PapyrosEvent } from "./PapyrosEvent";
|
|
2
|
+
import { Channel } from "sync-message";
|
|
2
3
|
export declare abstract class Backend {
|
|
3
4
|
onEvent: (e: PapyrosEvent) => any;
|
|
4
5
|
runId: number;
|
|
@@ -6,12 +7,10 @@ export declare abstract class Backend {
|
|
|
6
7
|
/**
|
|
7
8
|
* Initialize the backend, setting up any globals required
|
|
8
9
|
* @param {function(PapyrosEvent):void} onEvent Callback for when events occur
|
|
9
|
-
* @param {
|
|
10
|
-
* @param {Uint8Array} inputTextArray Optional shared buffer for input
|
|
11
|
-
* @param {Int32Array} inputMetaData Optional shared buffer for metadata about input
|
|
10
|
+
* @param {Channel} channel for communication with the main thread
|
|
12
11
|
* @return {Promise<void>} Promise of launching
|
|
13
12
|
*/
|
|
14
|
-
launch(onEvent: (e: PapyrosEvent) => void,
|
|
13
|
+
launch(onEvent: (e: PapyrosEvent) => void, channel: Channel): Promise<void>;
|
|
15
14
|
abstract _runCodeInternal(code: string): Promise<any>;
|
|
16
15
|
/**
|
|
17
16
|
* Validate and run arbitrary code
|
package/dist/Constants.d.ts
CHANGED
|
@@ -17,4 +17,3 @@ export declare const EXAMPLE_SELECT_ID = "example-select";
|
|
|
17
17
|
export declare const LOCALE_SELECT_ID = "locale-select";
|
|
18
18
|
export declare const DEFAULT_LOCALE = "nl";
|
|
19
19
|
export declare const DEFAULT_SERVICE_WORKER = "inputServiceWorker.js";
|
|
20
|
-
export declare const INPUT_RELATIVE_URL = "__papyros_input";
|
package/dist/InputManager.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { PapyrosEvent } from "./PapyrosEvent";
|
|
2
2
|
import { RenderOptions } from "./util/Util";
|
|
3
|
+
import { Channel } from "sync-message";
|
|
3
4
|
export declare enum InputMode {
|
|
4
5
|
Interactive = "interactive",
|
|
5
6
|
Batch = "batch"
|
|
@@ -15,10 +16,8 @@ export declare class InputManager {
|
|
|
15
16
|
batchInput: string;
|
|
16
17
|
onSend: () => void;
|
|
17
18
|
session: InputSession;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
inputMetaData?: Int32Array;
|
|
21
|
-
textEncoder: TextEncoder;
|
|
19
|
+
channel: Channel;
|
|
20
|
+
messageId: string;
|
|
22
21
|
constructor(onSend: () => void, inputMode: InputMode);
|
|
23
22
|
get enterButton(): HTMLButtonElement;
|
|
24
23
|
get inputArea(): HTMLInputElement;
|