@dodona/papyros 0.1.953-darkmode → 0.2.0
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 +21 -0
- package/dist/BackendEventQueue.d.ts +85 -0
- package/dist/BackendManager.d.ts +8 -2
- package/dist/CodeEditor.d.ts +52 -61
- package/dist/Constants.d.ts +3 -1
- package/dist/InputManager.d.ts +7 -7
- package/dist/Library.js +1 -1
- package/dist/OutputManager.d.ts +4 -2
- package/dist/Papyros.d.ts +4 -4
- package/dist/examples/PythonExamples.d.ts +1 -0
- package/dist/util/HTMLShapes.d.ts +2 -2
- package/dist/util/Util.d.ts +1 -0
- package/package.json +26 -35
- package/dist/RunListener.d.ts +0 -13
package/dist/OutputManager.d.ts
CHANGED
|
@@ -45,8 +45,9 @@ export declare class OutputManager extends Renderable {
|
|
|
45
45
|
/**
|
|
46
46
|
* Render an element in the next position of the output area
|
|
47
47
|
* @param {string} html Safe string version of the next child to render
|
|
48
|
+
* @param {boolean} isNewElement Whether this a newly generated element
|
|
48
49
|
*/
|
|
49
|
-
renderNextElement(html: string): void;
|
|
50
|
+
renderNextElement(html: string, isNewElement?: boolean): void;
|
|
50
51
|
/**
|
|
51
52
|
* Convert a piece of text to a span element for displaying
|
|
52
53
|
* @param {string} text The text content for the span
|
|
@@ -54,7 +55,7 @@ export declare class OutputManager extends Renderable {
|
|
|
54
55
|
* @param {string} className Optional class name for the span
|
|
55
56
|
* @return {string} String version of the created span
|
|
56
57
|
*/
|
|
57
|
-
spanify
|
|
58
|
+
private spanify;
|
|
58
59
|
/**
|
|
59
60
|
* Display output to the user, based on its content type
|
|
60
61
|
* @param {BackendEvent} output Event containing the output data
|
|
@@ -70,4 +71,5 @@ export declare class OutputManager extends Renderable {
|
|
|
70
71
|
* Clear the contents of the output area
|
|
71
72
|
*/
|
|
72
73
|
reset(): void;
|
|
74
|
+
onRunEnd(): void;
|
|
73
75
|
}
|
package/dist/Papyros.d.ts
CHANGED
|
@@ -24,6 +24,10 @@ interface PapyrosConfig {
|
|
|
24
24
|
* The InputMode to use
|
|
25
25
|
*/
|
|
26
26
|
inputMode: InputMode;
|
|
27
|
+
/**
|
|
28
|
+
* The selected code example
|
|
29
|
+
*/
|
|
30
|
+
example?: string;
|
|
27
31
|
}
|
|
28
32
|
/**
|
|
29
33
|
* Options for rendering Papyros
|
|
@@ -70,10 +74,6 @@ export declare class Papyros extends Renderable<PapyrosRenderOptions> {
|
|
|
70
74
|
* Component to handle output generated by the user's code
|
|
71
75
|
*/
|
|
72
76
|
outputManager: OutputManager;
|
|
73
|
-
/**
|
|
74
|
-
* Whether this instance has been launched
|
|
75
|
-
*/
|
|
76
|
-
private launched;
|
|
77
77
|
/**
|
|
78
78
|
* Construct a new Papyros instance
|
|
79
79
|
* @param {PapyrosConfig} config Properties to configure this instance
|
|
@@ -9,7 +9,7 @@ export declare const svgCircle: (id: string, color: string) => string;
|
|
|
9
9
|
* Wrap text (best a single character) in a circle to provide information to the user
|
|
10
10
|
* @param {string} content The symbol in the circle, e.g. ? of !
|
|
11
11
|
* @param {string} title The information to display when hovering over the element
|
|
12
|
-
* @param {string}
|
|
12
|
+
* @param {string} colorClasses The classes to color the content
|
|
13
13
|
* @return {string} A string representation of the circle with content
|
|
14
14
|
*/
|
|
15
|
-
export declare const inCircle: (content: string, title: string,
|
|
15
|
+
export declare const inCircle: (content: string, title: string, colorClasses: string) => string;
|
package/dist/util/Util.d.ts
CHANGED
|
@@ -38,4 +38,5 @@ export declare function removeSelection(selectId: string): void;
|
|
|
38
38
|
* @return {any} The parsed data
|
|
39
39
|
*/
|
|
40
40
|
export declare function parseData(data: string, contentType?: string): any;
|
|
41
|
+
export declare function downloadResults(data: string, filename: string): void;
|
|
41
42
|
export {};
|
package/package.json
CHANGED
|
@@ -1,28 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dodona/papyros",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"homepage": ".",
|
|
6
6
|
"devDependencies": {
|
|
7
|
-
"@babel/traverse": "^7.16.3",
|
|
8
7
|
"@types/escape-html": "^1.0.1",
|
|
9
8
|
"@types/i18n-js": "^3.8.2",
|
|
10
|
-
"@types/
|
|
11
|
-
"@
|
|
12
|
-
"@typescript-eslint/
|
|
9
|
+
"@types/jest": "27.4.1",
|
|
10
|
+
"@types/serviceworker": "^0.0.42",
|
|
11
|
+
"@typescript-eslint/eslint-plugin": "^5.21.0",
|
|
12
|
+
"@typescript-eslint/parser": "^5.21.0",
|
|
13
13
|
"autoprefixer": "^10.4.0",
|
|
14
|
-
"bootstrap": "^5.1.2",
|
|
15
14
|
"css-loader": "^6.5.1",
|
|
16
15
|
"eslint": "^7.11.0",
|
|
17
16
|
"eslint-config-google": "^0.14.0",
|
|
18
|
-
"eslint-plugin-flowtype": "^
|
|
17
|
+
"eslint-plugin-flowtype": "^7.0.0",
|
|
19
18
|
"eslint-plugin-import": "^2.22.1",
|
|
20
|
-
"eslint-plugin-jest": "^
|
|
21
|
-
"eslint-webpack-plugin": "^
|
|
22
|
-
"glob": "^7.2.0",
|
|
19
|
+
"eslint-plugin-jest": "^26.1.5",
|
|
20
|
+
"eslint-webpack-plugin": "^3.1.1",
|
|
23
21
|
"i18n-extract": "^0.6.7",
|
|
24
|
-
"jest": "
|
|
25
|
-
"jest-junit": "^13.0.0",
|
|
22
|
+
"jest": "27.0.0",
|
|
26
23
|
"postcss": "^8.3.11",
|
|
27
24
|
"postcss-import": "^14.0.2",
|
|
28
25
|
"postcss-loader": "^6.2.0",
|
|
@@ -30,9 +27,9 @@
|
|
|
30
27
|
"style-loader": "^3.3.1",
|
|
31
28
|
"tailwindcss": "^3.0.24",
|
|
32
29
|
"terser-webpack-plugin": "^5.3.1",
|
|
33
|
-
"ts-jest": "^27.
|
|
30
|
+
"ts-jest": "^27.1.4",
|
|
34
31
|
"ts-loader": "^9.2.6",
|
|
35
|
-
"typescript": "^4.
|
|
32
|
+
"typescript": "^4.6.4",
|
|
36
33
|
"url-loader": "^4.1.1",
|
|
37
34
|
"webpack": "^5.70.0",
|
|
38
35
|
"webpack-cli": "^4.9.2",
|
|
@@ -40,20 +37,16 @@
|
|
|
40
37
|
"worker-loader": "^3.0.8"
|
|
41
38
|
},
|
|
42
39
|
"dependencies": {
|
|
43
|
-
"@codemirror/autocomplete": "^0.
|
|
44
|
-
"@codemirror/
|
|
45
|
-
"@codemirror/
|
|
46
|
-
"@codemirror/
|
|
47
|
-
"@codemirror/
|
|
48
|
-
"@codemirror/
|
|
49
|
-
"@codemirror/
|
|
50
|
-
"@codemirror/
|
|
51
|
-
"@codemirror/
|
|
52
|
-
"@codemirror/
|
|
53
|
-
"@codemirror/rectangular-selection": "^0.19.1",
|
|
54
|
-
"@codemirror/search": "^0.19.3",
|
|
55
|
-
"@codemirror/state": "^0.19.6",
|
|
56
|
-
"@codemirror/theme-one-dark": "^0.19.0",
|
|
40
|
+
"@codemirror/autocomplete": "^0.20.0",
|
|
41
|
+
"@codemirror/commands": "^0.20.0",
|
|
42
|
+
"@codemirror/lang-javascript": "^0.20.0",
|
|
43
|
+
"@codemirror/lang-python": "^0.20.0",
|
|
44
|
+
"@codemirror/language": "^0.20.0",
|
|
45
|
+
"@codemirror/lint": "^0.20.2",
|
|
46
|
+
"@codemirror/search": "^0.20.1",
|
|
47
|
+
"@codemirror/state": "^0.20.0",
|
|
48
|
+
"@codemirror/theme-one-dark": "^0.20.0",
|
|
49
|
+
"@codemirror/view": "^0.20.3",
|
|
57
50
|
"comlink": "^4.3.1",
|
|
58
51
|
"comsync": "^0.0.8",
|
|
59
52
|
"escape-html": "^1.0.3",
|
|
@@ -66,15 +59,10 @@
|
|
|
66
59
|
"setup": "bash scripts/setup.sh",
|
|
67
60
|
"build:app": "bash scripts/build_package.sh development",
|
|
68
61
|
"build:library": "bash scripts/build_package.sh production",
|
|
69
|
-
"test": "
|
|
62
|
+
"test": "jest",
|
|
70
63
|
"lint": "eslint --ext '.js' --ext '.ts' src",
|
|
71
64
|
"validate:translations": "node scripts/ValidateTranslations.js"
|
|
72
65
|
},
|
|
73
|
-
"babel": {
|
|
74
|
-
"presets": [
|
|
75
|
-
"@babel/preset-typescript"
|
|
76
|
-
]
|
|
77
|
-
},
|
|
78
66
|
"description": "Scratchpad for multiple programming languages in the browser.",
|
|
79
67
|
"repository": {
|
|
80
68
|
"type": "git",
|
|
@@ -82,7 +70,10 @@
|
|
|
82
70
|
},
|
|
83
71
|
"keywords": [
|
|
84
72
|
"programming",
|
|
85
|
-
"scratchpad"
|
|
73
|
+
"scratchpad",
|
|
74
|
+
"Dodona",
|
|
75
|
+
"Python",
|
|
76
|
+
"Pyodide"
|
|
86
77
|
],
|
|
87
78
|
"author": "Winnie De Ridder",
|
|
88
79
|
"license": "MIT",
|
package/dist/RunListener.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Interface for components that maintain state based on runs of code
|
|
3
|
-
*/
|
|
4
|
-
export interface RunListener {
|
|
5
|
-
/**
|
|
6
|
-
* Inform this listener that a new run started
|
|
7
|
-
*/
|
|
8
|
-
onRunStart(): void;
|
|
9
|
-
/**
|
|
10
|
-
* Inform this listener that the run ended
|
|
11
|
-
*/
|
|
12
|
-
onRunEnd(): void;
|
|
13
|
-
}
|