@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.
@@ -37,6 +37,14 @@ export declare class OutputManager extends Renderable {
37
37
  * Store the HTML that is rendered to restore when changing language/theme
38
38
  */
39
39
  private content;
40
+ /**
41
+ * Whether overflow has occurred
42
+ */
43
+ private overflown;
44
+ /**
45
+ * Function to call when the user wants to download overflow results
46
+ */
47
+ private downloadCallback;
40
48
  constructor();
41
49
  /**
42
50
  * Retrieve the parent element containing all output parts
@@ -61,6 +69,11 @@ export declare class OutputManager extends Renderable {
61
69
  * @param {BackendEvent} output Event containing the output data
62
70
  */
63
71
  showOutput(output: BackendEvent): void;
72
+ /**
73
+ * Display to the user that overflow has occurred, limiting the shown output
74
+ * @param {function():void | null} downloadCallback Optional callback to download overflow
75
+ */
76
+ onOverflow(downloadCallback: (() => void) | null): void;
64
77
  /**
65
78
  * Display an error to the user
66
79
  * @param {BackendEvent} error Event containing the error data
package/dist/Papyros.d.ts CHANGED
@@ -2,7 +2,6 @@ import "./Papyros.css";
2
2
  import { InputMode } from "./InputManager";
3
3
  import { ProgrammingLanguage } from "./ProgrammingLanguage";
4
4
  import { RunState, CodeRunner } from "./CodeRunner";
5
- import { OutputManager } from "./OutputManager";
6
5
  import { AtomicsChannelOptions, ServiceWorkerChannelOptions } from "sync-message";
7
6
  import { RenderOptions, ButtonOptions, Renderable } from "./util/Rendering";
8
7
  /**
@@ -77,10 +76,6 @@ export declare class Papyros extends Renderable<PapyrosRenderOptions> {
77
76
  * Component to run code entered by the user
78
77
  */
79
78
  readonly codeRunner: CodeRunner;
80
- /**
81
- * Component to handle output generated by the user's code
82
- */
83
- readonly outputManager: OutputManager;
84
79
  /**
85
80
  * Construct a new Papyros instance
86
81
  * @param {PapyrosConfig} config Properties to configure this instance
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/package.json CHANGED
@@ -1,18 +1,18 @@
1
1
  {
2
2
  "name": "@dodona/papyros",
3
- "version": "0.3.5",
3
+ "version": "0.3.8",
4
4
  "private": false,
5
5
  "homepage": ".",
6
6
  "devDependencies": {
7
7
  "@types/escape-html": "^1.0.1",
8
8
  "@types/i18n-js": "^3.8.2",
9
9
  "@types/jest": "27.4.1",
10
- "@types/serviceworker": "^0.0.43",
10
+ "@types/serviceworker": "^0.0.44",
11
11
  "@typescript-eslint/eslint-plugin": "^5.21.0",
12
12
  "@typescript-eslint/parser": "^5.21.0",
13
13
  "autoprefixer": "^10.4.0",
14
14
  "css-loader": "^6.5.1",
15
- "eslint": "^7.11.0",
15
+ "eslint": "^8.15.0",
16
16
  "eslint-config-google": "^0.14.0",
17
17
  "eslint-plugin-jest": "^26.1.5",
18
18
  "i18n-extract": "^0.6.7",
@@ -51,7 +51,7 @@
51
51
  "sync-message": "^0.0.10"
52
52
  },
53
53
  "scripts": {
54
- "start": "yarn setup && webpack serve --mode development",
54
+ "start": "webpack serve --mode development",
55
55
  "setup": "bash scripts/setup.sh",
56
56
  "build:app": "bash scripts/build_package.sh development",
57
57
  "build:library": "bash scripts/build_package.sh production",