vzcode 0.79.0 → 0.80.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-DZXcjW4O.js → index-FsyJOC4a.js} +42 -42
- package/dist/assets/{index-WtPPom-d.css → index-J8-kRnnE.css} +1 -1
- package/dist/assets/{worker-Bp-D5zJz.js → worker-DrXASJTP.js} +45 -45
- package/dist/index.html +2 -2
- package/package.json +12 -12
- package/src/client/VZSidebar/index.tsx +93 -91
- package/src/client/VZSidebar/styles.scss +10 -18
- package/src/client/useFileCRUD.ts +1 -1
- package/src/client/useTypeScript/worker.ts +3 -0
package/dist/index.html
CHANGED
|
@@ -20,8 +20,8 @@
|
|
|
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-
|
|
24
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
23
|
+
<script type="module" crossorigin src="/assets/index-FsyJOC4a.js"></script>
|
|
24
|
+
<link rel="stylesheet" crossorigin href="/assets/index-J8-kRnnE.css">
|
|
25
25
|
</head>
|
|
26
26
|
<body>
|
|
27
27
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vzcode",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.80.0",
|
|
4
4
|
"description": "Multiplayer code editor system",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"type": "module",
|
|
@@ -79,15 +79,15 @@
|
|
|
79
79
|
"@replit/codemirror-vscode-keymap": "^6.0.2",
|
|
80
80
|
"@teamwork/websocket-json-stream": "^2.0.0",
|
|
81
81
|
"@typescript/vfs": "^1.5.0",
|
|
82
|
-
"@uiw/codemirror-theme-abcdef": "^4.21.
|
|
83
|
-
"@uiw/codemirror-theme-dracula": "^4.21.
|
|
84
|
-
"@uiw/codemirror-theme-eclipse": "^4.21.
|
|
85
|
-
"@uiw/codemirror-theme-github": "^4.21.
|
|
86
|
-
"@uiw/codemirror-theme-material": "^4.21.
|
|
87
|
-
"@uiw/codemirror-theme-nord": "^4.21.
|
|
88
|
-
"@uiw/codemirror-theme-okaidia": "^4.21.
|
|
89
|
-
"@uiw/codemirror-theme-xcode": "^4.21.
|
|
90
|
-
"@uiw/codemirror-themes": "^4.21.
|
|
82
|
+
"@uiw/codemirror-theme-abcdef": "^4.21.25",
|
|
83
|
+
"@uiw/codemirror-theme-dracula": "^4.21.25",
|
|
84
|
+
"@uiw/codemirror-theme-eclipse": "^4.21.25",
|
|
85
|
+
"@uiw/codemirror-theme-github": "^4.21.25",
|
|
86
|
+
"@uiw/codemirror-theme-material": "^4.21.25",
|
|
87
|
+
"@uiw/codemirror-theme-nord": "^4.21.25",
|
|
88
|
+
"@uiw/codemirror-theme-okaidia": "^4.21.25",
|
|
89
|
+
"@uiw/codemirror-theme-xcode": "^4.21.25",
|
|
90
|
+
"@uiw/codemirror-themes": "^4.21.25",
|
|
91
91
|
"body-parser": "^1.20.2",
|
|
92
92
|
"codemirror": "^6.0.1",
|
|
93
93
|
"codemirror-ot": "^4.4.0",
|
|
@@ -112,14 +112,14 @@
|
|
|
112
112
|
"ws": "^8.16.0"
|
|
113
113
|
},
|
|
114
114
|
"devDependencies": {
|
|
115
|
-
"@types/react": "^18.2.
|
|
115
|
+
"@types/react": "^18.2.69",
|
|
116
116
|
"@types/react-dom": "^18.2.22",
|
|
117
117
|
"@vitejs/plugin-react": "^4.2.1",
|
|
118
118
|
"concurrently": "^8.2.2",
|
|
119
119
|
"prettier": "^3.2.5",
|
|
120
120
|
"sass": "^1.72.0",
|
|
121
121
|
"typescript": "^5.4.3",
|
|
122
|
-
"vite": "^5.2.
|
|
122
|
+
"vite": "^5.2.6",
|
|
123
123
|
"vitest": "^1.4.0"
|
|
124
124
|
}
|
|
125
125
|
}
|
|
@@ -94,121 +94,123 @@ export const VZSidebar = ({
|
|
|
94
94
|
|
|
95
95
|
return (
|
|
96
96
|
<div
|
|
97
|
-
className=
|
|
97
|
+
className="vz-sidebar"
|
|
98
|
+
style={{ width: sidebarWidth + 'px' }}
|
|
98
99
|
onDragEnter={handleDragEnter}
|
|
99
100
|
onDragOver={handleDragOver}
|
|
100
101
|
onDragLeave={handleDragLeave}
|
|
101
102
|
onDrop={handleDrop}
|
|
102
103
|
>
|
|
103
|
-
<div
|
|
104
|
-
className="
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
<div className="
|
|
109
|
-
<
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
104
|
+
<div className="files">
|
|
105
|
+
<div className="full-box">
|
|
106
|
+
<div className="sidebar-section-hint">
|
|
107
|
+
Project Files
|
|
108
|
+
</div>
|
|
109
|
+
<div className="sidebar-section-buttons">
|
|
110
|
+
<OverlayTrigger
|
|
111
|
+
placement="left"
|
|
112
|
+
overlay={
|
|
113
|
+
<Tooltip id="report-bug-tooltip">
|
|
114
|
+
{reportBugTooltipText}
|
|
115
|
+
</Tooltip>
|
|
116
|
+
}
|
|
117
|
+
>
|
|
118
|
+
<a
|
|
119
|
+
href="https://github.com/vizhub-core/vzcode/issues/new"
|
|
120
|
+
target="_blank"
|
|
121
|
+
rel="noopener noreferrer"
|
|
120
122
|
>
|
|
121
|
-
<
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
<BugSVG />
|
|
128
|
-
</i>
|
|
129
|
-
</a>
|
|
130
|
-
</OverlayTrigger>
|
|
131
|
-
{disableSettings ? null : (
|
|
132
|
-
<OverlayTrigger
|
|
133
|
-
placement="left"
|
|
134
|
-
overlay={
|
|
135
|
-
<Tooltip id="open-settings-tooltip">
|
|
136
|
-
{openSettingsTooltipText}
|
|
137
|
-
</Tooltip>
|
|
138
|
-
}
|
|
139
|
-
>
|
|
140
|
-
<i
|
|
141
|
-
onClick={handleSettingsClick}
|
|
142
|
-
className="icon-button icon-button-dark"
|
|
143
|
-
>
|
|
144
|
-
<GearSVG />
|
|
145
|
-
</i>
|
|
146
|
-
</OverlayTrigger>
|
|
147
|
-
)}
|
|
123
|
+
<i className="icon-button icon-button-dark">
|
|
124
|
+
<BugSVG />
|
|
125
|
+
</i>
|
|
126
|
+
</a>
|
|
127
|
+
</OverlayTrigger>
|
|
128
|
+
{disableSettings ? null : (
|
|
148
129
|
<OverlayTrigger
|
|
149
130
|
placement="left"
|
|
150
131
|
overlay={
|
|
151
|
-
<Tooltip id="
|
|
152
|
-
{
|
|
132
|
+
<Tooltip id="open-settings-tooltip">
|
|
133
|
+
{openSettingsTooltipText}
|
|
153
134
|
</Tooltip>
|
|
154
135
|
}
|
|
155
136
|
>
|
|
156
137
|
<i
|
|
157
|
-
onClick={
|
|
138
|
+
onClick={handleSettingsClick}
|
|
158
139
|
className="icon-button icon-button-dark"
|
|
159
140
|
>
|
|
160
|
-
<
|
|
141
|
+
<GearSVG />
|
|
161
142
|
</i>
|
|
162
143
|
</OverlayTrigger>
|
|
163
|
-
|
|
144
|
+
)}
|
|
145
|
+
<OverlayTrigger
|
|
146
|
+
placement="left"
|
|
147
|
+
overlay={
|
|
148
|
+
<Tooltip id="create-file-tooltip">
|
|
149
|
+
{createFileTooltipText}
|
|
150
|
+
</Tooltip>
|
|
151
|
+
}
|
|
152
|
+
>
|
|
153
|
+
<i
|
|
154
|
+
onClick={handleOpenCreateFileModal}
|
|
155
|
+
className="icon-button icon-button-dark"
|
|
156
|
+
>
|
|
157
|
+
<NewSVG />
|
|
158
|
+
</i>
|
|
159
|
+
</OverlayTrigger>
|
|
164
160
|
</div>
|
|
165
|
-
{filesExist ? (
|
|
166
|
-
fileTree.children.map((entity) => {
|
|
167
|
-
const { fileId } = entity as FileTreeFile;
|
|
168
|
-
const { path } = entity as FileTree;
|
|
169
|
-
const key = fileId ? fileId : path;
|
|
170
|
-
return (
|
|
171
|
-
<Listing
|
|
172
|
-
key={key}
|
|
173
|
-
entity={entity}
|
|
174
|
-
renameFile={renameFile}
|
|
175
|
-
deleteFile={deleteFile}
|
|
176
|
-
renameDirectory={renameDirectory}
|
|
177
|
-
deleteDirectory={deleteDirectory}
|
|
178
|
-
handleFileClick={handleFileClick}
|
|
179
|
-
handleFileDoubleClick={
|
|
180
|
-
handleFileDoubleClick
|
|
181
|
-
}
|
|
182
|
-
isDirectoryOpen={isDirectoryOpen}
|
|
183
|
-
toggleDirectory={toggleDirectory}
|
|
184
|
-
activeFileId={activeFileId}
|
|
185
|
-
/>
|
|
186
|
-
);
|
|
187
|
-
})
|
|
188
|
-
) : (
|
|
189
|
-
<div className="empty">
|
|
190
|
-
<div className="empty-text">
|
|
191
|
-
It looks like you don't have any files yet!
|
|
192
|
-
Click the "Create file" button above to
|
|
193
|
-
create your first file.
|
|
194
|
-
</div>
|
|
195
|
-
</div>
|
|
196
|
-
)}
|
|
197
161
|
</div>
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
162
|
+
{isDragOver ? (
|
|
163
|
+
<div className="empty">
|
|
164
|
+
<div className="empty-text">
|
|
165
|
+
Drop files here!
|
|
166
|
+
</div>
|
|
167
|
+
</div>
|
|
168
|
+
) : filesExist ? (
|
|
169
|
+
fileTree.children.map((entity) => {
|
|
170
|
+
const { fileId } = entity as FileTreeFile;
|
|
171
|
+
const { path } = entity as FileTree;
|
|
172
|
+
const key = fileId ? fileId : path;
|
|
173
|
+
return (
|
|
174
|
+
<Listing
|
|
175
|
+
key={key}
|
|
176
|
+
entity={entity}
|
|
177
|
+
renameFile={renameFile}
|
|
178
|
+
deleteFile={deleteFile}
|
|
179
|
+
renameDirectory={renameDirectory}
|
|
180
|
+
deleteDirectory={deleteDirectory}
|
|
181
|
+
handleFileClick={handleFileClick}
|
|
182
|
+
handleFileDoubleClick={
|
|
183
|
+
handleFileDoubleClick
|
|
184
|
+
}
|
|
185
|
+
isDirectoryOpen={isDirectoryOpen}
|
|
186
|
+
toggleDirectory={toggleDirectory}
|
|
187
|
+
activeFileId={activeFileId}
|
|
207
188
|
/>
|
|
189
|
+
);
|
|
190
|
+
})
|
|
191
|
+
) : (
|
|
192
|
+
<div className="empty">
|
|
193
|
+
<div className="empty-text">
|
|
194
|
+
It looks like you don't have any files yet!
|
|
195
|
+
Click the "Create file" button above to create
|
|
196
|
+
your first file.
|
|
208
197
|
</div>
|
|
209
198
|
</div>
|
|
210
199
|
)}
|
|
211
200
|
</div>
|
|
201
|
+
|
|
202
|
+
{enableConnectionStatus && (
|
|
203
|
+
<div className="connection-status">
|
|
204
|
+
{connected ? 'Connected' : 'Connection Lost'}
|
|
205
|
+
<div className="connection">
|
|
206
|
+
<div
|
|
207
|
+
className={`connection-status-indicator ${
|
|
208
|
+
connected ? 'connected' : 'disconnected'
|
|
209
|
+
}`}
|
|
210
|
+
/>
|
|
211
|
+
</div>
|
|
212
|
+
</div>
|
|
213
|
+
)}
|
|
212
214
|
</div>
|
|
213
215
|
);
|
|
214
216
|
};
|
|
@@ -127,11 +127,17 @@
|
|
|
127
127
|
padding: 20px;
|
|
128
128
|
border: 1px dashed rgba(255, 255, 255, 0.5); /* White dashed outline */
|
|
129
129
|
border-radius: 10px;
|
|
130
|
-
}
|
|
131
130
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
131
|
+
/*
|
|
132
|
+
* This fixes some issues where the drop zone for files
|
|
133
|
+
* was flickering when dragging files over the sidebar.
|
|
134
|
+
*/
|
|
135
|
+
pointer-events: none;
|
|
136
|
+
|
|
137
|
+
.empty-text {
|
|
138
|
+
font-size: 16px;
|
|
139
|
+
font-weight: 500;
|
|
140
|
+
}
|
|
135
141
|
}
|
|
136
142
|
|
|
137
143
|
.connection-status {
|
|
@@ -155,17 +161,3 @@
|
|
|
155
161
|
}
|
|
156
162
|
}
|
|
157
163
|
}
|
|
158
|
-
|
|
159
|
-
.drop-zone {
|
|
160
|
-
height: 100%;
|
|
161
|
-
border: 3px solid #0a1731;
|
|
162
|
-
width: auto;
|
|
163
|
-
color: #bdc7dc;
|
|
164
|
-
text-align: center;
|
|
165
|
-
font-family: var(--vzcode-font-family);
|
|
166
|
-
font-weight: 500;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
.drop-zone.dragover {
|
|
170
|
-
border-color: #009639;
|
|
171
|
-
}
|
|
@@ -132,7 +132,7 @@ export const useFileCRUD = ({
|
|
|
132
132
|
submitOperation((document: VZCodeContent) => {
|
|
133
133
|
const updatedFiles = { ...document.files };
|
|
134
134
|
for (const key in updatedFiles) {
|
|
135
|
-
if (updatedFiles[key].name.includes(path)) {
|
|
135
|
+
if (updatedFiles[key].name.includes(path + '/')) {
|
|
136
136
|
tabsToClose.push(key);
|
|
137
137
|
delete updatedFiles[key];
|
|
138
138
|
}
|