lean4monaco 1.0.46 → 1.1.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 (209) hide show
  1. package/README.md +75 -0
  2. package/dist/JuliaMono-Regular.ttf +0 -0
  3. package/dist/css/custom.css +7 -1
  4. package/dist/infowebview.d.ts +3 -4
  5. package/dist/infowebview.js +4 -4
  6. package/dist/lean4-infoview/codicon.ttf +0 -0
  7. package/dist/lean4-infoview/esm-shims/react-dom.d.ts +5 -0
  8. package/dist/lean4-infoview/esm-shims/react-jsx-runtime.d.ts +5 -0
  9. package/dist/lean4-infoview/esm-shims/react.d.ts +5 -0
  10. package/dist/lean4-infoview/index.css +4161 -0
  11. package/dist/lean4-infoview/index.d.ts +16 -0
  12. package/dist/lean4-infoview/index.development.js +37312 -0
  13. package/dist/lean4-infoview/index.production.min.js +1528 -0
  14. package/dist/lean4-infoview/infoview/collapsing.d.ts +12 -0
  15. package/dist/lean4-infoview/infoview/contexts.d.ts +10 -0
  16. package/dist/lean4-infoview/infoview/editorConnection.d.ts +22 -0
  17. package/dist/lean4-infoview/infoview/errors.d.ts +14 -0
  18. package/dist/lean4-infoview/infoview/event.d.ts +33 -0
  19. package/dist/lean4-infoview/infoview/goalLocation.d.ts +61 -0
  20. package/dist/lean4-infoview/infoview/goals.d.ts +46 -0
  21. package/dist/lean4-infoview/infoview/info.d.ts +18 -0
  22. package/dist/lean4-infoview/infoview/infos.d.ts +2 -0
  23. package/dist/lean4-infoview/infoview/interactiveCode.d.ts +19 -0
  24. package/dist/lean4-infoview/infoview/main.d.ts +13 -0
  25. package/dist/lean4-infoview/infoview/messages.d.ts +19 -0
  26. package/dist/lean4-infoview/infoview/rpcSessions.d.ts +11 -0
  27. package/dist/lean4-infoview/infoview/serverVersion.d.ts +10 -0
  28. package/dist/lean4-infoview/infoview/tooltips.d.ts +32 -0
  29. package/dist/lean4-infoview/infoview/traceExplorer.d.ts +11 -0
  30. package/dist/lean4-infoview/infoview/userWidget.d.ts +39 -0
  31. package/dist/lean4-infoview/infoview/util.d.ts +144 -0
  32. package/dist/lean4-infoview/loader.d.ts +20 -0
  33. package/dist/lean4-infoview/loader.development.js +1006 -0
  34. package/dist/lean4-infoview/loader.production.min.js +1 -0
  35. package/dist/lean4-infoview/react-dom.development.js +30537 -0
  36. package/dist/lean4-infoview/react-dom.production.min.js +21 -0
  37. package/dist/lean4-infoview/react-jsx-runtime.development.js +1362 -0
  38. package/dist/lean4-infoview/react-jsx-runtime.production.min.js +1 -0
  39. package/dist/lean4-infoview/react.development.js +2823 -0
  40. package/dist/lean4-infoview/react.production.min.js +1 -0
  41. package/dist/leanmonaco.js +5 -4
  42. package/dist/monaco-lean4/vscode-lean4/package.json +944 -0
  43. package/dist/monaco-lean4/vscode-lean4/src/abbreviation/AbbreviationFeature.d.ts +9 -0
  44. package/dist/monaco-lean4/vscode-lean4/src/abbreviation/AbbreviationFeature.js +20 -0
  45. package/dist/monaco-lean4/vscode-lean4/src/abbreviation/AbbreviationHoverProvider.d.ts +12 -0
  46. package/dist/monaco-lean4/vscode-lean4/src/abbreviation/AbbreviationHoverProvider.js +40 -0
  47. package/dist/monaco-lean4/vscode-lean4/src/abbreviation/AbbreviationRewriterFeature.d.ts +20 -0
  48. package/dist/monaco-lean4/vscode-lean4/src/abbreviation/AbbreviationRewriterFeature.js +79 -0
  49. package/dist/monaco-lean4/vscode-lean4/src/abbreviation/VSCodeAbbreviationConfig.d.ts +13 -0
  50. package/dist/monaco-lean4/vscode-lean4/src/abbreviation/VSCodeAbbreviationConfig.js +29 -0
  51. package/dist/monaco-lean4/vscode-lean4/src/abbreviation/VSCodeAbbreviationRewriter.d.ts +28 -0
  52. package/dist/monaco-lean4/vscode-lean4/src/abbreviation/VSCodeAbbreviationRewriter.js +124 -0
  53. package/dist/monaco-lean4/vscode-lean4/src/config.d.ts +33 -0
  54. package/dist/monaco-lean4/vscode-lean4/src/config.js +119 -0
  55. package/dist/monaco-lean4/vscode-lean4/src/diagnostics/setupNotifs.d.ts +27 -0
  56. package/dist/monaco-lean4/vscode-lean4/src/diagnostics/setupNotifs.js +133 -0
  57. package/dist/monaco-lean4/vscode-lean4/src/infoview.d.ts +69 -0
  58. package/dist/monaco-lean4/vscode-lean4/src/infoview.js +711 -0
  59. package/dist/monaco-lean4/vscode-lean4/src/leanclient.d.ts +67 -0
  60. package/dist/monaco-lean4/vscode-lean4/src/leanclient.js +443 -0
  61. package/dist/monaco-lean4/vscode-lean4/src/rpc.d.ts +16 -0
  62. package/dist/monaco-lean4/vscode-lean4/src/rpc.js +102 -0
  63. package/dist/monaco-lean4/vscode-lean4/src/taskgutter.d.ts +11 -0
  64. package/dist/monaco-lean4/vscode-lean4/src/taskgutter.js +130 -0
  65. package/dist/monaco-lean4/vscode-lean4/src/utils/batch.d.ts +37 -0
  66. package/dist/monaco-lean4/vscode-lean4/src/utils/batch.js +203 -0
  67. package/dist/monaco-lean4/vscode-lean4/src/utils/clientProvider.d.ts +41 -0
  68. package/dist/monaco-lean4/vscode-lean4/src/utils/clientProvider.js +205 -0
  69. package/dist/monaco-lean4/vscode-lean4/src/utils/converters.d.ts +16 -0
  70. package/dist/monaco-lean4/vscode-lean4/src/utils/converters.js +129 -0
  71. package/dist/monaco-lean4/vscode-lean4/src/utils/elan.d.ts +3 -0
  72. package/dist/monaco-lean4/vscode-lean4/src/utils/elan.js +4 -0
  73. package/dist/monaco-lean4/vscode-lean4/src/utils/envPath.d.ts +21 -0
  74. package/dist/monaco-lean4/vscode-lean4/src/utils/envPath.js +53 -0
  75. package/dist/monaco-lean4/vscode-lean4/src/utils/exturi.d.ts +35 -0
  76. package/dist/monaco-lean4/vscode-lean4/src/utils/exturi.js +136 -0
  77. package/dist/monaco-lean4/vscode-lean4/src/utils/fsHelper.d.ts +17 -0
  78. package/dist/monaco-lean4/vscode-lean4/src/utils/fsHelper.js +36 -0
  79. package/dist/monaco-lean4/vscode-lean4/src/utils/leanInstaller.d.ts +37 -0
  80. package/dist/monaco-lean4/vscode-lean4/src/utils/leanInstaller.js +210 -0
  81. package/dist/monaco-lean4/vscode-lean4/src/utils/logger.d.ts +7 -0
  82. package/dist/monaco-lean4/vscode-lean4/src/utils/logger.js +20 -0
  83. package/dist/monaco-lean4/vscode-lean4/src/utils/notifs.d.ts +24 -0
  84. package/dist/monaco-lean4/vscode-lean4/src/utils/notifs.js +110 -0
  85. package/dist/monaco-lean4/vscode-lean4/src/utils/projectInfo.d.ts +9 -0
  86. package/dist/monaco-lean4/vscode-lean4/src/utils/projectInfo.js +125 -0
  87. package/dist/monacoleanclient.d.ts +1 -2
  88. package/dist/monacoleanclient.js +3 -3
  89. package/dist/vscode-lean4/lean4-infoview/package.json +25 -23
  90. package/dist/vscode-lean4/lean4-infoview/src/infoview/highlightjs.css +210 -0
  91. package/dist/vscode-lean4/lean4-infoview/tsconfig.json +6 -2
  92. package/dist/vscode-lean4/lean4-infoview-api/package.json +1 -1
  93. package/dist/vscode-lean4/lean4-unicode-input/package.json +1 -1
  94. package/dist/vscode-lean4/lean4-unicode-input/src/abbreviations.json +12 -12
  95. package/dist/vscode-lean4/lean4-unicode-input-component/package.json +2 -2
  96. package/dist/vscode-lean4/package-lock.json +6129 -3245
  97. package/dist/vscode-lean4/vscode-lean4/language-configuration.json +1 -1
  98. package/dist/vscode-lean4/vscode-lean4/loogleview/static/index.css +19 -16
  99. package/dist/vscode-lean4/vscode-lean4/media/diagnostic-gutter-icons/error-dark.svg +91 -0
  100. package/dist/vscode-lean4/vscode-lean4/media/diagnostic-gutter-icons/error-i-dark.svg +114 -0
  101. package/dist/vscode-lean4/vscode-lean4/media/diagnostic-gutter-icons/error-i-light.svg +114 -0
  102. package/dist/vscode-lean4/vscode-lean4/media/diagnostic-gutter-icons/error-i-passthrough-dark.svg +109 -0
  103. package/dist/vscode-lean4/vscode-lean4/media/diagnostic-gutter-icons/error-i-passthrough-light.svg +109 -0
  104. package/dist/vscode-lean4/vscode-lean4/media/diagnostic-gutter-icons/error-init-dark.svg +100 -0
  105. package/dist/vscode-lean4/vscode-lean4/media/diagnostic-gutter-icons/error-init-light.svg +100 -0
  106. package/dist/vscode-lean4/vscode-lean4/media/diagnostic-gutter-icons/error-l-dark.svg +123 -0
  107. package/dist/vscode-lean4/vscode-lean4/media/diagnostic-gutter-icons/error-l-light.svg +123 -0
  108. package/dist/vscode-lean4/vscode-lean4/media/diagnostic-gutter-icons/error-l-passthrough-dark.svg +109 -0
  109. package/dist/vscode-lean4/vscode-lean4/media/diagnostic-gutter-icons/error-l-passthrough-light.svg +109 -0
  110. package/dist/vscode-lean4/vscode-lean4/media/diagnostic-gutter-icons/error-light.svg +91 -0
  111. package/dist/vscode-lean4/vscode-lean4/media/diagnostic-gutter-icons/error-t-dark.svg +123 -0
  112. package/dist/vscode-lean4/vscode-lean4/media/diagnostic-gutter-icons/error-t-light.svg +123 -0
  113. package/dist/vscode-lean4/vscode-lean4/media/diagnostic-gutter-icons/error-t-passthrough-dark.svg +118 -0
  114. package/dist/vscode-lean4/vscode-lean4/media/diagnostic-gutter-icons/error-t-passthrough-light.svg +118 -0
  115. package/dist/vscode-lean4/vscode-lean4/media/diagnostic-gutter-icons/goals-accomplished-checkmark-dark.svg +138 -0
  116. package/dist/vscode-lean4/vscode-lean4/media/diagnostic-gutter-icons/goals-accomplished-checkmark-i-passthrough-dark.svg +160 -0
  117. package/dist/vscode-lean4/vscode-lean4/media/diagnostic-gutter-icons/goals-accomplished-checkmark-i-passthrough-light.svg +160 -0
  118. package/dist/vscode-lean4/vscode-lean4/media/diagnostic-gutter-icons/goals-accomplished-checkmark-l-passthrough-dark.svg +158 -0
  119. package/dist/vscode-lean4/vscode-lean4/media/diagnostic-gutter-icons/goals-accomplished-checkmark-l-passthrough-light.svg +158 -0
  120. package/dist/vscode-lean4/vscode-lean4/media/diagnostic-gutter-icons/goals-accomplished-checkmark-light.svg +138 -0
  121. package/dist/vscode-lean4/vscode-lean4/media/diagnostic-gutter-icons/goals-accomplished-checkmark-t-passthrough-dark.svg +169 -0
  122. package/dist/vscode-lean4/vscode-lean4/media/diagnostic-gutter-icons/goals-accomplished-checkmark-t-passthrough-light.svg +169 -0
  123. package/dist/vscode-lean4/vscode-lean4/media/diagnostic-gutter-icons/goals-accomplished-circled-checkmark-dark.svg +147 -0
  124. package/dist/vscode-lean4/vscode-lean4/media/diagnostic-gutter-icons/goals-accomplished-circled-checkmark-i-passthrough-dark.svg +170 -0
  125. package/dist/vscode-lean4/vscode-lean4/media/diagnostic-gutter-icons/goals-accomplished-circled-checkmark-i-passthrough-light.svg +170 -0
  126. package/dist/vscode-lean4/vscode-lean4/media/diagnostic-gutter-icons/goals-accomplished-circled-checkmark-l-passthrough-dark.svg +167 -0
  127. package/dist/vscode-lean4/vscode-lean4/media/diagnostic-gutter-icons/goals-accomplished-circled-checkmark-l-passthrough-light.svg +167 -0
  128. package/dist/vscode-lean4/vscode-lean4/media/diagnostic-gutter-icons/goals-accomplished-circled-checkmark-light.svg +147 -0
  129. package/dist/vscode-lean4/vscode-lean4/media/diagnostic-gutter-icons/goals-accomplished-circled-checkmark-t-passthrough-dark.svg +179 -0
  130. package/dist/vscode-lean4/vscode-lean4/media/diagnostic-gutter-icons/goals-accomplished-circled-checkmark-t-passthrough-light.svg +179 -0
  131. package/dist/vscode-lean4/vscode-lean4/media/diagnostic-gutter-icons/goals-accomplished-octopus-dark.svg +165 -0
  132. package/dist/vscode-lean4/vscode-lean4/media/diagnostic-gutter-icons/goals-accomplished-octopus-i-passthrough-dark.svg +187 -0
  133. package/dist/vscode-lean4/vscode-lean4/media/diagnostic-gutter-icons/goals-accomplished-octopus-i-passthrough-light.svg +187 -0
  134. package/dist/vscode-lean4/vscode-lean4/media/diagnostic-gutter-icons/goals-accomplished-octopus-l-passthrough-dark.svg +185 -0
  135. package/dist/vscode-lean4/vscode-lean4/media/diagnostic-gutter-icons/goals-accomplished-octopus-l-passthrough-light.svg +185 -0
  136. package/dist/vscode-lean4/vscode-lean4/media/diagnostic-gutter-icons/goals-accomplished-octopus-light.svg +165 -0
  137. package/dist/vscode-lean4/vscode-lean4/media/diagnostic-gutter-icons/goals-accomplished-octopus-t-passthrough-dark.svg +196 -0
  138. package/dist/vscode-lean4/vscode-lean4/media/diagnostic-gutter-icons/goals-accomplished-octopus-t-passthrough-light.svg +196 -0
  139. package/dist/vscode-lean4/vscode-lean4/media/diagnostic-gutter-icons/goals-accomplished-tada-dark.svg +184 -0
  140. package/dist/vscode-lean4/vscode-lean4/media/diagnostic-gutter-icons/goals-accomplished-tada-i-passthrough-dark.svg +206 -0
  141. package/dist/vscode-lean4/vscode-lean4/media/diagnostic-gutter-icons/goals-accomplished-tada-i-passthrough-light.svg +206 -0
  142. package/dist/vscode-lean4/vscode-lean4/media/diagnostic-gutter-icons/goals-accomplished-tada-l-passthrough-dark.svg +204 -0
  143. package/dist/vscode-lean4/vscode-lean4/media/diagnostic-gutter-icons/goals-accomplished-tada-l-passthrough-light.svg +204 -0
  144. package/dist/vscode-lean4/vscode-lean4/media/diagnostic-gutter-icons/goals-accomplished-tada-light.svg +184 -0
  145. package/dist/vscode-lean4/vscode-lean4/media/diagnostic-gutter-icons/goals-accomplished-tada-t-passthrough-dark.svg +215 -0
  146. package/dist/vscode-lean4/vscode-lean4/media/diagnostic-gutter-icons/goals-accomplished-tada-t-passthrough-light.svg +215 -0
  147. package/dist/vscode-lean4/vscode-lean4/media/diagnostic-gutter-icons/warning-dark.svg +132 -0
  148. package/dist/vscode-lean4/vscode-lean4/media/diagnostic-gutter-icons/warning-i-passthrough-dark.svg +154 -0
  149. package/dist/vscode-lean4/vscode-lean4/media/diagnostic-gutter-icons/warning-i-passthrough-light.svg +154 -0
  150. package/dist/vscode-lean4/vscode-lean4/media/diagnostic-gutter-icons/warning-l-passthrough-dark.svg +152 -0
  151. package/dist/vscode-lean4/vscode-lean4/media/diagnostic-gutter-icons/warning-l-passthrough-light.svg +152 -0
  152. package/dist/vscode-lean4/vscode-lean4/media/diagnostic-gutter-icons/warning-light.svg +132 -0
  153. package/dist/vscode-lean4/vscode-lean4/media/diagnostic-gutter-icons/warning-t-passthrough-dark.svg +163 -0
  154. package/dist/vscode-lean4/vscode-lean4/media/diagnostic-gutter-icons/warning-t-passthrough-light.svg +163 -0
  155. package/dist/vscode-lean4/vscode-lean4/moogleview/static/index.css +198 -0
  156. package/dist/vscode-lean4/vscode-lean4/moogleview/tsconfig.json +10 -0
  157. package/dist/vscode-lean4/vscode-lean4/package.json +638 -18
  158. package/dist/vscode-lean4/vscode-lean4/src/abbreviation/AbbreviationFeature.d.ts +2 -2
  159. package/dist/vscode-lean4/vscode-lean4/src/abbreviation/AbbreviationFeature.js +2 -2
  160. package/dist/vscode-lean4/vscode-lean4/src/abbreviation/AbbreviationRewriterFeature.d.ts +2 -3
  161. package/dist/vscode-lean4/vscode-lean4/src/abbreviation/AbbreviationRewriterFeature.js +3 -5
  162. package/dist/vscode-lean4/vscode-lean4/src/abbreviation/VSCodeAbbreviationRewriter.d.ts +1 -2
  163. package/dist/vscode-lean4/vscode-lean4/src/abbreviation/VSCodeAbbreviationRewriter.js +4 -8
  164. package/dist/vscode-lean4/vscode-lean4/src/config.d.ts +14 -1
  165. package/dist/vscode-lean4/vscode-lean4/src/config.js +56 -5
  166. package/dist/vscode-lean4/vscode-lean4/src/diagnostics/setupDiagnoser.d.ts +36 -5
  167. package/dist/vscode-lean4/vscode-lean4/src/diagnostics/setupDiagnoser.js +59 -23
  168. package/dist/vscode-lean4/vscode-lean4/src/diagnostics/setupDiagnostics.d.ts +22 -17
  169. package/dist/vscode-lean4/vscode-lean4/src/diagnostics/setupDiagnostics.js +182 -119
  170. package/dist/vscode-lean4/vscode-lean4/src/diagnostics/setupNotifs.d.ts +33 -20
  171. package/dist/vscode-lean4/vscode-lean4/src/diagnostics/setupNotifs.js +235 -89
  172. package/dist/vscode-lean4/vscode-lean4/src/infoview.d.ts +7 -18
  173. package/dist/vscode-lean4/vscode-lean4/src/infoview.js +217 -102
  174. package/dist/vscode-lean4/vscode-lean4/src/leanclient.d.ts +12 -7
  175. package/dist/vscode-lean4/vscode-lean4/src/leanclient.js +187 -64
  176. package/dist/vscode-lean4/vscode-lean4/src/taskgutter.d.ts +35 -3
  177. package/dist/vscode-lean4/vscode-lean4/src/taskgutter.js +533 -93
  178. package/dist/vscode-lean4/vscode-lean4/src/utils/batch.d.ts +12 -4
  179. package/dist/vscode-lean4/vscode-lean4/src/utils/batch.js +78 -72
  180. package/dist/vscode-lean4/vscode-lean4/src/utils/clientProvider.d.ts +9 -9
  181. package/dist/vscode-lean4/vscode-lean4/src/utils/clientProvider.js +121 -77
  182. package/dist/vscode-lean4/vscode-lean4/src/utils/converters.d.ts +15 -0
  183. package/dist/vscode-lean4/vscode-lean4/src/utils/converters.js +9 -0
  184. package/dist/vscode-lean4/vscode-lean4/src/utils/elan.d.ts +179 -1
  185. package/dist/vscode-lean4/vscode-lean4/src/utils/elan.js +422 -3
  186. package/dist/vscode-lean4/vscode-lean4/src/utils/exturi.d.ts +3 -1
  187. package/dist/vscode-lean4/vscode-lean4/src/utils/exturi.js +11 -11
  188. package/dist/vscode-lean4/vscode-lean4/src/utils/groupBy.d.ts +2 -0
  189. package/dist/vscode-lean4/vscode-lean4/src/utils/groupBy.js +17 -0
  190. package/dist/vscode-lean4/vscode-lean4/src/utils/internalErrors.d.ts +2 -0
  191. package/dist/vscode-lean4/vscode-lean4/src/utils/internalErrors.js +35 -0
  192. package/dist/vscode-lean4/vscode-lean4/src/utils/leanCmdRunner.d.ts +34 -0
  193. package/dist/vscode-lean4/vscode-lean4/src/utils/leanCmdRunner.js +249 -0
  194. package/dist/vscode-lean4/vscode-lean4/src/utils/leanEditorProvider.d.ts +83 -0
  195. package/dist/vscode-lean4/vscode-lean4/src/utils/leanEditorProvider.js +323 -0
  196. package/dist/vscode-lean4/vscode-lean4/src/utils/leanInstaller.d.ts +41 -12
  197. package/dist/vscode-lean4/vscode-lean4/src/utils/leanInstaller.js +245 -128
  198. package/dist/vscode-lean4/vscode-lean4/src/utils/notifs.d.ts +27 -22
  199. package/dist/vscode-lean4/vscode-lean4/src/utils/notifs.js +177 -82
  200. package/dist/vscode-lean4/vscode-lean4/src/utils/projectInfo.d.ts +11 -4
  201. package/dist/vscode-lean4/vscode-lean4/src/utils/projectInfo.js +18 -16
  202. package/dist/vscode-lean4/vscode-lean4/src/utils/semverRegex.d.ts +1 -0
  203. package/dist/vscode-lean4/vscode-lean4/src/utils/semverRegex.js +2 -0
  204. package/dist/vscode-lean4/vscode-lean4/src/utils/viewColumn.d.ts +3 -0
  205. package/dist/vscode-lean4/vscode-lean4/src/utils/viewColumn.js +22 -0
  206. package/dist/vscode-lean4/vscode-lean4/tsconfig.json +2 -1
  207. package/dist/vscode-lean4/vscode-lean4/webview/tsconfig.json +3 -1
  208. package/dist/vscode.css +7 -0
  209. package/package.json +7 -5
