vzcode 2.26.0 → 2.27.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-CkFweu5-.js → index-CHCIQbYC.js} +126 -126
- package/dist/assets/worker-BMR_X2Ea.js +346 -0
- package/dist/index.html +1 -1
- package/dist/ot.js +6 -1
- package/package.json +4 -4
- package/src/client/CodeEditor/getOrCreateEditor.tsx +1 -2
- package/src/ot.ts +13 -1
- package/src/types.ts +5 -4
- package/dist/assets/worker-VPLhQVba.js +0 -330
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-CHCIQbYC.js"></script>
|
|
24
24
|
<link rel="stylesheet" crossorigin href="/assets/index-Dyt9tpmu.css">
|
|
25
25
|
</head>
|
|
26
26
|
<body>
|
package/dist/ot.js
CHANGED
|
@@ -3,7 +3,12 @@
|
|
|
3
3
|
// Localized to one file so it's easy to change it in future.
|
|
4
4
|
import OTJSON1Presence from 'sharedb-client-browser/dist/ot-json1-presence-umd.cjs';
|
|
5
5
|
import jsondiff from 'json0-ot-diff';
|
|
6
|
-
import
|
|
6
|
+
import { diff_match_patch as DiffMatchPatch, DIFF_DELETE, DIFF_INSERT, DIFF_EQUAL, } from '@dmsnell/diff-match-patch';
|
|
7
|
+
// Attach the constants to the class as static properties for compatibility with json0-ot-diff
|
|
8
|
+
DiffMatchPatch.DIFF_DELETE = DIFF_DELETE;
|
|
9
|
+
DiffMatchPatch.DIFF_INSERT = DIFF_INSERT;
|
|
10
|
+
DiffMatchPatch.DIFF_EQUAL = DIFF_EQUAL;
|
|
11
|
+
const diffMatchPatch = DiffMatchPatch;
|
|
7
12
|
export const { json1Presence, textUnicode } = OTJSON1Presence;
|
|
8
13
|
// The OT type used throughout the codebase.
|
|
9
14
|
export const otType = json1Presence.type;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vzcode",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.27.0",
|
|
4
4
|
"description": "Multiplayer code editor system",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"type": "module",
|
|
@@ -153,7 +153,7 @@
|
|
|
153
153
|
"d3-array": "^3.2.4",
|
|
154
154
|
"d3-color": "^3.1.0",
|
|
155
155
|
"diff": "^8.0.2",
|
|
156
|
-
"diff-match-patch": "^1.0
|
|
156
|
+
"@dmsnell/diff-match-patch": "^1.1.0",
|
|
157
157
|
"diff2html": "^3.4.52",
|
|
158
158
|
"dotenv": "^17.2.3",
|
|
159
159
|
"editcodewithai": "^2.4.0",
|
|
@@ -182,7 +182,7 @@
|
|
|
182
182
|
},
|
|
183
183
|
"devDependencies": {
|
|
184
184
|
"@eslint/js": "^9.39.1",
|
|
185
|
-
"@tauri-apps/cli": "^2.9.
|
|
185
|
+
"@tauri-apps/cli": "^2.9.5",
|
|
186
186
|
"@types/d3-color": "^3.1.3",
|
|
187
187
|
"@types/react": "^18",
|
|
188
188
|
"@types/react-dom": "^18",
|
|
@@ -197,7 +197,7 @@
|
|
|
197
197
|
"eslint-plugin-react-hooks": "^7.0.1",
|
|
198
198
|
"globals": "^16.5.0",
|
|
199
199
|
"npm-check-updates": "^19.1.2",
|
|
200
|
-
"prettier": "^3.
|
|
200
|
+
"prettier": "^3.7.3",
|
|
201
201
|
"sass": "^1.94.2",
|
|
202
202
|
"ts-node": "^10.9.2",
|
|
203
203
|
"tsx": "^4.20.6",
|
|
@@ -162,8 +162,7 @@ const getAtPath = (obj, path) => {
|
|
|
162
162
|
};
|
|
163
163
|
|
|
164
164
|
// Extend the EditorCacheValue type to include the compartments and the updateRainbowBrackets method
|
|
165
|
-
interface ExtendedEditorCacheValue
|
|
166
|
-
extends EditorCacheValue {
|
|
165
|
+
interface ExtendedEditorCacheValue extends EditorCacheValue {
|
|
167
166
|
themeCompartment: Compartment;
|
|
168
167
|
languageCompartment: Compartment;
|
|
169
168
|
rainbowBracketsCompartment: Compartment;
|
package/src/ot.ts
CHANGED
|
@@ -3,7 +3,19 @@
|
|
|
3
3
|
// Localized to one file so it's easy to change it in future.
|
|
4
4
|
import OTJSON1Presence from 'sharedb-client-browser/dist/ot-json1-presence-umd.cjs';
|
|
5
5
|
import jsondiff from 'json0-ot-diff';
|
|
6
|
-
import
|
|
6
|
+
import {
|
|
7
|
+
diff_match_patch as DiffMatchPatch,
|
|
8
|
+
DIFF_DELETE,
|
|
9
|
+
DIFF_INSERT,
|
|
10
|
+
DIFF_EQUAL,
|
|
11
|
+
} from '@dmsnell/diff-match-patch';
|
|
12
|
+
|
|
13
|
+
// Attach the constants to the class as static properties for compatibility with json0-ot-diff
|
|
14
|
+
DiffMatchPatch.DIFF_DELETE = DIFF_DELETE;
|
|
15
|
+
DiffMatchPatch.DIFF_INSERT = DIFF_INSERT;
|
|
16
|
+
DiffMatchPatch.DIFF_EQUAL = DIFF_EQUAL;
|
|
17
|
+
|
|
18
|
+
const diffMatchPatch = DiffMatchPatch;
|
|
7
19
|
|
|
8
20
|
export const { json1Presence, textUnicode } =
|
|
9
21
|
OTJSON1Presence;
|
package/src/types.ts
CHANGED
|
@@ -265,16 +265,17 @@ export interface ExtendedVizChat extends VizChat {
|
|
|
265
265
|
}
|
|
266
266
|
|
|
267
267
|
// Extended VizChatMessage with progressive rendering support
|
|
268
|
-
export interface ExtendedVizChatMessage
|
|
269
|
-
extends VizChatMessage {
|
|
268
|
+
export interface ExtendedVizChatMessage extends VizChatMessage {
|
|
270
269
|
streamingEvents?: StreamingEvent[];
|
|
271
270
|
isProgressive?: boolean; // Flag to indicate this message uses progressive rendering
|
|
272
271
|
isComplete?: boolean; // Flag to indicate if streaming is complete
|
|
273
272
|
}
|
|
274
273
|
|
|
275
274
|
// Extended VizContent that uses our extended chat types
|
|
276
|
-
export interface ExtendedVizContent
|
|
277
|
-
|
|
275
|
+
export interface ExtendedVizContent extends Omit<
|
|
276
|
+
VizContent,
|
|
277
|
+
'chats'
|
|
278
|
+
> {
|
|
278
279
|
chats?: { [chatId: VizChatId]: ExtendedVizChat };
|
|
279
280
|
}
|
|
280
281
|
|