vzcode 0.89.0 → 1.0.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,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-pzvwg1lq.js"></script>
24
- <link rel="stylesheet" crossorigin href="/assets/index-9yhZQKtK.css">
23
+ <script type="module" crossorigin src="/assets/index-DacyImKg.js"></script>
24
+ <link rel="stylesheet" crossorigin href="/assets/index-CWMOj-be.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.89.0",
3
+ "version": "1.0.0",
4
4
  "description": "Multiplayer code editor system",
5
5
  "main": "src/index.ts",
6
6
  "type": "module",
@@ -59,6 +59,26 @@
59
59
  {
60
60
  "name": "Ethan Nuessle",
61
61
  "url": "https://github.com/enuessle"
62
+ },
63
+ {
64
+ "name": "Brandon Balchand",
65
+ "url": "https://github.com/MandingoBrandon"
66
+ },
67
+ {
68
+ "name": "Demetrius Ho Sang",
69
+ "url": "https://github.com/demhos"
70
+ },
71
+ {
72
+ "name": "Jary Chen",
73
+ "url": "https://github.com/CJary"
74
+ },
75
+ {
76
+ "name": "Shashank Garg",
77
+ "url": "https://github.com/viratkohli2011"
78
+ },
79
+ {
80
+ "name": "Nghia Minh Huynh",
81
+ "url": "https://github.com/NghiaMinhHuynh"
62
82
  }
63
83
  ],
64
84
  "license": "MIT",
@@ -83,15 +103,15 @@
83
103
  "@replit/codemirror-vscode-keymap": "^6.0.2",
84
104
  "@teamwork/websocket-json-stream": "^2.0.0",
85
105
  "@typescript/vfs": "^1.5.0",
86
- "@uiw/codemirror-theme-abcdef": "^4.21.25",
87
- "@uiw/codemirror-theme-dracula": "^4.21.25",
88
- "@uiw/codemirror-theme-eclipse": "^4.21.25",
89
- "@uiw/codemirror-theme-github": "^4.21.25",
90
- "@uiw/codemirror-theme-material": "^4.21.25",
91
- "@uiw/codemirror-theme-nord": "^4.21.25",
92
- "@uiw/codemirror-theme-okaidia": "^4.21.25",
93
- "@uiw/codemirror-theme-xcode": "^4.21.25",
94
- "@uiw/codemirror-themes": "^4.21.25",
106
+ "@uiw/codemirror-theme-abcdef": "^4.22.0",
107
+ "@uiw/codemirror-theme-dracula": "^4.22.0",
108
+ "@uiw/codemirror-theme-eclipse": "^4.22.0",
109
+ "@uiw/codemirror-theme-github": "^4.22.0",
110
+ "@uiw/codemirror-theme-material": "^4.22.0",
111
+ "@uiw/codemirror-theme-nord": "^4.22.0",
112
+ "@uiw/codemirror-theme-okaidia": "^4.22.0",
113
+ "@uiw/codemirror-theme-xcode": "^4.22.0",
114
+ "@uiw/codemirror-themes": "^4.22.0",
95
115
  "body-parser": "^1.20.2",
96
116
  "codemirror": "^6.0.1",
97
117
  "codemirror-ot": "^4.4.0",
@@ -104,26 +124,26 @@
104
124
  "json0-ot-diff": "^1.1.2",
105
125
  "ngrok": "^4.3.3",
106
126
  "open": "^10.1.0",
107
- "openai": "^4.36.0",
127
+ "openai": "^4.40.0",
108
128
  "prettier-plugin-svelte": "^3.2.3",
109
- "react": "^18.2.0",
129
+ "react": "^18.3.1",
110
130
  "react-bootstrap": "^2.10.2",
111
- "react-dom": "^18.2.0",
112
- "react-router-dom": "^6.22.3",
131
+ "react-dom": "^18.3.1",
132
+ "react-router-dom": "^6.23.0",
113
133
  "sharedb": "^4.1.4",
114
134
  "sharedb-client-browser": "^4.5.0",
115
- "vizhub-ui": "^3.22.0",
116
- "ws": "^8.16.0"
135
+ "vizhub-ui": "^3.23.0",
136
+ "ws": "^8.17.0"
117
137
  },
