@dao42/d42paas-front 0.5.28 → 0.5.33
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 +339 -187
- package/dist/DaoPaaS.umd.js +443 -432
- package/dist/editor.d.ts +1 -1
- package/dist/index.html +6 -3
- package/dist/style.css +1 -1
- package/package.json +4 -2
package/dist/DaoPaaS.es.js
CHANGED
|
@@ -14706,7 +14706,7 @@ const daopaasDB = openDB("daopaas", 1, {
|
|
|
14706
14706
|
db2.createObjectStore("media");
|
|
14707
14707
|
}
|
|
14708
14708
|
});
|
|
14709
|
-
async function setReplaySource(val
|
|
14709
|
+
async function setReplaySource(val) {
|
|
14710
14710
|
const {
|
|
14711
14711
|
CRDTInfo,
|
|
14712
14712
|
appStatus,
|
|
@@ -14904,6 +14904,7 @@ const persist = (config, baseOptions) => (set, get2, api2) => {
|
|
|
14904
14904
|
return stateFromStorage || configResult;
|
|
14905
14905
|
};
|
|
14906
14906
|
const oTStore = create$2((set) => ({
|
|
14907
|
+
asyncType: void 0,
|
|
14907
14908
|
appStatus: "code",
|
|
14908
14909
|
setAppStatus: (arg) => set(() => ({
|
|
14909
14910
|
appStatus: arg
|
|
@@ -15021,6 +15022,9 @@ const oTStore = create$2((set) => ({
|
|
|
15021
15022
|
})),
|
|
15022
15023
|
setQueryObject: (arg) => set(() => ({
|
|
15023
15024
|
queryObject: arg
|
|
15025
|
+
})),
|
|
15026
|
+
setAsyncType: (arg) => set(() => ({
|
|
15027
|
+
asyncType: arg
|
|
15024
15028
|
}))
|
|
15025
15029
|
}));
|
|
15026
15030
|
const userStore = create$2(persist((set) => ({
|
|
@@ -15032,6 +15036,22 @@ const userStore = create$2(persist((set) => ({
|
|
|
15032
15036
|
name: "userInfo",
|
|
15033
15037
|
getStorage: () => localStorage
|
|
15034
15038
|
}));
|
|
15039
|
+
const shadowUserStore = create$2(persist((set) => ({
|
|
15040
|
+
shadowUser: {},
|
|
15041
|
+
switchShadowUser: (arg) => set(() => {
|
|
15042
|
+
if (arg.uuid) {
|
|
15043
|
+
alert(`\u5DF2\u5207\u6362\u81F3\u3010${arg.username}\u3011\u89C6\u89D2`);
|
|
15044
|
+
} else {
|
|
15045
|
+
alert(`\u5DF2\u9000\u51FA\u8DDF\u968F\u89C6\u89D2`);
|
|
15046
|
+
}
|
|
15047
|
+
return {
|
|
15048
|
+
shadowUser: arg
|
|
15049
|
+
};
|
|
15050
|
+
})
|
|
15051
|
+
}), {
|
|
15052
|
+
name: "shadowUser",
|
|
15053
|
+
getStorage: () => localStorage
|
|
15054
|
+
}));
|
|
15035
15055
|
const userListStore = create$2(persist((set) => ({
|
|
15036
15056
|
userList: [],
|
|
15037
15057
|
setUserList: (arg) => set(() => ({
|
|
@@ -15044,9 +15064,11 @@ const userListStore = create$2(persist((set) => ({
|
|
|
15044
15064
|
if (typeof indexedDB === "undefined") {
|
|
15045
15065
|
return null;
|
|
15046
15066
|
}
|
|
15047
|
-
|
|
15067
|
+
const response = await (await daopaasDB).getAll("users");
|
|
15068
|
+
return JSON.stringify(response[0]) || null;
|
|
15048
15069
|
},
|
|
15049
15070
|
setItem: async (name, value) => {
|
|
15071
|
+
console.log(name);
|
|
15050
15072
|
(await daopaasDB).put("users", JSON.parse(value).state[name], "userList");
|
|
15051
15073
|
},
|
|
15052
15074
|
removeItem: async () => {
|
|
@@ -27231,6 +27253,7 @@ const PlaygroundInit = (arg) => {
|
|
|
27231
27253
|
switchDoc,
|
|
27232
27254
|
setSenders,
|
|
27233
27255
|
setCRDTInfo,
|
|
27256
|
+
setAsyncType,
|
|
27234
27257
|
setServerAck,
|
|
27235
27258
|
setCustomAck,
|
|
27236
27259
|
switchDocTree,
|
|
@@ -27244,6 +27267,7 @@ const PlaygroundInit = (arg) => {
|
|
|
27244
27267
|
setAppStatus,
|
|
27245
27268
|
setGlobalData
|
|
27246
27269
|
} = oTStore.getState();
|
|
27270
|
+
shadowUserStore.getState();
|
|
27247
27271
|
window.clearCache = () => {
|
|
27248
27272
|
localStorage.clear();
|
|
27249
27273
|
indexedDB.deleteDatabase("daopaas").onsuccess = () => {
|
|
@@ -27255,7 +27279,7 @@ const PlaygroundInit = (arg) => {
|
|
|
27255
27279
|
ticket
|
|
27256
27280
|
}));
|
|
27257
27281
|
io.on("connect", () => {
|
|
27258
|
-
|
|
27282
|
+
setAsyncType(void 0);
|
|
27259
27283
|
setInterval(() => {
|
|
27260
27284
|
io.emit("heartbeat", "\u{1F497}");
|
|
27261
27285
|
}, heartbeatTime);
|
|
@@ -27308,26 +27332,30 @@ const PlaygroundInit = (arg) => {
|
|
|
27308
27332
|
setDockerStatus(data || "STOP");
|
|
27309
27333
|
});
|
|
27310
27334
|
io.on("fileContent", async (d2) => {
|
|
27335
|
+
var _a2, _b2, _c2, _d3;
|
|
27311
27336
|
const _d2 = JSON.parse(d2);
|
|
27312
27337
|
setCRDTInfo(_d2);
|
|
27338
|
+
setAsyncType("file");
|
|
27313
27339
|
setReplaySource(_d2);
|
|
27314
|
-
if (IsMe(_d2 == null ? void 0 : _d2.userInfo) &&
|
|
27340
|
+
if (shadowUserStore.getState().shadowUser.uuid || IsMe(_d2 == null ? void 0 : _d2.userInfo) && _d2.file) {
|
|
27315
27341
|
switchDoc(_d2.file);
|
|
27316
|
-
(await daopaasDB).put("files", _d2.file.value, _d2.file.path);
|
|
27342
|
+
(await daopaasDB).put("files", (_a2 = _d2 == null ? void 0 : _d2.file) == null ? void 0 : _a2.value, (_b2 = _d2 == null ? void 0 : _d2.file) == null ? void 0 : _b2.path);
|
|
27317
27343
|
if (!await getLocalReplayFile(_d2.file.path)) {
|
|
27318
|
-
setLocalReplayFile(_d2.file.path, _d2.file.value);
|
|
27344
|
+
setLocalReplayFile((_c2 = _d2 == null ? void 0 : _d2.file) == null ? void 0 : _c2.path, (_d3 = _d2 == null ? void 0 : _d2.file) == null ? void 0 : _d3.value);
|
|
27319
27345
|
}
|
|
27320
27346
|
}
|
|
27321
27347
|
});
|
|
27322
27348
|
io.on("terminal", (d2) => {
|
|
27323
27349
|
const _d2 = JSON.parse(d2);
|
|
27324
27350
|
setCRDTInfo(_d2);
|
|
27351
|
+
setAsyncType("terminal");
|
|
27325
27352
|
setReplaySource(_d2);
|
|
27326
27353
|
});
|
|
27327
27354
|
io.on("editFile", (d2) => {
|
|
27328
27355
|
const _d2 = JSON.parse(d2);
|
|
27329
27356
|
setFromServer(true);
|
|
27330
27357
|
setCRDTInfo(_d2);
|
|
27358
|
+
setAsyncType("editor");
|
|
27331
27359
|
setReplaySource(_d2);
|
|
27332
27360
|
});
|
|
27333
27361
|
io.on("saveFile", (d2) => {
|
|
@@ -27336,11 +27364,25 @@ const PlaygroundInit = (arg) => {
|
|
|
27336
27364
|
io.on("customAck", (d2) => {
|
|
27337
27365
|
const _d2 = JSON.parse(d2);
|
|
27338
27366
|
setCRDTInfo(_d2);
|
|
27367
|
+
setAsyncType("editor");
|
|
27339
27368
|
setReplaySource(_d2);
|
|
27340
27369
|
setCustomAck();
|
|
27341
27370
|
});
|
|
27371
|
+
io.on("extraSync", (d2) => {
|
|
27372
|
+
const _d2 = JSON.parse(d2);
|
|
27373
|
+
switch (_d2.extend.type) {
|
|
27374
|
+
case "editor-scroll":
|
|
27375
|
+
setCRDTInfo(_d2);
|
|
27376
|
+
setAsyncType("editor");
|
|
27377
|
+
setCustomAck();
|
|
27378
|
+
break;
|
|
27379
|
+
default:
|
|
27380
|
+
return;
|
|
27381
|
+
}
|
|
27382
|
+
});
|
|
27342
27383
|
io.on("serverAck", (d2) => {
|
|
27343
27384
|
const _d2 = JSON.parse(d2);
|
|
27385
|
+
setAsyncType("editor");
|
|
27344
27386
|
setReplaySource(_d2);
|
|
27345
27387
|
setServerAck();
|
|
27346
27388
|
});
|
|
@@ -27356,12 +27398,14 @@ const PlaygroundInit = (arg) => {
|
|
|
27356
27398
|
io.on("console", (d2) => {
|
|
27357
27399
|
const _d2 = JSON.parse(d2);
|
|
27358
27400
|
setCRDTInfo(_d2);
|
|
27401
|
+
setAsyncType("console");
|
|
27359
27402
|
setReplaySource(_d2);
|
|
27360
27403
|
});
|
|
27361
27404
|
io.on("mediaRecord", (d2) => {
|
|
27362
27405
|
const _d2 = JSON.parse(d2);
|
|
27363
27406
|
setLocalMedia(_d2.timestamp, _d2);
|
|
27364
27407
|
setCRDTInfo(_d2);
|
|
27408
|
+
setAsyncType("media");
|
|
27365
27409
|
setReplaySource(_d2);
|
|
27366
27410
|
});
|
|
27367
27411
|
io.on("disconnect", (reason) => {
|
|
@@ -29527,43 +29571,16 @@ class DaoPaaS {
|
|
|
29527
29571
|
__publicField(this, "playgroundId");
|
|
29528
29572
|
__publicField(this, "userId");
|
|
29529
29573
|
__publicField(this, "tenantId");
|
|
29574
|
+
__publicField(this, "username");
|
|
29530
29575
|
__publicField(this, "userInfo", {});
|
|
29531
29576
|
__publicField(this, "io");
|
|
29532
|
-
const {
|
|
29533
|
-
setSocket,
|
|
29534
|
-
socket: socket2
|
|
29535
|
-
} = useOT.getState();
|
|
29536
29577
|
this.ticket = ticket;
|
|
29537
29578
|
this.playgroundId = playgroundId;
|
|
29538
29579
|
this.userId = userId;
|
|
29539
29580
|
this.tenantId = tenantId;
|
|
29581
|
+
this.username = username ? username : "";
|
|
29540
29582
|
sessionStorage.setItem("playgroundId", playgroundId);
|
|
29541
|
-
|
|
29542
|
-
method: "POST",
|
|
29543
|
-
headers: {
|
|
29544
|
-
"Content-Type": "application/json"
|
|
29545
|
-
},
|
|
29546
|
-
body: JSON.stringify({
|
|
29547
|
-
ticket: this.ticket
|
|
29548
|
-
})
|
|
29549
|
-
}).then((response) => {
|
|
29550
|
-
return response.json();
|
|
29551
|
-
}).then((data) => {
|
|
29552
|
-
this.io = new sockerIO({
|
|
29553
|
-
ticket,
|
|
29554
|
-
playgroundId,
|
|
29555
|
-
userId,
|
|
29556
|
-
username,
|
|
29557
|
-
tenantId,
|
|
29558
|
-
ioPath: `wss://${data.data}`
|
|
29559
|
-
});
|
|
29560
|
-
setSocket(this.io);
|
|
29561
|
-
this.init({
|
|
29562
|
-
ticket,
|
|
29563
|
-
playgroundId,
|
|
29564
|
-
userId
|
|
29565
|
-
});
|
|
29566
|
-
});
|
|
29583
|
+
this.init();
|
|
29567
29584
|
}
|
|
29568
29585
|
get otstore() {
|
|
29569
29586
|
return oTStore.getState();
|
|
@@ -29571,21 +29588,37 @@ class DaoPaaS {
|
|
|
29571
29588
|
get playgroundStatus() {
|
|
29572
29589
|
return this.otstore.playgroundStatus;
|
|
29573
29590
|
}
|
|
29574
|
-
async init(
|
|
29575
|
-
|
|
29576
|
-
|
|
29577
|
-
|
|
29578
|
-
|
|
29579
|
-
|
|
29580
|
-
placement: "bottomEnd"
|
|
29581
|
-
});
|
|
29582
|
-
}
|
|
29583
|
-
};
|
|
29584
|
-
reactDom.exports.unstable_batchedUpdates(() => {
|
|
29591
|
+
async init() {
|
|
29592
|
+
const {
|
|
29593
|
+
setSocket,
|
|
29594
|
+
socket: socket2
|
|
29595
|
+
} = useOT.getState();
|
|
29596
|
+
reactDom.exports.unstable_batchedUpdates(async () => {
|
|
29585
29597
|
const {
|
|
29586
29598
|
setUserInfo,
|
|
29587
29599
|
userInfo
|
|
29588
29600
|
} = userStore.getState();
|
|
29601
|
+
const args = {
|
|
29602
|
+
ticket: this.ticket,
|
|
29603
|
+
playgroundId: this.playgroundId,
|
|
29604
|
+
userId: this.userId,
|
|
29605
|
+
username: this.username,
|
|
29606
|
+
tenantId: this.tenantId
|
|
29607
|
+
};
|
|
29608
|
+
const response = await fetch("https://develop.1024paas.com/jssdk/ticket", {
|
|
29609
|
+
method: "POST",
|
|
29610
|
+
headers: {
|
|
29611
|
+
"Content-Type": "application/json"
|
|
29612
|
+
},
|
|
29613
|
+
body: JSON.stringify({
|
|
29614
|
+
ticket: this.ticket
|
|
29615
|
+
})
|
|
29616
|
+
});
|
|
29617
|
+
const data = await response.json();
|
|
29618
|
+
this.io = new sockerIO(__spreadProps(__spreadValues({}, args), {
|
|
29619
|
+
ioPath: `wss://${data.data}`
|
|
29620
|
+
}));
|
|
29621
|
+
setSocket(this.io);
|
|
29589
29622
|
if (!args.userId)
|
|
29590
29623
|
throw "\u7F3A\u5C11userId";
|
|
29591
29624
|
if (!args.playgroundId)
|
|
@@ -29600,6 +29633,15 @@ class DaoPaaS {
|
|
|
29600
29633
|
io: this.io
|
|
29601
29634
|
}));
|
|
29602
29635
|
});
|
|
29636
|
+
window.onerror = (message) => {
|
|
29637
|
+
if (/dError/.test(message)) {
|
|
29638
|
+
Toast.message({
|
|
29639
|
+
type: "error",
|
|
29640
|
+
content: message.replace("Uncaught dError:", ""),
|
|
29641
|
+
placement: "bottomEnd"
|
|
29642
|
+
});
|
|
29643
|
+
}
|
|
29644
|
+
};
|
|
29603
29645
|
}
|
|
29604
29646
|
clearIDB() {
|
|
29605
29647
|
}
|
|
@@ -31755,6 +31797,58 @@ AwaitingWithBuffer.prototype.transformSelection = function(selection2) {
|
|
|
31755
31797
|
AwaitingWithBuffer.prototype.resend = function(client2) {
|
|
31756
31798
|
client2.sendOperation(client2.revision, this.outstanding);
|
|
31757
31799
|
};
|
|
31800
|
+
const FollowLayoutWrapper = newStyled.div`
|
|
31801
|
+
width: 100%;
|
|
31802
|
+
height: 100%;
|
|
31803
|
+
|
|
31804
|
+
border-width: 4px 3px;
|
|
31805
|
+
border-radius: 2px;
|
|
31806
|
+
position: relative;
|
|
31807
|
+
border-color: ${(props) => props.user.color};
|
|
31808
|
+
border-style: ${(props) => props.user.color && props.isPass ? "solid" : "none"};
|
|
31809
|
+
`;
|
|
31810
|
+
const FollowLayout = ({
|
|
31811
|
+
className = "",
|
|
31812
|
+
children,
|
|
31813
|
+
name
|
|
31814
|
+
}) => {
|
|
31815
|
+
const shadowUser = shadowUserStore((state) => state.shadowUser);
|
|
31816
|
+
const asyncType = oTStore((state) => state.asyncType);
|
|
31817
|
+
const setAsyncType = oTStore((state) => state.setAsyncType);
|
|
31818
|
+
const {
|
|
31819
|
+
switchShadowUser
|
|
31820
|
+
} = shadowUserStore.getState();
|
|
31821
|
+
return /* @__PURE__ */ jsx(FollowLayoutWrapper, {
|
|
31822
|
+
user: shadowUser,
|
|
31823
|
+
className: `${className}`,
|
|
31824
|
+
isPass: asyncType === name && !IsMe(shadowUser),
|
|
31825
|
+
onClick: () => {
|
|
31826
|
+
if (!shadowUser.uuid)
|
|
31827
|
+
return;
|
|
31828
|
+
setAsyncType(void 0);
|
|
31829
|
+
switchShadowUser({});
|
|
31830
|
+
},
|
|
31831
|
+
onKeyDown: () => {
|
|
31832
|
+
if (!shadowUser.uuid)
|
|
31833
|
+
return;
|
|
31834
|
+
setAsyncType(void 0);
|
|
31835
|
+
switchShadowUser({});
|
|
31836
|
+
},
|
|
31837
|
+
onScroll: () => {
|
|
31838
|
+
if (!shadowUser.uuid)
|
|
31839
|
+
return;
|
|
31840
|
+
setAsyncType(void 0);
|
|
31841
|
+
switchShadowUser({});
|
|
31842
|
+
},
|
|
31843
|
+
onWheel: () => {
|
|
31844
|
+
if (!shadowUser.uuid)
|
|
31845
|
+
return;
|
|
31846
|
+
setAsyncType(void 0);
|
|
31847
|
+
switchShadowUser({});
|
|
31848
|
+
},
|
|
31849
|
+
children
|
|
31850
|
+
});
|
|
31851
|
+
};
|
|
31758
31852
|
function addChildrenArray(children, parent2) {
|
|
31759
31853
|
for (let i2 = 0; i2 < children.length; i2++) {
|
|
31760
31854
|
if (children[i2].type === "DIRECTORY") {
|
|
@@ -32032,65 +32126,68 @@ const FileTree = ({
|
|
|
32032
32126
|
}
|
|
32033
32127
|
}
|
|
32034
32128
|
}, [CRDTInfo]);
|
|
32035
|
-
return /* @__PURE__ */ jsx(
|
|
32036
|
-
|
|
32037
|
-
|
|
32038
|
-
|
|
32039
|
-
|
|
32040
|
-
|
|
32041
|
-
|
|
32042
|
-
canDragAndDrop: true,
|
|
32043
|
-
items: treeData,
|
|
32044
|
-
onFocusItem: (item) => setFocusedItem(item.index),
|
|
32045
|
-
onExpandItem: (item) => {
|
|
32046
|
-
onExpand(item.index);
|
|
32047
|
-
},
|
|
32048
|
-
onCollapseItem: (item) => {
|
|
32049
|
-
onCollapse(item.index);
|
|
32050
|
-
},
|
|
32051
|
-
getItemTitle: (item) => item.data,
|
|
32052
|
-
viewState: {
|
|
32053
|
-
["tree-1"]: {
|
|
32054
|
-
focusedItem,
|
|
32055
|
-
expandedItems,
|
|
32056
|
-
selectedItems
|
|
32057
|
-
}
|
|
32058
|
-
},
|
|
32059
|
-
onSelectItems: (items) => {
|
|
32060
|
-
onSelect(items);
|
|
32061
|
-
onCustomSelect == null ? void 0 : onCustomSelect(items);
|
|
32129
|
+
return /* @__PURE__ */ jsx(FollowLayout, {
|
|
32130
|
+
name: "file",
|
|
32131
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
32132
|
+
ref: treeRef,
|
|
32133
|
+
style: {
|
|
32134
|
+
height: "100%",
|
|
32135
|
+
overflow: "auto"
|
|
32062
32136
|
},
|
|
32063
|
-
|
|
32064
|
-
|
|
32065
|
-
|
|
32066
|
-
|
|
32067
|
-
|
|
32068
|
-
|
|
32069
|
-
|
|
32070
|
-
|
|
32071
|
-
|
|
32072
|
-
|
|
32073
|
-
|
|
32074
|
-
|
|
32075
|
-
|
|
32076
|
-
|
|
32077
|
-
|
|
32078
|
-
|
|
32079
|
-
|
|
32080
|
-
|
|
32081
|
-
|
|
32137
|
+
children: /* @__PURE__ */ jsx(ControlledTreeEnvironment, {
|
|
32138
|
+
canDragAndDrop: true,
|
|
32139
|
+
items: treeData,
|
|
32140
|
+
onFocusItem: (item) => setFocusedItem(item.index),
|
|
32141
|
+
onExpandItem: (item) => {
|
|
32142
|
+
onExpand(item.index);
|
|
32143
|
+
},
|
|
32144
|
+
onCollapseItem: (item) => {
|
|
32145
|
+
onCollapse(item.index);
|
|
32146
|
+
},
|
|
32147
|
+
getItemTitle: (item) => item.data,
|
|
32148
|
+
viewState: {
|
|
32149
|
+
["tree-1"]: {
|
|
32150
|
+
focusedItem,
|
|
32151
|
+
expandedItems,
|
|
32152
|
+
selectedItems
|
|
32153
|
+
}
|
|
32154
|
+
},
|
|
32155
|
+
onSelectItems: (items) => {
|
|
32156
|
+
onSelect(items);
|
|
32157
|
+
onCustomSelect == null ? void 0 : onCustomSelect(items);
|
|
32158
|
+
},
|
|
32159
|
+
renderItem: ({
|
|
32160
|
+
title,
|
|
32161
|
+
arrow,
|
|
32162
|
+
depth,
|
|
32163
|
+
context,
|
|
32164
|
+
children
|
|
32165
|
+
}) => {
|
|
32166
|
+
return /* @__PURE__ */ jsxs("div", __spreadProps(__spreadValues({}, context.itemContainerWithChildrenProps), {
|
|
32167
|
+
className: ["rct-tree-item-li", context.isSelected ? "rct-tree-item-li-selected" : "", context.isExpanded ? "rct-tree-item-li-expanded" : "", context.isFocused ? "rct-tree-item-li-focused" : "", children ? "rct-tree-item-li-hasChildren" : ""].join(" "),
|
|
32168
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
32169
|
+
className: ["rct-tree-item-title-container", context.isSelected ? "rct-tree-item-title-container-selected" : "", context.isExpanded ? "rct-tree-item-title-container-expanded" : "", context.isFocused ? "rct-tree-item-title-container-focused" : "", children ? "rct-tree-item-title-container-hasChildren" : ""].join(" "),
|
|
32082
32170
|
style: {
|
|
32083
|
-
|
|
32084
|
-
|
|
32085
|
-
}
|
|
32086
|
-
|
|
32087
|
-
|
|
32088
|
-
|
|
32089
|
-
|
|
32090
|
-
|
|
32091
|
-
|
|
32092
|
-
|
|
32093
|
-
|
|
32171
|
+
paddingLeft: `${depth}0px`
|
|
32172
|
+
},
|
|
32173
|
+
children: [arrow, /* @__PURE__ */ jsx("button", __spreadProps(__spreadValues(__spreadValues({}, context.itemContainerWithoutChildrenProps), context.interactiveElementProps), {
|
|
32174
|
+
className: ["rct-tree-item-button", context.isSelected ? "rct-tree-item-button-selected" : "", context.isExpanded ? "rct-tree-item-button-expanded" : "", context.isFocused ? "rct-tree-item-button-focused" : "", children ? "rct-tree-item-button-hasChildren" : ""].join(" "),
|
|
32175
|
+
children: title
|
|
32176
|
+
})), remoteUserList[context.interactiveElementProps["data-rct-item-id"]] && remoteUserList[context.interactiveElementProps["data-rct-item-id"]].map((remoteUser) => /* @__PURE__ */ jsx("div", {
|
|
32177
|
+
className: "rct-tree-item-avatar rounded-full absolute border",
|
|
32178
|
+
style: {
|
|
32179
|
+
borderColor: remoteUser.color,
|
|
32180
|
+
backgroundImage: `url(${remoteUser.avatar})`
|
|
32181
|
+
}
|
|
32182
|
+
}, remoteUser.uuid))]
|
|
32183
|
+
}), children]
|
|
32184
|
+
}));
|
|
32185
|
+
},
|
|
32186
|
+
children: /* @__PURE__ */ jsx(Tree, {
|
|
32187
|
+
treeId: "tree-1",
|
|
32188
|
+
rootItem: "/",
|
|
32189
|
+
treeLabel: "File Tree"
|
|
32190
|
+
})
|
|
32094
32191
|
})
|
|
32095
32192
|
})
|
|
32096
32193
|
});
|
|
@@ -56247,7 +56344,7 @@ function setARIAContainer(parent2) {
|
|
|
56247
56344
|
statusContainer2 = createStatusContainer();
|
|
56248
56345
|
parent2.appendChild(ariaContainer);
|
|
56249
56346
|
}
|
|
56250
|
-
function alert(msg2) {
|
|
56347
|
+
function alert$1(msg2) {
|
|
56251
56348
|
if (!ariaContainer) {
|
|
56252
56349
|
return;
|
|
56253
56350
|
}
|
|
@@ -56264,7 +56361,7 @@ function status(msg2) {
|
|
|
56264
56361
|
return;
|
|
56265
56362
|
}
|
|
56266
56363
|
if (isMacintosh) {
|
|
56267
|
-
alert(msg2);
|
|
56364
|
+
alert$1(msg2);
|
|
56268
56365
|
} else {
|
|
56269
56366
|
if (statusContainer.textContent !== msg2) {
|
|
56270
56367
|
clearNode(statusContainer2);
|
|
@@ -102887,7 +102984,7 @@ class TypeLabelController {
|
|
|
102887
102984
|
if (focus.length > 0 && focus[0] === this.previouslyFocused) {
|
|
102888
102985
|
const ariaLabel = (_a2 = this.list.options.accessibilityProvider) === null || _a2 === void 0 ? void 0 : _a2.getAriaLabel(this.list.element(focus[0]));
|
|
102889
102986
|
if (ariaLabel) {
|
|
102890
|
-
alert(ariaLabel);
|
|
102987
|
+
alert$1(ariaLabel);
|
|
102891
102988
|
}
|
|
102892
102989
|
}
|
|
102893
102990
|
this.previouslyFocused = -1;
|
|
@@ -111762,7 +111859,7 @@ class InputBox extends Widget {
|
|
|
111762
111859
|
} else {
|
|
111763
111860
|
alertText = localize("alertInfoMessage", "Info: {0}", this.message.content);
|
|
111764
111861
|
}
|
|
111765
|
-
alert(alertText);
|
|
111862
|
+
alert$1(alertText);
|
|
111766
111863
|
this.state = "open";
|
|
111767
111864
|
}
|
|
111768
111865
|
_hideMessage() {
|
|
@@ -116173,15 +116270,15 @@ function alertFormattingEdits(edits) {
|
|
|
116173
116270
|
const { startLineNumber, endLineNumber } = range2;
|
|
116174
116271
|
if (startLineNumber === endLineNumber) {
|
|
116175
116272
|
if (edits.length === 1) {
|
|
116176
|
-
alert(localize("hint11", "Made 1 formatting edit on line {0}", startLineNumber));
|
|
116273
|
+
alert$1(localize("hint11", "Made 1 formatting edit on line {0}", startLineNumber));
|
|
116177
116274
|
} else {
|
|
116178
|
-
alert(localize("hintn1", "Made {0} formatting edits on line {1}", edits.length, startLineNumber));
|
|
116275
|
+
alert$1(localize("hintn1", "Made {0} formatting edits on line {1}", edits.length, startLineNumber));
|
|
116179
116276
|
}
|
|
116180
116277
|
} else {
|
|
116181
116278
|
if (edits.length === 1) {
|
|
116182
|
-
alert(localize("hint1n", "Made 1 formatting edit between lines {0} and {1}", startLineNumber, endLineNumber));
|
|
116279
|
+
alert$1(localize("hint1n", "Made 1 formatting edit between lines {0} and {1}", startLineNumber, endLineNumber));
|
|
116183
116280
|
} else {
|
|
116184
|
-
alert(localize("hintnn", "Made {0} formatting edits between lines {1} and {2}", edits.length, startLineNumber, endLineNumber));
|
|
116281
|
+
alert$1(localize("hintnn", "Made {0} formatting edits between lines {1} and {2}", edits.length, startLineNumber, endLineNumber));
|
|
116185
116282
|
}
|
|
116186
116283
|
}
|
|
116187
116284
|
}
|
|
@@ -118685,7 +118782,7 @@ let SelectionAnchorController = class SelectionAnchorController2 {
|
|
|
118685
118782
|
}]);
|
|
118686
118783
|
this.decorationId = newDecorationId[0];
|
|
118687
118784
|
this.selectionAnchorSetContextKey.set(!!this.decorationId);
|
|
118688
|
-
alert(localize("anchorSet", "Anchor set at {0}:{1}", position2.lineNumber, position2.column));
|
|
118785
|
+
alert$1(localize("anchorSet", "Anchor set at {0}:{1}", position2.lineNumber, position2.column));
|
|
118689
118786
|
}
|
|
118690
118787
|
}
|
|
118691
118788
|
goToSelectionAnchor() {
|
|
@@ -119816,7 +119913,7 @@ let MessageController = class MessageController2 {
|
|
|
119816
119913
|
this._visible.reset();
|
|
119817
119914
|
}
|
|
119818
119915
|
showMessage(message, position2) {
|
|
119819
|
-
alert(message);
|
|
119916
|
+
alert$1(message);
|
|
119820
119917
|
this._visible.set(true);
|
|
119821
119918
|
this._messageWidget.clear();
|
|
119822
119919
|
this._messageListeners.clear();
|
|
@@ -125042,7 +125139,7 @@ class SymbolNavigationAction extends EditorAction {
|
|
|
125042
125139
|
if (!references || cts.token.isCancellationRequested) {
|
|
125043
125140
|
return;
|
|
125044
125141
|
}
|
|
125045
|
-
alert(references.ariaMessage);
|
|
125142
|
+
alert$1(references.ariaMessage);
|
|
125046
125143
|
let altAction;
|
|
125047
125144
|
if (references.referenceAt(model.uri, pos)) {
|
|
125048
125145
|
const altActionId = this._getAlternativeCommand(editor2);
|
|
@@ -137378,7 +137475,7 @@ let SuggestController = class SuggestController2 {
|
|
|
137378
137475
|
_alertCompletionItem(item) {
|
|
137379
137476
|
if (isNonEmptyArray(item.completion.additionalTextEdits)) {
|
|
137380
137477
|
let msg2 = localize("aria.alert.snippet", "Accepting '{0}' made {1} additional edits", item.textLabel, item.completion.additionalTextEdits.length);
|
|
137381
|
-
alert(msg2);
|
|
137478
|
+
alert$1(msg2);
|
|
137382
137479
|
}
|
|
137383
137480
|
}
|
|
137384
137481
|
triggerSuggest(onlyFrom, auto) {
|
|
@@ -144158,7 +144255,7 @@ class FindWidget extends Widget {
|
|
|
144158
144255
|
label = NLS_NO_RESULTS;
|
|
144159
144256
|
}
|
|
144160
144257
|
this._matchesCount.appendChild(document.createTextNode(label));
|
|
144161
|
-
alert(this._getAriaLabel(label, this._state.currentMatch, this._state.searchString));
|
|
144258
|
+
alert$1(this._getAriaLabel(label, this._state.currentMatch, this._state.searchString));
|
|
144162
144259
|
MAX_MATCHES_COUNT_WIDTH = Math.max(MAX_MATCHES_COUNT_WIDTH, this._matchesCount.clientWidth);
|
|
144163
144260
|
}
|
|
144164
144261
|
_getAriaLabel(label, currentMatch, searchString) {
|
|
@@ -153063,7 +153160,7 @@ let ParameterHintsWidget = class ParameterHintsWidget2 extends Disposable {
|
|
|
153063
153160
|
labelToAnnounce += typeof signature.documentation === "string" ? `, ${signature.documentation}` : `, ${signature.documentation.value}`;
|
|
153064
153161
|
}
|
|
153065
153162
|
if (this.announcedLabel !== labelToAnnounce) {
|
|
153066
|
-
alert(localize("hint", "{0}, hint", labelToAnnounce));
|
|
153163
|
+
alert$1(localize("hint", "{0}, hint", labelToAnnounce));
|
|
153067
153164
|
this.announcedLabel = labelToAnnounce;
|
|
153068
153165
|
}
|
|
153069
153166
|
}
|
|
@@ -153675,7 +153772,7 @@ let RenameController = class RenameController2 {
|
|
|
153675
153772
|
quotableLabel: localize("quotableLabel", "Renaming {0}", loc === null || loc === void 0 ? void 0 : loc.text)
|
|
153676
153773
|
}).then((result) => {
|
|
153677
153774
|
if (result.ariaSummary) {
|
|
153678
|
-
alert(localize("aria", "Successfully renamed '{0}' to '{1}'. Summary: {2}", loc.text, inputFieldResult.newName, result.ariaSummary));
|
|
153775
|
+
alert$1(localize("aria", "Successfully renamed '{0}' to '{1}'. Summary: {2}", loc.text, inputFieldResult.newName, result.ariaSummary));
|
|
153679
153776
|
}
|
|
153680
153777
|
}).catch((err) => {
|
|
153681
153778
|
this._notificationService.error(localize("rename.failedApply", "Rename failed to apply edits"));
|
|
@@ -154161,9 +154258,9 @@ class ToggleTabFocusModeAction extends EditorAction {
|
|
|
154161
154258
|
const newValue = !oldValue;
|
|
154162
154259
|
TabFocus.setTabFocusMode(newValue);
|
|
154163
154260
|
if (newValue) {
|
|
154164
|
-
alert(localize("toggle.tabMovesFocus.on", "Pressing Tab will now move focus to the next focusable element"));
|
|
154261
|
+
alert$1(localize("toggle.tabMovesFocus.on", "Pressing Tab will now move focus to the next focusable element"));
|
|
154165
154262
|
} else {
|
|
154166
|
-
alert(localize("toggle.tabMovesFocus.off", "Pressing Tab will now insert the tab character"));
|
|
154263
|
+
alert$1(localize("toggle.tabMovesFocus.off", "Pressing Tab will now insert the tab character"));
|
|
154167
154264
|
}
|
|
154168
154265
|
}
|
|
154169
154266
|
}
|
|
@@ -154559,7 +154656,7 @@ class WordHighlighter {
|
|
|
154559
154656
|
const word = this._getWord();
|
|
154560
154657
|
if (word) {
|
|
154561
154658
|
const lineContent = this.editor.getModel().getLineContent(dest.startLineNumber);
|
|
154562
|
-
alert(`${lineContent}, ${newIndex + 1} of ${highlights.length} for '${word.word}'`);
|
|
154659
|
+
alert$1(`${lineContent}, ${newIndex + 1} of ${highlights.length} for '${word.word}'`);
|
|
154563
154660
|
}
|
|
154564
154661
|
} finally {
|
|
154565
154662
|
this._ignorePositionChangeEvent = false;
|
|
@@ -154577,7 +154674,7 @@ class WordHighlighter {
|
|
|
154577
154674
|
const word = this._getWord();
|
|
154578
154675
|
if (word) {
|
|
154579
154676
|
const lineContent = this.editor.getModel().getLineContent(dest.startLineNumber);
|
|
154580
|
-
alert(`${lineContent}, ${newIndex + 1} of ${highlights.length} for '${word.word}'`);
|
|
154677
|
+
alert$1(`${lineContent}, ${newIndex + 1} of ${highlights.length} for '${word.word}'`);
|
|
154581
154678
|
}
|
|
154582
154679
|
} finally {
|
|
154583
154680
|
this._ignorePositionChangeEvent = false;
|
|
@@ -155523,7 +155620,7 @@ let AccessibilityHelpWidget = class AccessibilityHelpWidget2 extends Widget {
|
|
|
155523
155620
|
return;
|
|
155524
155621
|
}
|
|
155525
155622
|
if (e2.equals(2048 | 35)) {
|
|
155526
|
-
alert(AccessibilityHelpNLS.emergencyConfOn);
|
|
155623
|
+
alert$1(AccessibilityHelpNLS.emergencyConfOn);
|
|
155527
155624
|
this._editor.updateOptions({
|
|
155528
155625
|
accessibilitySupport: "on"
|
|
155529
155626
|
});
|
|
@@ -155534,7 +155631,7 @@ let AccessibilityHelpWidget = class AccessibilityHelpWidget2 extends Widget {
|
|
|
155534
155631
|
e2.stopPropagation();
|
|
155535
155632
|
}
|
|
155536
155633
|
if (e2.equals(2048 | 38)) {
|
|
155537
|
-
alert(AccessibilityHelpNLS.openingDocs);
|
|
155634
|
+
alert$1(AccessibilityHelpNLS.openingDocs);
|
|
155538
155635
|
let url2 = this._editor.getRawOptions().accessibilityHelpUrl;
|
|
155539
155636
|
if (typeof url2 === "undefined") {
|
|
155540
155637
|
url2 = "https://go.microsoft.com/fwlink/?linkid=852450";
|
|
@@ -174704,6 +174801,7 @@ const useValue = create$2((set) => ({
|
|
|
174704
174801
|
}));
|
|
174705
174802
|
let editor;
|
|
174706
174803
|
const EditorLayout = newStyled.div`
|
|
174804
|
+
width: 100%;
|
|
174707
174805
|
.contentWidgets {
|
|
174708
174806
|
visibility: hidden;
|
|
174709
174807
|
}
|
|
@@ -174730,6 +174828,7 @@ const EditorLayout = newStyled.div`
|
|
|
174730
174828
|
padding: 15px;
|
|
174731
174829
|
color: #fff;
|
|
174732
174830
|
font-size: 12px;
|
|
174831
|
+
flex: 0 0 auto;
|
|
174733
174832
|
}
|
|
174734
174833
|
|
|
174735
174834
|
.active {
|
|
@@ -174843,6 +174942,24 @@ const Editor = ({
|
|
|
174843
174942
|
setValue(changes[0].text);
|
|
174844
174943
|
}
|
|
174845
174944
|
});
|
|
174945
|
+
editor.onDidScrollChange((evt) => {
|
|
174946
|
+
var _a2, _b2;
|
|
174947
|
+
const {
|
|
174948
|
+
userInfo
|
|
174949
|
+
} = userStore.getState();
|
|
174950
|
+
const topPercent = evt.scrollTopChanged ? (evt.scrollTop / evt.scrollHeight).toFixed(2) : 1;
|
|
174951
|
+
const leftPercent = evt.scrollLeftChanged ? (evt.scrollLeft / evt.scrollWidth).toFixed(2) : 1;
|
|
174952
|
+
const crdt = {
|
|
174953
|
+
timestamp: Date.now().toString(),
|
|
174954
|
+
userInfo: lodash$2.exports.pick(userInfo, "uuid", "role"),
|
|
174955
|
+
extend: {
|
|
174956
|
+
type: "editor-scroll",
|
|
174957
|
+
topPercent,
|
|
174958
|
+
leftPercent
|
|
174959
|
+
}
|
|
174960
|
+
};
|
|
174961
|
+
(_b2 = (_a2 = useOT.getState()) == null ? void 0 : _a2.socket) == null ? void 0 : _b2.emit("extraSync", JSON.stringify(crdt));
|
|
174962
|
+
});
|
|
174846
174963
|
editor.createContextKey("save", true);
|
|
174847
174964
|
editor.addCommand(KeyMod.CtrlCmd | KeyCode.KeyS, () => {
|
|
174848
174965
|
var _a2, _b2;
|
|
@@ -175043,6 +175160,7 @@ const Editor = ({
|
|
|
175043
175160
|
useValue.getState();
|
|
175044
175161
|
if (!CRDTInfo.editor || CRDTInfo.editor.evtType !== "Editor")
|
|
175045
175162
|
return;
|
|
175163
|
+
console.log(CRDTInfo);
|
|
175046
175164
|
if (editor && ((doc2 == null ? void 0 : doc2.path) === ((_a2 = CRDTInfo == null ? void 0 : CRDTInfo.file) == null ? void 0 : _a2.path) || ((_b2 = CRDTInfo == null ? void 0 : CRDTInfo.file) == null ? void 0 : _b2.path) === "singleFile")) {
|
|
175047
175165
|
const server_operation = CRDTInfo.editor.operation;
|
|
175048
175166
|
const CLIENT_OPERATION = receiveOperation(CRDTInfo.editor.revision, TextOperation.fromJSON(server_operation), (_c2 = CRDTInfo == null ? void 0 : CRDTInfo.file) == null ? void 0 : _c2.path);
|
|
@@ -175082,6 +175200,19 @@ const Editor = ({
|
|
|
175082
175200
|
}
|
|
175083
175201
|
}
|
|
175084
175202
|
}, [OTSTATE.CRDTInfo]);
|
|
175203
|
+
react.exports.useEffect(() => {
|
|
175204
|
+
var _a2;
|
|
175205
|
+
const {
|
|
175206
|
+
CRDTInfo
|
|
175207
|
+
} = oTStore.getState();
|
|
175208
|
+
const {
|
|
175209
|
+
shadowUser
|
|
175210
|
+
} = shadowUserStore.getState();
|
|
175211
|
+
if (((_a2 = CRDTInfo == null ? void 0 : CRDTInfo.extend) == null ? void 0 : _a2.type) === "editor-scroll" && editor && shadowUser.uuid) {
|
|
175212
|
+
editor.setScrollTop(editor.getScrollHeight() * Number(CRDTInfo.extend.topPercent));
|
|
175213
|
+
editor.setScrollLeft(-(editor.getScrollWidth() * Number(CRDTInfo.extend.leftPercent)));
|
|
175214
|
+
}
|
|
175215
|
+
}, [OTSTATE.CRDTInfo.extend]);
|
|
175085
175216
|
react.exports.useEffect(() => {
|
|
175086
175217
|
var _a2, _b2;
|
|
175087
175218
|
if (!editor)
|
|
@@ -175155,15 +175286,18 @@ const Editor = ({
|
|
|
175155
175286
|
}));
|
|
175156
175287
|
}, [OTSTATE.serverAck]);
|
|
175157
175288
|
react.exports.useEffect(() => {
|
|
175158
|
-
if (file)
|
|
175289
|
+
if ((file == null ? void 0 : file.value) === null)
|
|
175290
|
+
return;
|
|
175291
|
+
if ((file == null ? void 0 : file.path) && editor) {
|
|
175159
175292
|
const egt = /\.(\w+$)/gim.exec(file.path);
|
|
175160
175293
|
const {
|
|
175161
175294
|
CRDTInfo,
|
|
175162
175295
|
doc: doc2
|
|
175163
175296
|
} = oTStore.getState();
|
|
175164
|
-
|
|
175165
|
-
|
|
175166
|
-
|
|
175297
|
+
const {
|
|
175298
|
+
shadowUser
|
|
175299
|
+
} = shadowUserStore.getState();
|
|
175300
|
+
if (shadowUser.uuid || file.path && egt && IsMe(CRDTInfo.userInfo)) {
|
|
175167
175301
|
updateLspOps({
|
|
175168
175302
|
value: file.value,
|
|
175169
175303
|
path: file.path,
|
|
@@ -175218,25 +175352,28 @@ const Editor = ({
|
|
|
175218
175352
|
}
|
|
175219
175353
|
});
|
|
175220
175354
|
}, [USERLISTSTORE.userList, file == null ? void 0 : file.path]);
|
|
175221
|
-
return /* @__PURE__ */
|
|
175222
|
-
|
|
175223
|
-
|
|
175224
|
-
|
|
175225
|
-
|
|
175226
|
-
|
|
175227
|
-
|
|
175228
|
-
className:
|
|
175229
|
-
|
|
175230
|
-
|
|
175231
|
-
|
|
175232
|
-
|
|
175233
|
-
|
|
175234
|
-
|
|
175235
|
-
|
|
175236
|
-
|
|
175237
|
-
|
|
175238
|
-
|
|
175239
|
-
|
|
175355
|
+
return /* @__PURE__ */ jsx(FollowLayout, {
|
|
175356
|
+
name: "editor",
|
|
175357
|
+
children: /* @__PURE__ */ jsxs(EditorLayout, {
|
|
175358
|
+
style: containerStyle,
|
|
175359
|
+
className: "editor-layout flex flex-col",
|
|
175360
|
+
children: [FileTreeStack.length > 0 ? /* @__PURE__ */ jsx("ul", {
|
|
175361
|
+
style: menuStyle,
|
|
175362
|
+
className: "bg-codezone-black stack-list flex flex-row items-center flex-shrink-0",
|
|
175363
|
+
children: FileTreeStack.map((f2, index2) => /* @__PURE__ */ jsx("li", {
|
|
175364
|
+
className: `flex flex-row justify-center items-center cursor-pointer flex-grow-0 flex-shrink-0 ${f2.path === (file == null ? void 0 : file.path) ? "active" : ""}`,
|
|
175365
|
+
onClick: () => {
|
|
175366
|
+
switchModel(f2.model);
|
|
175367
|
+
},
|
|
175368
|
+
children: f2.label.substring(1)
|
|
175369
|
+
}, index2))
|
|
175370
|
+
}) : null, /* @__PURE__ */ jsx(ContentLayout, {
|
|
175371
|
+
ref: divEl,
|
|
175372
|
+
userList: userListStore.getState().userList,
|
|
175373
|
+
className: "edito-content flex-1",
|
|
175374
|
+
style: editorStyle
|
|
175375
|
+
})]
|
|
175376
|
+
})
|
|
175240
175377
|
});
|
|
175241
175378
|
};
|
|
175242
175379
|
var index$4 = /* @__PURE__ */ Object.freeze({
|
|
@@ -182337,7 +182474,7 @@ const XTerm = (_a2) => {
|
|
|
182337
182474
|
}
|
|
182338
182475
|
break;
|
|
182339
182476
|
}
|
|
182340
|
-
onKey(character2);
|
|
182477
|
+
onKey == null ? void 0 : onKey(character2);
|
|
182341
182478
|
});
|
|
182342
182479
|
};
|
|
182343
182480
|
const fitTerminal = () => {
|
|
@@ -182345,7 +182482,8 @@ const XTerm = (_a2) => {
|
|
|
182345
182482
|
setTimeout(() => {
|
|
182346
182483
|
xtermFitAddon.fit();
|
|
182347
182484
|
}, 0);
|
|
182348
|
-
} catch (
|
|
182485
|
+
} catch (err) {
|
|
182486
|
+
throw err;
|
|
182349
182487
|
}
|
|
182350
182488
|
};
|
|
182351
182489
|
react.exports.useEffect(() => {
|
|
@@ -182416,11 +182554,12 @@ const Console = (_c2) => {
|
|
|
182416
182554
|
}
|
|
182417
182555
|
}, [terminal]);
|
|
182418
182556
|
react.exports.useEffect(() => {
|
|
182557
|
+
var _a2;
|
|
182419
182558
|
if (!terminal)
|
|
182420
182559
|
return;
|
|
182421
182560
|
const crdt = CRDTInfo.console;
|
|
182422
182561
|
if (crdt) {
|
|
182423
|
-
writeText(terminal, crdt.doc.value || "");
|
|
182562
|
+
writeText(terminal, ((_a2 = crdt == null ? void 0 : crdt.doc) == null ? void 0 : _a2.value) || "");
|
|
182424
182563
|
}
|
|
182425
182564
|
}, [CRDTInfo.console]);
|
|
182426
182565
|
react.exports.useEffect(() => {
|
|
@@ -182434,14 +182573,16 @@ const Console = (_c2) => {
|
|
|
182434
182573
|
initTerminalText(terminal, "");
|
|
182435
182574
|
}
|
|
182436
182575
|
}, [dockerStatus]);
|
|
182437
|
-
return /* @__PURE__ */ jsx(
|
|
182438
|
-
|
|
182439
|
-
|
|
182440
|
-
|
|
182441
|
-
|
|
182442
|
-
|
|
182443
|
-
|
|
182444
|
-
|
|
182576
|
+
return /* @__PURE__ */ jsx(FollowLayout, {
|
|
182577
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
182578
|
+
style: {
|
|
182579
|
+
height: "100%",
|
|
182580
|
+
width: "100%"
|
|
182581
|
+
},
|
|
182582
|
+
children: /* @__PURE__ */ jsx(XTerm, __spreadValues({
|
|
182583
|
+
terminal
|
|
182584
|
+
}, props))
|
|
182585
|
+
})
|
|
182445
182586
|
});
|
|
182446
182587
|
};
|
|
182447
182588
|
var index$3 = /* @__PURE__ */ Object.freeze({
|
|
@@ -182558,7 +182699,8 @@ const OutputBrowser = (_e2) => {
|
|
|
182558
182699
|
}
|
|
182559
182700
|
}
|
|
182560
182701
|
}, [playgroundStatus, dockerStatus]);
|
|
182561
|
-
return /* @__PURE__ */ jsxs(
|
|
182702
|
+
return /* @__PURE__ */ jsxs(FollowLayout, {
|
|
182703
|
+
name: "browser",
|
|
182562
182704
|
children: [/* @__PURE__ */ jsxs(NavBar, {
|
|
182563
182705
|
children: [/* @__PURE__ */ jsx("i", {
|
|
182564
182706
|
className: "d42 text-xl reload cursor-pointer",
|
|
@@ -182652,13 +182794,18 @@ const TerminalComponent = (_g2) => {
|
|
|
182652
182794
|
return;
|
|
182653
182795
|
}
|
|
182654
182796
|
writeText(terminal, ((_b2 = crdt == null ? void 0 : crdt.doc) == null ? void 0 : _b2.value) || "");
|
|
182655
|
-
|
|
182797
|
+
if (!CRDTInfo.userInfo.uuid)
|
|
182798
|
+
return;
|
|
182799
|
+
const postUser = userListStore.getState().userList.find(({
|
|
182800
|
+
uuid: uuid2
|
|
182801
|
+
}) => uuid2 === CRDTInfo.userInfo.uuid);
|
|
182656
182802
|
if (postUser && !IsMe(CRDTInfo.userInfo)) {
|
|
182657
|
-
const helperContainer = terminal._core._helperContainer;
|
|
182803
|
+
const helperContainer = (_c2 = terminal == null ? void 0 : terminal._core) == null ? void 0 : _c2._helperContainer;
|
|
182804
|
+
const childNode = helperContainer == null ? void 0 : helperContainer.firstChild;
|
|
182658
182805
|
userLabel.innerText = postUser.name;
|
|
182659
182806
|
userLabel.style.backgroundColor = postUser.color;
|
|
182660
|
-
userLabel.style.top =
|
|
182661
|
-
userLabel.style.left =
|
|
182807
|
+
userLabel.style.top = childNode.style.top;
|
|
182808
|
+
userLabel.style.left = childNode.style.left;
|
|
182662
182809
|
helperContainer == null ? void 0 : helperContainer.appendChild(userLabel);
|
|
182663
182810
|
terminal.setOption("theme", __spreadProps(__spreadValues({}, terminal.getOption("theme")), {
|
|
182664
182811
|
cursor: postUser.color
|
|
@@ -182682,16 +182829,19 @@ const TerminalComponent = (_g2) => {
|
|
|
182682
182829
|
}
|
|
182683
182830
|
}
|
|
182684
182831
|
}, [CRDTInfo.terminal]);
|
|
182685
|
-
return /* @__PURE__ */ jsx(
|
|
182686
|
-
|
|
182687
|
-
|
|
182688
|
-
|
|
182689
|
-
|
|
182690
|
-
|
|
182691
|
-
|
|
182692
|
-
|
|
182693
|
-
|
|
182694
|
-
|
|
182832
|
+
return /* @__PURE__ */ jsx(FollowLayout, {
|
|
182833
|
+
name: "terminal",
|
|
182834
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
182835
|
+
id: "terminal",
|
|
182836
|
+
style: {
|
|
182837
|
+
height: "100%",
|
|
182838
|
+
width: "100%"
|
|
182839
|
+
},
|
|
182840
|
+
children: /* @__PURE__ */ jsx(XTerm, __spreadValues({
|
|
182841
|
+
terminal,
|
|
182842
|
+
onKey
|
|
182843
|
+
}, props))
|
|
182844
|
+
})
|
|
182695
182845
|
});
|
|
182696
182846
|
};
|
|
182697
182847
|
var index$1 = /* @__PURE__ */ Object.freeze({
|
|
@@ -182712,7 +182862,7 @@ const Tabs = (_i) => {
|
|
|
182712
182862
|
return /* @__PURE__ */ jsx(Nav$1, __spreadProps(__spreadValues({}, props), {
|
|
182713
182863
|
activeKey,
|
|
182714
182864
|
onSelect,
|
|
182715
|
-
children: tabItems.map((item) => /* @__PURE__ */ jsx(Nav$1.Item, {
|
|
182865
|
+
children: tabItems == null ? void 0 : tabItems.map((item) => /* @__PURE__ */ jsx(Nav$1.Item, {
|
|
182716
182866
|
eventKey: item.eventKey,
|
|
182717
182867
|
children: item.itemName
|
|
182718
182868
|
}, item.eventKey))
|
|
@@ -183200,13 +183350,13 @@ const ToolBar = (_q) => {
|
|
|
183200
183350
|
}, [dStatus]);
|
|
183201
183351
|
const onRun = () => {
|
|
183202
183352
|
if (oTStore.getState().playgroundStatus === "ACTIVE") {
|
|
183203
|
-
io.emit("run");
|
|
183353
|
+
io == null ? void 0 : io.emit("run");
|
|
183204
183354
|
} else if (oTStore.getState().playgroundStatus === "INACTIVE") {
|
|
183205
|
-
io.emit("active");
|
|
183355
|
+
io == null ? void 0 : io.emit("active");
|
|
183206
183356
|
}
|
|
183207
183357
|
};
|
|
183208
183358
|
const onStop = () => {
|
|
183209
|
-
io.emit("stop");
|
|
183359
|
+
io == null ? void 0 : io.emit("stop");
|
|
183210
183360
|
};
|
|
183211
183361
|
const [netStatus, setNetStatus] = react.exports.useState("ONLINE");
|
|
183212
183362
|
react.exports.useEffect(() => {
|
|
@@ -183225,10 +183375,6 @@ const ToolBar = (_q) => {
|
|
|
183225
183375
|
}, 3e5);
|
|
183226
183376
|
}, []);
|
|
183227
183377
|
const getSpeedWithDownlink = () => {
|
|
183228
|
-
const connection2 = window.navigator.connection;
|
|
183229
|
-
if (connection2 && connection2.downlink) {
|
|
183230
|
-
return connection2.downlink * 1024 / 8;
|
|
183231
|
-
}
|
|
183232
183378
|
};
|
|
183233
183379
|
return /* @__PURE__ */ jsxs(ToolBarWrapper, {
|
|
183234
183380
|
children: [/* @__PURE__ */ jsx(ButtonWrapper, __spreadProps(__spreadValues({
|
|
@@ -232683,7 +232829,7 @@ const Index = (props) => {
|
|
|
232683
232829
|
}
|
|
232684
232830
|
}, [active]);
|
|
232685
232831
|
react.exports.useEffect(() => {
|
|
232686
|
-
props.replay && replay();
|
|
232832
|
+
props.replay && props.replay();
|
|
232687
232833
|
}, [props.replay]);
|
|
232688
232834
|
react.exports.useEffect(() => {
|
|
232689
232835
|
setUrl(playgroundInfo.url);
|
|
@@ -232776,8 +232922,8 @@ const HeaderComponent = () => {
|
|
|
232776
232922
|
resizable=yes,
|
|
232777
232923
|
width=500,
|
|
232778
232924
|
height=500`);
|
|
232779
|
-
minePage.addEventListener("load", () => {
|
|
232780
|
-
minePage.close();
|
|
232925
|
+
minePage == null ? void 0 : minePage.addEventListener("load", () => {
|
|
232926
|
+
minePage == null ? void 0 : minePage.close();
|
|
232781
232927
|
}, false);
|
|
232782
232928
|
}
|
|
232783
232929
|
}), /* @__PURE__ */ jsxs("div", {
|
|
@@ -232823,11 +232969,12 @@ const HeaderComponent = () => {
|
|
|
232823
232969
|
}) : null, appStatus !== "replay" ? /* @__PURE__ */ jsx("button", {
|
|
232824
232970
|
className: "replay-button self-center",
|
|
232825
232971
|
onClick: () => {
|
|
232972
|
+
var _a3, _b3;
|
|
232826
232973
|
if (!globalData.isRecording) {
|
|
232827
232974
|
oTStore.getState().setGlobalData({
|
|
232828
232975
|
isRecording: true
|
|
232829
232976
|
});
|
|
232830
|
-
useOT.getState().socket.emit("globalData", {
|
|
232977
|
+
(_b3 = (_a3 = useOT.getState()) == null ? void 0 : _a3.socket) == null ? void 0 : _b3.emit("globalData", {
|
|
232831
232978
|
isRecording: true
|
|
232832
232979
|
});
|
|
232833
232980
|
return;
|
|
@@ -232837,10 +232984,11 @@ const HeaderComponent = () => {
|
|
|
232837
232984
|
}) : null, globalData.isRecording ? /* @__PURE__ */ jsx("button", {
|
|
232838
232985
|
className: "replay-button self-center",
|
|
232839
232986
|
onClick: () => {
|
|
232987
|
+
var _a3, _b3;
|
|
232840
232988
|
oTStore.getState().setGlobalData({
|
|
232841
232989
|
isRecording: false
|
|
232842
232990
|
});
|
|
232843
|
-
useOT.getState().socket.emit("globalData", {
|
|
232991
|
+
(_b3 = (_a3 = useOT.getState()) == null ? void 0 : _a3.socket) == null ? void 0 : _b3.emit("globalData", {
|
|
232844
232992
|
isRecording: false
|
|
232845
232993
|
});
|
|
232846
232994
|
setAppStatus("code");
|
|
@@ -232852,6 +233000,10 @@ const HeaderComponent = () => {
|
|
|
232852
233000
|
className: "items-center flex relative",
|
|
232853
233001
|
children: userListStore.getState().userList.map((item, index2) => {
|
|
232854
233002
|
return /* @__PURE__ */ jsx("div", {
|
|
233003
|
+
onClick: () => {
|
|
233004
|
+
shadowUserStore.getState().switchShadowUser(item);
|
|
233005
|
+
console.log(shadowUserStore.getState().shadowUser);
|
|
233006
|
+
},
|
|
232855
233007
|
className: "-ml-2.5 z-0 avatar-hover",
|
|
232856
233008
|
children: /* @__PURE__ */ jsx(Avatar, {
|
|
232857
233009
|
user: item
|