@dao42/d42paas-front 0.5.52 → 0.5.53
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/DaoPaaS.es.js +18 -19
- package/dist/DaoPaaS.umd.js +178 -178
- package/dist/editor.d.ts +1 -1
- package/package.json +1 -1
package/dist/DaoPaaS.es.js
CHANGED
|
@@ -28433,16 +28433,16 @@ const PlaygroundInit = (arg) => {
|
|
|
28433
28433
|
crdt,
|
|
28434
28434
|
dockerInfo: dockerInfo2
|
|
28435
28435
|
} = JSON.parse(data);
|
|
28436
|
+
setCRDTInfo2(crdt);
|
|
28436
28437
|
const otPlaygroundInfo = oTStore.getState().playgroundInfo;
|
|
28437
28438
|
setPlaygroundInfo(__spreadProps(__spreadValues(__spreadValues({}, playgroundInfo), otPlaygroundInfo), {
|
|
28438
|
-
|
|
28439
|
+
activeDockerId: dockerInfo2.dockerId
|
|
28439
28440
|
}));
|
|
28440
28441
|
(_a2 = otPlaygroundInfo == null ? void 0 : otPlaygroundInfo.dockerInfos) == null ? void 0 : _a2.set(dockerInfo2.dockerId, dockerInfo2);
|
|
28441
28442
|
setDockerInfo(__spreadValues(__spreadValues({}, oTStore.getState().dockerInfo), dockerInfo2));
|
|
28442
28443
|
dockerInfo2.fileTree && switchFileTree({
|
|
28443
28444
|
data: dockerInfo2.fileTree
|
|
28444
28445
|
});
|
|
28445
|
-
setCRDTInfo2(crdt);
|
|
28446
28446
|
});
|
|
28447
28447
|
io.on("playgroundStatus", (data) => {
|
|
28448
28448
|
setPlaygroundStatus(data);
|
|
@@ -42443,7 +42443,10 @@ class DaoPaaS {
|
|
|
42443
42443
|
};
|
|
42444
42444
|
}
|
|
42445
42445
|
replay(arg) {
|
|
42446
|
-
replay(
|
|
42446
|
+
replay({
|
|
42447
|
+
userId: arg.userInfo.uuid,
|
|
42448
|
+
timestamp: arg.timestamp
|
|
42449
|
+
});
|
|
42447
42450
|
}
|
|
42448
42451
|
setIgnoreReplayers(arg) {
|
|
42449
42452
|
ignoreReplayerStore.getState().setIgnoreReplayer(arg);
|
|
@@ -44604,9 +44607,11 @@ AwaitingConfirm.prototype.applyClient = function(client2, operation) {
|
|
|
44604
44607
|
return new AwaitingWithBuffer(this.outstanding, operation);
|
|
44605
44608
|
};
|
|
44606
44609
|
AwaitingConfirm.prototype.applyServer = function(client2, operation) {
|
|
44607
|
-
|
|
44608
|
-
|
|
44609
|
-
|
|
44610
|
+
if (this.outstanding.baseLength === operation.baseLength) {
|
|
44611
|
+
const pair = operation.constructor.transform(this.outstanding, operation);
|
|
44612
|
+
client2.applyOperation(pair[1]);
|
|
44613
|
+
return new AwaitingConfirm(pair[0]);
|
|
44614
|
+
}
|
|
44610
44615
|
};
|
|
44611
44616
|
AwaitingConfirm.prototype.serverAck = function(client2) {
|
|
44612
44617
|
return synchronized_;
|
|
@@ -187771,9 +187776,6 @@ const Editor = ({
|
|
|
187771
187776
|
} = evt;
|
|
187772
187777
|
if (!isFlush) {
|
|
187773
187778
|
setPosition(editor.getPosition());
|
|
187774
|
-
let keepString = 0;
|
|
187775
|
-
let rangeLengthamount = 0;
|
|
187776
|
-
let rangeOffsetthamount = 0;
|
|
187777
187779
|
let preOffset = 0;
|
|
187778
187780
|
const valuelength = editorValue.length - changes.reduce((change, nextChange, i2) => change - nextChange.rangeLength + nextChange.text.length, 0);
|
|
187779
187781
|
const operation = new TextOperation();
|
|
@@ -187783,12 +187785,9 @@ const Editor = ({
|
|
|
187783
187785
|
operation.retain(valuelength - change.rangeLength - change.rangeOffset);
|
|
187784
187786
|
}
|
|
187785
187787
|
preOffset = change.rangeOffset + change.rangeLength;
|
|
187786
|
-
rangeLengthamount += change.rangeLength;
|
|
187787
|
-
keepString += change.text.length;
|
|
187788
|
-
rangeOffsetthamount += change.rangeOffset;
|
|
187789
187788
|
});
|
|
187790
|
-
setLocalFile((doc22 == null ? void 0 : doc22.path) ? doc22 == null ? void 0 : doc22.path : "singleFile", editor.getValue());
|
|
187791
187789
|
client2.applyClient(operation);
|
|
187790
|
+
setLocalFile((doc22 == null ? void 0 : doc22.path) ? doc22 == null ? void 0 : doc22.path : "singleFile", editor.getValue());
|
|
187792
187791
|
} else {
|
|
187793
187792
|
setValue2(changes[0].text);
|
|
187794
187793
|
}
|
|
@@ -187830,6 +187829,7 @@ const Editor = ({
|
|
|
187830
187829
|
});
|
|
187831
187830
|
}, "save");
|
|
187832
187831
|
client2.sendOperation = function(revision, operation) {
|
|
187832
|
+
var _a2, _b2;
|
|
187833
187833
|
if (oTStore.getState().appStatus === "replay")
|
|
187834
187834
|
return;
|
|
187835
187835
|
const {
|
|
@@ -187851,10 +187851,7 @@ const Editor = ({
|
|
|
187851
187851
|
path: doc22 == null ? void 0 : doc22.path
|
|
187852
187852
|
}
|
|
187853
187853
|
};
|
|
187854
|
-
|
|
187855
|
-
var _a2, _b2;
|
|
187856
|
-
(_b2 = (_a2 = useOT.getState()) == null ? void 0 : _a2.socket) == null ? void 0 : _b2.emit("editFile", JSON.stringify(crdt));
|
|
187857
|
-
});
|
|
187854
|
+
(_b2 = (_a2 = useOT.getState()) == null ? void 0 : _a2.socket) == null ? void 0 : _b2.emit("editFile", JSON.stringify(crdt));
|
|
187858
187855
|
};
|
|
187859
187856
|
};
|
|
187860
187857
|
const updateLspOps = ({
|
|
@@ -188143,8 +188140,10 @@ const Editor = ({
|
|
|
188143
188140
|
react.exports.useEffect(() => {
|
|
188144
188141
|
if (!editor)
|
|
188145
188142
|
return;
|
|
188146
|
-
|
|
188147
|
-
|
|
188143
|
+
if (IsMe(OTSTATE.CRDTInfo.userInfo)) {
|
|
188144
|
+
editor$1.getModels().forEach((model) => model.dispose());
|
|
188145
|
+
setFileTreeStack([]);
|
|
188146
|
+
}
|
|
188148
188147
|
}, [OTSTATE.dockerInfo]);
|
|
188149
188148
|
react.exports.useEffect(() => {
|
|
188150
188149
|
if (!editor || !file)
|