vzcode 0.86.0 → 0.87.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/assets/index-B4X7yIz8.js +155 -0
- package/dist/assets/index-DubfLBmh.js +400 -0
- package/dist/index.html +1 -1
- package/package.json +10 -10
- package/src/client/CodeEditor/typeScriptCompletions.ts +2 -2
- package/src/client/CodeEditor/typeScriptLinter.ts +3 -3
- package/src/client/VZSettings.tsx +27 -13
- package/src/client/VZSidebar/useDragAndDrop.tsx +2 -2
- package/src/server/index.js +2 -3
- package/dist/assets/index-CI1sbUJw.js +0 -400
- package/dist/assets/index-DzsReLik.js +0 -146
package/dist/index.html
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap"
|
|
21
21
|
rel="stylesheet"
|
|
22
22
|
/>
|
|
23
|
-
<script type="module" crossorigin src="/assets/index-
|
|
23
|
+
<script type="module" crossorigin src="/assets/index-B4X7yIz8.js"></script>
|
|
24
24
|
<link rel="stylesheet" crossorigin href="/assets/index-9yhZQKtK.css">
|
|
25
25
|
</head>
|
|
26
26
|
<body>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vzcode",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.87.0",
|
|
4
4
|
"description": "Multiplayer code editor system",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"type": "module",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"@codemirror/lang-markdown": "^6.2.4",
|
|
76
76
|
"@codemirror/state": "^6.4.1",
|
|
77
77
|
"@codemirror/theme-one-dark": "^6.1.2",
|
|
78
|
-
"@codemirror/view": "^6.26.
|
|
78
|
+
"@codemirror/view": "^6.26.2",
|
|
79
79
|
"@lezer/highlight": "^1.2.0",
|
|
80
80
|
"@replit/codemirror-indentation-markers": "^6.5.1",
|
|
81
81
|
"@replit/codemirror-interact": "^6.3.1",
|
|
@@ -104,26 +104,26 @@
|
|
|
104
104
|
"json0-ot-diff": "^1.1.2",
|
|
105
105
|
"ngrok": "^4.3.3",
|
|
106
106
|
"open": "^10.1.0",
|
|
107
|
-
"openai": "^4.
|
|
107
|
+
"openai": "^4.33.0",
|
|
108
108
|
"prettier-plugin-svelte": "^3.2.2",
|
|
109
109
|
"react": "^18.2.0",
|
|
110
110
|
"react-bootstrap": "^2.10.2",
|
|
111
111
|
"react-dom": "^18.2.0",
|
|
112
112
|
"react-router-dom": "^6.22.3",
|
|
113
|
-
"sharedb": "^4.1.
|
|
114
|
-
"sharedb-client-browser": "^4.
|
|
113
|
+
"sharedb": "^4.1.4",
|
|
114
|
+
"sharedb-client-browser": "^4.5.0",
|
|
115
115
|
"vizhub-ui": "^3.22.0",
|
|
116
116
|
"ws": "^8.16.0"
|
|
117
117
|
},
|
|
118
118
|
"devDependencies": {
|
|
119
|
-
"@types/react": "^18.2.
|
|
120
|
-
"@types/react-dom": "^18.2.
|
|
119
|
+
"@types/react": "^18.2.75",
|
|
120
|
+
"@types/react-dom": "^18.2.24",
|
|
121
121
|
"@vitejs/plugin-react": "^4.2.1",
|
|
122
122
|
"concurrently": "^8.2.2",
|
|
123
123
|
"prettier": "^3.2.5",
|
|
124
|
-
"sass": "^1.
|
|
125
|
-
"typescript": "^5.4.
|
|
126
|
-
"vite": "^5.2.
|
|
124
|
+
"sass": "^1.74.1",
|
|
125
|
+
"typescript": "^5.4.4",
|
|
126
|
+
"vite": "^5.2.8",
|
|
127
127
|
"vitest": "^1.4.0"
|
|
128
128
|
}
|
|
129
129
|
}
|
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
CompletionContext,
|
|
3
3
|
CompletionSource,
|
|
4
4
|
} from '@codemirror/autocomplete';
|
|
5
|
+
import { generateRequestId } from '../generateRequestId';
|
|
5
6
|
import {
|
|
6
7
|
AutocompleteRequest,
|
|
7
8
|
AutocompleteResponse,
|
|
8
|
-
} from '../useTypeScript/requestTypes';
|
|
9
|
-
import { generateRequestId } from '../generateRequestId';
|
|
9
|
+
} from '../useTypeScript/worker/requestTypes';
|
|
10
10
|
|
|
11
11
|
export const typeScriptCompletions = ({
|
|
12
12
|
typeScriptWorker,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { Diagnostic } from 'typescript';
|
|
2
|
+
import { generateRequestId } from '../generateRequestId';
|
|
2
3
|
import {
|
|
3
|
-
LinterResponse,
|
|
4
4
|
LinterRequest,
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
LinterResponse,
|
|
6
|
+
} from '../useTypeScript/worker/requestTypes';
|
|
7
7
|
|
|
8
8
|
export const typeScriptLinter = ({
|
|
9
9
|
typeScriptWorker,
|
|
@@ -35,23 +35,37 @@ export const VZSettings = ({
|
|
|
35
35
|
);
|
|
36
36
|
|
|
37
37
|
// Initialize font and size from localStorage or defaults
|
|
38
|
-
const [selectedFont, setSelectedFont] = useState(
|
|
39
|
-
|
|
38
|
+
const [selectedFont, setSelectedFont] = useState(
|
|
39
|
+
localStorage.getItem('vzcodeSelectedFont') ||
|
|
40
|
+
'Roboto Mono',
|
|
41
|
+
);
|
|
42
|
+
const [selectedFontSize, setSelectedFontSize] = useState(
|
|
43
|
+
localStorage.getItem('vzcodeSelectedFontSize') ||
|
|
44
|
+
'16px',
|
|
45
|
+
);
|
|
40
46
|
|
|
41
47
|
// Called when the user selects a different font
|
|
42
|
-
const handleFontChange = useCallback(
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
48
|
+
const handleFontChange = useCallback(
|
|
49
|
+
(event: React.ChangeEvent<HTMLSelectElement>) => {
|
|
50
|
+
const newFont = event.target.value;
|
|
51
|
+
localStorage.setItem('vzcodeSelectedFont', newFont);
|
|
52
|
+
setSelectedFont(newFont);
|
|
53
|
+
},
|
|
54
|
+
[],
|
|
55
|
+
);
|
|
47
56
|
|
|
48
57
|
// Called when the user selects a different font size
|
|
49
|
-
const handleFontSizeChange = useCallback(
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
58
|
+
const handleFontSizeChange = useCallback(
|
|
59
|
+
(event: React.ChangeEvent<HTMLSelectElement>) => {
|
|
60
|
+
const newSize = event.target.value;
|
|
61
|
+
localStorage.setItem(
|
|
62
|
+
'vzcodeSelectedFontSize',
|
|
63
|
+
newSize,
|
|
64
|
+
);
|
|
65
|
+
setSelectedFontSize(newSize);
|
|
66
|
+
},
|
|
67
|
+
[],
|
|
68
|
+
);
|
|
55
69
|
|
|
56
70
|
useEffect(() => {
|
|
57
71
|
document.body.style.setProperty(
|
|
@@ -37,9 +37,9 @@ export const useDragAndDrop = () => {
|
|
|
37
37
|
event.preventDefault();
|
|
38
38
|
event.stopPropagation();
|
|
39
39
|
setIsDragOver(false);
|
|
40
|
-
|
|
40
|
+
|
|
41
41
|
const items = event.dataTransfer.items;
|
|
42
|
-
|
|
42
|
+
|
|
43
43
|
const processEntry = (entry, path) => {
|
|
44
44
|
if (entry.isFile) {
|
|
45
45
|
entry.file((file) => {
|
package/src/server/index.js
CHANGED
|
@@ -220,13 +220,12 @@ const save = () => {
|
|
|
220
220
|
// Handle creating files and Directories.
|
|
221
221
|
if (!previous && current) {
|
|
222
222
|
//File Creation
|
|
223
|
-
if(!isDirectory(current.name)){
|
|
223
|
+
if (!isDirectory(current.name)) {
|
|
224
224
|
fs.writeFileSync(current.name, current.text);
|
|
225
|
-
}else{
|
|
225
|
+
} else {
|
|
226
226
|
fs.mkdirSync(current.name, { recursive: true });
|
|
227
227
|
}
|
|
228
228
|
}
|
|
229
|
-
|
|
230
229
|
}
|
|
231
230
|
// TODO deleted all directories under directoriesToDelete
|
|
232
231
|
|