lean4monaco 1.1.3 → 1.1.5
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/README.md +2 -4
- package/dist/vscode-lean4/vscode-lean4/src/utils/depInstaller.d.ts +81 -0
- package/dist/vscode-lean4/vscode-lean4/src/utils/depInstaller.js +372 -0
- package/package.json +1 -1
- package/dist/JuliaMono-Regular.ttf +0 -0
- package/dist/lean4-infoview/codicon.ttf +0 -0
- package/dist/lean4-infoview/esm-shims/react-dom.d.ts +0 -5
- package/dist/lean4-infoview/esm-shims/react-jsx-runtime.d.ts +0 -5
- package/dist/lean4-infoview/esm-shims/react.d.ts +0 -5
- package/dist/lean4-infoview/index.css +0 -4161
- package/dist/lean4-infoview/index.d.ts +0 -16
- package/dist/lean4-infoview/index.development.js +0 -37312
- package/dist/lean4-infoview/index.production.min.js +0 -1528
- package/dist/lean4-infoview/infoview/collapsing.d.ts +0 -12
- package/dist/lean4-infoview/infoview/contexts.d.ts +0 -10
- package/dist/lean4-infoview/infoview/editorConnection.d.ts +0 -22
- package/dist/lean4-infoview/infoview/errors.d.ts +0 -14
- package/dist/lean4-infoview/infoview/event.d.ts +0 -33
- package/dist/lean4-infoview/infoview/goalLocation.d.ts +0 -61
- package/dist/lean4-infoview/infoview/goals.d.ts +0 -46
- package/dist/lean4-infoview/infoview/info.d.ts +0 -18
- package/dist/lean4-infoview/infoview/infos.d.ts +0 -2
- package/dist/lean4-infoview/infoview/interactiveCode.d.ts +0 -19
- package/dist/lean4-infoview/infoview/main.d.ts +0 -13
- package/dist/lean4-infoview/infoview/messages.d.ts +0 -19
- package/dist/lean4-infoview/infoview/rpcSessions.d.ts +0 -11
- package/dist/lean4-infoview/infoview/serverVersion.d.ts +0 -10
- package/dist/lean4-infoview/infoview/tooltips.d.ts +0 -32
- package/dist/lean4-infoview/infoview/traceExplorer.d.ts +0 -11
- package/dist/lean4-infoview/infoview/userWidget.d.ts +0 -39
- package/dist/lean4-infoview/infoview/util.d.ts +0 -144
- package/dist/lean4-infoview/loader.d.ts +0 -20
- package/dist/lean4-infoview/loader.development.js +0 -1006
- package/dist/lean4-infoview/loader.production.min.js +0 -1
- package/dist/lean4-infoview/react-dom.development.js +0 -30537
- package/dist/lean4-infoview/react-dom.production.min.js +0 -21
- package/dist/lean4-infoview/react-jsx-runtime.development.js +0 -1362
- package/dist/lean4-infoview/react-jsx-runtime.production.min.js +0 -1
- package/dist/lean4-infoview/react.development.js +0 -2823
- package/dist/lean4-infoview/react.production.min.js +0 -1
- package/dist/monaco-lean4/vscode-lean4/package.json +0 -944
- package/dist/monaco-lean4/vscode-lean4/src/abbreviation/AbbreviationFeature.d.ts +0 -9
- package/dist/monaco-lean4/vscode-lean4/src/abbreviation/AbbreviationFeature.js +0 -20
- package/dist/monaco-lean4/vscode-lean4/src/abbreviation/AbbreviationHoverProvider.d.ts +0 -12
- package/dist/monaco-lean4/vscode-lean4/src/abbreviation/AbbreviationHoverProvider.js +0 -40
- package/dist/monaco-lean4/vscode-lean4/src/abbreviation/AbbreviationRewriterFeature.d.ts +0 -20
- package/dist/monaco-lean4/vscode-lean4/src/abbreviation/AbbreviationRewriterFeature.js +0 -79
- package/dist/monaco-lean4/vscode-lean4/src/abbreviation/VSCodeAbbreviationConfig.d.ts +0 -13
- package/dist/monaco-lean4/vscode-lean4/src/abbreviation/VSCodeAbbreviationConfig.js +0 -29
- package/dist/monaco-lean4/vscode-lean4/src/abbreviation/VSCodeAbbreviationRewriter.d.ts +0 -28
- package/dist/monaco-lean4/vscode-lean4/src/abbreviation/VSCodeAbbreviationRewriter.js +0 -124
- package/dist/monaco-lean4/vscode-lean4/src/config.d.ts +0 -33
- package/dist/monaco-lean4/vscode-lean4/src/config.js +0 -119
- package/dist/monaco-lean4/vscode-lean4/src/diagnostics/setupNotifs.d.ts +0 -27
- package/dist/monaco-lean4/vscode-lean4/src/diagnostics/setupNotifs.js +0 -133
- package/dist/monaco-lean4/vscode-lean4/src/infoview.d.ts +0 -69
- package/dist/monaco-lean4/vscode-lean4/src/infoview.js +0 -711
- package/dist/monaco-lean4/vscode-lean4/src/leanclient.d.ts +0 -67
- package/dist/monaco-lean4/vscode-lean4/src/leanclient.js +0 -443
- package/dist/monaco-lean4/vscode-lean4/src/rpc.d.ts +0 -16
- package/dist/monaco-lean4/vscode-lean4/src/rpc.js +0 -102
- package/dist/monaco-lean4/vscode-lean4/src/taskgutter.d.ts +0 -11
- package/dist/monaco-lean4/vscode-lean4/src/taskgutter.js +0 -130
- package/dist/monaco-lean4/vscode-lean4/src/utils/batch.d.ts +0 -37
- package/dist/monaco-lean4/vscode-lean4/src/utils/batch.js +0 -203
- package/dist/monaco-lean4/vscode-lean4/src/utils/clientProvider.d.ts +0 -41
- package/dist/monaco-lean4/vscode-lean4/src/utils/clientProvider.js +0 -205
- package/dist/monaco-lean4/vscode-lean4/src/utils/converters.d.ts +0 -16
- package/dist/monaco-lean4/vscode-lean4/src/utils/converters.js +0 -129
- package/dist/monaco-lean4/vscode-lean4/src/utils/elan.d.ts +0 -3
- package/dist/monaco-lean4/vscode-lean4/src/utils/elan.js +0 -4
- package/dist/monaco-lean4/vscode-lean4/src/utils/envPath.d.ts +0 -21
- package/dist/monaco-lean4/vscode-lean4/src/utils/envPath.js +0 -53
- package/dist/monaco-lean4/vscode-lean4/src/utils/exturi.d.ts +0 -35
- package/dist/monaco-lean4/vscode-lean4/src/utils/exturi.js +0 -136
- package/dist/monaco-lean4/vscode-lean4/src/utils/fsHelper.d.ts +0 -17
- package/dist/monaco-lean4/vscode-lean4/src/utils/fsHelper.js +0 -36
- package/dist/monaco-lean4/vscode-lean4/src/utils/leanInstaller.d.ts +0 -37
- package/dist/monaco-lean4/vscode-lean4/src/utils/leanInstaller.js +0 -210
- package/dist/monaco-lean4/vscode-lean4/src/utils/logger.d.ts +0 -7
- package/dist/monaco-lean4/vscode-lean4/src/utils/logger.js +0 -20
- package/dist/monaco-lean4/vscode-lean4/src/utils/notifs.d.ts +0 -24
- package/dist/monaco-lean4/vscode-lean4/src/utils/notifs.js +0 -110
- package/dist/monaco-lean4/vscode-lean4/src/utils/projectInfo.d.ts +0 -9
- package/dist/monaco-lean4/vscode-lean4/src/utils/projectInfo.js +0 -125
- package/dist/useragent.d.ts +0 -1
- package/dist/useragent.js +0 -31
- package/dist/vscode.css +0 -7
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
import { shouldShowSetupWarnings } from '../config';
|
|
2
|
-
import { displayError, displayErrorWithInput, displayErrorWithOptionalInput, displayErrorWithOutput, displayErrorWithSetupGuide, displayModalWarning, displayModalWarningWithOutput, displayModalWarningWithSetupGuide, displayWarning, displayWarningWithInput, displayWarningWithOptionalInput, displayWarningWithOutput, displayWarningWithSetupGuide, } from '../utils/notifs';
|
|
3
|
-
export function preconditionCheckResultToSeverity(result) {
|
|
4
|
-
switch (result) {
|
|
5
|
-
case 'Fulfilled':
|
|
6
|
-
return 0;
|
|
7
|
-
case 'Warning':
|
|
8
|
-
return 1;
|
|
9
|
-
case 'Fatal':
|
|
10
|
-
return 2;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
export function severityToPreconditionCheckResult(severity) {
|
|
14
|
-
switch (severity) {
|
|
15
|
-
case 0:
|
|
16
|
-
return 'Fulfilled';
|
|
17
|
-
case 1:
|
|
18
|
-
return 'Warning';
|
|
19
|
-
case 2:
|
|
20
|
-
return 'Fatal';
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
export function worstPreconditionViolation(...results) {
|
|
24
|
-
let worstViolation = 'Fulfilled';
|
|
25
|
-
for (const r of results) {
|
|
26
|
-
if (preconditionCheckResultToSeverity(r) > preconditionCheckResultToSeverity(worstViolation)) {
|
|
27
|
-
worstViolation = r;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
return worstViolation;
|
|
31
|
-
}
|
|
32
|
-
export function displaySetupError(message, finalizer) {
|
|
33
|
-
displayError(message, finalizer);
|
|
34
|
-
return 'Fatal';
|
|
35
|
-
}
|
|
36
|
-
export async function displaySetupErrorWithInput(message, ...items) {
|
|
37
|
-
return await displayErrorWithInput(message, ...items);
|
|
38
|
-
}
|
|
39
|
-
export function displaySetupErrorWithOptionalInput(message, input, action, finalizer) {
|
|
40
|
-
displayErrorWithOptionalInput(message, input, action, finalizer);
|
|
41
|
-
return 'Fatal';
|
|
42
|
-
}
|
|
43
|
-
export function displaySetupErrorWithOutput(message, finalizer) {
|
|
44
|
-
displayErrorWithOutput(message, finalizer);
|
|
45
|
-
return 'Fatal';
|
|
46
|
-
}
|
|
47
|
-
export function displaySetupErrorWithSetupGuide(message, finalizer) {
|
|
48
|
-
displayErrorWithSetupGuide(message, finalizer);
|
|
49
|
-
return 'Fatal';
|
|
50
|
-
}
|
|
51
|
-
export function displayDependencySetupError(missingDeps) {
|
|
52
|
-
if (missingDeps.length === 0) {
|
|
53
|
-
throw new Error();
|
|
54
|
-
}
|
|
55
|
-
let missingDepMessage;
|
|
56
|
-
if (missingDeps.length === 1) {
|
|
57
|
-
missingDepMessage = `One of Lean's dependencies ('${missingDeps.at(0)}') is missing`;
|
|
58
|
-
}
|
|
59
|
-
else {
|
|
60
|
-
missingDepMessage = `Multiple of Lean's dependencies (${missingDeps.map(dep => `'${dep}'`).join(', ')}) are missing`;
|
|
61
|
-
}
|
|
62
|
-
const errorMessage = `${missingDepMessage}. Please read the Setup Guide on how to install missing dependencies and set up Lean 4.`;
|
|
63
|
-
displaySetupErrorWithSetupGuide(errorMessage);
|
|
64
|
-
return 'Fatal';
|
|
65
|
-
}
|
|
66
|
-
export async function displayElanSetupError(installer, reason) {
|
|
67
|
-
const isElanInstalled = await installer.displayInstallElanPrompt('Error', reason);
|
|
68
|
-
return isElanInstalled ? 'Fulfilled' : 'Fatal';
|
|
69
|
-
}
|
|
70
|
-
export async function displayElanOutdatedSetupError(installer, currentVersion, recommendedVersion) {
|
|
71
|
-
const isElanUpToDate = await installer.displayUpdateElanPrompt('Error', currentVersion, recommendedVersion);
|
|
72
|
-
return isElanUpToDate ? 'Fulfilled' : 'Fatal';
|
|
73
|
-
}
|
|
74
|
-
export async function displaySetupWarning(message, options = { modal: false }) {
|
|
75
|
-
if (!shouldShowSetupWarnings()) {
|
|
76
|
-
return 'Warning';
|
|
77
|
-
}
|
|
78
|
-
if (options.modal) {
|
|
79
|
-
const choice = await displayModalWarning(message);
|
|
80
|
-
return choice === 'Proceed' ? 'Warning' : 'Fatal';
|
|
81
|
-
}
|
|
82
|
-
displayWarning(message, options.finalizer);
|
|
83
|
-
return 'Warning';
|
|
84
|
-
}
|
|
85
|
-
export async function displaySetupWarningWithInput(message, ...items) {
|
|
86
|
-
if (!shouldShowSetupWarnings()) {
|
|
87
|
-
return undefined;
|
|
88
|
-
}
|
|
89
|
-
return await displayWarningWithInput(message, ...items);
|
|
90
|
-
}
|
|
91
|
-
export function displaySetupWarningWithOptionalInput(message, input, action, finalizer) {
|
|
92
|
-
if (!shouldShowSetupWarnings()) {
|
|
93
|
-
return 'Warning';
|
|
94
|
-
}
|
|
95
|
-
displayWarningWithOptionalInput(message, input, action, finalizer);
|
|
96
|
-
return 'Warning';
|
|
97
|
-
}
|
|
98
|
-
export async function displaySetupWarningWithOutput(message, options = { modal: false }) {
|
|
99
|
-
if (!shouldShowSetupWarnings()) {
|
|
100
|
-
return 'Warning';
|
|
101
|
-
}
|
|
102
|
-
if (options.modal) {
|
|
103
|
-
const choice = await displayModalWarningWithOutput(message);
|
|
104
|
-
return choice === 'Proceed' ? 'Warning' : 'Fatal';
|
|
105
|
-
}
|
|
106
|
-
displayWarningWithOutput(message, options.finalizer);
|
|
107
|
-
return 'Warning';
|
|
108
|
-
}
|
|
109
|
-
export async function displaySetupWarningWithSetupGuide(message, options = { modal: false }) {
|
|
110
|
-
if (!shouldShowSetupWarnings()) {
|
|
111
|
-
return 'Warning';
|
|
112
|
-
}
|
|
113
|
-
if (options.modal) {
|
|
114
|
-
const choice = await displayModalWarningWithSetupGuide(message);
|
|
115
|
-
return choice === 'Proceed' ? 'Warning' : 'Fatal';
|
|
116
|
-
}
|
|
117
|
-
displayWarningWithSetupGuide(message, options.finalizer);
|
|
118
|
-
return 'Warning';
|
|
119
|
-
}
|
|
120
|
-
export async function displayElanSetupWarning(installer, reason) {
|
|
121
|
-
if (!shouldShowSetupWarnings()) {
|
|
122
|
-
return 'Warning';
|
|
123
|
-
}
|
|
124
|
-
const isElanInstalled = await installer.displayInstallElanPrompt('Warning', reason);
|
|
125
|
-
return isElanInstalled ? 'Fulfilled' : 'Warning';
|
|
126
|
-
}
|
|
127
|
-
export async function displayElanOutdatedSetupWarning(installer, currentVersion, recommendedVersion) {
|
|
128
|
-
if (!shouldShowSetupWarnings()) {
|
|
129
|
-
return 'Warning';
|
|
130
|
-
}
|
|
131
|
-
const isElanUpToDate = await installer.displayUpdateElanPrompt('Warning', currentVersion, recommendedVersion);
|
|
132
|
-
return isElanUpToDate ? 'Fulfilled' : 'Warning';
|
|
133
|
-
}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { EditorApi, InfoviewApi, ServerStoppedReason } from '@leanprover/infoview-api';
|
|
2
|
-
import { Disposable, DocumentSelector, Event, ExtensionContext, ViewColumn } from 'vscode';
|
|
3
|
-
import { LeanClient } from './leanclient';
|
|
4
|
-
import { Rpc } from './rpc';
|
|
5
|
-
import { LeanClientProvider } from './utils/clientProvider';
|
|
6
|
-
export interface InfoWebview {
|
|
7
|
-
readonly api: InfoviewApi;
|
|
8
|
-
readonly rpc: Rpc;
|
|
9
|
-
readonly visible: boolean;
|
|
10
|
-
dispose(): any;
|
|
11
|
-
reveal(viewColumn?: ViewColumn, preserveFocus?: boolean): void;
|
|
12
|
-
onDidDispose: Event<void>;
|
|
13
|
-
}
|
|
14
|
-
export interface InfoWebviewFactory {
|
|
15
|
-
make(editorApi: EditorApi, stylesheet: string, column: number): InfoWebview;
|
|
16
|
-
}
|
|
17
|
-
export declare class InfoProvider implements Disposable {
|
|
18
|
-
private provider;
|
|
19
|
-
private readonly leanDocs;
|
|
20
|
-
private context;
|
|
21
|
-
private infoWebviewFactory;
|
|
22
|
-
/** Instance of the panel, if it is open. Otherwise `undefined`. */
|
|
23
|
-
private webviewPanel?;
|
|
24
|
-
private subscriptions;
|
|
25
|
-
private clientSubscriptions;
|
|
26
|
-
private stylesheet;
|
|
27
|
-
private autoOpened;
|
|
28
|
-
private clientProvider;
|
|
29
|
-
private serverNotifSubscriptions;
|
|
30
|
-
private clientNotifSubscriptions;
|
|
31
|
-
private rpcSessions;
|
|
32
|
-
private clientsFailed;
|
|
33
|
-
private workersFailed;
|
|
34
|
-
private subscribeDidChangeNotification;
|
|
35
|
-
private subscribeDidCloseNotification;
|
|
36
|
-
private subscribeDiagnosticsNotification;
|
|
37
|
-
private subscribeCustomNotification;
|
|
38
|
-
private editorApi;
|
|
39
|
-
constructor(provider: LeanClientProvider, leanDocs: DocumentSelector, context: ExtensionContext, infoWebviewFactory: InfoWebviewFactory);
|
|
40
|
-
private onClientRestarted;
|
|
41
|
-
private onClientAdded;
|
|
42
|
-
onWorkerRestarted(uri: string): Promise<void>;
|
|
43
|
-
onWorkerStopped(uri: string, client: LeanClient, reason: ServerStoppedReason): Promise<void>;
|
|
44
|
-
onClientRemoved(client: LeanClient): void;
|
|
45
|
-
onActiveClientStopped(client: LeanClient, activeClient: boolean, reason: ServerStoppedReason): Promise<void>;
|
|
46
|
-
dispose(): void;
|
|
47
|
-
isOpen(): boolean;
|
|
48
|
-
runTestScript(javaScript: string): Promise<void>;
|
|
49
|
-
getHtmlContents(): Promise<string>;
|
|
50
|
-
sleep(ms: number): Promise<unknown>;
|
|
51
|
-
toggleAllMessages(): Promise<void>;
|
|
52
|
-
private updateStylesheet;
|
|
53
|
-
private autoOpen;
|
|
54
|
-
private clearNotificationHandlers;
|
|
55
|
-
private clearRpcSessions;
|
|
56
|
-
private toggleInfoview;
|
|
57
|
-
private openPreview;
|
|
58
|
-
private initInfoView;
|
|
59
|
-
private sendConfig;
|
|
60
|
-
private static getDiagnosticParams;
|
|
61
|
-
private sendDiagnostics;
|
|
62
|
-
private sendProgress;
|
|
63
|
-
private onLanguageChanged;
|
|
64
|
-
private getLocation;
|
|
65
|
-
private sendPosition;
|
|
66
|
-
private updateStatus;
|
|
67
|
-
private revealEditorSelection;
|
|
68
|
-
private handleInsertText;
|
|
69
|
-
}
|