lean4monaco 1.0.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.
Files changed (87) hide show
  1. package/README.md +79 -0
  2. package/dist/editor.d.ts +10 -0
  3. package/dist/editor.js +31 -0
  4. package/dist/importmetaurl.d.ts +2 -0
  5. package/dist/importmetaurl.js +26 -0
  6. package/dist/index.d.ts +2 -0
  7. package/dist/index.js +2 -0
  8. package/dist/infowebview.d.ts +21 -0
  9. package/dist/infowebview.js +80 -0
  10. package/dist/leanmonaco.d.ts +26 -0
  11. package/dist/leanmonaco.js +205 -0
  12. package/dist/monaco-lean4/lean4-infoview/package.json +59 -0
  13. package/dist/monaco-lean4/lean4-infoview/src/infoview/index.css +272 -0
  14. package/dist/monaco-lean4/lean4-infoview/test/tsconfig.json +7 -0
  15. package/dist/monaco-lean4/lean4-infoview/tsconfig.json +34 -0
  16. package/dist/monaco-lean4/lean4-infoview-api/package.json +20 -0
  17. package/dist/monaco-lean4/lean4-infoview-api/tsconfig.json +29 -0
  18. package/dist/monaco-lean4/lean4-unicode-input/package.json +19 -0
  19. package/dist/monaco-lean4/lean4-unicode-input/src/abbreviations.json +1836 -0
  20. package/dist/monaco-lean4/lean4-unicode-input/tsconfig.json +18 -0
  21. package/dist/monaco-lean4/lean4-unicode-input-component/package.json +22 -0
  22. package/dist/monaco-lean4/lean4-unicode-input-component/tsconfig.json +18 -0
  23. package/dist/monaco-lean4/lerna.json +4 -0
  24. package/dist/monaco-lean4/package-lock.json +14153 -0
  25. package/dist/monaco-lean4/package.json +39 -0
  26. package/dist/monaco-lean4/vscode-lean4/abbreviationview/tsconfig.json +10 -0
  27. package/dist/monaco-lean4/vscode-lean4/language-configuration.json +157 -0
  28. package/dist/monaco-lean4/vscode-lean4/loogleview/static/index.css +94 -0
  29. package/dist/monaco-lean4/vscode-lean4/loogleview/tsconfig.json +10 -0
  30. package/dist/monaco-lean4/vscode-lean4/package.json +944 -0
  31. package/dist/monaco-lean4/vscode-lean4/src/abbreviation/AbbreviationFeature.d.ts +8 -0
  32. package/dist/monaco-lean4/vscode-lean4/src/abbreviation/AbbreviationFeature.js +20 -0
  33. package/dist/monaco-lean4/vscode-lean4/src/abbreviation/AbbreviationHoverProvider.d.ts +12 -0
  34. package/dist/monaco-lean4/vscode-lean4/src/abbreviation/AbbreviationHoverProvider.js +40 -0
  35. package/dist/monaco-lean4/vscode-lean4/src/abbreviation/AbbreviationRewriterFeature.d.ts +19 -0
  36. package/dist/monaco-lean4/vscode-lean4/src/abbreviation/AbbreviationRewriterFeature.js +77 -0
  37. package/dist/monaco-lean4/vscode-lean4/src/abbreviation/VSCodeAbbreviationConfig.d.ts +13 -0
  38. package/dist/monaco-lean4/vscode-lean4/src/abbreviation/VSCodeAbbreviationConfig.js +29 -0
  39. package/dist/monaco-lean4/vscode-lean4/src/abbreviation/VSCodeAbbreviationRewriter.d.ts +27 -0
  40. package/dist/monaco-lean4/vscode-lean4/src/abbreviation/VSCodeAbbreviationRewriter.js +122 -0
  41. package/dist/monaco-lean4/vscode-lean4/src/config.d.ts +33 -0
  42. package/dist/monaco-lean4/vscode-lean4/src/config.js +119 -0
  43. package/dist/monaco-lean4/vscode-lean4/src/diagnostics/setupNotifs.d.ts +27 -0
  44. package/dist/monaco-lean4/vscode-lean4/src/diagnostics/setupNotifs.js +133 -0
  45. package/dist/monaco-lean4/vscode-lean4/src/infoview.d.ts +69 -0
  46. package/dist/monaco-lean4/vscode-lean4/src/infoview.js +711 -0
  47. package/dist/monaco-lean4/vscode-lean4/src/leanclient.d.ts +67 -0
  48. package/dist/monaco-lean4/vscode-lean4/src/leanclient.js +443 -0
  49. package/dist/monaco-lean4/vscode-lean4/src/rpc.d.ts +16 -0
  50. package/dist/monaco-lean4/vscode-lean4/src/rpc.js +102 -0
  51. package/dist/monaco-lean4/vscode-lean4/src/taskgutter.d.ts +11 -0
  52. package/dist/monaco-lean4/vscode-lean4/src/taskgutter.js +130 -0
  53. package/dist/monaco-lean4/vscode-lean4/src/utils/batch.d.ts +37 -0
  54. package/dist/monaco-lean4/vscode-lean4/src/utils/batch.js +203 -0
  55. package/dist/monaco-lean4/vscode-lean4/src/utils/clientProvider.d.ts +41 -0
  56. package/dist/monaco-lean4/vscode-lean4/src/utils/clientProvider.js +205 -0
  57. package/dist/monaco-lean4/vscode-lean4/src/utils/converters.d.ts +16 -0
  58. package/dist/monaco-lean4/vscode-lean4/src/utils/converters.js +129 -0
  59. package/dist/monaco-lean4/vscode-lean4/src/utils/elan.d.ts +3 -0
  60. package/dist/monaco-lean4/vscode-lean4/src/utils/elan.js +4 -0
  61. package/dist/monaco-lean4/vscode-lean4/src/utils/envPath.d.ts +21 -0
  62. package/dist/monaco-lean4/vscode-lean4/src/utils/envPath.js +53 -0
  63. package/dist/monaco-lean4/vscode-lean4/src/utils/exturi.d.ts +35 -0
  64. package/dist/monaco-lean4/vscode-lean4/src/utils/exturi.js +136 -0
  65. package/dist/monaco-lean4/vscode-lean4/src/utils/fsHelper.d.ts +17 -0
  66. package/dist/monaco-lean4/vscode-lean4/src/utils/fsHelper.js +36 -0
  67. package/dist/monaco-lean4/vscode-lean4/src/utils/leanInstaller.d.ts +37 -0
  68. package/dist/monaco-lean4/vscode-lean4/src/utils/leanInstaller.js +210 -0
  69. package/dist/monaco-lean4/vscode-lean4/src/utils/logger.d.ts +7 -0
  70. package/dist/monaco-lean4/vscode-lean4/src/utils/logger.js +20 -0
  71. package/dist/monaco-lean4/vscode-lean4/src/utils/notifs.d.ts +24 -0
  72. package/dist/monaco-lean4/vscode-lean4/src/utils/notifs.js +110 -0
  73. package/dist/monaco-lean4/vscode-lean4/src/utils/projectInfo.d.ts +9 -0
  74. package/dist/monaco-lean4/vscode-lean4/src/utils/projectInfo.js +125 -0
  75. package/dist/monaco-lean4/vscode-lean4/syntaxes/codeblock.json +45 -0
  76. package/dist/monaco-lean4/vscode-lean4/syntaxes/lean4-markdown.json +2637 -0
  77. package/dist/monaco-lean4/vscode-lean4/syntaxes/lean4.json +127 -0
  78. package/dist/monaco-lean4/vscode-lean4/tsconfig.json +18 -0
  79. package/dist/monaco-lean4/vscode-lean4/webview/tsconfig.json +11 -0
  80. package/dist/monacoleanclient.d.ts +4 -0
  81. package/dist/monacoleanclient.js +17 -0
  82. package/dist/preconditions.d.ts +4 -0
  83. package/dist/preconditions.js +3 -0
  84. package/dist/vscode.css +408 -0
  85. package/dist/webview.d.ts +1 -0
  86. package/dist/webview.js +9 -0
  87. package/package.json +45 -0
