@finos/legend-lego 1.2.72 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/code-editor/CodeDiffView.d.ts +3 -1
- package/lib/code-editor/CodeDiffView.d.ts.map +1 -1
- package/lib/code-editor/CodeDiffView.js +6 -2
- package/lib/code-editor/CodeDiffView.js.map +1 -1
- package/lib/code-editor/CodeEditor.d.ts +8 -2
- package/lib/code-editor/CodeEditor.d.ts.map +1 -1
- package/lib/code-editor/CodeEditor.js +42 -4
- package/lib/code-editor/CodeEditor.js.map +1 -1
- package/lib/code-editor/index.d.ts +0 -5
- package/lib/code-editor/index.d.ts.map +1 -1
- package/lib/code-editor/index.js +0 -5
- package/lib/code-editor/index.js.map +1 -1
- package/lib/index.css +1 -1
- package/package.json +29 -29
- package/src/code-editor/CodeDiffView.tsx +10 -3
- package/src/code-editor/CodeEditor.tsx +69 -4
- package/src/code-editor/index.ts +0 -6
- package/tsconfig.json +1 -15
- package/lib/code-editor/CodeEditorTheme.d.ts +0 -41
- package/lib/code-editor/CodeEditorTheme.d.ts.map +0 -1
- package/lib/code-editor/CodeEditorTheme.js +0 -99
- package/lib/code-editor/CodeEditorTheme.js.map +0 -1
- package/lib/code-editor/CodeEditorUtils.d.ts +0 -74
- package/lib/code-editor/CodeEditorUtils.d.ts.map +0 -1
- package/lib/code-editor/CodeEditorUtils.js +0 -203
- package/lib/code-editor/CodeEditorUtils.js.map +0 -1
- package/lib/code-editor/PureLanguage.d.ts +0 -38
- package/lib/code-editor/PureLanguage.d.ts.map +0 -1
- package/lib/code-editor/PureLanguage.js +0 -39
- package/lib/code-editor/PureLanguage.js.map +0 -1
- package/lib/code-editor/PureLanguageCodeEditorSupport.d.ts +0 -71
- package/lib/code-editor/PureLanguageCodeEditorSupport.d.ts.map +0 -1
- package/lib/code-editor/PureLanguageCodeEditorSupport.js +0 -238
- package/lib/code-editor/PureLanguageCodeEditorSupport.js.map +0 -1
- package/lib/code-editor/PureLanguageService.d.ts +0 -19
- package/lib/code-editor/PureLanguageService.d.ts.map +0 -1
- package/lib/code-editor/PureLanguageService.js +0 -373
- package/lib/code-editor/PureLanguageService.js.map +0 -1
- package/lib/code-editor/themes/Github-Theme-dark-dimmed.json +0 -613
- package/lib/code-editor/themes/Github-Theme-dark.json +0 -513
- package/lib/code-editor/themes/Github-Theme-light.json +0 -598
- package/lib/code-editor/themes/Material-Theme-Darker.json +0 -816
- package/lib/code-editor/themes/Material-Theme-Default.json +0 -816
- package/lib/code-editor/themes/MonacoEditorThemeUtils.d.ts +0 -31
- package/lib/code-editor/themes/MonacoEditorThemeUtils.d.ts.map +0 -1
- package/lib/code-editor/themes/MonacoEditorThemeUtils.js +0 -88
- package/lib/code-editor/themes/MonacoEditorThemeUtils.js.map +0 -1
- package/lib/code-editor/themes/OneDark-Pro-darker.json +0 -2061
- package/lib/code-editor/themes/OneDark-Pro.json +0 -2090
- package/lib/code-editor/themes/solarized-dark-color-theme.json +0 -398
- package/src/code-editor/CodeEditorTheme.ts +0 -151
- package/src/code-editor/CodeEditorUtils.ts +0 -336
- package/src/code-editor/PureLanguage.ts +0 -42
- package/src/code-editor/PureLanguageCodeEditorSupport.ts +0 -341
- package/src/code-editor/PureLanguageService.ts +0 -416
- package/src/code-editor/themes/Github-Theme-dark-dimmed.json +0 -613
- package/src/code-editor/themes/Github-Theme-dark.json +0 -513
- package/src/code-editor/themes/Github-Theme-light.json +0 -598
- package/src/code-editor/themes/Material-Theme-Darker.json +0 -816
- package/src/code-editor/themes/Material-Theme-Default.json +0 -816
- package/src/code-editor/themes/MonacoEditorThemeUtils.ts +0 -128
- package/src/code-editor/themes/OneDark-Pro-darker.json +0 -2061
- package/src/code-editor/themes/OneDark-Pro.json +0 -2090
- package/src/code-editor/themes/README.md +0 -8
- package/src/code-editor/themes/solarized-dark-color-theme.json +0 -423
@@ -1,74 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Copyright (c) 2020-present, Goldman Sachs
|
3
|
-
*
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
-
* you may not use this file except in compliance with the License.
|
6
|
-
* You may obtain a copy of the License at
|
7
|
-
*
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
*
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
-
* See the License for the specific language governing permissions and
|
14
|
-
* limitations under the License.
|
15
|
-
*/
|
16
|
-
import { type GenericLegendApplicationStore } from '@finos/legend-application';
|
17
|
-
import { editor as monacoEditorAPI } from 'monaco-editor';
|
18
|
-
export type CodeEditorPosition = {
|
19
|
-
lineNumber: number;
|
20
|
-
column: number;
|
21
|
-
};
|
22
|
-
/**
|
23
|
-
* Normally `monaco-editor` worker disposes after 5 minutes staying idle, but we fasten
|
24
|
-
* this pace just in case the usage of the editor causes memory-leak somehow
|
25
|
-
*/
|
26
|
-
export declare const disposeCodeEditor: (editor: monacoEditorAPI.IStandaloneCodeEditor) => void;
|
27
|
-
export declare const disposeDiffCodeEditor: (editor: monacoEditorAPI.IStandaloneDiffEditor) => void;
|
28
|
-
/**
|
29
|
-
* Get the text value with LF line ending.
|
30
|
-
* This is needed since if there are CR `\r` characters in the text input
|
31
|
-
* (e.g. users of Windows doing copy/paste)
|
32
|
-
* the default mode of `monaco-editor` is `TextDefined` which means if the text
|
33
|
-
* contains CR character(s), it will automatically be treated as CRLF. As such, we want
|
34
|
-
* an utility method to extract the text value with line ending option LF
|
35
|
-
* to force omission of CR characters
|
36
|
-
* See https://github.com/finos/legend-studio/issues/608
|
37
|
-
*/
|
38
|
-
export declare const getCodeEditorValue: (editor: monacoEditorAPI.IStandaloneCodeEditor) => string;
|
39
|
-
export declare const getBaseCodeEditorOptions: () => monacoEditorAPI.IStandaloneEditorConstructionOptions;
|
40
|
-
export declare const getBaseConsoleOptions: () => monacoEditorAPI.IStandaloneEditorConstructionOptions;
|
41
|
-
export declare const moveCursorToPosition: (editor: monacoEditorAPI.ICodeEditor, position: CodeEditorPosition) => void;
|
42
|
-
export declare const setErrorMarkers: (editorModel: monacoEditorAPI.ITextModel, errors: {
|
43
|
-
message: string;
|
44
|
-
startLineNumber: number;
|
45
|
-
startColumn: number;
|
46
|
-
endLineNumber: number;
|
47
|
-
endColumn: number;
|
48
|
-
}[], ownerId?: string) => void;
|
49
|
-
export declare const setWarningMarkers: (editorModel: monacoEditorAPI.ITextModel, warnings: {
|
50
|
-
message: string;
|
51
|
-
startLineNumber: number;
|
52
|
-
startColumn: number;
|
53
|
-
endLineNumber: number;
|
54
|
-
endColumn: number;
|
55
|
-
}[], ownerId?: string) => void;
|
56
|
-
export declare const clearMarkers: (ownerId?: string) => void;
|
57
|
-
/**
|
58
|
-
* This method eliminates CR '\r' character(s) in the provided text value.
|
59
|
-
*/
|
60
|
-
export declare const normalizeLineEnding: (val: string) => string;
|
61
|
-
export declare const resetLineNumberGutterWidth: (editor: monacoEditorAPI.ICodeEditor) => void;
|
62
|
-
export declare const configureCodeEditorComponent: (applicationStore: GenericLegendApplicationStore) => Promise<void>;
|
63
|
-
export declare enum CODE_EDITOR_LANGUAGE {
|
64
|
-
TEXT = "plaintext",
|
65
|
-
PURE = "pure",
|
66
|
-
JSON = "json",
|
67
|
-
JAVA = "java",
|
68
|
-
MARKDOWN = "markdown",
|
69
|
-
SQL = "sql",
|
70
|
-
XML = "xml",
|
71
|
-
YAML = "yaml",
|
72
|
-
GRAPHQL = "graphql"
|
73
|
-
}
|
74
|
-
//# sourceMappingURL=CodeEditorUtils.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"CodeEditorUtils.d.ts","sourceRoot":"","sources":["../../src/code-editor/CodeEditorUtils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAGL,KAAK,6BAA6B,EACnC,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EACL,MAAM,IAAI,eAAe,EA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WAC7B,eAAe,CAAC,WAAW,KAClC,IAQF,CAAC;AAEF,eAAO,MAAM,4BAA4B,qBACrB,6BAA6B,KAC9C,OAAO,CAAC,IAAI,CA+Fd,CAAC;AAEF,oBAAY,oBAAoB;IAC9B,IAAI,cAAc;IAClB,IAAI,SAAS;IACb,IAAI,SAAS;IACb,IAAI,SAAS;IACb,QAAQ,aAAa;IACrB,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,IAAI,SAAS;IACb,OAAO,YAAY;CACpB"}
|
@@ -1,203 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Copyright (c) 2020-present, Goldman Sachs
|
3
|
-
*
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
-
* you may not use this file except in compliance with the License.
|
6
|
-
* You may obtain a copy of the License at
|
7
|
-
*
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
*
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
-
* See the License for the specific language governing permissions and
|
14
|
-
* limitations under the License.
|
15
|
-
*/
|
16
|
-
import { APPLICATION_EVENT, DEFAULT_MONOSPACED_FONT_FAMILY, } from '@finos/legend-application';
|
17
|
-
import { LogEvent } from '@finos/legend-shared';
|
18
|
-
import { editor as monacoEditorAPI, KeyCode, KeyMod, MarkerSeverity, } from 'monaco-editor';
|
19
|
-
import { CODE_EDITOR_THEME, DEFAULT_DARK_THEME, GITHUB_DARK_DIMMED_THEME, GITHUB_DARK_THEME, GITHUB_LIGHT_THEME, MATERIAL_DARKER_THEME, MATERIAL_DEFAULT_THEME, ONE_DARK_PRO_DARKER_THEME, ONE_DARK_PRO_THEME, SOLARIZED_DARK_THEME, } from './CodeEditorTheme.js';
|
20
|
-
/**
|
21
|
-
* Normally `monaco-editor` worker disposes after 5 minutes staying idle, but we fasten
|
22
|
-
* this pace just in case the usage of the editor causes memory-leak somehow
|
23
|
-
*/
|
24
|
-
export const disposeCodeEditor = (editor) => {
|
25
|
-
editor.dispose();
|
26
|
-
// NOTE: just to be sure, we dispose the model after disposing the editor
|
27
|
-
editor.getModel()?.dispose();
|
28
|
-
};
|
29
|
-
export const disposeDiffCodeEditor = (editor) => {
|
30
|
-
editor.dispose();
|
31
|
-
editor.getOriginalEditor().getModel()?.dispose();
|
32
|
-
editor.getModifiedEditor().getModel()?.dispose();
|
33
|
-
};
|
34
|
-
/**
|
35
|
-
* Get the text value with LF line ending.
|
36
|
-
* This is needed since if there are CR `\r` characters in the text input
|
37
|
-
* (e.g. users of Windows doing copy/paste)
|
38
|
-
* the default mode of `monaco-editor` is `TextDefined` which means if the text
|
39
|
-
* contains CR character(s), it will automatically be treated as CRLF. As such, we want
|
40
|
-
* an utility method to extract the text value with line ending option LF
|
41
|
-
* to force omission of CR characters
|
42
|
-
* See https://github.com/finos/legend-studio/issues/608
|
43
|
-
*/
|
44
|
-
export const getCodeEditorValue = (editor) => editor.getModel()?.getValue(monacoEditorAPI.EndOfLinePreference.LF) ?? '';
|
45
|
-
export const getBaseCodeEditorOptions = () => ({
|
46
|
-
contextmenu: false,
|
47
|
-
copyWithSyntaxHighlighting: false,
|
48
|
-
// NOTE: These following font options are needed (and CSS font-size option `.monaco-editor * { font-size: ... }` as well)
|
49
|
-
// in order to make the editor appear properly on multiple platform, the ligatures option is needed for Mac to display properly
|
50
|
-
// otherwise the cursor position relatively to text would be off
|
51
|
-
// Another potential cause for this misaligment is that the fonts are being lazy-loaded and made available after `monaco-editor`
|
52
|
-
// calculated the font-width, for this, we can use `remeasureFonts`, but our case here, `fontLigatures: true` seems
|
53
|
-
// to do the trick
|
54
|
-
// See https://github.com/microsoft/monaco-editor/issues/392
|
55
|
-
fontSize: 14,
|
56
|
-
// Enforce a fixed font-family to make cross platform display consistent (i.e. Mac defaults to use `Menlo` which is bigger than
|
57
|
-
// `Consolas` on Windows, etc.)
|
58
|
-
fontFamily: 'Roboto Mono',
|
59
|
-
// Enable font ligature: glyphs which combine the shapes of certain sequences of characters into a new form that makes for
|
60
|
-
// a more harmonious reading experience.
|
61
|
-
fontLigatures: true,
|
62
|
-
// Make sure hover or widget shown near boundary are not truncated by setting their position to `fixed`
|
63
|
-
fixedOverflowWidgets: true,
|
64
|
-
detectIndentation: false, // i.e. so we can force tab-size
|
65
|
-
tabSize: 2,
|
66
|
-
// The typing is currently not correct for `bracketPairColorization`, until this is fixed, we will remove the cast
|
67
|
-
// See https://github.com/microsoft/monaco-editor/issues/3013
|
68
|
-
'bracketPairColorization.enabled': false,
|
69
|
-
automaticLayout: true,
|
70
|
-
});
|
71
|
-
export const getBaseConsoleOptions = () => ({
|
72
|
-
...getBaseCodeEditorOptions(),
|
73
|
-
fontSize: 12,
|
74
|
-
extraEditorClassName: 'monaco-editor--small-font',
|
75
|
-
readOnly: true,
|
76
|
-
glyphMargin: false,
|
77
|
-
folding: false,
|
78
|
-
lineNumbers: 'off',
|
79
|
-
lineDecorationsWidth: 10,
|
80
|
-
lineNumbersMinChars: 0,
|
81
|
-
minimap: {
|
82
|
-
enabled: false,
|
83
|
-
},
|
84
|
-
guides: {
|
85
|
-
bracketPairs: false,
|
86
|
-
bracketPairsHorizontal: false,
|
87
|
-
highlightActiveBracketPair: false,
|
88
|
-
indentation: false,
|
89
|
-
highlightActiveIndentation: false,
|
90
|
-
},
|
91
|
-
renderLineHighlight: 'none',
|
92
|
-
});
|
93
|
-
export const moveCursorToPosition = (editor, position) => {
|
94
|
-
if (!editor.hasTextFocus()) {
|
95
|
-
editor.focus();
|
96
|
-
} // focus the editor first so that it can shows the cursor
|
97
|
-
editor.revealPositionInCenter(position, 0);
|
98
|
-
editor.setPosition(position);
|
99
|
-
};
|
100
|
-
const INTERNAL__DUMMY_PROBLEM_MARKER_OWNER = 'dummy_problem_marker_owner';
|
101
|
-
export const setErrorMarkers = (editorModel, errors, ownerId) => {
|
102
|
-
monacoEditorAPI.setModelMarkers(editorModel, ownerId ?? INTERNAL__DUMMY_PROBLEM_MARKER_OWNER, errors.map((error) => ({
|
103
|
-
startLineNumber: error.startLineNumber,
|
104
|
-
startColumn: error.startColumn,
|
105
|
-
endLineNumber: error.endLineNumber,
|
106
|
-
endColumn: error.endColumn + 1, // add a 1 to endColumn as monaco editor range is not inclusive
|
107
|
-
// NOTE: when the message is empty, no error tooltip is shown, we want to avoid this
|
108
|
-
message: error.message === '' ? '(no error message)' : error.message,
|
109
|
-
severity: MarkerSeverity.Error,
|
110
|
-
})));
|
111
|
-
};
|
112
|
-
export const setWarningMarkers = (editorModel, warnings, ownerId) => {
|
113
|
-
monacoEditorAPI.setModelMarkers(editorModel, ownerId ?? INTERNAL__DUMMY_PROBLEM_MARKER_OWNER, warnings.map((warning) => ({
|
114
|
-
startLineNumber: warning.startLineNumber,
|
115
|
-
startColumn: warning.startColumn,
|
116
|
-
endColumn: warning.endColumn,
|
117
|
-
endLineNumber: warning.endLineNumber,
|
118
|
-
message: warning.message === '' ? '(no warning message)' : warning.message,
|
119
|
-
severity: MarkerSeverity.Warning,
|
120
|
-
})));
|
121
|
-
};
|
122
|
-
export const clearMarkers = (ownerId) => {
|
123
|
-
monacoEditorAPI.removeAllMarkers(ownerId ?? INTERNAL__DUMMY_PROBLEM_MARKER_OWNER);
|
124
|
-
};
|
125
|
-
/**
|
126
|
-
* This method eliminates CR '\r' character(s) in the provided text value.
|
127
|
-
*/
|
128
|
-
export const normalizeLineEnding = (val) => val.replace(/\r/g, '');
|
129
|
-
// We need to dynamically adjust the width of the line number gutter, otherwise as the document gets
|
130
|
-
// larger, the left margin will start to shrink
|
131
|
-
// See https://github.com/microsoft/monaco-editor/issues/2206
|
132
|
-
export const resetLineNumberGutterWidth = (editor) => {
|
133
|
-
const currentValue = editor.getValue();
|
134
|
-
editor.updateOptions({
|
135
|
-
lineNumbersMinChars: Math.max(Math.floor(Math.log10(currentValue.split(/\r\n|\r|\n/g).length)) + 3, 5),
|
136
|
-
});
|
137
|
-
};
|
138
|
-
export const configureCodeEditorComponent = async (applicationStore) => {
|
139
|
-
/**
|
140
|
-
* Since we use a custom fonts for text-editor, we want to make sure the font is loaded before any text-editor is opened
|
141
|
-
* this is to ensure
|
142
|
-
*/
|
143
|
-
const fontLoadFailureErrorMessage = `Monospaced font '${DEFAULT_MONOSPACED_FONT_FAMILY}' has not been loaded properly, code editor might not display properly`;
|
144
|
-
await Promise.all([400, 700].map((weight) => document.fonts.load(`${weight} 1em ${DEFAULT_MONOSPACED_FONT_FAMILY}`)))
|
145
|
-
.then(() => {
|
146
|
-
if (document.fonts.check(`1em ${DEFAULT_MONOSPACED_FONT_FAMILY}`)) {
|
147
|
-
monacoEditorAPI.remeasureFonts();
|
148
|
-
}
|
149
|
-
else {
|
150
|
-
applicationStore.logService.error(LogEvent.create(APPLICATION_EVENT.APPLICATION_SETUP__FAILURE), fontLoadFailureErrorMessage);
|
151
|
-
}
|
152
|
-
})
|
153
|
-
.catch(() => applicationStore.logService.error(LogEvent.create(APPLICATION_EVENT.APPLICATION_SETUP__FAILURE), fontLoadFailureErrorMessage));
|
154
|
-
// override native hotkeys supported by monaco-editor
|
155
|
-
// here we map these keys to a dummy command that would just dispatch the key combination
|
156
|
-
// to the application keyboard shortcut service, effectively bypassing the command associated
|
157
|
-
// with the native keybinding
|
158
|
-
const OVERRIDE_DEFAULT_KEYBINDING_COMMAND = 'legend.code-editor.override-default-keybinding';
|
159
|
-
monacoEditorAPI.registerCommand(OVERRIDE_DEFAULT_KEYBINDING_COMMAND, (accessor, ...args) => {
|
160
|
-
applicationStore.keyboardShortcutsService.dispatch(args[0]);
|
161
|
-
});
|
162
|
-
const hotkeyMapping = [
|
163
|
-
[KeyCode.F1, 'F1'], // show command center
|
164
|
-
[KeyCode.F8, 'F8'], // show error
|
165
|
-
[KeyCode.F9, 'F9'], // toggle debugger breakpoint
|
166
|
-
[KeyMod.WinCtrl | KeyCode.KeyG, 'Control+KeyG'], // go-to line command
|
167
|
-
[KeyMod.WinCtrl | KeyCode.KeyB, 'Control+KeyB'], // cursor move (core command)
|
168
|
-
[KeyMod.WinCtrl | KeyCode.KeyO, 'Control+KeyO'], // cursor move (core command)
|
169
|
-
[KeyMod.WinCtrl | KeyCode.KeyD, 'Control+KeyD'], // cursor move (core command)
|
170
|
-
[KeyMod.WinCtrl | KeyCode.KeyP, 'Control+KeyP'], // cursor move (core command)
|
171
|
-
[KeyMod.Shift | KeyCode.F10, 'Shift+F10'], // show editor context menu
|
172
|
-
[KeyMod.WinCtrl | KeyCode.F2, 'Control+F2'], // change all instances
|
173
|
-
[KeyMod.WinCtrl | KeyCode.F12, 'Control+F12'], // go-to definition
|
174
|
-
];
|
175
|
-
monacoEditorAPI.addKeybindingRules(hotkeyMapping.map(([nativeCodeEditorKeyBinding, keyCombination]) => ({
|
176
|
-
keybinding: nativeCodeEditorKeyBinding,
|
177
|
-
command: OVERRIDE_DEFAULT_KEYBINDING_COMMAND,
|
178
|
-
commandArgs: keyCombination,
|
179
|
-
})));
|
180
|
-
// themes
|
181
|
-
monacoEditorAPI.defineTheme(CODE_EDITOR_THEME.DEFAULT_DARK, DEFAULT_DARK_THEME);
|
182
|
-
monacoEditorAPI.defineTheme(CODE_EDITOR_THEME.SOLARIZED_DARK, SOLARIZED_DARK_THEME);
|
183
|
-
monacoEditorAPI.defineTheme(CODE_EDITOR_THEME.GITHUB_DARK, GITHUB_DARK_THEME);
|
184
|
-
monacoEditorAPI.defineTheme(CODE_EDITOR_THEME.GITHUB_DARK_DIMMED, GITHUB_DARK_DIMMED_THEME);
|
185
|
-
monacoEditorAPI.defineTheme(CODE_EDITOR_THEME.GITHUB_LIGHT, GITHUB_LIGHT_THEME);
|
186
|
-
monacoEditorAPI.defineTheme(CODE_EDITOR_THEME.MATERIAL_DEFAULT, MATERIAL_DEFAULT_THEME);
|
187
|
-
monacoEditorAPI.defineTheme(CODE_EDITOR_THEME.MATERIAL_DARKER, MATERIAL_DARKER_THEME);
|
188
|
-
monacoEditorAPI.defineTheme(CODE_EDITOR_THEME.ONE_DARK_PRO, ONE_DARK_PRO_THEME);
|
189
|
-
monacoEditorAPI.defineTheme(CODE_EDITOR_THEME.ONE_DARK_PRO_DARKER, ONE_DARK_PRO_DARKER_THEME);
|
190
|
-
};
|
191
|
-
export var CODE_EDITOR_LANGUAGE;
|
192
|
-
(function (CODE_EDITOR_LANGUAGE) {
|
193
|
-
CODE_EDITOR_LANGUAGE["TEXT"] = "plaintext";
|
194
|
-
CODE_EDITOR_LANGUAGE["PURE"] = "pure";
|
195
|
-
CODE_EDITOR_LANGUAGE["JSON"] = "json";
|
196
|
-
CODE_EDITOR_LANGUAGE["JAVA"] = "java";
|
197
|
-
CODE_EDITOR_LANGUAGE["MARKDOWN"] = "markdown";
|
198
|
-
CODE_EDITOR_LANGUAGE["SQL"] = "sql";
|
199
|
-
CODE_EDITOR_LANGUAGE["XML"] = "xml";
|
200
|
-
CODE_EDITOR_LANGUAGE["YAML"] = "yaml";
|
201
|
-
CODE_EDITOR_LANGUAGE["GRAPHQL"] = "graphql";
|
202
|
-
})(CODE_EDITOR_LANGUAGE || (CODE_EDITOR_LANGUAGE = {}));
|
203
|
-
//# sourceMappingURL=CodeEditorUtils.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"CodeEditorUtils.js","sourceRoot":"","sources":["../../src/code-editor/CodeEditorUtils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,iBAAiB,EACjB,8BAA8B,GAE/B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EACL,MAAM,IAAI,eAAe,EACzB,OAAO,EACP,MAAM,EACN,cAAc,GACf,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,wBAAwB,EACxB,iBAAiB,EACjB,kBAAkB,EAClB,qBAAqB,EACrB,sBAAsB,EACtB,y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goldman Sachs
|
3
|
-
*
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
-
* you may not use this file except in compliance with the License.
|
6
|
-
* You may obtain a copy of the License at
|
7
|
-
*
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
*
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
-
* See the License for the specific language governing permissions and
|
14
|
-
* limitations under the License.
|
15
|
-
*/
|
16
|
-
export declare enum PURE_GRAMMAR_TOKEN {
|
17
|
-
WHITESPACE = "",
|
18
|
-
KEYWORD = "keyword",
|
19
|
-
IDENTIFIER = "identifier",
|
20
|
-
OPERATOR = "operator",
|
21
|
-
DELIMITER = "delimiter",
|
22
|
-
PARSER = "parser",
|
23
|
-
NUMBER = "number",
|
24
|
-
DATE = "date",
|
25
|
-
COLOR = "color",
|
26
|
-
PACKAGE = "package",
|
27
|
-
STRING = "string",
|
28
|
-
COMMENT = "comment",
|
29
|
-
LANGUAGE_STRUCT = "language-struct",
|
30
|
-
MULTIPLICITY = "multiplicity",
|
31
|
-
GENERICS = "generics",
|
32
|
-
PROPERTY = "property",
|
33
|
-
PARAMETER = "parameter",
|
34
|
-
VARIABLE = "variable",
|
35
|
-
TYPE = "type",
|
36
|
-
INVALID = "invalid"
|
37
|
-
}
|
38
|
-
//# sourceMappingURL=PureLanguage.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"PureLanguage.d.ts","sourceRoot":"","sources":["../../src/code-editor/PureLanguage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,oBAAY,kBAAkB;IAC5B,UAAU,KAAK;IAEf,OAAO,YAAY;IACnB,UAAU,eAAe;IACzB,QAAQ,aAAa;IACrB,SAAS,cAAc;IAEvB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,OAAO,YAAY;IAEnB,eAAe,oBAAoB;IACnC,YAAY,iBAAiB;IAC7B,QAAQ,aAAa;IACrB,QAAQ,aAAa;IACrB,SAAS,cAAc;IACvB,QAAQ,aAAa;IACrB,IAAI,SAAS;IAEb,OAAO,YAAY;CACpB"}
|
@@ -1,39 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Copyright (c) 2020-present, Goldman Sachs
|
3
|
-
*
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
-
* you may not use this file except in compliance with the License.
|
6
|
-
* You may obtain a copy of the License at
|
7
|
-
*
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
*
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
-
* See the License for the specific language governing permissions and
|
14
|
-
* limitations under the License.
|
15
|
-
*/
|
16
|
-
export var PURE_GRAMMAR_TOKEN;
|
17
|
-
(function (PURE_GRAMMAR_TOKEN) {
|
18
|
-
PURE_GRAMMAR_TOKEN["WHITESPACE"] = "";
|
19
|
-
PURE_GRAMMAR_TOKEN["KEYWORD"] = "keyword";
|
20
|
-
PURE_GRAMMAR_TOKEN["IDENTIFIER"] = "identifier";
|
21
|
-
PURE_GRAMMAR_TOKEN["OPERATOR"] = "operator";
|
22
|
-
PURE_GRAMMAR_TOKEN["DELIMITER"] = "delimiter";
|
23
|
-
PURE_GRAMMAR_TOKEN["PARSER"] = "parser";
|
24
|
-
PURE_GRAMMAR_TOKEN["NUMBER"] = "number";
|
25
|
-
PURE_GRAMMAR_TOKEN["DATE"] = "date";
|
26
|
-
PURE_GRAMMAR_TOKEN["COLOR"] = "color";
|
27
|
-
PURE_GRAMMAR_TOKEN["PACKAGE"] = "package";
|
28
|
-
PURE_GRAMMAR_TOKEN["STRING"] = "string";
|
29
|
-
PURE_GRAMMAR_TOKEN["COMMENT"] = "comment";
|
30
|
-
PURE_GRAMMAR_TOKEN["LANGUAGE_STRUCT"] = "language-struct";
|
31
|
-
PURE_GRAMMAR_TOKEN["MULTIPLICITY"] = "multiplicity";
|
32
|
-
PURE_GRAMMAR_TOKEN["GENERICS"] = "generics";
|
33
|
-
PURE_GRAMMAR_TOKEN["PROPERTY"] = "property";
|
34
|
-
PURE_GRAMMAR_TOKEN["PARAMETER"] = "parameter";
|
35
|
-
PURE_GRAMMAR_TOKEN["VARIABLE"] = "variable";
|
36
|
-
PURE_GRAMMAR_TOKEN["TYPE"] = "type";
|
37
|
-
PURE_GRAMMAR_TOKEN["INVALID"] = "invalid";
|
38
|
-
})(PURE_GRAMMAR_TOKEN || (PURE_GRAMMAR_TOKEN = {}));
|
39
|
-
//# sourceMappingURL=PureLanguage.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"PureLanguage.js","sourceRoot":"","sources":["../../src/code-editor/PureLanguage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,MAAM,CAAN,IAAY,kBAyBX;AAzBD,WAAY,kBAAkB;IAC5B,qCAAe,CAAA;IAEf,yCAAmB,CAAA;IACnB,+CAAyB,CAAA;IACzB,2CAAqB,CAAA;IACrB,6CAAuB,CAAA;IAEvB,uCAAiB,CAAA;IACjB,uCAAiB,CAAA;IACjB,mCAAa,CAAA;IACb,qCAAe,CAAA;IACf,yCAAmB,CAAA;IACnB,uCAAiB,CAAA;IACjB,yCAAmB,CAAA;IAEnB,yDAAmC,CAAA;IACnC,mDAA6B,CAAA;IAC7B,2CAAqB,CAAA;IACrB,2CAAqB,CAAA;IACrB,6CAAuB,CAAA;IACvB,2CAAqB,CAAA;IACrB,mCAAa,CAAA;IAEb,yCAAmB,CAAA;AACrB,CAAC,EAzBW,kBAAkB,KAAlB,kBAAkB,QAyB7B"}
|
@@ -1,71 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Copyright (c) 2020-present, Goldman Sachs
|
3
|
-
*
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
-
* you may not use this file except in compliance with the License.
|
6
|
-
* You may obtain a copy of the License at
|
7
|
-
*
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
*
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
-
* See the License for the specific language governing permissions and
|
14
|
-
* limitations under the License.
|
15
|
-
*/
|
16
|
-
import type { DocumentationEntry } from '@finos/legend-application';
|
17
|
-
import { type editor as monacoEditorAPI, languages as monacoLanguagesAPI, type IPosition } from 'monaco-editor';
|
18
|
-
/**
|
19
|
-
* This snippet suggestion is meant for an embedded content of an element
|
20
|
-
* In other words, it is used to construct element snippet suggestions
|
21
|
-
*
|
22
|
-
* Because of that, it is expected that there are text content wrapping around
|
23
|
-
* this snippet, so the first suggestion might not start from index 1.
|
24
|
-
*/
|
25
|
-
export interface ElementEmbeddedContentSnippetSuggestion {
|
26
|
-
/**
|
27
|
-
* Brief description about the suggestion item to enable the users to quickly
|
28
|
-
* differentiate between one suggestions from another
|
29
|
-
*/
|
30
|
-
description?: string | undefined;
|
31
|
-
/**
|
32
|
-
* The snippet text to be embedded in the full snippet suggestion text for the element
|
33
|
-
*
|
34
|
-
* NOTE: The snippet syntax follows that of `monaco-editor`
|
35
|
-
* See https://code.visualstudio.com/docs/editor/userdefinedsnippets#_create-your-own-snippets
|
36
|
-
*/
|
37
|
-
text: string;
|
38
|
-
}
|
39
|
-
/**
|
40
|
-
* This mirrors `monaco-editor` completion item structure
|
41
|
-
* See https://microsoft.github.io/monaco-editor/api/interfaces/monaco.languages.CompletionItem.html
|
42
|
-
*/
|
43
|
-
export interface PureGrammarTextSuggestion {
|
44
|
-
/**
|
45
|
-
* The text label of the suggestion.
|
46
|
-
*/
|
47
|
-
text: string;
|
48
|
-
/**
|
49
|
-
* Brief description about the suggestion item to enable the users to quickly
|
50
|
-
* differentiate between one suggestions from another
|
51
|
-
*/
|
52
|
-
description?: string | undefined;
|
53
|
-
/**
|
54
|
-
* Detailed documentation that explains/elaborates the suggestion item.
|
55
|
-
*/
|
56
|
-
documentation?: DocumentationEntry | undefined;
|
57
|
-
/**
|
58
|
-
* A string or snippet that should be inserted when selecting this suggestion.
|
59
|
-
*
|
60
|
-
* NOTE: The snippet syntax follows that of `monaco-editor`
|
61
|
-
* See https://code.visualstudio.com/docs/editor/userdefinedsnippets#_create-your-own-snippets
|
62
|
-
*/
|
63
|
-
insertText: string;
|
64
|
-
}
|
65
|
-
export declare const getParserKeywordSuggestions: (position: IPosition, model: monacoEditorAPI.ITextModel, suggestions: PureGrammarTextSuggestion[]) => monacoLanguagesAPI.CompletionItem[];
|
66
|
-
export declare const getSectionParserNameFromLineText: (lineText: string) => string | undefined;
|
67
|
-
export declare const getParserElementSnippetSuggestions: (position: IPosition, model: monacoEditorAPI.ITextModel, suggestionsGetter: (parserName: string) => PureGrammarTextSuggestion[]) => monacoLanguagesAPI.CompletionItem[];
|
68
|
-
export declare const getInlineSnippetSuggestions: (position: IPosition, model: monacoEditorAPI.ITextModel, extraSnippetSuggestions?: PureGrammarTextSuggestion[]) => monacoLanguagesAPI.CompletionItem[];
|
69
|
-
export declare const isTokenOneOf: (token: string, baseTokens: string[], exact?: boolean) => boolean;
|
70
|
-
export declare const PURE_CODE_EDITOR_WORD_SEPARATORS = "`~!@#%^&*()-=+[{]}\\|;:'\",.<>/?";
|
71
|
-
//# sourceMappingURL=PureLanguageCodeEditorSupport.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"PureLanguageCodeEditorSupport.d.ts","sourceRoot":"","sources":["../../src/code-editor/PureLanguageCodeEditorSupport.ts"],"names":[],"mappings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