@ws-ui/code-editor 0.3.11 → 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.
- package/dist/index.cjs.js +19 -19
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +648 -686
- package/dist/index.es.js.map +1 -1
- package/dist/package.json +99 -0
- package/dist/style.css +1 -1
- package/package.json +10 -17
- package/README.md +0 -27
- package/dist/editor/loader/monaco-workers.d.ts +0 -1
- package/dist/main.d.ts +0 -1
- /package/dist/{studio/assets → assets}/css.worker.bundle.js +0 -0
- /package/dist/{studio/assets → assets}/editor.worker.bundle.js +0 -0
- /package/dist/{studio/assets → assets}/html.worker.bundle.js +0 -0
- /package/dist/{studio/assets → assets}/json.worker.bundle.js +0 -0
- /package/dist/{studio/assets → assets}/textmate.worker.bundle.js +0 -0
- /package/dist/{studio/assets → assets}/ts.worker.bundle.js +0 -0
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ws-ui/code-editor",
|
|
3
|
+
"private": false,
|
|
4
|
+
"version": "1.1.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.cjs.js",
|
|
7
|
+
"module": "./dist/index.es.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"files": [
|
|
10
|
+
"dist"
|
|
11
|
+
],
|
|
12
|
+
"scripts": {
|
|
13
|
+
"start-dev": "nodemon --watch src --ext ts,tsx,js,jsx,css --exec \"npm run build && npm run --prefix ../.. postbuild -- --packages=code-editor\"",
|
|
14
|
+
"dev": "vite",
|
|
15
|
+
"dev:4d": "cross-env VITE_DEMO_LANG=4d vite",
|
|
16
|
+
"dev:qodly": "cross-env VITE_DEMO_LANG=qodly vite",
|
|
17
|
+
"dev:json": "cross-env VITE_DEMO_LANG=json vite",
|
|
18
|
+
"dev:js": "cross-env VITE_DEMO_LANG=js vite",
|
|
19
|
+
"dev:condition": "cross-env VITE_DEMO_LANG=condition vite",
|
|
20
|
+
"dev:qs-389": "cross-env VITE_DEMO_LANG=qs-389 vite",
|
|
21
|
+
"clean:cache": "npx rimraf node_modules/.vite node_modules/.monaco",
|
|
22
|
+
"prepack": "npm run build",
|
|
23
|
+
"prebuild": "npm run clean:cache",
|
|
24
|
+
"build": "tsc && vite build",
|
|
25
|
+
"build:noloader": "cross-env VITE_DISABLE_MONACO_LOADER=true npm run build"
|
|
26
|
+
},
|
|
27
|
+
"overrides": {
|
|
28
|
+
"@ws-ui/shared": {
|
|
29
|
+
"@ws-ui/icons": "1.1.0"
|
|
30
|
+
},
|
|
31
|
+
"@monaco-editor/react": {
|
|
32
|
+
"monaco-editor": "$monaco-editor"
|
|
33
|
+
},
|
|
34
|
+
"monaco-languageclient": {
|
|
35
|
+
"monaco-editor": "$monaco-editor",
|
|
36
|
+
"vscode": "$vscode"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"@codingame/monaco-vscode-configuration-service-override": "8.0.4",
|
|
41
|
+
"@codingame/monaco-vscode-css-default-extension": "8.0.4",
|
|
42
|
+
"@codingame/monaco-vscode-editor-service-override": "8.0.4",
|
|
43
|
+
"@codingame/monaco-vscode-html-default-extension": "8.0.4",
|
|
44
|
+
"@codingame/monaco-vscode-javascript-default-extension": "8.0.4",
|
|
45
|
+
"@codingame/monaco-vscode-json-default-extension": "8.0.4",
|
|
46
|
+
"@codingame/monaco-vscode-languages-service-override": "8.0.4",
|
|
47
|
+
"@codingame/monaco-vscode-model-service-override": "8.0.4",
|
|
48
|
+
"@codingame/monaco-vscode-monarch-service-override": "8.0.4",
|
|
49
|
+
"@codingame/monaco-vscode-standalone-css-language-features": "8.0.4",
|
|
50
|
+
"@codingame/monaco-vscode-standalone-html-language-features": "8.0.4",
|
|
51
|
+
"@codingame/monaco-vscode-standalone-json-language-features": "8.0.4",
|
|
52
|
+
"@codingame/monaco-vscode-standalone-languages": "8.0.4",
|
|
53
|
+
"@codingame/monaco-vscode-standalone-typescript-language-features": "8.0.4",
|
|
54
|
+
"@codingame/monaco-vscode-textmate-service-override": "8.0.4",
|
|
55
|
+
"@codingame/monaco-vscode-theme-defaults-default-extension": "8.0.4",
|
|
56
|
+
"@codingame/monaco-vscode-theme-service-override": "8.0.4",
|
|
57
|
+
"@monaco-editor/react": "4.6.0",
|
|
58
|
+
"monaco-languageclient": "8.8.3",
|
|
59
|
+
"monaco-editor": "npm:@codingame/monaco-vscode-editor-api@8.0.4",
|
|
60
|
+
"vscode": "npm:@codingame/monaco-vscode-api@8.0.4",
|
|
61
|
+
"vscode-ws-jsonrpc": "^3.0.0"
|
|
62
|
+
},
|
|
63
|
+
"peerDependencies": {
|
|
64
|
+
"classnames": "^2.3.1",
|
|
65
|
+
"lodash": "^4.17.21",
|
|
66
|
+
"re-resizable": "^6.9.0",
|
|
67
|
+
"react": "^17.0.2",
|
|
68
|
+
"react-dom": "^17.0.2",
|
|
69
|
+
"react-icons": "^4.3.1",
|
|
70
|
+
"react-popper": "^2.2.5",
|
|
71
|
+
"react-select": "^4.3.1",
|
|
72
|
+
"simplebar-react": "^2.3.3"
|
|
73
|
+
},
|
|
74
|
+
"devDependencies": {
|
|
75
|
+
"@tailwindcss/typography": "^0.5.10",
|
|
76
|
+
"@types/classnames": "^2.3.0",
|
|
77
|
+
"@types/lodash": "^4.14.199",
|
|
78
|
+
"@types/node": "^20.6.5",
|
|
79
|
+
"@types/react": "^17.0.24",
|
|
80
|
+
"@types/react-dom": "^17.0.5",
|
|
81
|
+
"@types/react-select": "^4.0.15",
|
|
82
|
+
"@typescript-eslint/eslint-plugin": "^6.0.0",
|
|
83
|
+
"@typescript-eslint/parser": "^6.0.0",
|
|
84
|
+
"@vitejs/plugin-react": "^4.0.3",
|
|
85
|
+
"@ws-ui/vite-plugins": "^1.0.1",
|
|
86
|
+
"autoprefixer": "^10.4.16",
|
|
87
|
+
"cross-env": "^7.0.3",
|
|
88
|
+
"esbuild": "^0.18.20",
|
|
89
|
+
"eslint": "^8.45.0",
|
|
90
|
+
"eslint-plugin-react-hooks": "^5.2.0",
|
|
91
|
+
"eslint-plugin-react-refresh": "^0.4.3",
|
|
92
|
+
"postcss": "^8.4.31",
|
|
93
|
+
"prettier": "^3.3.3",
|
|
94
|
+
"tailwindcss": "^3.3.3",
|
|
95
|
+
"typescript": "^5.0.2",
|
|
96
|
+
"vite": "^5.0.0",
|
|
97
|
+
"vite-plugin-dts": "^3.5.4"
|
|
98
|
+
}
|
|
99
|
+
}
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
*,:before,:after{
|
|
1
|
+
*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.static{position:static}.absolute{position:absolute}.inset-0{top:0;right:0;bottom:0;left:0}.flex{display:flex}.h-3{height:.75rem}.h-4{height:1rem}.h-full{height:100%}.w-3\/4{width:75%}.w-4{width:1rem}.w-5\/6{width:83.333333%}.w-full{width:100%}.flex-1{flex:1 1 0%}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.items-center{align-items:center}.justify-center{justify-content:center}.gap-1{gap:.25rem}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.rounded{border-radius:.25rem}.border-b{border-bottom-width:1px}.px-2{padding-left:.5rem;padding-right:.5rem}.px-4{padding-left:1rem;padding-right:1rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.text-xs{font-size:.75rem;line-height:1rem}.italic{font-style:italic}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-600{--tw-text-opacity: 1;color:rgb(202 138 4 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.line-through{text-decoration-line:line-through}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ws-ui/code-editor",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "1.1.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs.js",
|
|
7
7
|
"module": "./dist/index.es.js",
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
"dist"
|
|
11
11
|
],
|
|
12
12
|
"scripts": {
|
|
13
|
+
"start-dev": "nodemon --watch src --ext ts,tsx,js,jsx,css --exec \"npm run build && npm run --prefix ../.. postbuild -- --packages=code-editor\"",
|
|
13
14
|
"dev": "vite",
|
|
14
|
-
"format": "prettier --write .",
|
|
15
15
|
"dev:4d": "cross-env VITE_DEMO_LANG=4d vite",
|
|
16
16
|
"dev:qodly": "cross-env VITE_DEMO_LANG=qodly vite",
|
|
17
17
|
"dev:json": "cross-env VITE_DEMO_LANG=json vite",
|
|
@@ -21,16 +21,12 @@
|
|
|
21
21
|
"clean:cache": "npx rimraf node_modules/.vite node_modules/.monaco",
|
|
22
22
|
"prepack": "npm run build",
|
|
23
23
|
"prebuild": "npm run clean:cache",
|
|
24
|
-
"build": "tsc && vite build
|
|
25
|
-
"build:noloader": "cross-env VITE_DISABLE_MONACO_LOADER=true npm run build"
|
|
26
|
-
"postbuild": "yalc push --private",
|
|
27
|
-
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
|
28
|
-
"preview": "vite preview"
|
|
24
|
+
"build": "tsc && vite build",
|
|
25
|
+
"build:noloader": "cross-env VITE_DISABLE_MONACO_LOADER=true npm run build"
|
|
29
26
|
},
|
|
30
27
|
"overrides": {
|
|
31
28
|
"@ws-ui/shared": {
|
|
32
|
-
"@ws-ui/icons": "
|
|
33
|
-
"monaco-editor": "$monaco-editor"
|
|
29
|
+
"@ws-ui/icons": "1.1.0"
|
|
34
30
|
},
|
|
35
31
|
"@monaco-editor/react": {
|
|
36
32
|
"monaco-editor": "$monaco-editor"
|
|
@@ -58,15 +54,13 @@
|
|
|
58
54
|
"@codingame/monaco-vscode-textmate-service-override": "8.0.4",
|
|
59
55
|
"@codingame/monaco-vscode-theme-defaults-default-extension": "8.0.4",
|
|
60
56
|
"@codingame/monaco-vscode-theme-service-override": "8.0.4",
|
|
61
|
-
"monaco-editor": "
|
|
57
|
+
"@monaco-editor/react": "4.6.0",
|
|
62
58
|
"monaco-languageclient": "8.8.3",
|
|
59
|
+
"monaco-editor": "npm:@codingame/monaco-vscode-editor-api@8.0.4",
|
|
63
60
|
"vscode": "npm:@codingame/monaco-vscode-api@8.0.4",
|
|
64
61
|
"vscode-ws-jsonrpc": "^3.0.0"
|
|
65
62
|
},
|
|
66
63
|
"peerDependencies": {
|
|
67
|
-
"@monaco-editor/react": "^4.6.0",
|
|
68
|
-
"@ws-ui/icons": "0.2.3",
|
|
69
|
-
"@ws-ui/shared": "0.3.11",
|
|
70
64
|
"classnames": "^2.3.1",
|
|
71
65
|
"lodash": "^4.17.21",
|
|
72
66
|
"re-resizable": "^6.9.0",
|
|
@@ -93,14 +87,13 @@
|
|
|
93
87
|
"cross-env": "^7.0.3",
|
|
94
88
|
"esbuild": "^0.18.20",
|
|
95
89
|
"eslint": "^8.45.0",
|
|
96
|
-
"eslint-plugin-react-hooks": "^
|
|
90
|
+
"eslint-plugin-react-hooks": "^5.2.0",
|
|
97
91
|
"eslint-plugin-react-refresh": "^0.4.3",
|
|
98
92
|
"postcss": "^8.4.31",
|
|
99
93
|
"prettier": "^3.3.3",
|
|
100
94
|
"tailwindcss": "^3.3.3",
|
|
101
95
|
"typescript": "^5.0.2",
|
|
102
|
-
"vite": "^
|
|
103
|
-
"vite-plugin-dts": "^3.5.4"
|
|
104
|
-
"yalc": "^1.0.0-pre.53"
|
|
96
|
+
"vite": "^5.0.0",
|
|
97
|
+
"vite-plugin-dts": "^3.5.4"
|
|
105
98
|
}
|
|
106
99
|
}
|
package/README.md
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
# React + TypeScript + Vite
|
|
2
|
-
|
|
3
|
-
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
|
|
4
|
-
|
|
5
|
-
Currently, two official plugins are available:
|
|
6
|
-
|
|
7
|
-
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
|
|
8
|
-
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
|
|
9
|
-
|
|
10
|
-
## Expanding the ESLint configuration
|
|
11
|
-
|
|
12
|
-
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
|
|
13
|
-
|
|
14
|
-
- Configure the top-level `parserOptions` property like this:
|
|
15
|
-
|
|
16
|
-
```js
|
|
17
|
-
parserOptions: {
|
|
18
|
-
ecmaVersion: 'latest',
|
|
19
|
-
sourceType: 'module',
|
|
20
|
-
project: ['./tsconfig.json', './tsconfig.node.json'],
|
|
21
|
-
tsconfigRootDir: __dirname,
|
|
22
|
-
},
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked`
|
|
26
|
-
- Optionally add `plugin:@typescript-eslint/stylistic-type-checked`
|
|
27
|
-
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/main.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|