lean4monaco 1.0.42 → 1.0.43

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.
@@ -20,8 +20,6 @@ export declare class IFrameInfoWebviewFactory implements InfoWebviewFactory {
20
20
  private fontFiles;
21
21
  private infoviewElement;
22
22
  private iframe;
23
- rpc: Rpc;
24
- editorApi: EditorApi;
25
23
  constructor(themeService: IThemeService, configurationService: IConfigurationService, fontFiles: FontFace[]);
26
24
  setInfoviewElement(infoviewElement: HTMLElement): void;
27
25
  make(editorApi: EditorApi, stylesheet: string, column: number): IFrameInfoWebview;
@@ -28,8 +28,6 @@ export class IFrameInfoWebviewFactory {
28
28
  fontFiles;
29
29
  infoviewElement;
30
30
  iframe;
31
- rpc;
32
- editorApi;
33
31
  constructor(themeService, configurationService, fontFiles) {
34
32
  this.themeService = themeService;
35
33
  this.configurationService = configurationService;
@@ -39,7 +37,6 @@ export class IFrameInfoWebviewFactory {
39
37
  this.infoviewElement = infoviewElement;
40
38
  }
41
39
  make(editorApi, stylesheet, column) {
42
- this.editorApi = editorApi;
43
40
  this.iframe = document.createElement("iframe");
44
41
  this.infoviewElement.append(this.iframe);
45
42
  this.iframe.contentWindow.document.open();
@@ -52,7 +49,7 @@ export class IFrameInfoWebviewFactory {
52
49
  // inside the webview through the standard message event.
53
50
  // The receiving of these messages is done inside webview\index.ts where it
54
51
  // calls window.addEventListener('message',...
55
- this.rpc = new Rpc(m => {
52
+ const rpc = new Rpc(m => {
56
53
  try {
57
54
  // JSON.stringify is needed here to serialize getters such as `Position.line` and `Position.character`
58
55
  void this.iframe.contentWindow.postMessage(JSON.stringify(m));
@@ -61,20 +58,20 @@ export class IFrameInfoWebviewFactory {
61
58
  // ignore any disposed object exceptions
62
59
  }
63
60
  });
64
- this.rpc.register(editorApi);
61
+ rpc.register(editorApi);
65
62
  // Similarly, we can received data from the webview by listening to onDidReceiveMessage.
66
63
  document.defaultView.addEventListener('message', m => {
67
64
  if (m.source != this.iframe.contentWindow) {
68
65
  return;
69
66
  }
70
67
  try {
71
- this.rpc.messageReceived(JSON.parse(m.data));
68
+ rpc.messageReceived(JSON.parse(m.data));
72
69
  }
73
70
  catch {
74
71
  // ignore any disposed object exceptions
75
72
  }
76
73
  });
77
- return new IFrameInfoWebview(this.iframe, this.rpc);
74
+ return new IFrameInfoWebview(this.iframe, rpc);
78
75
  }
79
76
  updateCssVars() {
80
77
  const theme = this.themeService.getColorTheme();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lean4monaco",
3
- "version": "1.0.42",
3
+ "version": "1.0.43",
4
4
  "description": "Monaco Editor support for the Lean 4 theorem prover.",
5
5
  "keywords": [
6
6
  "lean",
@@ -43,7 +43,7 @@
43
43
  "dependencies": {
44
44
  "@leanprover/infoview": "^0.7.3",
45
45
  "@leanprover/infoview-api": "^0.4.0",
46
- "@leanprover/unicode-input": "=0.1.0",
46
+ "@leanprover/unicode-input": "^0.1.2",
47
47
  "concurrently": "^8.2.2",
48
48
  "import-meta-resolve": "^4.1.0",
49
49
  "memfs": "^4.9.3",