package/README.md CHANGED
@@ -196,8 +196,19 @@ Some random errors we encountered. If you have more, please share them.
196
196
  * Warnings about `glob` and `inflight` come from `copyfiles`: see [copyfiles#132](https://github.com/calvinmetcalf/copyfiles/pull/132)
197
197
  * Warning about ` @types/cypress` comes from `cypress-iframe`
198
198
 
199
+
199
200
  ## Development
200
201
 
202
+ ### Beware of the Git Submodule
203
+
204
+ This repo contains a submodule in `src/vscode-lean4`. So after cloning the repo and after pulling changes, run
205
+ ```
206
+ git submodule update --init
207
+ ```
208
+ to update the submodule as well.
209
+
210
+ ### Testing
211
+
201
212
  You can run
202
213
 
203
214
  ```
@@ -207,6 +218,70 @@ npm test
207
218
 
208
219
  for the automated cypress tests.
209
220
 
221
+ ### Merge upstream changes from the VSCode extension
222
+
223
+ Here is how to get the latest changes from the VSCode extension:
224
+ ```
225
+ cd src/vscode-lean4
226
+ git remote add upstream https://github.com/leanprover/vscode-lean4.git
227
+ git fetch upstream
228
+ git merge upstream/master
229
+ ```
230
+ If there are merge conflicts, resolve them.
231
+
232
+ Make sure that the `@leanprover` packages (and possibly others?)
233
+ listed under `dependencies` in `package.json` point to the same versions as the packages
234
+ listed under `dependencies` in `src/vscode-lean4/package.json`.
235
+
236
+ Verify that the everything still works:
237
+ ```
238
+ npm install
239
+ npm test
240
+ ```
241
+
242
+ Stage the submodule pointer to the new merge commit
243
+ and if you made changes to `package.json`, stage `package.json` and `package-lock.json` as well:
244
+ ```
245
+ cd ../..
246
+ git add src/vscode-lean4 package.json package-lock.json
247
+ ```
248
+
249
+ Commit your changes:
250
+ ```
251
+ git commit -m "Merge upstream changes from vscode-lean4"
252
+ ```
253
+
254
+ Push the new commits in the submodule and in the parent repo:
255
+ ```
256
+ cd src/vscode/lean4
257
+ git push
258
+ cd ../..
259
+ git push
260
+ ```
261
+
262
+ ### Publishing
263
+
264
+ Increase the version number in `package.json`.
265
+
266
+ Verify that the everything works:
267
+ ```
268
+ npm install
269
+ npm test
270
+ ```
271
+
272
+ Publish:
273
+ ```
274
+ npm publish
275
+ ```
276
+
277
+ If it succeeded, commit the new version number:
278
+ ```
279
+ git add package.json package-lock.json demo/package-lock.json
280
+ git commit -m "Publish npm package"
281
+ git push
282
+ ```
283
+
284
+
210
285
  ### Docker image
211
286
 
212
287
  There is a `Dockerfile` which defines an image where the server is run in a Linux container.
Binary file
@@ -10,4 +10,10 @@ TODO: These might be superfluous if the styles from `vscode-lean4 were integrate
10
10
 
11
11
  .font-size-code-smaller {
12
12
  opacity: 0.6;
13
- }
13
+ }
14
+
15
+ /* Hide "Save current config to default config" button */
16
+ .saveConfigButton,
17
+ .saveConfigLineBreak {
18
+ display: none;
19
+ }
@@ -1,9 +1,8 @@
1
1
  import { EditorApi, InfoviewApi } from "@leanprover/infoview-api";