118
138
  "devDependencies": {
119
- "@types/react": "^18.2.79",
120
- "@types/react-dom": "^18.2.25",
139
+ "@types/react": "^18.3.1",
140
+ "@types/react-dom": "^18.3.0",
121
141
  "@vitejs/plugin-react": "^4.2.1",
122
142
  "concurrently": "^8.2.2",
123
143
  "prettier": "^3.2.5",
124
- "sass": "^1.75.0",
144
+ "sass": "^1.76.0",
125
145
  "typescript": "^5.4.5",
126
- "vite": "^5.2.9",
127
- "vitest": "^1.5.0"
146
+ "vite": "^5.2.10",
147
+ "vitest": "^1.5.3"
128
148
  }
129
149
  }
@@ -1,4 +1,4 @@
1
- import { useCallback, useContext } from 'react';
1
+ import { useCallback, useContext, useState } from 'react';
2
2
  import { PlaySVG } from '../Icons';
3
3
  import { VZCodeContext } from '../VZCodeContext';
4
4
  import { OverlayTrigger, Tooltip } from '../bootstrap';
@@ -16,8 +16,11 @@ export const RunCodeWidget = ({
16
16
  }) => {
17
17
  const { runCodeRef, runPrettierRef } =
18
18
  useContext(VZCodeContext);
19
+ const [isRunning, setIsRunning] = useState(false);
19
20
 
20
21
  const handleClick = useCallback(() => {
22
+ setIsRunning(true); // Set the running state to true
23
+
21
24
  // Run Prettier
22
25
  const runPrettier = runPrettierRef.current;
23
26
  if (runPrettier !== null) {
@@ -29,6 +32,9 @@ export const RunCodeWidget = ({
29
32
  if (runCode !== null) {
30
33
  runCode();
31
34
  }
35
+
36
+ // Optional: reset the icon state after animation completes (e.g., 1 second)
37
+ setTimeout(() => setIsRunning(false), 1000);
32
38
  }, []);
33
39
 
34
40
  return (
@@ -42,7 +48,7 @@ export const RunCodeWidget = ({
42
48
  }
43
49
  >
44
50
  <i
45
- className="icon-button icon-button-dark"
51
+ className={`icon-button icon-button-dark ${isRunning ? 'rotate-icon' : ''}`}
46
52
  onClick={handleClick}
47
53
  >
48
54
  <PlaySVG />
@@ -2,6 +2,18 @@
2
2
  position: absolute;
3
3
  right: 16px;
4
4
  top: 9px;
5
- // color: var(--vh-color-caution-01);
6
5
  color: var(--vh-color-neutral-04);
6
+
7
+ .rotate-icon {
8
+ animation: spin 1s linear;
9
+ }
10
+ }
11
+
12
+ @keyframes spin {
13
+ from {
14
+ transform: rotate(0deg);
15
+ }
16
+ to {
17
+ transform: rotate(360deg);
18
+ }
7
19
  }
@@ -116,6 +116,25 @@ export const VZSettings = ({
116
116
  setUsername(usernameRef.current?.value || '');
117
117
  }, [setUsername]);
118
118
 
119
+ // Function to handle pressing Enter key
120
+ useEffect(() => {
121
+ if (isSettingsOpen) {
122
+ const handleEnterKey = (event: KeyboardEvent) => {
123
+ if (event.key === 'Enter') {
124
+ closeSettings();
125
+ }
126
+ };
127
+
128
+ window.addEventListener('keydown', handleEnterKey);
129
+ return () => {
130
+ window.removeEventListener(
131
+ 'keydown',
132
+ handleEnterKey,
133
+ );
134
+ };
135
+ }
136
+ }, [isSettingsOpen, closeSettings]);
137
+
119
138
  return isSettingsOpen ? (
120
139
  <Modal
121
140
  className="vz-settings"
@@ -8,7 +8,6 @@ import { Tooltip, OverlayTrigger } from '../bootstrap';
8
8
  import { getFileTree } from '../getFileTree';
9
9
  import { sortFileTree } from '../sortFileTree';
10
10
  import { SplitPaneResizeContext } from '../SplitPaneResizeContext';
11
- import { BugSVG, GearSVG, NewSVG } from '../Icons';
12
11
  import {
13
12
  BugSVG,
14
13
  GearSVG,
@@ -16,8 +15,8 @@ import {
16
15
  FileSVG,
17
16
  QuestionMarkSVG,
18
17
  } from '../Icons';
19
- import { Listing } from './Listing';
20
18
  import { VZCodeContext } from '../VZCodeContext';
19
+ import { Listing } from './Listing';
21
20
  import { useDragAndDrop } from './useDragAndDrop';
22
21
  import './styles.scss';
23
22