@finos/legend-lego 1.2.72 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. package/lib/code-editor/CodeDiffView.d.ts +3 -1
  2. package/lib/code-editor/CodeDiffView.d.ts.map +1 -1
  3. package/lib/code-editor/CodeDiffView.js +6 -2
  4. package/lib/code-editor/CodeDiffView.js.map +1 -1
  5. package/lib/code-editor/CodeEditor.d.ts +8 -2
  6. package/lib/code-editor/CodeEditor.d.ts.map +1 -1
  7. package/lib/code-editor/CodeEditor.js +42 -4
  8. package/lib/code-editor/CodeEditor.js.map +1 -1
  9. package/lib/code-editor/index.d.ts +0 -5
  10. package/lib/code-editor/index.d.ts.map +1 -1
  11. package/lib/code-editor/index.js +0 -5
  12. package/lib/code-editor/index.js.map +1 -1
  13. package/lib/data-grid/DataGrid.d.ts.map +1 -1
  14. package/lib/data-grid/DataGrid.js +1 -13
  15. package/lib/data-grid/DataGrid.js.map +1 -1
  16. package/lib/index.css +1 -1
  17. package/package.json +29 -29
  18. package/src/code-editor/CodeDiffView.tsx +10 -3
  19. package/src/code-editor/CodeEditor.tsx +69 -4
  20. package/src/code-editor/index.ts +0 -6
  21. package/src/data-grid/DataGrid.tsx +0 -6
  22. package/tsconfig.json +1 -15
  23. package/lib/code-editor/CodeEditorTheme.d.ts +0 -41
  24. package/lib/code-editor/CodeEditorTheme.d.ts.map +0 -1
  25. package/lib/code-editor/CodeEditorTheme.js +0 -99
  26. package/lib/code-editor/CodeEditorTheme.js.map +0 -1
  27. package/lib/code-editor/CodeEditorUtils.d.ts +0 -74
  28. package/lib/code-editor/CodeEditorUtils.d.ts.map +0 -1
  29. package/lib/code-editor/CodeEditorUtils.js +0 -203
  30. package/lib/code-editor/CodeEditorUtils.js.map +0 -1
  31. package/lib/code-editor/PureLanguage.d.ts +0 -38
  32. package/lib/code-editor/PureLanguage.d.ts.map +0 -1
  33. package/lib/code-editor/PureLanguage.js +0 -39
  34. package/lib/code-editor/PureLanguage.js.map +0 -1
  35. package/lib/code-editor/PureLanguageCodeEditorSupport.d.ts +0 -71
  36. package/lib/code-editor/PureLanguageCodeEditorSupport.d.ts.map +0 -1
  37. package/lib/code-editor/PureLanguageCodeEditorSupport.js +0 -238
  38. package/lib/code-editor/PureLanguageCodeEditorSupport.js.map +0 -1
  39. package/lib/code-editor/PureLanguageService.d.ts +0 -19
  40. package/lib/code-editor/PureLanguageService.d.ts.map +0 -1
  41. package/lib/code-editor/PureLanguageService.js +0 -373
  42. package/lib/code-editor/PureLanguageService.js.map +0 -1
  43. package/lib/code-editor/themes/Github-Theme-dark-dimmed.json +0 -613
  44. package/lib/code-editor/themes/Github-Theme-dark.json +0 -513
  45. package/lib/code-editor/themes/Github-Theme-light.json +0 -598
  46. package/lib/code-editor/themes/Material-Theme-Darker.json +0 -816
  47. package/lib/code-editor/themes/Material-Theme-Default.json +0 -816
  48. package/lib/code-editor/themes/MonacoEditorThemeUtils.d.ts +0 -31
  49. package/lib/code-editor/themes/MonacoEditorThemeUtils.d.ts.map +0 -1
  50. package/lib/code-editor/themes/MonacoEditorThemeUtils.js +0 -88
  51. package/lib/code-editor/themes/MonacoEditorThemeUtils.js.map +0 -1
  52. package/lib/code-editor/themes/OneDark-Pro-darker.json +0 -2061
  53. package/lib/code-editor/themes/OneDark-Pro.json +0 -2090
  54. package/lib/code-editor/themes/solarized-dark-color-theme.json +0 -398
  55. package/src/code-editor/CodeEditorTheme.ts +0 -151
  56. package/src/code-editor/CodeEditorUtils.ts +0 -336
  57. package/src/code-editor/PureLanguage.ts +0 -42
  58. package/src/code-editor/PureLanguageCodeEditorSupport.ts +0 -341
  59. package/src/code-editor/PureLanguageService.ts +0 -416
  60. package/src/code-editor/themes/Github-Theme-dark-dimmed.json +0 -613
  61. package/src/code-editor/themes/Github-Theme-dark.json +0 -513
  62. package/src/code-editor/themes/Github-Theme-light.json +0 -598
  63. package/src/code-editor/themes/Material-Theme-Darker.json +0 -816
  64. package/src/code-editor/themes/Material-Theme-Default.json +0 -816
  65. package/src/code-editor/themes/MonacoEditorThemeUtils.ts +0 -128
  66. package/src/code-editor/themes/OneDark-Pro-darker.json +0 -2061
  67. package/src/code-editor/themes/OneDark-Pro.json +0 -2090
  68. package/src/code-editor/themes/README.md +0 -8
  69. package/src/code-editor/themes/solarized-dark-color-theme.json +0 -423
