vzcode 0.61.0 → 0.63.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-66GpGKeF.js"></script>
24
- <link rel="stylesheet" crossorigin href="/assets/index-c1T5_KtM.css">
23
+ <script type="module" crossorigin src="/assets/index-cVB2xPdw.js"></script>
24
+ <link rel="stylesheet" crossorigin href="/assets/index-7hPfA_d2.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.61.0",
3
+ "version": "0.63.0",
4
4
  "description": "Multiplayer code editor system",
5
5
  "main": "src/index.ts",
6
6
  "type": "module",
@@ -100,7 +100,7 @@
100
100
  "json0-ot-diff": "^1.1.2",
101
101
  "ngrok": "^4.3.3",
102
102
  "open": "^10.0.3",
103
- "openai": "^4.26.0",
103
+ "openai": "^4.26.1",
104
104
  "prettier-plugin-svelte": "^3.1.2",
105
105
  "react": "^18.2.0",
106
106
  "react-bootstrap": "^2.10.0",
@@ -112,7 +112,7 @@
112
112
  "ws": "^8.16.0"
113
113
  },
114
114
  "devDependencies": {
115
- "@types/react": "^18.2.52",
115
+ "@types/react": "^18.2.55",
116
116
  "@types/react-dom": "^18.2.18",
117
117
  "@vitejs/plugin-react": "^4.2.1",
118
118
  "concurrently": "^8.2.2",
@@ -4,11 +4,7 @@ import {
4
4
  ShareDBDoc,
5
5
  VZCodeContent,
6
6
  } from '../../../types';
7
- import {
8
- Button,
9
- OverlayTrigger,
10
- Tooltip,
11
- } from '../../bootstrap';
7
+ import { OverlayTrigger, Tooltip } from '../../bootstrap';
12
8
  import { EditorCache } from '../../useEditorCache';
13
9
  import { TabState } from '../../vzReducer';
14
10
  import {
@@ -87,14 +83,15 @@ export const AIAssistWidget = ({
87
83
  showWidget && (
88
84
  <div className="vz-code-ai-assist-widget">
89
85
  <OverlayTrigger
90
- placement="top"
86
+ placement="left"
91
87
  overlay={
92
88
  <Tooltip id="ai-assist-widget-tooltip">
93
89
  {aiAssistTooltipText}
94
90
  </Tooltip>
95
91
  }
96
92
  >
97
- <Button
93
+ <i
94
+ className="icon-button icon-button-dark"
98
95
  onClick={aiAssistClickOverride || handleClick}
99
96
  >
100
97
  {aiStreamId ? (
@@ -104,7 +101,7 @@ export const AIAssistWidget = ({
104
101
  ) : (
105
102
  <SparklesSVG />
106
103
  )}
107
- </Button>
104
+ </i>
108
105
  </OverlayTrigger>
109
106
  </div>
110
107
  )
@@ -1,19 +1,6 @@
1
1
  .vz-code-ai-assist-widget {
2
2
  position: absolute;
3
- bottom: 20px;
4
- right: 20px;
5
-
6
- .btn {
7
- /* Center the icon */
8
- padding: 6px 6px 7px 6px;
9
- background: #1f2022;
10
- color: #e0e8ff;
11
- border-radius: 4px;
12
- border: none;
13
- }
14
- .btn:hover,
15
- .btn:active,
16
- .btn:focus {
17
- background: #47546b;
18
- }
3
+ bottom: 32px;
4
+ right: 32px;
5
+ color: var(--vh-color-caution-01);
19
6
  }
@@ -12,6 +12,10 @@ export const CodeErrorOverlay = ({
12
12
  errorMessage: string | null;
13
13
  content: VZCodeContent;
14
14
  }) => {
15
+ // console.log(
16
+ // 'errorMessage in CodeErrorOverlay: ',
17
+ // errorMessage,
18
+ // );
15
19
  const [isOverlayVisible, setIsOverlayVisible] =
16
20
  useState(true);
17
21
 
@@ -23,9 +27,11 @@ export const CodeErrorOverlay = ({
23
27
  }, [errorMessage]);
24
28
 
25
29
  // If the content changes, set the overlay to be not visible.
26
- useEffect(() => {
27
- setIsOverlayVisible(false);
28
- }, [content]);
30
+ // Removed because it was interfering in the case of
31
+ // server-side build errors on page load.
32
+ // useEffect(() => {
33
+ // setIsOverlayVisible(false);
34
+ // }, [content]);
29
35
 
30
36
  // Set the visibility state to false when the button is clicked
31
37
  const handleCloseClick = useCallback(() => {
@@ -7,25 +7,27 @@
7
7
  bottom: 0;
8
8
  left: 0;
9
9
  right: 0;
10
- margin: 0;
11
- padding: 12px 16px;
10
+ margin: 0 12px;
11
+ /* Right padding is so that the wrapped text
12
+ doesn't overlap with the .error-dismiss-button */
13
+ padding: 14px 38px 14px 16px;
12
14
  border-top-left-radius: 4px;
13
15
  border-top-right-radius: 4px;
14
16
 
15
- /* Add a box shadow for a subtle effect */
16
- box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
17
-
18
17
  /* Style the monospace font */
19
18
  pre {
20
19
  font-family: var(--vzcode-font-family);
21
20
  font-size: var(--vzcode-font-size);
22
21
  margin: 0;
22
+
23
+ /* Wrap long lines */
24
+ white-space: pre-wrap;
23
25
  }
24
26
 
25
27
  /* Customize the dismiss button style */
26
28
  .error-dismiss-button {
27
29
  position: absolute;
28
- top: 5px; /* Adjust the top position */
29
- right: 5px; /* Adjust the right position */
30
+ top: 8px;
31
+ right: 8px;
30
32
  }
31
33
  }
@@ -1,31 +1,17 @@
1
1
  export const SparklesSVG = () => (
2
2
  <svg
3
3
  xmlns="http://www.w3.org/2000/svg"
4
- width="24"
5
- height="24"
4
+ width="32"
5
+ height="32"
6
6
  viewBox="0 0 24 24"
7
- fill="none"
7
+ fill="currentColor"
8
+ stroke="currentColor"
9
+ strokeWidth="1.5"
10
+ strokeLinecap="round"
11
+ strokeLinejoin="round"
8
12
  >
9
- <path
10
- d="M9.8132 15.9038L9 18.75L8.1868 15.9038C7.75968 14.4089 6.59112 13.2403 5.09619 12.8132L2.25 12L5.09619 11.1868C6.59113 10.7597 7.75968 9.59112 8.1868 8.09619L9 5.25L9.8132 8.09619C10.2403 9.59113 11.4089 10.7597 12.9038 11.1868L15.75 12L12.9038 12.8132C11.4089 13.2403 10.2403 14.4089 9.8132 15.9038Z"
11
- stroke="currentColor"
12
- strokeWidth="1.5"
13
- strokeLinecap="round"
14
- strokeLinejoin="round"
15
- />
16
- <path
17
- d="M18.2589 8.71454L18 9.75L17.7411 8.71454C17.4388 7.50533 16.4947 6.56117 15.2855 6.25887L14.25 6L15.2855 5.74113C16.4947 5.43883 17.4388 4.49467 17.7411 3.28546L18 2.25L18.2589 3.28546C18.5612 4.49467 19.5053 5.43883 20.7145 5.74113L21.75 6L20.7145 6.25887C19.5053 6.56117 18.5612 7.50533 18.2589 8.71454Z"
18
- stroke="currentColor"
19
- strokeWidth="1.5"
20
- strokeLinecap="round"
21
- strokeLinejoin="round"
22
- />
23
- <path
24
- d="M16.8942 20.5673L16.5 21.75L16.1058 20.5673C15.8818 19.8954 15.3546 19.3682 14.6827 19.1442L13.5 18.75L14.6827 18.3558C15.3546 18.1318 15.8818 17.6046 16.1058 16.9327L16.5 15.75L16.8942 16.9327C17.1182 17.6046 17.6454 18.1318 18.3173 18.3558L19.5 18.75L18.3173 19.1442C17.6454 19.3682 17.1182 19.8954 16.8942 20.5673Z"
25
- stroke="currentColor"
26
- strokeWidth="1.5"
27
- strokeLinecap="round"
28
- strokeLinejoin="round"
29
- />
13
+ <path d="M9.8132 15.9038L9 18.75L8.1868 15.9038C7.75968 14.4089 6.59112 13.2403 5.09619 12.8132L2.25 12L5.09619 11.1868C6.59113 10.7597 7.75968 9.59112 8.1868 8.09619L9 5.25L9.8132 8.09619C10.2403 9.59113 11.4089 10.7597 12.9038 11.1868L15.75 12L12.9038 12.8132C11.4089 13.2403 10.2403 14.4089 9.8132 15.9038Z" />
14
+ <path d="M18.2589 8.71454L18 9.75L17.7411 8.71454C17.4388 7.50533 16.4947 6.56117 15.2855 6.25887L14.25 6L15.2855 5.74113C16.4947 5.43883 17.4388 4.49467 17.7411 3.28546L18 2.25L18.2589 3.28546C18.5612 4.49467 19.5053 5.43883 20.7145 5.74113L21.75 6L20.7145 6.25887C19.5053 6.56117 18.5612 7.50533 18.2589 8.71454Z" />
15
+ <path d="M16.8942 20.5673L16.5 21.75L16.1058 20.5673C15.8818 19.8954 15.3546 19.3682 14.6827 19.1442L13.5 18.75L14.6827 18.3558C15.3546 18.1318 15.8818 17.6046 16.1058 16.9327L16.5 15.75L16.8942 16.9327C17.1182 17.6046 17.6454 18.1318 18.3173 18.3558L19.5 18.75L18.3173 19.1442C17.6454 19.3682 17.1182 19.8954 16.8942 20.5673Z" />
30
16
  </svg>
31
17
  );
@@ -149,6 +149,7 @@ export const Item = ({
149
149
  <div className="name">
150
150
  {isRenaming ? (
151
151
  <input
152
+ className="rename-input"
152
153
  ref={renameInputRef}
153
154
  type="text"
154
155
  aria-label="Field name"
@@ -88,6 +88,12 @@
88
88
  }
89
89
  }
90
90
 
91
+ .rename-input {
92
+ padding: 0px;
93
+ border: 0px;
94
+ margin: 0px;
95
+ }
96
+
91
97
  .indentation {
92
98
  margin-left: 20px;
93
99
  }