vzcode 0.83.0 → 0.84.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.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-9InCi-kT.js"></script>
|
|
24
24
|
<link rel="stylesheet" crossorigin href="/assets/index-J8-kRnnE.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.84.0",
|
|
4
4
|
"description": "Multiplayer code editor system",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"type": "module",
|
|
@@ -55,6 +55,10 @@
|
|
|
55
55
|
{
|
|
56
56
|
"name": "Evan Whymark",
|
|
57
57
|
"url": "https://github.com/EvWhymark"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"name": "Ethan Nuessle",
|
|
61
|
+
"url": "https://github.com/enuessle"
|
|
58
62
|
}
|
|
59
63
|
],
|
|
60
64
|
"license": "MIT",
|
|
@@ -71,7 +75,7 @@
|
|
|
71
75
|
"@codemirror/lang-markdown": "^6.2.4",
|
|
72
76
|
"@codemirror/state": "^6.4.1",
|
|
73
77
|
"@codemirror/theme-one-dark": "^6.1.2",
|
|
74
|
-
"@codemirror/view": "^6.26.
|
|
78
|
+
"@codemirror/view": "^6.26.1",
|
|
75
79
|
"@lezer/highlight": "^1.2.0",
|
|
76
80
|
"@replit/codemirror-indentation-markers": "^6.5.1",
|
|
77
81
|
"@replit/codemirror-interact": "^6.3.1",
|
|
@@ -100,26 +104,26 @@
|
|
|
100
104
|
"json0-ot-diff": "^1.1.2",
|
|
101
105
|
"ngrok": "^4.3.3",
|
|
102
106
|
"open": "^10.1.0",
|
|
103
|
-
"openai": "^4.
|
|
107
|
+
"openai": "^4.31.0",
|
|
104
108
|
"prettier-plugin-svelte": "^3.2.2",
|
|
105
109
|
"react": "^18.2.0",
|
|
106
110
|
"react-bootstrap": "^2.10.2",
|
|
107
111
|
"react-dom": "^18.2.0",
|
|
108
112
|
"react-router-dom": "^6.22.3",
|
|
109
|
-
"sharedb": "^4.1.
|
|
113
|
+
"sharedb": "^4.1.3",
|
|
110
114
|
"sharedb-client-browser": "^4.4.0",
|
|
111
115
|
"vizhub-ui": "^3.21.0",
|
|
112
116
|
"ws": "^8.16.0"
|
|
113
117
|
},
|
|
114
118
|
"devDependencies": {
|
|
115
|
-
"@types/react": "^18.2.
|
|
116
|
-
"@types/react-dom": "^18.2.
|
|
119
|
+
"@types/react": "^18.2.73",
|
|
120
|
+
"@types/react-dom": "^18.2.23",
|
|
117
121
|
"@vitejs/plugin-react": "^4.2.1",
|
|
118
122
|
"concurrently": "^8.2.2",
|
|
119
123
|
"prettier": "^3.2.5",
|
|
120
124
|
"sass": "^1.72.0",
|
|
121
125
|
"typescript": "^5.4.3",
|
|
122
|
-
"vite": "^5.2.
|
|
126
|
+
"vite": "^5.2.7",
|
|
123
127
|
"vitest": "^1.4.0"
|
|
124
128
|
}
|
|
125
129
|
}
|
|
@@ -49,6 +49,7 @@ export const CreateFileModal = ({
|
|
|
49
49
|
(e) => {
|
|
50
50
|
if (
|
|
51
51
|
e.key === 'Enter' &&
|
|
52
|
+
validateFileName(newName) &&
|
|
52
53
|
(e.ctrlKey ||
|
|
53
54
|
e.shiftKey ||
|
|
54
55
|
(!e.altKey && !e.metaKey))
|
|
@@ -56,7 +57,7 @@ export const CreateFileModal = ({
|
|
|
56
57
|
onCreateClick();
|
|
57
58
|
}
|
|
58
59
|
},
|
|
59
|
-
[onCreateClick],
|
|
60
|
+
[onCreateClick, validateFileName, newName],
|
|
60
61
|
);
|
|
61
62
|
|
|
62
63
|
return isCreateFileModalOpen ? (
|
|
@@ -29,6 +29,7 @@ import {
|
|
|
29
29
|
GOLDENROD,
|
|
30
30
|
PANIC,
|
|
31
31
|
} from './colors';
|
|
32
|
+
import { EditorView } from 'codemirror';
|
|
32
33
|
|
|
33
34
|
// Use semi-bold weight for keywords and other important things
|
|
34
35
|
// const boldWeight = 'bold';
|
|
@@ -57,116 +58,142 @@ function vizhubThemeInit(
|
|
|
57
58
|
settings = {},
|
|
58
59
|
styles = [],
|
|
59
60
|
} = options || {};
|
|
60
|
-
return
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
styles: [
|
|
67
|
-
{
|
|
68
|
-
tag: [
|
|
69
|
-
t.keyword,
|
|
70
|
-
t.operatorKeyword,
|
|
71
|
-
t.modifier,
|
|
72
|
-
t.color,
|
|
73
|
-
t.constant(t.name),
|
|
74
|
-
t.standard(t.name),
|
|
75
|
-
t.standard(t.tagName),
|
|
76
|
-
t.special(t.brace),
|
|
77
|
-
t.atom,
|
|
78
|
-
t.bool,
|
|
79
|
-
t.special(t.variableName),
|
|
80
|
-
],
|
|
81
|
-
color: MINT,
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
tag: [t.controlKeyword, t.moduleKeyword],
|
|
85
|
-
color: MINT,
|
|
61
|
+
return [
|
|
62
|
+
createTheme({
|
|
63
|
+
theme: theme,
|
|
64
|
+
settings: {
|
|
65
|
+
...defaultSettingsVizhubTheme,
|
|
66
|
+
...settings,
|
|
86
67
|
},
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
68
|
+
styles: [
|
|
69
|
+
{
|
|
70
|
+
tag: [
|
|
71
|
+
t.keyword,
|
|
72
|
+
t.operatorKeyword,
|
|
73
|
+
t.modifier,
|
|
74
|
+
t.color,
|
|
75
|
+
t.constant(t.name),
|
|
76
|
+
t.standard(t.name),
|
|
77
|
+
t.standard(t.tagName),
|
|
78
|
+
t.special(t.brace),
|
|
79
|
+
t.atom,
|
|
80
|
+
t.bool,
|
|
81
|
+
t.special(t.variableName),
|
|
82
|
+
],
|
|
83
|
+
color: MINT,
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
tag: [t.controlKeyword, t.moduleKeyword],
|
|
87
|
+
color: MINT,
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
tag: [
|
|
91
|
+
t.name,
|
|
92
|
+
t.deleted,
|
|
93
|
+
t.character,
|
|
94
|
+
t.macroName,
|
|
93
95
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
96
|
+
t.variableName,
|
|
97
|
+
t.labelName,
|
|
98
|
+
t.definition(t.name),
|
|
99
|
+
],
|
|
100
|
+
color: AQUA,
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
tag: [t.propertyName],
|
|
104
|
+
color: GOLDENROD,
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
tag: t.heading,
|
|
108
|
+
fontWeight: boldWeight,
|
|
109
|
+
color: SKY,
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
tag: [
|
|
113
|
+
t.typeName,
|
|
114
|
+
t.className,
|
|
115
|
+
t.tagName,
|
|
116
|
+
t.number,
|
|
117
|
+
t.changed,
|
|
118
|
+
t.annotation,
|
|
119
|
+
t.self,
|
|
120
|
+
t.namespace,
|
|
121
|
+
],
|
|
122
|
+
color: AQUA,
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
tag: [
|
|
126
|
+
t.function(t.variableName),
|
|
127
|
+
t.function(t.propertyName),
|
|
128
|
+
],
|
|
129
|
+
color: AQUA,
|
|
130
|
+
},
|
|
131
|
+
{ tag: [t.number], color: SALMON },
|
|
132
|
+
{
|
|
133
|
+
tag: [
|
|
134
|
+
t.operator,
|
|
135
|
+
t.punctuation,
|
|
136
|
+
t.separator,
|
|
137
|
+
t.url,
|
|
138
|
+
t.escape,
|
|
139
|
+
t.regexp,
|
|
140
|
+
],
|
|
141
|
+
color: light,
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
tag: [t.regexp],
|
|
145
|
+
color: LAVENDER,
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
tag: [t.special(t.string), t.string, t.inserted],
|
|
149
|
+
color: LAVENDER,
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
tag: [t.processingInstruction],
|
|
153
|
+
color: AQUA,
|
|
154
|
+
},
|
|
155
|
+
{ tag: [t.angleBracket], color: AQUA },
|
|
156
|
+
{ tag: t.strong, fontWeight: boldWeight },
|
|
157
|
+
{ tag: t.emphasis, fontStyle: 'italic' },
|
|
158
|
+
{
|
|
159
|
+
tag: t.strikethrough,
|
|
160
|
+
textDecoration: 'line-through',
|
|
161
|
+
},
|
|
162
|
+
{ tag: [t.meta, t.comment], color: dark },
|
|
163
|
+
{
|
|
164
|
+
tag: t.link,
|
|
165
|
+
color: GOLDENROD,
|
|
166
|
+
textDecoration: 'underline',
|
|
167
|
+
},
|
|
168
|
+
{ tag: t.invalid, color: PANIC },
|
|
169
|
+
// {
|
|
170
|
+
// class: 'cm-nonmatchingBracket',
|
|
171
|
+
// // color: "rede",
|
|
172
|
+
// backgroundColor: 'red', // Optional: set background color for matching brackets
|
|
173
|
+
// },
|
|
174
|
+
// {
|
|
175
|
+
// tag: t.nonmatchingBracket,
|
|
176
|
+
// color: nonMatchingBracketColor,
|
|
177
|
+
// backgroundColor: 'transparent', // Optional: set background color for non-matching brackets
|
|
178
|
+
// },
|
|
179
|
+
...styles,
|
|
180
|
+
],
|
|
181
|
+
}),
|
|
182
|
+
// Theme matching and non-matching brackets.
|
|
183
|
+
EditorView.theme(
|
|
161
184
|
{
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
185
|
+
'&.cm-focused .cm-matchingBracket': {
|
|
186
|
+
backgroundColor: 'transparent',
|
|
187
|
+
outline: '1px solid #888888',
|
|
188
|
+
},
|
|
189
|
+
'&.cm-focused .cm-nonmatchingBracket': {
|
|
190
|
+
backgroundColor: 'transparent',
|
|
191
|
+
outline: '1px solid #ff2222',
|
|
192
|
+
},
|
|
165
193
|
},
|
|
166
|
-
{
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
});
|
|
194
|
+
{ dark: true },
|
|
195
|
+
),
|
|
196
|
+
];
|
|
170
197
|
}
|
|
171
198
|
|
|
172
199
|
export const vizhubTheme = vizhubThemeInit();
|
package/src/client/useURLSync.ts
CHANGED