@@ -1,31 +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 { editor as monacoEditorAPI } from 'monaco-editor';
17
- type VSCodeThemeData = {
18
- colors: Record<string, string | string[]>;
19
- tokenColors: {
20
- name?: string;
21
- scope?: string[] | string;
22
- settings?: {
23
- foreground?: string;
24
- background?: string;
25
- fontStyle?: string;
26
- };
27
- }[];
28
- };
29
- export declare const buildCodeEditorTheme: (vscodeThemeData: VSCodeThemeData, baseTheme: monacoEditorAPI.BuiltinTheme, colorsOverride: Record<string, string>, rulesOverride: monacoEditorAPI.ITokenThemeRule[]) => monacoEditorAPI.IStandaloneThemeData;
30
- export {};
31
- //# sourceMappingURL=MonacoEditorThemeUtils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MonacoEditorThemeUtils.d.ts","sourceRoot":"","sources":["../../../src/code-editor/themes/MonacoEditorThemeUtils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAOH,OAAO,KAAK,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,eAAe,CAAC;AAE/D,KAAK,eAAe,GAAG;IACrB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,CAAC;IAC1C,WAAW,EAAE;QACX,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;QAC1B,QAAQ,CAAC,EAAE;YACT,UAAU,CAAC,EAAE,MAAM,CAAC;YACpB,UAAU,CAAC,EAAE,MAAM,CAAC;YACpB,SAAS,CAAC,EAAE,MAAM,CAAC;SACpB,CAAC;KACH,EAAE,CAAC;CACL,CAAC;AAgFF,eAAO,MAAM,oBAAoB,oBACd,eAAe,aACrB,eAAe,CAAC,YAAY,kBACvB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,iBACvB,eAAe,CAAC,eAAe,EAAE,KAC/C,eAAe,CAAC,oBAQlB,CAAC"}
@@ -1,88 +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 { getNonNullableEntry, isNonNullable, isString, } from '@finos/legend-shared';
17
- const parseVSCodeTheme = (rawData) => {
18
- const rules = [];
19
- rawData.tokenColors.forEach((tokenColor) => {
20
- if (!tokenColor.settings) {
21
- return;
22
- }
23
- let scopes = [];
24
- if (isString(tokenColor.scope)) {
25
- scopes = tokenColor.scope
26
- .replace(/^[,]+/, '')
27
- .replace(/[,]+$/, '')
28
- .split(',')
29
- .map((scope) => scope.trim());
30
- }
31
- else if (Array.isArray(tokenColor.scope)) {
32
- scopes = tokenColor.scope;
33
- }
34
- else {
35
- scopes = [''];
36
- }
37
- const baseRule = {};
38
- if (tokenColor.settings.foreground &&
39
- isString(tokenColor.settings.foreground)) {
40
- baseRule.foreground = tokenColor.settings.foreground;
41
- }
42
- if (tokenColor.settings.background &&
43
- isString(tokenColor.settings.background)) {
44
- baseRule.background = tokenColor.settings.background;
45
- }
46
- if (tokenColor.settings.fontStyle &&
47
- isString(tokenColor.settings.fontStyle)) {
48
- baseRule.fontStyle = tokenColor.settings.fontStyle;
49
- }
50
- scopes.forEach((scope) => {
51
- if (isNonNullable(scope) || !Object.keys(baseRule).length) {
52
- return;
53
- }
54
- const rule = {
55
- ...baseRule,
56
- token: scope,
57
- };
58
- rules.push(rule);
59
- });
60
- });
61
- const colors = {};
62
- Object.entries(rawData.colors).forEach(([key, value]) => {
63
- if (Array.isArray(value)) {
64
- if (value.length) {
65
- colors[key] = getNonNullableEntry(value, 0);
66
- }
67
- }
68
- else {
69
- colors[key] = value;
70
- }
71
- });
72
- return {
73
- base: 'vs-dark',
74
- inherit: true,
75
- rules: rules,
76
- colors,
77
- };
78
- };
79
- export const buildCodeEditorTheme = (vscodeThemeData, baseTheme, colorsOverride, rulesOverride) => {
80
- const baseThemeData = parseVSCodeTheme(vscodeThemeData);
81
- return {
82
- ...baseThemeData,
83
- base: baseTheme,
84
- colors: { ...baseThemeData.colors, ...colorsOverride },
85
- rules: [...baseThemeData.rules, ...rulesOverride],
86
- };
87
- };
88
- //# sourceMappingURL=MonacoEditorThemeUtils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MonacoEditorThemeUtils.js","sourceRoot":"","sources":["../../../src/code-editor/themes/MonacoEditorThemeUtils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,mBAAmB,EACnB,aAAa,EACb,QAAQ,GACT,MAAM,sBAAsB,CAAC;AAgB9B,MAAM,gBAAgB,GAAG,CACvB,OAAwB,EACc,EAAE;IACxC,MAAM,KAAK,GAAsC,EAAE,CAAC;IAEpD,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,EAAE;QACzC,IA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