2
- import { InfoWebviewFactory, InfoWebview } from "./vscode-lean4/vscode-lean4/src/infoview";
3
2
  import { Rpc } from "./vscode-lean4/vscode-lean4/src/rpc";
4
3
  import { ViewColumn } from "vscode";
5
4
  import { IConfigurationService, IThemeService } from "vscode/services";
6
- export declare class IFrameInfoWebview implements InfoWebview {
5
+ export declare class IFrameInfoWebview {
7
6
  private iframe;
8
7
  rpc: Rpc;
9
8
  visible: boolean;
@@ -14,7 +13,7 @@ export declare class IFrameInfoWebview implements InfoWebview {
14
13
  dispose(): void;
15
14
  reveal(viewColumn?: ViewColumn, preserveFocus?: boolean): void;
16
15
  }
17
- export declare class IFrameInfoWebviewFactory implements InfoWebviewFactory {
16
+ export declare class IFrameInfoWebviewFactory {
18
17
  private themeService;
19
18
  private configurationService;
20
19
  private fontFiles;
@@ -22,7 +21,7 @@ export declare class IFrameInfoWebviewFactory implements InfoWebviewFactory {
22
21
  private iframe;
23
22
  constructor(themeService: IThemeService, configurationService: IConfigurationService, fontFiles: FontFace[]);
24
23
  setInfoviewElement(infoviewElement: HTMLElement): void;
25
- make(editorApi: EditorApi, stylesheet: string, column: number): IFrameInfoWebview;
24
+ make(editorApi: EditorApi, stylesheet: string): IFrameInfoWebview;
26
25
  private updateCssVars;
27
26
  private apiThemeClassName;
28
27
  private initialHtml;
@@ -36,7 +36,7 @@ export class IFrameInfoWebviewFactory {
36
36
  setInfoviewElement(infoviewElement) {
37
37
  this.infoviewElement = infoviewElement;
38
38
  }
39
- make(editorApi, stylesheet, column) {
39
+ make(editorApi, stylesheet) {
40
40
  this.iframe = document.createElement("iframe");
41
41
  this.infoviewElement.append(this.iframe);
42
42
  this.iframe.contentWindow.document.open();
@@ -74,6 +74,7 @@ export class IFrameInfoWebviewFactory {
74
74
  return new IFrameInfoWebview(this.iframe, rpc);
75
75
  }
76
76
  updateCssVars() {
77
+ // See also https://github.com/microsoft/vscode/blob/main/src/vs/workbench/contrib/webview/browser/themeing.ts
77
78
  const theme = this.themeService.getColorTheme();
78
79
  const documentStyle = this.iframe.contentDocument?.documentElement.style;
79
80
  const colors = colorUtils.getColorRegistry().getColors();
@@ -91,7 +92,7 @@ export class IFrameInfoWebviewFactory {
91
92
  const editorFontSize = configuration.fontSize || EDITOR_FONT_DEFAULTS.fontSize;
92
93
  const linkUnderlines = this.configurationService.getValue('accessibility.underlineLinks');
93
94
  const styles = {
94
- 'vscode-font-family': '\'Droid Sans Mono\', Consolas, Menlo, Monaco, \'Courier New\', monospace',
95
+ 'vscode-font-family': '-apple-system,BlinkMacSystemFont,Segoe WPC,Segoe UI,HelveticaNeue-Light,system-ui,Ubuntu,Droid Sans,sans-serif',
95
96
  'vscode-font-weight': 'normal',
96
97
  'vscode-font-size': '13px',
97
98
  'vscode-editor-font-family': editorFontFamily,
@@ -103,7 +104,6 @@ export class IFrameInfoWebviewFactory {
103
104
  for (const id in styles) {
104
105
  documentStyle?.setProperty(`--${id}`, styles[id]);
105
106
  }
106
- documentStyle?.setProperty('font-family', '-apple-system,BlinkMacSystemFont,Segoe WPC,Segoe UI,HelveticaNeue-Light,system-ui,Ubuntu,Droid Sans,sans-serif');
107
107
  this.iframe.contentDocument?.documentElement.setAttribute('class', `${this.apiThemeClassName(theme)}`);
108
108
  this.fontFiles.map(font => {
109
109
  this.iframe.contentDocument?.fonts.add(font);
@@ -132,7 +132,7 @@ export class IFrameInfoWebviewFactory {
132
132
  color: var(--vscode-editor-foreground);
133
133
  }
134
134
  </style>
135
- <link rel="stylesheet" href="${new URL('./vscode-lean4/lean4-infoview/src/infoview/index.css', import.meta.url)}">
135
+ <link rel="stylesheet" href="${new URL('../node_modules/@leanprover/infoview/dist/index.css', import.meta.url)}">
136
136
  <link rel="stylesheet" href="${new URL('./css/vscode_webview.css', import.meta.url)}">
137
137
  <link rel="stylesheet" href="${new URL('./css/custom.css', import.meta.url)}">
138
138
  </head>
Binary file
@@ -0,0 +1,5 @@
1
+ /** @module See `rollup.config.js` for what this file does. */
2
+ import * as ReactDOM from 'react-dom';
3
+ import { createPortal, createRoot, findDOMNode, flushSync, hydrate, hydrateRoot, render, unmountComponentAtNode, unstable_batchedUpdates, unstable_renderSubtreeIntoContainer, version, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED } from 'react-dom';
4
+ export default ReactDOM;
5
+ export { __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, createPortal, createRoot, findDOMNode, flushSync, hydrate, hydrateRoot, render, unmountComponentAtNode, unstable_batchedUpdates, unstable_renderSubtreeIntoContainer, version, };
@@ -0,0 +1,5 @@
1
+ /** @module See `rollup.config.js` for what this file does. */
2
+ import * as Jsx from 'react/jsx-runtime';
3
+ import { Fragment, jsx, jsxs } from 'react/jsx-runtime';
4
+ export default Jsx;
5
+ export { Fragment, jsx, jsxs };
@@ -0,0 +1,5 @@
1
+ /** @module See `rollup.config.js` for what this file does. */
2
+ import * as React from 'react';
3
+ export default React;
4
+ import { Children, cloneElement, Component, createContext, createElement, createFactory, createRef, forwardRef, Fragment, isValidElement, lazy, memo, Profiler, PureComponent, startTransition, StrictMode, Suspense, unstable_act, useCallback, useContext, useDebugValue, useDeferredValue, useEffect, useId, useImperativeHandle, useInsertionEffect, useLayoutEffect, useMemo, useReducer, useRef, useState, useSyncExternalStore, useTransition, version, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED } from 'react';
5
+ export { Children, Component, Fragment, Profiler, PureComponent, StrictMode, Suspense, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, cloneElement, createContext, createElement, createFactory, createRef, forwardRef, isValidElement, lazy, memo, startTransition, unstable_act, useCallback, useContext, useDebugValue, useDeferredValue, useEffect, useId, useImperativeHandle, useInsertionEffect, useLayoutEffect, useMemo, useReducer, useRef, useState, useSyncExternalStore, useTransition, version, };