@ws-ui/code-editor 0.0.19 → 0.0.21
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/dist/demo/LSPDemo.d.ts +6 -0
- package/dist/demo/common.d.ts +33 -0
- package/dist/demo/index.d.ts +2 -0
- package/dist/monaco_theme.json +93 -0
- package/package.json +4 -2
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { LSPProps } from '..';
|
|
3
|
+
export declare const files: {
|
|
4
|
+
css: {
|
|
5
|
+
path: string;
|
|
6
|
+
initialValue: string;
|
|
7
|
+
language: string;
|
|
8
|
+
};
|
|
9
|
+
js: {
|
|
10
|
+
path: string;
|
|
11
|
+
initialValue: string;
|
|
12
|
+
language: string;
|
|
13
|
+
};
|
|
14
|
+
'4d': {
|
|
15
|
+
path: string;
|
|
16
|
+
initialValue: string;
|
|
17
|
+
language: string;
|
|
18
|
+
requireLSP: boolean;
|
|
19
|
+
};
|
|
20
|
+
qodly: {
|
|
21
|
+
path: string;
|
|
22
|
+
initialValue: string;
|
|
23
|
+
language: string;
|
|
24
|
+
requireLSP: boolean;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export type LanguageKey = keyof typeof files;
|
|
28
|
+
export interface IFile {
|
|
29
|
+
path: string;
|
|
30
|
+
initialValue: string;
|
|
31
|
+
language: string;
|
|
32
|
+
}
|
|
33
|
+
export declare function renderCodeEditor(file: IFile, lspProps?: LSPProps): JSX.Element;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
{
|
|
2
|
+
"base": "vs-dark",
|
|
3
|
+
"inherit": true,
|
|
4
|
+
"colors": {
|
|
5
|
+
"editor.background": "#313131"
|
|
6
|
+
},
|
|
7
|
+
"rules": [
|
|
8
|
+
{
|
|
9
|
+
"token": "",
|
|
10
|
+
"background": "#313131"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"token": "method",
|
|
14
|
+
"foreground": "#1b79f3",
|
|
15
|
+
"fontStyle": "bold italic"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"token": "method.defaultLibrary",
|
|
19
|
+
"foreground": "#59bb00",
|
|
20
|
+
"fontStyle": "bold"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"token": "method.plugin",
|
|
24
|
+
"foreground": "#bfbfbf"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"token": "property",
|
|
28
|
+
"foreground": "#a0806b"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"token": "function",
|
|
32
|
+
"foreground": "#4ec36e",
|
|
33
|
+
"fontStyle": "italic"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"token": "parameter",
|
|
37
|
+
"foreground": "#0c70ff",
|
|
38
|
+
"fontStyle": "bold"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"token": "variable.interprocess",
|
|
42
|
+
"foreground": "#ff0088"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"token": "variable.process",
|
|
46
|
+
"foreground": "#53b0eb"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"token": "variable.local",
|
|
50
|
+
"foreground": "#18b3f1"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"token": "keyword",
|
|
54
|
+
"foreground": "#d0d0d0",
|
|
55
|
+
"fontStyle": "bold"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"token": "type",
|
|
59
|
+
"foreground": "#068c00",
|
|
60
|
+
"fontStyle": "bold"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"token": "table",
|
|
64
|
+
"foreground": "#cf5600"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"token": "field",
|
|
68
|
+
"foreground": "#9c6765"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"token": "operator",
|
|
72
|
+
"foreground": "#d0d0d0"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"token": "comment",
|
|
76
|
+
"foreground": "#8f8f8f"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"token": "constant",
|
|
80
|
+
"foreground": "#fa647f",
|
|
81
|
+
"fontStyle": "underline"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"token": "string",
|
|
85
|
+
"foreground": "#ffffff"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"token": "error",
|
|
89
|
+
"foreground": "#ff0000",
|
|
90
|
+
"fontStyle": "bold italic"
|
|
91
|
+
}
|
|
92
|
+
]
|
|
93
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ws-ui/code-editor",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.21",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs.js",
|
|
7
7
|
"module": "./dist/index.es.js",
|
|
@@ -11,6 +11,8 @@
|
|
|
11
11
|
],
|
|
12
12
|
"scripts": {
|
|
13
13
|
"dev": "cross-env VITE_DISABLE_MONACO_LOADER=true vite",
|
|
14
|
+
"dev:4d": "cross-env VITE_DEMO_LANG=4d vite",
|
|
15
|
+
"dev:qodly": "cross-env VITE_DEMO_LANG=qodly vite",
|
|
14
16
|
"prepack": "npm run build",
|
|
15
17
|
"build": "tsc && vite build --base=/studio/",
|
|
16
18
|
"postbuild": "yalc push --private",
|
|
@@ -35,7 +37,7 @@
|
|
|
35
37
|
"peerDependencies": {
|
|
36
38
|
"@monaco-editor/react": "^4.6.0",
|
|
37
39
|
"@ws-ui/icons": "^0",
|
|
38
|
-
"@ws-ui/shared": "^0.0.
|
|
40
|
+
"@ws-ui/shared": "^0.0.40",
|
|
39
41
|
"classnames": "^2.3.1",
|
|
40
42
|
"lodash": "^4.17.21",
|
|
41
43
|
"monaco-editor": "^0.41.0",
|