@@ -0,0 +1,272 @@
1
+ /* Some styles specific to the infoview. */
2
+
3
+ html,
4
+ body {
5
+ height: 100%;
6
+ }
7
+
8
+ .font-code {
9
+ color: var(--vscode-editor-foreground);
10
+ font-family: var(--vscode-editor-font-family);
11
+ font-weight: var(--vscode-editor-font-weight);
12
+ font-size: var(--vscode-editor-font-size);
13
+ line-height: var(--vscode-editor-line-height);
14
+ }
15
+
16
+ .font-size-code-smaller {
17
+ font-size: calc(0.8 * var(--vscode-editor-font-size));
18
+ line-height: calc(0.8 * var(--vscode-editor-line-height));
19
+ }
20
+
21
+ .font-normal {
22
+ font-family: var(--vscode-font-family);
23
+ font-weight: var(--vscode-font-weight);
24
+ font-size: var(--vscode-font-size);
25
+ }
26
+
27
+ .codicon-blank {
28
+ width: 20px;
29
+ height: 16px;
30
+ }
31
+
32
+ /* These are syntax highlights for the string goal view. */
33
+ .goal-goals {
34
+ color: var(--vscode-lean4-infoView\.goalCount);
35
+ }
36
+ .goal-vdash {
37
+ color: var(--vscode-lean4-infoView\.turnstile);
38
+ }
39
+ .goal-case {
40
+ color: var(--vscode-lean4-infoView\.caseLabel);
41
+ }
42
+ .goal-hyp {
43
+ color: var(--vscode-lean4-infoView\.hypothesisName);
44
+ }
45
+ .goal-inaccessible {
46
+ color: var(--vscode-lean4-infoView\.inaccessibleHypothesisName);
47
+ opacity: 0.7;
48
+ font-style: italic;
49
+ font-weight: normal;
50
+ }
51
+
52
+ /* Used to denote text highlighted by the pretty-print expression widget. */
53
+ .highlightable {
54
+ border-radius: 2pt;
55
+ transition: background-color 100ms ease-in-out;
56
+ }
57
+
58
+ .highlight {
59
+ background-color: var(--vscode-editor-selectionBackground) !important;
60
+ }
61
+
62
+ .highlight-selected {
63
+ background-color: var(--vscode-editorOverviewRuler-rangeHighlightForeground);
64
+ }
65
+
66
+ /* Interactive traces */
67
+ .trace-line:hover {
68
+ background-color: #dbeeff;
69
+ }
70
+ .vscode-dark .trace-line:hover {
71
+ background-color: #1a2c3c;
72
+ }
73
+ .trace-class {
74
+ opacity: 0.4;
75
+ }
76
+
77
+ .pre-wrap {
78
+ white-space: pre-wrap;
79
+ }
80
+
81
+ .error {
82
+ color: #e51400;
83
+ }
84
+
85
+ .warning {
86
+ color: #bf8803;
87
+ }
88
+
89
+ .information {
90
+ color: darkgreen;
91
+ }
92
+
93
+ .vscode-dark .error {
94
+ color: #f14c4c;
95
+ }
96
+
97
+ .vscode-dark .warning {
98
+ color: #cca700;
99
+ }
100
+
101
+ .vscode-dark .information {
102
+ color: #89d185;
103
+ }
104
+
105
+ .vscode-high-contrast .error {
106
+ color: lightpink;
107
+ }
108
+
109
+ .vscode-high-contrast .warning {
110
+ color: yellow;
111
+ }
112
+
113
+ .vscode-high-contrast .information {
114
+ color: lightgreen;
115
+ }
116
+
117
+ /* Headers for infoview */
118
+
119
+ .restart-file-button {
120
+ position: fixed;
121
+ bottom: 10px;
122
+ right: 10px;
123
+ z-index: 37;
124
+ }
125
+
126
+ select {
127
+ background-color: var(--vscode-dropdown-background);
128
+ color: var(--vscode-dropdown-foreground);
129
+ border-color: var(--vscode-dropdown-border);
130
+ }
131
+
132
+ /* Style for the rounded box that is the outermost div of every tooltip.
133
+ * We use more specific classes for styling tooltip contents. */
134
+ .tooltip {
135
+ background-color: var(--vscode-editorHoverWidget-background);
136
+ border-radius: 4px;
137
+ border-color: var(--vscode-editorHoverWidget-border);
138
+ border-width: 1px;
139
+ border-style: solid;
140
+ box-shadow: 1px 1px 5px var(--vscode-widget-shadow);
141
+ box-sizing: border-box;
142
+ /* Note: max-height is set in JS. */
143
+ max-width: 70%;
144
+ /* Flexbox ensures that contents don't overflow. */
145
+ display: flex;
146
+ }
147
+
148
+ .tooltip-content {
149
+ padding: 4px 8px;
150
+ overflow-y: auto;
151
+ overscroll-behavior: contain;
152
+ }
153
+
154
+ /* Contents of a list of selections shown as a tooltip. */
155
+ .tooltip-menu-content {
156
+ color: var(--vscode-editorHoverWidget-foreground);
157
+ }
158
+
159
+ .tooltip-menu-content .tooltip-menu-text {
160
+ text-align: center;
161
+ padding: 5px;
162
+ vertical-align: top;
163
+ display: inline-block;
164
+ }
165
+
166
+ .tooltip-menu-content .tooltip-menu-icon {
167
+ padding: 0px;
168
+ margin-top: 6px;
169
+ }
170
+
171
+ /*---------------------------------------------------------------------------------------------
172
+ * Copyright (c) Microsoft Corporation. All rights reserved.
173
+ * Licensed under the MIT License. See License.txt in the project root for license information.
174
+ *--------------------------------------------------------------------------------------------*/
175
+ /* adapted from https://github.com/microsoft/vscode/blob/main/src/vs/base/browser/ui/hover/hover.css */
176
+
177
+ /* Contents of a code tooltip showing a value, type, documentation, etc. */
178
+ .tooltip-code-content {
179
+ color: var(--vscode-editorHoverWidget-foreground);
180
+ line-height: var(--vscode-editor-line-height);
181
+ }
182
+
183
+ .tooltip-code-content a:hover {
184
+ cursor: pointer;
185
+ }
186
+
187
+ .tooltip-code-content p,
188
+ .tooltip-code-content .code,
189
+ .tooltip-code-content ul {
190
+ margin: 8px 0;
191
+ }
192
+
193
+ .tooltip-code-content hr {
194
+ box-sizing: border-box;
195
+ border-left: -8px;
196
+ border-right: -8px;
197
+ margin-top: 4px;
198
+ margin-bottom: 4px;
199
+ height: 1px;
200
+ border-bottom-width: 0px;
201
+ border-top-width: 1px;
202
+ border-top-style: solid;
203
+ border-top-color: var(--vscode-editorHoverWidget-border);
204
+ }
205
+
206
+ .tooltip-code-content p:first-child,
207
+ .tooltip-code-content .code:first-child,
208
+ .tooltip-code-content ul:first-child {
209
+ margin-top: 0;
210
+ }
211
+
212
+ .tooltip-code-content p:last-child,
213
+ .tooltip-code-content .code:last-child,
214
+ .tooltip-code-content ul:last-child {
215
+ margin-bottom: 0;
216
+ }
217
+
218
+ /* MarkupContent Layout */
219
+ .tooltip-code-content ul {
220
+ padding-left: 20px;
221
+ }
222
+ .tooltip-code-content ol {
223
+ padding-left: 20px;
224
+ }
225
+
226
+ .tooltip-code-content li > p {
227
+ margin-bottom: 0;
228
+ }
229
+
230
+ .tooltip-code-content li > ul {
231
+ margin-top: 0;
232
+ }
233
+
234
+ .tooltip-code-content code {
235
+ border-radius: 3px;
236
+ padding: 0 0.4em;
237
+ background-color: var(--vscode-textCodeBlock-background);
238
+ }
239
+
240
+ .vscode-high-contrast .inserted-text {
241
+ border: thin solid var(--vscode-diffEditor-insertedTextBorder);
242
+ }
243
+
244
+ .vscode-high-contrast .removed-text {
245
+ border: thin solid var(--vscode-diffEditor-removedTextBorder);
246
+ }
247
+
248
+ .inserted-text {
249
+ background-color: var(--vscode-diffEditor-insertedTextBackground);
250
+ border-radius: 2pt;
251
+ }
252
+
253
+ .removed-text {
254
+ background-color: var(--vscode-diffEditor-removedTextBackground);
255
+ border-radius: 2pt;
256
+ }
257
+
258
+ .b--inserted {
259
+ border-color: var(--vscode-diffEditor-insertedTextBackground) !important;
260
+ }
261
+
262
+ .b--modified {
263
+ border-color: var(--vscode-diffEditor-insertedTextBackground) !important;
264
+ }
265
+
266
+ .b--removed {
267
+ border-color: var(--vscode-diffEditor-removedTextBackground) !important;
268
+ }
269
+
270
+ .b--transparent {
271
+ border-color: transparent;
272
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "extends": "../tsconfig",
3
+ "compilerOptions": {
4
+ "rootDir": "../"
5
+ },
6
+ "include": ["./**/*", "../src/**/*"]
7
+ }
@@ -0,0 +1,34 @@
1
+ {
2
+ "compilerOptions": {
3
+ /* Projects */
4
+ "composite": true,
5
+
6
+ /* Language and Environment */
7
+ "target": "esnext",
8
+ "lib": ["DOM", "DOM.Iterable", "ESNext"],
9
+ "jsx": "react-jsx",
10
+
11
+ /* Modules */
12
+ "module": "esnext",
13
+ "moduleResolution": "node",
14
+
15
+ /* Emit */
16
+ "sourceMap": true,
17
+ "rootDir": "src",
18
+ "outDir": "dist",
19
+
20
+ /* Interop Constraints */
21
+ "esModuleInterop": true,
22
+ "forceConsistentCasingInFileNames": true,
23
+
24
+ /* Type Checking */
25
+ "strict": true,
26
+ "noImplicitAny": true,
27
+ "noFallthroughCasesInSwitch": true,
28
+
29
+ /* Completeness */
30
+ "skipLibCheck": true
31
+ },
32
+ "include": ["src/**/*"],
33
+ "exclude": ["dist"]
34
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "@leanprover/infoview-api",
3
+ "version": "0.4.0",
4
+ "description": "Types and API for @leanprover/infoview.",
5
+ "scripts": {
6
+ "watch": "tsc --watch",
7
+ "watchTest": "tsc --watch",
8
+ "build": "tsc"
9
+ },
10
+ "main": "dist/index",
11
+ "types": "dist/index",
12
+ "files": [
13
+ "dist/*"
14
+ ],
15
+ "license": "Apache-2.0",
16
+ "devDependencies": {
17
+ "typescript": "^5.4.5",
18
+ "vscode-languageserver-protocol": "^3.17.3"
19
+ }
20
+ }
@@ -0,0 +1,29 @@
1
+ {
2
+ "compilerOptions": {
3
+ /* Code generation */
4
+ "target": "ES2021",
5
+ "module": "ES6",
6
+ "lib": ["dom", "dom.iterable", "ES2021"],
7
+ "allowJs": true,
8
+ "esModuleInterop": true,
9
+
10
+ /* Type-checking */
11
+ "strict": true,
12
+ "noFallthroughCasesInSwitch": true,
13
+ "skipLibCheck": true,
14
+
15
+ /* Module resolution */
16
+ "moduleResolution": "node",
17
+ "allowSyntheticDefaultImports": true,
18
+ "forceConsistentCasingInFileNames": true,
19
+
20
+ /* Output */
21
+ "composite": true,
22
+ "rootDir": "src/",
23
+ "outDir": "dist/",
24
+ "declaration": true,
25
+ "sourceMap": true
26
+ },
27
+
28
+ "include": ["src/**/*"]
29
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "@leanprover/unicode-input",
3
+ "version": "0.1.0",
4
+ "description": "Unicode input mechanism for the Lean 4 theorem prover",
5
+ "scripts": {
6
+ "watch": "tsc --watch",
7
+ "watchTest": "tsc --watch",
8
+ "build": "tsc"
9
+ },
10
+ "main": "dist/index",
11
+ "types": "dist/index",
12
+ "files": [
13
+ "dist/*"
14
+ ],
15
+ "license": "Apache-2.0",
16
+ "devDependencies": {
17
+ "typescript": "^5.4.5"
18
+ }
19
+ }