@dodona/papyros 0.1.61 → 0.1.702

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/Papyros.d.ts CHANGED
@@ -5,7 +5,7 @@ import { CodeEditor } from "./CodeEditor";
5
5
  import { InputManager, InputMode } from "./InputManager";
6
6
  import { PapyrosEvent } from "./PapyrosEvent";
7
7
  import { ProgrammingLanguage } from "./ProgrammingLanguage";
8
- import { RenderOptions } from "./util/Util";
8
+ import { RenderOptions, ButtonOptions } from "./util/Util";
9
9
  import { StatusPanel } from "./StatusPanel";
10
10
  import { OutputManager } from "./OutputManager";
11
11
  declare enum PapyrosState {
@@ -20,7 +20,7 @@ declare class PapyrosStateManager {
20
20
  statusPanel: StatusPanel;
21
21
  get runButton(): HTMLButtonElement;
22
22
  get stopButton(): HTMLButtonElement;
23
- constructor(statusPanel: StatusPanel);
23
+ constructor(statusPanel: StatusPanel, onRunClicked: () => void, onStopClicked: () => void);
24
24
  setState(state: PapyrosState, message?: string): void;
25
25
  render(options: RenderOptions): HTMLElement;
26
26
  }
@@ -63,6 +63,7 @@ export declare class Papyros {
63
63
  runCode(): Promise<void>;
64
64
  stop(): Promise<void>;
65
65
  render(standAlone: boolean, programmingLanguage: ProgrammingLanguage, locale: string, renderOptions: PapyrosRenderOptions): void;
66
+ addButton(options: ButtonOptions, onClick: () => void): void;
66
67
  static supportsProgrammingLanguage(language: string): boolean;
67
68
  static toProgrammingLanguage(language: string): ProgrammingLanguage | undefined;
68
69
  }
@@ -1,8 +1,17 @@
1
- import { RenderOptions } from "./util/Util";
1
+ import { ButtonOptions, RenderOptions } from "./util/Util";
2
+ interface DynamicButton {
3
+ id: string;
4
+ buttonHTML: string;
5
+ onClick: () => void;
6
+ }
2
7
  export declare class StatusPanel {
8
+ buttons: Array<DynamicButton>;
9
+ constructor();
10
+ addButton(options: ButtonOptions, onClick: () => void): void;
3
11
  get statusSpinner(): HTMLElement;
4
12
  get statusText(): HTMLElement;
5
13
  showSpinner(show: boolean): void;
6
14
  setStatus(status: string): void;
7
15
  render(options: RenderOptions): HTMLElement;
8
16
  }
17
+ export {};