@dao42/d42paas-front 0.5.20 → 0.5.26
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 +338 -348
- package/dist/DaoPaaS.umd.js +409 -406
- package/dist/editor.d.ts +80 -14
- package/dist/index.html +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/assets/css.worker.fcb4bd78.js +0 -62
- package/dist/assets/editor.worker.d0372abe.js +0 -4
- package/dist/assets/html.worker.446a9d97.js +0 -452
- package/dist/assets/json.worker.4dd01dd8.js +0 -35
- package/dist/assets/ts.worker.bb4527d0.js +0 -35320
package/dist/DaoPaaS.es.js
CHANGED
|
@@ -29401,7 +29401,7 @@ const Loading = () => {
|
|
|
29401
29401
|
})
|
|
29402
29402
|
});
|
|
29403
29403
|
};
|
|
29404
|
-
let index$
|
|
29404
|
+
let index$7 = 0;
|
|
29405
29405
|
const REPLAY_INTERVAL = 250;
|
|
29406
29406
|
let timer;
|
|
29407
29407
|
let timeOutT;
|
|
@@ -29418,7 +29418,7 @@ const replayHandler = async () => {
|
|
|
29418
29418
|
data: dockerInfo.fileTree
|
|
29419
29419
|
});
|
|
29420
29420
|
const crdts = await getLocalCRDTs();
|
|
29421
|
-
const filterData = crdts[index$
|
|
29421
|
+
const filterData = crdts[index$7];
|
|
29422
29422
|
const cdata = __spreadValues({}, filterData);
|
|
29423
29423
|
timeOutT = setTimeout(async () => {
|
|
29424
29424
|
if (!cdata.timestamp) {
|
|
@@ -29440,7 +29440,7 @@ const replayHandler = async () => {
|
|
|
29440
29440
|
}
|
|
29441
29441
|
setCRDTInfo(__spreadValues({}, cdata));
|
|
29442
29442
|
}, 0);
|
|
29443
|
-
index$
|
|
29443
|
+
index$7++;
|
|
29444
29444
|
return {};
|
|
29445
29445
|
};
|
|
29446
29446
|
const replay = async (status2) => {
|
|
@@ -29460,7 +29460,7 @@ const replay = async (status2) => {
|
|
|
29460
29460
|
content: "\u64AD\u653E\u5B8C\u6BD5",
|
|
29461
29461
|
placement: "topCenter"
|
|
29462
29462
|
});
|
|
29463
|
-
index$
|
|
29463
|
+
index$7 = 0;
|
|
29464
29464
|
break;
|
|
29465
29465
|
case "disabled":
|
|
29466
29466
|
clearInterval(timer);
|
|
@@ -29469,7 +29469,7 @@ const replay = async (status2) => {
|
|
|
29469
29469
|
path: ""
|
|
29470
29470
|
});
|
|
29471
29471
|
setAppStatus("code");
|
|
29472
|
-
index$
|
|
29472
|
+
index$7 = 0;
|
|
29473
29473
|
break;
|
|
29474
29474
|
case "pause":
|
|
29475
29475
|
clearInterval(timer);
|
|
@@ -29492,13 +29492,19 @@ const replay = async (status2) => {
|
|
|
29492
29492
|
break;
|
|
29493
29493
|
}
|
|
29494
29494
|
};
|
|
29495
|
-
var index$
|
|
29495
|
+
var index$6 = "";
|
|
29496
29496
|
const LazyTreeComponent = lazy$2(async () => (await Promise.resolve().then(function() {
|
|
29497
|
-
return index$
|
|
29497
|
+
return index$5;
|
|
29498
29498
|
})).FileTree);
|
|
29499
29499
|
const LazyEditorComponent = lazy$2(async () => (await Promise.resolve().then(function() {
|
|
29500
|
-
return index$
|
|
29500
|
+
return index$4;
|
|
29501
29501
|
})).Editor);
|
|
29502
|
+
const LazyConsoleComponent = lazy$2(async () => (await Promise.resolve().then(function() {
|
|
29503
|
+
return index$3;
|
|
29504
|
+
})).default);
|
|
29505
|
+
const LazyBrowserComponent = lazy$2(async () => (await Promise.resolve().then(function() {
|
|
29506
|
+
return index$2;
|
|
29507
|
+
})).default);
|
|
29502
29508
|
const LazyShellComponent = lazy$2(async () => (await Promise.resolve().then(function() {
|
|
29503
29509
|
return index$1;
|
|
29504
29510
|
})).default);
|
|
@@ -29604,6 +29610,14 @@ class DaoPaaS {
|
|
|
29604
29610
|
var _a2;
|
|
29605
29611
|
(_a2 = this.io) == null ? void 0 : _a2.emit("active");
|
|
29606
29612
|
}
|
|
29613
|
+
runPlayground() {
|
|
29614
|
+
var _a2;
|
|
29615
|
+
(_a2 = this.io) == null ? void 0 : _a2.emit("run");
|
|
29616
|
+
}
|
|
29617
|
+
stopPlayground() {
|
|
29618
|
+
var _a2;
|
|
29619
|
+
(_a2 = this.io) == null ? void 0 : _a2.emit("stop");
|
|
29620
|
+
}
|
|
29607
29621
|
switchLspServer(arg) {
|
|
29608
29622
|
this.otstore.switchLspServer(arg);
|
|
29609
29623
|
}
|
|
@@ -29666,6 +29680,26 @@ class DaoPaaS {
|
|
|
29666
29680
|
children: /* @__PURE__ */ jsx(LazyTreeComponent, __spreadValues({}, props))
|
|
29667
29681
|
}), this.editorDOM);
|
|
29668
29682
|
}
|
|
29683
|
+
Console({
|
|
29684
|
+
container,
|
|
29685
|
+
props
|
|
29686
|
+
}) {
|
|
29687
|
+
this.editorDOM = container ? isHTMLElement$1(container) : this.editorDOM;
|
|
29688
|
+
reactDom.exports.render(/* @__PURE__ */ jsx(react.exports.Suspense, {
|
|
29689
|
+
fallback: /* @__PURE__ */ jsx(Loading, {}),
|
|
29690
|
+
children: /* @__PURE__ */ jsx(LazyConsoleComponent, __spreadValues({}, props))
|
|
29691
|
+
}), this.editorDOM);
|
|
29692
|
+
}
|
|
29693
|
+
Browser({
|
|
29694
|
+
container,
|
|
29695
|
+
props
|
|
29696
|
+
}) {
|
|
29697
|
+
this.editorDOM = container ? isHTMLElement$1(container) : this.editorDOM;
|
|
29698
|
+
reactDom.exports.render(/* @__PURE__ */ jsx(react.exports.Suspense, {
|
|
29699
|
+
fallback: /* @__PURE__ */ jsx(Loading, {}),
|
|
29700
|
+
children: /* @__PURE__ */ jsx(LazyBrowserComponent, __spreadValues({}, props))
|
|
29701
|
+
}), this.editorDOM);
|
|
29702
|
+
}
|
|
29669
29703
|
}
|
|
29670
29704
|
function isHTMLElement$1(arg) {
|
|
29671
29705
|
if (!/HTMLDivElement|HTMLElement/.test(Object.prototype.toString.call(arg))) {
|
|
@@ -32056,7 +32090,7 @@ const FileTree = ({
|
|
|
32056
32090
|
})
|
|
32057
32091
|
});
|
|
32058
32092
|
};
|
|
32059
|
-
var index$
|
|
32093
|
+
var index$5 = /* @__PURE__ */ Object.freeze({
|
|
32060
32094
|
__proto__: null,
|
|
32061
32095
|
[Symbol.toStringTag]: "Module",
|
|
32062
32096
|
FileTree
|
|
@@ -157483,24 +157517,6 @@ class ToggleHighContrast extends EditorAction {
|
|
|
157483
157517
|
}
|
|
157484
157518
|
}
|
|
157485
157519
|
registerEditorAction(ToggleHighContrast);
|
|
157486
|
-
var monaco = /* @__PURE__ */ Object.freeze({
|
|
157487
|
-
__proto__: null,
|
|
157488
|
-
[Symbol.toStringTag]: "Module",
|
|
157489
|
-
CancellationTokenSource,
|
|
157490
|
-
Emitter,
|
|
157491
|
-
KeyCode,
|
|
157492
|
-
KeyMod,
|
|
157493
|
-
Position: Position$4,
|
|
157494
|
-
Range: Range$4,
|
|
157495
|
-
Selection: Selection$2,
|
|
157496
|
-
SelectionDirection,
|
|
157497
|
-
MarkerSeverity,
|
|
157498
|
-
MarkerTag,
|
|
157499
|
-
Uri,
|
|
157500
|
-
Token,
|
|
157501
|
-
editor: editor$1,
|
|
157502
|
-
languages
|
|
157503
|
-
});
|
|
157504
157520
|
var lib$2 = {};
|
|
157505
157521
|
var textOperation = { exports: {} };
|
|
157506
157522
|
(function(module2) {
|
|
@@ -162745,8 +162761,8 @@ var DEFAULT = {
|
|
|
162745
162761
|
startClosed: false,
|
|
162746
162762
|
debug: false
|
|
162747
162763
|
};
|
|
162748
|
-
|
|
162749
|
-
function
|
|
162764
|
+
(function() {
|
|
162765
|
+
function ReconnectingWebSocket(url2, protocols, options) {
|
|
162750
162766
|
var _this = this;
|
|
162751
162767
|
if (options === void 0) {
|
|
162752
162768
|
options = {};
|
|
@@ -162828,63 +162844,63 @@ var ReconnectingWebSocket = function() {
|
|
|
162828
162844
|
}
|
|
162829
162845
|
this._connect();
|
|
162830
162846
|
}
|
|
162831
|
-
Object.defineProperty(
|
|
162847
|
+
Object.defineProperty(ReconnectingWebSocket, "CONNECTING", {
|
|
162832
162848
|
get: function() {
|
|
162833
162849
|
return 0;
|
|
162834
162850
|
},
|
|
162835
162851
|
enumerable: true,
|
|
162836
162852
|
configurable: true
|
|
162837
162853
|
});
|
|
162838
|
-
Object.defineProperty(
|
|
162854
|
+
Object.defineProperty(ReconnectingWebSocket, "OPEN", {
|
|
162839
162855
|
get: function() {
|
|
162840
162856
|
return 1;
|
|
162841
162857
|
},
|
|
162842
162858
|
enumerable: true,
|
|
162843
162859
|
configurable: true
|
|
162844
162860
|
});
|
|
162845
|
-
Object.defineProperty(
|
|
162861
|
+
Object.defineProperty(ReconnectingWebSocket, "CLOSING", {
|
|
162846
162862
|
get: function() {
|
|
162847
162863
|
return 2;
|
|
162848
162864
|
},
|
|
162849
162865
|
enumerable: true,
|
|
162850
162866
|
configurable: true
|
|
162851
162867
|
});
|
|
162852
|
-
Object.defineProperty(
|
|
162868
|
+
Object.defineProperty(ReconnectingWebSocket, "CLOSED", {
|
|
162853
162869
|
get: function() {
|
|
162854
162870
|
return 3;
|
|
162855
162871
|
},
|
|
162856
162872
|
enumerable: true,
|
|
162857
162873
|
configurable: true
|
|
162858
162874
|
});
|
|
162859
|
-
Object.defineProperty(
|
|
162875
|
+
Object.defineProperty(ReconnectingWebSocket.prototype, "CONNECTING", {
|
|
162860
162876
|
get: function() {
|
|
162861
|
-
return
|
|
162877
|
+
return ReconnectingWebSocket.CONNECTING;
|
|
162862
162878
|
},
|
|
162863
162879
|
enumerable: true,
|
|
162864
162880
|
configurable: true
|
|
162865
162881
|
});
|
|
162866
|
-
Object.defineProperty(
|
|
162882
|
+
Object.defineProperty(ReconnectingWebSocket.prototype, "OPEN", {
|
|
162867
162883
|
get: function() {
|
|
162868
|
-
return
|
|
162884
|
+
return ReconnectingWebSocket.OPEN;
|
|
162869
162885
|
},
|
|
162870
162886
|
enumerable: true,
|
|
162871
162887
|
configurable: true
|
|
162872
162888
|
});
|
|
162873
|
-
Object.defineProperty(
|
|
162889
|
+
Object.defineProperty(ReconnectingWebSocket.prototype, "CLOSING", {
|
|
162874
162890
|
get: function() {
|
|
162875
|
-
return
|
|
162891
|
+
return ReconnectingWebSocket.CLOSING;
|
|
162876
162892
|
},
|
|
162877
162893
|
enumerable: true,
|
|
162878
162894
|
configurable: true
|
|
162879
162895
|
});
|
|
162880
|
-
Object.defineProperty(
|
|
162896
|
+
Object.defineProperty(ReconnectingWebSocket.prototype, "CLOSED", {
|
|
162881
162897
|
get: function() {
|
|
162882
|
-
return
|
|
162898
|
+
return ReconnectingWebSocket.CLOSED;
|
|
162883
162899
|
},
|
|
162884
162900
|
enumerable: true,
|
|
162885
162901
|
configurable: true
|
|
162886
162902
|
});
|
|
162887
|
-
Object.defineProperty(
|
|
162903
|
+
Object.defineProperty(ReconnectingWebSocket.prototype, "binaryType", {
|
|
162888
162904
|
get: function() {
|
|
162889
162905
|
return this._ws ? this._ws.binaryType : this._binaryType;
|
|
162890
162906
|
},
|
|
@@ -162897,14 +162913,14 @@ var ReconnectingWebSocket = function() {
|
|
|
162897
162913
|
enumerable: true,
|
|
162898
162914
|
configurable: true
|
|
162899
162915
|
});
|
|
162900
|
-
Object.defineProperty(
|
|
162916
|
+
Object.defineProperty(ReconnectingWebSocket.prototype, "retryCount", {
|
|
162901
162917
|
get: function() {
|
|
162902
162918
|
return Math.max(this._retryCount, 0);
|
|
162903
162919
|
},
|
|
162904
162920
|
enumerable: true,
|
|
162905
162921
|
configurable: true
|
|
162906
162922
|
});
|
|
162907
|
-
Object.defineProperty(
|
|
162923
|
+
Object.defineProperty(ReconnectingWebSocket.prototype, "bufferedAmount", {
|
|
162908
162924
|
get: function() {
|
|
162909
162925
|
var bytes = this._messageQueue.reduce(function(acc, message) {
|
|
162910
162926
|
if (typeof message === "string") {
|
|
@@ -162921,38 +162937,38 @@ var ReconnectingWebSocket = function() {
|
|
|
162921
162937
|
enumerable: true,
|
|
162922
162938
|
configurable: true
|
|
162923
162939
|
});
|
|
162924
|
-
Object.defineProperty(
|
|
162940
|
+
Object.defineProperty(ReconnectingWebSocket.prototype, "extensions", {
|
|
162925
162941
|
get: function() {
|
|
162926
162942
|
return this._ws ? this._ws.extensions : "";
|
|
162927
162943
|
},
|
|
162928
162944
|
enumerable: true,
|
|
162929
162945
|
configurable: true
|
|
162930
162946
|
});
|
|
162931
|
-
Object.defineProperty(
|
|
162947
|
+
Object.defineProperty(ReconnectingWebSocket.prototype, "protocol", {
|
|
162932
162948
|
get: function() {
|
|
162933
162949
|
return this._ws ? this._ws.protocol : "";
|
|
162934
162950
|
},
|
|
162935
162951
|
enumerable: true,
|
|
162936
162952
|
configurable: true
|
|
162937
162953
|
});
|
|
162938
|
-
Object.defineProperty(
|
|
162954
|
+
Object.defineProperty(ReconnectingWebSocket.prototype, "readyState", {
|
|
162939
162955
|
get: function() {
|
|
162940
162956
|
if (this._ws) {
|
|
162941
162957
|
return this._ws.readyState;
|
|
162942
162958
|
}
|
|
162943
|
-
return this._options.startClosed ?
|
|
162959
|
+
return this._options.startClosed ? ReconnectingWebSocket.CLOSED : ReconnectingWebSocket.CONNECTING;
|
|
162944
162960
|
},
|
|
162945
162961
|
enumerable: true,
|
|
162946
162962
|
configurable: true
|
|
162947
162963
|
});
|
|
162948
|
-
Object.defineProperty(
|
|
162964
|
+
Object.defineProperty(ReconnectingWebSocket.prototype, "url", {
|
|
162949
162965
|
get: function() {
|
|
162950
162966
|
return this._ws ? this._ws.url : "";
|
|
162951
162967
|
},
|
|
162952
162968
|
enumerable: true,
|
|
162953
162969
|
configurable: true
|
|
162954
162970
|
});
|
|
162955
|
-
|
|
162971
|
+
ReconnectingWebSocket.prototype.close = function(code2, reason) {
|
|
162956
162972
|
if (code2 === void 0) {
|
|
162957
162973
|
code2 = 1e3;
|
|
162958
162974
|
}
|
|
@@ -162969,7 +162985,7 @@ var ReconnectingWebSocket = function() {
|
|
|
162969
162985
|
}
|
|
162970
162986
|
this._ws.close(code2, reason);
|
|
162971
162987
|
};
|
|
162972
|
-
|
|
162988
|
+
ReconnectingWebSocket.prototype.reconnect = function(code2, reason) {
|
|
162973
162989
|
this._shouldReconnect = true;
|
|
162974
162990
|
this._closeCalled = false;
|
|
162975
162991
|
this._retryCount = -1;
|
|
@@ -162980,7 +162996,7 @@ var ReconnectingWebSocket = function() {
|
|
|
162980
162996
|
this._connect();
|
|
162981
162997
|
}
|
|
162982
162998
|
};
|
|
162983
|
-
|
|
162999
|
+
ReconnectingWebSocket.prototype.send = function(data) {
|
|
162984
163000
|
if (this._ws && this._ws.readyState === this.OPEN) {
|
|
162985
163001
|
this._debug("send", data);
|
|
162986
163002
|
this._ws.send(data);
|
|
@@ -162992,12 +163008,12 @@ var ReconnectingWebSocket = function() {
|
|
|
162992
163008
|
}
|
|
162993
163009
|
}
|
|
162994
163010
|
};
|
|
162995
|
-
|
|
163011
|
+
ReconnectingWebSocket.prototype.addEventListener = function(type, listener) {
|
|
162996
163012
|
if (this._listeners[type]) {
|
|
162997
163013
|
this._listeners[type].push(listener);
|
|
162998
163014
|
}
|
|
162999
163015
|
};
|
|
163000
|
-
|
|
163016
|
+
ReconnectingWebSocket.prototype.dispatchEvent = function(event) {
|
|
163001
163017
|
var e_1, _a2;
|
|
163002
163018
|
var listeners2 = this._listeners[event.type];
|
|
163003
163019
|
if (listeners2) {
|
|
@@ -163020,14 +163036,14 @@ var ReconnectingWebSocket = function() {
|
|
|
163020
163036
|
}
|
|
163021
163037
|
return true;
|
|
163022
163038
|
};
|
|
163023
|
-
|
|
163039
|
+
ReconnectingWebSocket.prototype.removeEventListener = function(type, listener) {
|
|
163024
163040
|
if (this._listeners[type]) {
|
|
163025
163041
|
this._listeners[type] = this._listeners[type].filter(function(l2) {
|
|
163026
163042
|
return l2 !== listener;
|
|
163027
163043
|
});
|
|
163028
163044
|
}
|
|
163029
163045
|
};
|
|
163030
|
-
|
|
163046
|
+
ReconnectingWebSocket.prototype._debug = function() {
|
|
163031
163047
|
var args = [];
|
|
163032
163048
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
163033
163049
|
args[_i] = arguments[_i];
|
|
@@ -163036,7 +163052,7 @@ var ReconnectingWebSocket = function() {
|
|
|
163036
163052
|
console.log.apply(console, __spread(["RWS>"], args));
|
|
163037
163053
|
}
|
|
163038
163054
|
};
|
|
163039
|
-
|
|
163055
|
+
ReconnectingWebSocket.prototype._getNextDelay = function() {
|
|
163040
163056
|
var _a2 = this._options, _b2 = _a2.reconnectionDelayGrowFactor, reconnectionDelayGrowFactor = _b2 === void 0 ? DEFAULT.reconnectionDelayGrowFactor : _b2, _c2 = _a2.minReconnectionDelay, minReconnectionDelay = _c2 === void 0 ? DEFAULT.minReconnectionDelay : _c2, _d2 = _a2.maxReconnectionDelay, maxReconnectionDelay = _d2 === void 0 ? DEFAULT.maxReconnectionDelay : _d2;
|
|
163041
163057
|
var delay = 0;
|
|
163042
163058
|
if (this._retryCount > 0) {
|
|
@@ -163048,13 +163064,13 @@ var ReconnectingWebSocket = function() {
|
|
|
163048
163064
|
this._debug("next delay", delay);
|
|
163049
163065
|
return delay;
|
|
163050
163066
|
};
|
|
163051
|
-
|
|
163067
|
+
ReconnectingWebSocket.prototype._wait = function() {
|
|
163052
163068
|
var _this = this;
|
|
163053
163069
|
return new Promise(function(resolve2) {
|
|
163054
163070
|
setTimeout(resolve2, _this._getNextDelay());
|
|
163055
163071
|
});
|
|
163056
163072
|
};
|
|
163057
|
-
|
|
163073
|
+
ReconnectingWebSocket.prototype._getNextUrl = function(urlProvider) {
|
|
163058
163074
|
if (typeof urlProvider === "string") {
|
|
163059
163075
|
return Promise.resolve(urlProvider);
|
|
163060
163076
|
}
|
|
@@ -163069,7 +163085,7 @@ var ReconnectingWebSocket = function() {
|
|
|
163069
163085
|
}
|
|
163070
163086
|
throw Error("Invalid URL");
|
|
163071
163087
|
};
|
|
163072
|
-
|
|
163088
|
+
ReconnectingWebSocket.prototype._connect = function() {
|
|
163073
163089
|
var _this = this;
|
|
163074
163090
|
if (this._connectLock || !this._shouldReconnect) {
|
|
163075
163091
|
return;
|
|
@@ -163102,11 +163118,11 @@ var ReconnectingWebSocket = function() {
|
|
|
163102
163118
|
}, connectionTimeout);
|
|
163103
163119
|
});
|
|
163104
163120
|
};
|
|
163105
|
-
|
|
163121
|
+
ReconnectingWebSocket.prototype._handleTimeout = function() {
|
|
163106
163122
|
this._debug("timeout event");
|
|
163107
163123
|
this._handleError(new ErrorEvent$1(Error("TIMEOUT"), this));
|
|
163108
163124
|
};
|
|
163109
|
-
|
|
163125
|
+
ReconnectingWebSocket.prototype._disconnect = function(code2, reason) {
|
|
163110
163126
|
if (code2 === void 0) {
|
|
163111
163127
|
code2 = 1e3;
|
|
163112
163128
|
}
|
|
@@ -163121,18 +163137,18 @@ var ReconnectingWebSocket = function() {
|
|
|
163121
163137
|
} catch (error2) {
|
|
163122
163138
|
}
|
|
163123
163139
|
};
|
|
163124
|
-
|
|
163140
|
+
ReconnectingWebSocket.prototype._acceptOpen = function() {
|
|
163125
163141
|
this._debug("accept open");
|
|
163126
163142
|
this._retryCount = 0;
|
|
163127
163143
|
};
|
|
163128
|
-
|
|
163144
|
+
ReconnectingWebSocket.prototype._callEventListener = function(event, listener) {
|
|
163129
163145
|
if ("handleEvent" in listener) {
|
|
163130
163146
|
listener.handleEvent(event);
|
|
163131
163147
|
} else {
|
|
163132
163148
|
listener(event);
|
|
163133
163149
|
}
|
|
163134
163150
|
};
|
|
163135
|
-
|
|
163151
|
+
ReconnectingWebSocket.prototype._removeListeners = function() {
|
|
163136
163152
|
if (!this._ws) {
|
|
163137
163153
|
return;
|
|
163138
163154
|
}
|
|
@@ -163142,7 +163158,7 @@ var ReconnectingWebSocket = function() {
|
|
|
163142
163158
|
this._ws.removeEventListener("message", this._handleMessage);
|
|
163143
163159
|
this._ws.removeEventListener("error", this._handleError);
|
|
163144
163160
|
};
|
|
163145
|
-
|
|
163161
|
+
ReconnectingWebSocket.prototype._addListeners = function() {
|
|
163146
163162
|
if (!this._ws) {
|
|
163147
163163
|
return;
|
|
163148
163164
|
}
|
|
@@ -163152,12 +163168,12 @@ var ReconnectingWebSocket = function() {
|
|
|
163152
163168
|
this._ws.addEventListener("message", this._handleMessage);
|
|
163153
163169
|
this._ws.addEventListener("error", this._handleError);
|
|
163154
163170
|
};
|
|
163155
|
-
|
|
163171
|
+
ReconnectingWebSocket.prototype._clearTimeouts = function() {
|
|
163156
163172
|
clearTimeout(this._connectTimeout);
|
|
163157
163173
|
clearTimeout(this._uptimeTimeout);
|
|
163158
163174
|
};
|
|
163159
|
-
return
|
|
163160
|
-
}();
|
|
163175
|
+
return ReconnectingWebSocket;
|
|
163176
|
+
})();
|
|
163161
163177
|
var lib = {};
|
|
163162
163178
|
var disposable = {};
|
|
163163
163179
|
var services = {};
|
|
@@ -174682,7 +174698,9 @@ const EditorLayout = newStyled.div`
|
|
|
174682
174698
|
.stack-list {
|
|
174683
174699
|
width: 100%;
|
|
174684
174700
|
height: 40px;
|
|
174685
|
-
|
|
174701
|
+
transform: translate(0, -1px);
|
|
174702
|
+
overflow-x: auto;
|
|
174703
|
+
flex-wrap: nowrap;
|
|
174686
174704
|
li {
|
|
174687
174705
|
/* width: 100px; */
|
|
174688
174706
|
height: 100%;
|
|
@@ -174693,6 +174711,7 @@ const EditorLayout = newStyled.div`
|
|
|
174693
174711
|
|
|
174694
174712
|
.active {
|
|
174695
174713
|
background: #1e1e1e;
|
|
174714
|
+
box-shadow: 0px 1px 0px 0 #333;
|
|
174696
174715
|
/* border-left: 1px solid rgb(42 96 231);
|
|
174697
174716
|
border-right: 1px solid rgb(42 96 231); */
|
|
174698
174717
|
/* background: red; */
|
|
@@ -174786,7 +174805,6 @@ const Editor = ({
|
|
|
174786
174805
|
keepString += i2 === 0 ? 0 : change.text.length;
|
|
174787
174806
|
return new TextOperation().retain(i2 === 0 ? change.rangeOffset : change.rangeOffset - rangeLengthamount + keepString).delete(change.rangeLength).insert(change.text).retain(valuelength - change.rangeOffset - change.rangeLength);
|
|
174788
174807
|
}).reduce((a2, b2) => a2.compose(b2));
|
|
174789
|
-
setLocalFile((doc2 == null ? void 0 : doc2.path) ? doc2 == null ? void 0 : doc2.path : "singleFile", editor.getValue());
|
|
174790
174808
|
client2.applyClient(operation);
|
|
174791
174809
|
} else {
|
|
174792
174810
|
setValue(changes[0].text);
|
|
@@ -174875,45 +174893,7 @@ const Editor = ({
|
|
|
174875
174893
|
extensions: [".ts"],
|
|
174876
174894
|
aliases: ["TypeScript", "ts", "TS", "typescript"]
|
|
174877
174895
|
});
|
|
174878
|
-
|
|
174879
|
-
return;
|
|
174880
|
-
lib.MonacoServices.install(monaco);
|
|
174881
|
-
const {
|
|
174882
|
-
lspUrl,
|
|
174883
|
-
ticket
|
|
174884
|
-
} = oTStore.getState().dockerInfo;
|
|
174885
|
-
if (!lspUrl)
|
|
174886
|
-
return;
|
|
174887
|
-
const webSocket = new ReconnectingWebSocket(`wss://${lspUrl}/${ticket}`, [], {
|
|
174888
|
-
maxReconnectionDelay: 1e4,
|
|
174889
|
-
minReconnectionDelay: 1e3,
|
|
174890
|
-
reconnectionDelayGrowFactor: 1.3,
|
|
174891
|
-
connectionTimeout: 1e4,
|
|
174892
|
-
maxRetries: Infinity,
|
|
174893
|
-
debug: false
|
|
174894
|
-
});
|
|
174895
|
-
lib$1.listen({
|
|
174896
|
-
webSocket,
|
|
174897
|
-
onConnection: (connection2) => {
|
|
174898
|
-
const languageClient = new lib.MonacoLanguageClient({
|
|
174899
|
-
name: "Language Client",
|
|
174900
|
-
clientOptions: {
|
|
174901
|
-
documentSelector: ["java", "ruby"],
|
|
174902
|
-
errorHandler: {
|
|
174903
|
-
error: () => lib.ErrorAction.Continue,
|
|
174904
|
-
closed: () => lib.CloseAction.DoNotRestart
|
|
174905
|
-
}
|
|
174906
|
-
},
|
|
174907
|
-
connectionProvider: {
|
|
174908
|
-
get: (errorHandler2, closeHandler) => {
|
|
174909
|
-
return Promise.resolve(lib.createConnection(connection2, errorHandler2, closeHandler));
|
|
174910
|
-
}
|
|
174911
|
-
}
|
|
174912
|
-
});
|
|
174913
|
-
const disposable2 = languageClient.start();
|
|
174914
|
-
connection2.onClose(() => disposable2.dispose());
|
|
174915
|
-
}
|
|
174916
|
-
});
|
|
174896
|
+
return;
|
|
174917
174897
|
};
|
|
174918
174898
|
const switchModel = (model) => {
|
|
174919
174899
|
const {
|
|
@@ -175135,7 +175115,7 @@ const Editor = ({
|
|
|
175135
175115
|
setUsersDelta(USERLISTSTORE.userList.filter((u2) => !IsMe(u2)).map((x2) => {
|
|
175136
175116
|
return __spreadProps(__spreadValues({}, x2), {
|
|
175137
175117
|
label: {
|
|
175138
|
-
domNode:
|
|
175118
|
+
domNode: null,
|
|
175139
175119
|
getId: function() {
|
|
175140
175120
|
return `label-${x2.uuid}`;
|
|
175141
175121
|
},
|
|
@@ -175167,7 +175147,6 @@ const Editor = ({
|
|
|
175167
175147
|
}
|
|
175168
175148
|
});
|
|
175169
175149
|
}, [USERLISTSTORE.userList, file == null ? void 0 : file.path]);
|
|
175170
|
-
console.log(file);
|
|
175171
175150
|
return /* @__PURE__ */ jsxs(EditorLayout, {
|
|
175172
175151
|
className: "editor-layout flex flex-col",
|
|
175173
175152
|
children: [FileTreeStack.length > 0 ? /* @__PURE__ */ jsx("ul", {
|
|
@@ -175186,7 +175165,7 @@ const Editor = ({
|
|
|
175186
175165
|
})]
|
|
175187
175166
|
});
|
|
175188
175167
|
};
|
|
175189
|
-
var index$
|
|
175168
|
+
var index$4 = /* @__PURE__ */ Object.freeze({
|
|
175190
175169
|
__proto__: null,
|
|
175191
175170
|
[Symbol.toStringTag]: "Module",
|
|
175192
175171
|
Editor
|
|
@@ -182313,17 +182292,241 @@ const XTerm = (_a2) => {
|
|
|
182313
182292
|
})
|
|
182314
182293
|
});
|
|
182315
182294
|
};
|
|
182316
|
-
const
|
|
182295
|
+
const Console = (_c2) => {
|
|
182317
182296
|
var _d2 = _c2, {
|
|
182318
182297
|
options
|
|
182319
182298
|
} = _d2, props = __objRest(_d2, [
|
|
182320
182299
|
"options"
|
|
182321
182300
|
]);
|
|
182301
|
+
const defaultOptions2 = __spreadValues({
|
|
182302
|
+
convertEol: true,
|
|
182303
|
+
fontSize: 12,
|
|
182304
|
+
fontFamily: "Monaco, Menlo, monospace",
|
|
182305
|
+
lineHeight: 1,
|
|
182306
|
+
cursorBlink: true,
|
|
182307
|
+
cursorWidth: 1,
|
|
182308
|
+
cursorStyle: "block",
|
|
182309
|
+
rightClickSelectsWord: true,
|
|
182310
|
+
theme: {
|
|
182311
|
+
background: "#1E1E1E"
|
|
182312
|
+
}
|
|
182313
|
+
}, options);
|
|
182314
|
+
const [terminal, setTerminal] = react.exports.useState(null);
|
|
182315
|
+
const {
|
|
182316
|
+
CRDTInfo
|
|
182317
|
+
} = oTStore((state) => state);
|
|
182318
|
+
const {
|
|
182319
|
+
dockerStatus
|
|
182320
|
+
} = oTStore((state) => state);
|
|
182321
|
+
const initTerminalText = (terminal2, text2) => {
|
|
182322
|
+
terminal2.write("\r\n");
|
|
182323
|
+
terminal2.clear();
|
|
182324
|
+
writeText(terminal2, text2);
|
|
182325
|
+
};
|
|
182326
|
+
const writeText = (terminal2, text2) => {
|
|
182327
|
+
terminal2.write(text2);
|
|
182328
|
+
};
|
|
182329
|
+
react.exports.useEffect(() => {
|
|
182330
|
+
if (!terminal) {
|
|
182331
|
+
const term = new xterm.exports.Terminal(defaultOptions2);
|
|
182332
|
+
setTerminal(term);
|
|
182333
|
+
}
|
|
182334
|
+
}, []);
|
|
182335
|
+
react.exports.useEffect(() => {
|
|
182336
|
+
if (!terminal)
|
|
182337
|
+
return;
|
|
182338
|
+
if (dockerStatus === "STOP") {
|
|
182339
|
+
initTerminalText(terminal, "\u5E94\u7528\u672A\u542F\u52A8\r\n");
|
|
182340
|
+
} else {
|
|
182341
|
+
initTerminalText(terminal, oTStore.getState().dockerInfo.consoleHistory);
|
|
182342
|
+
}
|
|
182343
|
+
}, [terminal]);
|
|
182344
|
+
react.exports.useEffect(() => {
|
|
182345
|
+
const crdt = CRDTInfo.console;
|
|
182346
|
+
if (terminal && crdt) {
|
|
182347
|
+
if (crdt.doc.value === "^C") {
|
|
182348
|
+
writeText(terminal, crdt.doc.value);
|
|
182349
|
+
initTerminalText(terminal, "");
|
|
182350
|
+
return;
|
|
182351
|
+
}
|
|
182352
|
+
writeText(terminal, crdt.doc.value || "");
|
|
182353
|
+
}
|
|
182354
|
+
}, [CRDTInfo.console]);
|
|
182355
|
+
react.exports.useEffect(() => {
|
|
182356
|
+
if (!terminal)
|
|
182357
|
+
return;
|
|
182358
|
+
if (dockerStatus === "STOP") {
|
|
182359
|
+
setTimeout(() => {
|
|
182360
|
+
initTerminalText(terminal, "\u5E94\u7528\u672A\u542F\u52A8\r\n");
|
|
182361
|
+
}, 400);
|
|
182362
|
+
} else {
|
|
182363
|
+
initTerminalText(terminal, "");
|
|
182364
|
+
}
|
|
182365
|
+
}, [dockerStatus]);
|
|
182366
|
+
return /* @__PURE__ */ jsx("div", {
|
|
182367
|
+
style: {
|
|
182368
|
+
height: "100%",
|
|
182369
|
+
width: "100%"
|
|
182370
|
+
},
|
|
182371
|
+
children: /* @__PURE__ */ jsx(XTerm, __spreadValues({
|
|
182372
|
+
terminal
|
|
182373
|
+
}, props))
|
|
182374
|
+
});
|
|
182375
|
+
};
|
|
182376
|
+
var index$3 = /* @__PURE__ */ Object.freeze({
|
|
182377
|
+
__proto__: null,
|
|
182378
|
+
[Symbol.toStringTag]: "Module",
|
|
182379
|
+
"default": Console
|
|
182380
|
+
});
|
|
182381
|
+
const PROTOCOL = "https://";
|
|
182382
|
+
const NavBar = newStyled.div`
|
|
182383
|
+
background-color: white;
|
|
182384
|
+
height: 30px;
|
|
182385
|
+
display: flex;
|
|
182386
|
+
align-items: center;
|
|
182387
|
+
|
|
182388
|
+
i {
|
|
182389
|
+
margin: 0 10px;
|
|
182390
|
+
width: 24px;
|
|
182391
|
+
height: 24px;
|
|
182392
|
+
border-radius: 50%;
|
|
182393
|
+
display: flex;
|
|
182394
|
+
justify-content: center;
|
|
182395
|
+
align-items: center;
|
|
182396
|
+
|
|
182397
|
+
&.disabled {
|
|
182398
|
+
color: #f2fffe;
|
|
182399
|
+
&:hover {
|
|
182400
|
+
background-color: white;
|
|
182401
|
+
}
|
|
182402
|
+
}
|
|
182403
|
+
|
|
182404
|
+
&:hover {
|
|
182405
|
+
background-color: #e0e0e0;
|
|
182406
|
+
}
|
|
182407
|
+
}
|
|
182408
|
+
|
|
182409
|
+
input {
|
|
182410
|
+
flex: 1;
|
|
182411
|
+
display: inline-block;
|
|
182412
|
+
height: 26px;
|
|
182413
|
+
line-height: 26px;
|
|
182414
|
+
padding: 0 8px;
|
|
182415
|
+
border: 1px solid #adacac;
|
|
182416
|
+
border-radius: 5px;
|
|
182417
|
+
}
|
|
182418
|
+
`;
|
|
182419
|
+
const StopMask = newStyled.div`
|
|
182420
|
+
width: 100%;
|
|
182421
|
+
height: calc(100% - 30px);
|
|
182422
|
+
position: absolute;
|
|
182423
|
+
display: flex;
|
|
182424
|
+
justify-content: center;
|
|
182425
|
+
align-items: center;
|
|
182426
|
+
font-size: 18px;
|
|
182427
|
+
color: #ffffff;
|
|
182428
|
+
background-color: #5a5a5a;
|
|
182429
|
+
opacity: 0.6;
|
|
182430
|
+
`;
|
|
182431
|
+
const OutputBrowser = (_e2) => {
|
|
182432
|
+
var _f2 = _e2, {
|
|
182433
|
+
url: url2
|
|
182434
|
+
} = _f2, props = __objRest(_f2, [
|
|
182435
|
+
"url"
|
|
182436
|
+
]);
|
|
182437
|
+
const pStatus = oTStore((state) => state.playgroundStatus);
|
|
182438
|
+
const dStatus = oTStore((state) => state.dockerStatus);
|
|
182439
|
+
const [playgroundStatus, setPlaygroundStatus] = react.exports.useState("EMPTY");
|
|
182440
|
+
const [dockerStatus, setDockerStatus] = react.exports.useState("STOP");
|
|
182441
|
+
const urlWithProtocol = (url22) => {
|
|
182442
|
+
if (!url22)
|
|
182443
|
+
return `${PROTOCOL}showmebug.com`;
|
|
182444
|
+
if (url22.indexOf("http://") !== 0 && url22.indexOf("https://") !== 0) {
|
|
182445
|
+
url22 = `${PROTOCOL}${url22}`;
|
|
182446
|
+
}
|
|
182447
|
+
return url22;
|
|
182448
|
+
};
|
|
182449
|
+
react.exports.useEffect(() => {
|
|
182450
|
+
setPlaygroundStatus(pStatus);
|
|
182451
|
+
}, [pStatus]);
|
|
182452
|
+
react.exports.useEffect(() => {
|
|
182453
|
+
setDockerStatus(dStatus);
|
|
182454
|
+
setTimeout(() => {
|
|
182455
|
+
onRefresh();
|
|
182456
|
+
}, 800);
|
|
182457
|
+
}, [dStatus]);
|
|
182458
|
+
const iframeRef = react.exports.useRef(null);
|
|
182459
|
+
const [iframeSrc, setIframeSrc] = react.exports.useState(urlWithProtocol(url2));
|
|
182460
|
+
react.exports.useEffect(() => {
|
|
182461
|
+
setIframeSrc(urlWithProtocol(url2));
|
|
182462
|
+
}, [url2]);
|
|
182463
|
+
react.exports.useEffect(() => {
|
|
182464
|
+
}, [iframeRef]);
|
|
182465
|
+
const onEnterKey = (e2) => {
|
|
182466
|
+
if (e2.keyCode !== 13)
|
|
182467
|
+
return;
|
|
182468
|
+
const url22 = urlWithProtocol(e2.target.value);
|
|
182469
|
+
setIframeSrc(url22);
|
|
182470
|
+
iframeRef.current.contentWindow.location.replace(url22);
|
|
182471
|
+
};
|
|
182472
|
+
const onRefresh = () => {
|
|
182473
|
+
iframeRef.current.contentWindow.location.replace(iframeSrc);
|
|
182474
|
+
};
|
|
182475
|
+
const onOpenInNewTab = () => {
|
|
182476
|
+
window.open(iframeSrc);
|
|
182477
|
+
};
|
|
182478
|
+
react.exports.useEffect(() => {
|
|
182479
|
+
if (playgroundStatus === "EMPTY")
|
|
182480
|
+
return;
|
|
182481
|
+
if (playgroundStatus === "ACTIVE" && dockerStatus === "RUNNING") {
|
|
182482
|
+
if (iframeSrc !== "http://" && iframeSrc !== "https://") {
|
|
182483
|
+
iframeRef.current.contentWindow.location.replace(iframeSrc);
|
|
182484
|
+
}
|
|
182485
|
+
}
|
|
182486
|
+
}, [playgroundStatus, dockerStatus]);
|
|
182487
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
182488
|
+
children: [/* @__PURE__ */ jsxs(NavBar, {
|
|
182489
|
+
children: [/* @__PURE__ */ jsx("i", {
|
|
182490
|
+
className: "d42 text-xl reload cursor-pointer",
|
|
182491
|
+
onClick: onRefresh
|
|
182492
|
+
}), /* @__PURE__ */ jsx("input", {
|
|
182493
|
+
type: "text",
|
|
182494
|
+
value: iframeSrc,
|
|
182495
|
+
onChange: (e2) => setIframeSrc(e2.target.value),
|
|
182496
|
+
onKeyDown: onEnterKey
|
|
182497
|
+
}), /* @__PURE__ */ jsx("i", {
|
|
182498
|
+
className: "d42 text-xl file-copy cursor-pointer",
|
|
182499
|
+
onClick: onOpenInNewTab
|
|
182500
|
+
})]
|
|
182501
|
+
}), dockerStatus === "STOP" && /* @__PURE__ */ jsx(StopMask, {
|
|
182502
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
182503
|
+
children: "\u70B9\u51FB\u201C\u8FD0\u884C\u201D\uFF0C\u542F\u52A8\u5E94\u7528"
|
|
182504
|
+
})
|
|
182505
|
+
}), /* @__PURE__ */ jsx("iframe", {
|
|
182506
|
+
ref: iframeRef,
|
|
182507
|
+
src: iframeSrc,
|
|
182508
|
+
style: {
|
|
182509
|
+
width: "100%",
|
|
182510
|
+
height: "calc(100% - 30px)"
|
|
182511
|
+
}
|
|
182512
|
+
})]
|
|
182513
|
+
});
|
|
182514
|
+
};
|
|
182515
|
+
var index$2 = /* @__PURE__ */ Object.freeze({
|
|
182516
|
+
__proto__: null,
|
|
182517
|
+
[Symbol.toStringTag]: "Module",
|
|
182518
|
+
"default": OutputBrowser
|
|
182519
|
+
});
|
|
182520
|
+
const TerminalComponent = (_g2) => {
|
|
182521
|
+
var _h2 = _g2, {
|
|
182522
|
+
options
|
|
182523
|
+
} = _h2, props = __objRest(_h2, [
|
|
182524
|
+
"options"
|
|
182525
|
+
]);
|
|
182322
182526
|
const defaultOptions2 = __spreadValues({}, options);
|
|
182323
182527
|
const userLabel = document.createElement("div");
|
|
182324
182528
|
userLabel.classList.add("xterm-helper-user-label");
|
|
182325
182529
|
const [terminal, setTerminal] = react.exports.useState(null);
|
|
182326
|
-
const io = useOT((state) => state.socket);
|
|
182327
182530
|
const {
|
|
182328
182531
|
CRDTInfo
|
|
182329
182532
|
} = oTStore((state) => state);
|
|
@@ -182336,6 +182539,7 @@ const TerminalComponent = (_c2) => {
|
|
|
182336
182539
|
terminal2.write(text2);
|
|
182337
182540
|
};
|
|
182338
182541
|
const onKey = (char2) => {
|
|
182542
|
+
var _a2, _b2;
|
|
182339
182543
|
if (oTStore.getState().appStatus === "replay") {
|
|
182340
182544
|
return;
|
|
182341
182545
|
}
|
|
@@ -182349,7 +182553,7 @@ const TerminalComponent = (_c2) => {
|
|
|
182349
182553
|
}
|
|
182350
182554
|
}
|
|
182351
182555
|
};
|
|
182352
|
-
|
|
182556
|
+
(_b2 = (_a2 = useOT.getState()) == null ? void 0 : _a2.socket) == null ? void 0 : _b2.emit("terminal", JSON.stringify(crdt));
|
|
182353
182557
|
};
|
|
182354
182558
|
react.exports.useEffect(() => {
|
|
182355
182559
|
if (!terminal) {
|
|
@@ -182358,22 +182562,23 @@ const TerminalComponent = (_c2) => {
|
|
|
182358
182562
|
}
|
|
182359
182563
|
}, []);
|
|
182360
182564
|
react.exports.useEffect(() => {
|
|
182361
|
-
var _a2;
|
|
182565
|
+
var _a2, _b2, _c2, _d2;
|
|
182362
182566
|
if (!terminal)
|
|
182363
182567
|
return;
|
|
182364
182568
|
if (CRDTInfo.terminal) {
|
|
182365
|
-
initTerminalText(terminal, ((_a2 = oTStore.getState().CRDTInfo.terminal.doc) == null ? void 0 :
|
|
182569
|
+
initTerminalText(terminal, ((_d2 = (_c2 = (_b2 = (_a2 = oTStore.getState()) == null ? void 0 : _a2.CRDTInfo) == null ? void 0 : _b2.terminal) == null ? void 0 : _c2.doc) == null ? void 0 : _d2.value) || "");
|
|
182366
182570
|
}
|
|
182367
182571
|
}, [terminal]);
|
|
182368
182572
|
react.exports.useEffect(() => {
|
|
182573
|
+
var _a2, _b2, _c2;
|
|
182369
182574
|
const crdt = CRDTInfo.terminal;
|
|
182370
182575
|
if (terminal && crdt) {
|
|
182371
|
-
if (crdt.doc.action === "Get") {
|
|
182576
|
+
if (((_a2 = crdt == null ? void 0 : crdt.doc) == null ? void 0 : _a2.action) === "Get") {
|
|
182372
182577
|
initTerminalText(terminal, crdt.doc.value);
|
|
182373
182578
|
return;
|
|
182374
182579
|
}
|
|
182375
|
-
writeText(terminal, crdt.doc.value || "");
|
|
182376
|
-
const postUser = userListStore.getState().userList[CRDTInfo.userInfo.uuid];
|
|
182580
|
+
writeText(terminal, ((_b2 = crdt == null ? void 0 : crdt.doc) == null ? void 0 : _b2.value) || "");
|
|
182581
|
+
const postUser = userListStore.getState().userList[(_c2 = CRDTInfo == null ? void 0 : CRDTInfo.userInfo) == null ? void 0 : _c2.uuid];
|
|
182377
182582
|
if (postUser && !IsMe(CRDTInfo.userInfo)) {
|
|
182378
182583
|
const helperContainer = terminal._core._helperContainer;
|
|
182379
182584
|
userLabel.innerText = postUser.name;
|
|
@@ -182420,12 +182625,12 @@ var index$1 = /* @__PURE__ */ Object.freeze({
|
|
|
182420
182625
|
[Symbol.toStringTag]: "Module",
|
|
182421
182626
|
"default": TerminalComponent
|
|
182422
182627
|
});
|
|
182423
|
-
const Tabs = (
|
|
182424
|
-
var
|
|
182628
|
+
const Tabs = (_i) => {
|
|
182629
|
+
var _j = _i, {
|
|
182425
182630
|
activeKey,
|
|
182426
182631
|
onSelect,
|
|
182427
182632
|
tabItems
|
|
182428
|
-
} =
|
|
182633
|
+
} = _j, props = __objRest(_j, [
|
|
182429
182634
|
"activeKey",
|
|
182430
182635
|
"onSelect",
|
|
182431
182636
|
"tabItems"
|
|
@@ -182743,10 +182948,10 @@ const AvatarLayout = newStyled.div`
|
|
|
182743
182948
|
border-color: ${(props) => props.user.color};
|
|
182744
182949
|
background-image: ${(props) => 'url("' + props.user.avatar + '")'};
|
|
182745
182950
|
`;
|
|
182746
|
-
const Avatar = (
|
|
182747
|
-
var
|
|
182951
|
+
const Avatar = (_k) => {
|
|
182952
|
+
var _l = _k, {
|
|
182748
182953
|
user
|
|
182749
|
-
} =
|
|
182954
|
+
} = _l, props = __objRest(_l, [
|
|
182750
182955
|
"user"
|
|
182751
182956
|
]);
|
|
182752
182957
|
return /* @__PURE__ */ jsx(AvatarLayout, __spreadValues({
|
|
@@ -182755,8 +182960,8 @@ const Avatar = (_g2) => {
|
|
|
182755
182960
|
}, props));
|
|
182756
182961
|
};
|
|
182757
182962
|
const SkeletonThemeContext = React.createContext({});
|
|
182758
|
-
function SkeletonTheme(
|
|
182759
|
-
var
|
|
182963
|
+
function SkeletonTheme(_m) {
|
|
182964
|
+
var _n = _m, { children } = _n, styleOptions = __objRest(_n, ["children"]);
|
|
182760
182965
|
return React.createElement(SkeletonThemeContext.Provider, { value: styleOptions }, children);
|
|
182761
182966
|
}
|
|
182762
182967
|
const defaultEnableAnimation = true;
|
|
@@ -182782,8 +182987,8 @@ function styleOptionsToCssProperties({ baseColor, highlightColor, width, height,
|
|
|
182782
182987
|
style["--highlight-color"] = highlightColor;
|
|
182783
182988
|
return style;
|
|
182784
182989
|
}
|
|
182785
|
-
function Skeleton$1(
|
|
182786
|
-
var
|
|
182990
|
+
function Skeleton$1(_o) {
|
|
182991
|
+
var _p = _o, { count = 1, wrapper: Wrapper, className: customClassName, containerClassName, containerTestId, circle = false, style: styleProp } = _p, propsStyleOptions = __objRest(_p, ["count", "wrapper", "className", "containerClassName", "containerTestId", "circle", "style"]);
|
|
182787
182992
|
var _a2, _b2;
|
|
182788
182993
|
const contextStyleOptions = React.useContext(SkeletonThemeContext);
|
|
182789
182994
|
const styleOptions = __spreadProps(__spreadValues(__spreadValues({}, contextStyleOptions), propsStyleOptions), {
|
|
@@ -182834,87 +183039,6 @@ function Box({
|
|
|
182834
183039
|
children
|
|
182835
183040
|
});
|
|
182836
183041
|
}
|
|
182837
|
-
const Console = (_m) => {
|
|
182838
|
-
var _n = _m, {
|
|
182839
|
-
options
|
|
182840
|
-
} = _n, props = __objRest(_n, [
|
|
182841
|
-
"options"
|
|
182842
|
-
]);
|
|
182843
|
-
const defaultOptions2 = __spreadValues({
|
|
182844
|
-
convertEol: true,
|
|
182845
|
-
fontSize: 12,
|
|
182846
|
-
fontFamily: "Monaco, Menlo, monospace",
|
|
182847
|
-
lineHeight: 1,
|
|
182848
|
-
cursorBlink: true,
|
|
182849
|
-
cursorWidth: 1,
|
|
182850
|
-
cursorStyle: "block",
|
|
182851
|
-
rightClickSelectsWord: true,
|
|
182852
|
-
theme: {
|
|
182853
|
-
background: "#1E1E1E"
|
|
182854
|
-
}
|
|
182855
|
-
}, options);
|
|
182856
|
-
const [terminal, setTerminal] = react.exports.useState(null);
|
|
182857
|
-
const {
|
|
182858
|
-
CRDTInfo
|
|
182859
|
-
} = oTStore((state) => state);
|
|
182860
|
-
const {
|
|
182861
|
-
dockerStatus
|
|
182862
|
-
} = oTStore((state) => state);
|
|
182863
|
-
const initTerminalText = (terminal2, text2) => {
|
|
182864
|
-
terminal2.write("\r\n");
|
|
182865
|
-
terminal2.clear();
|
|
182866
|
-
writeText(terminal2, text2);
|
|
182867
|
-
};
|
|
182868
|
-
const writeText = (terminal2, text2) => {
|
|
182869
|
-
terminal2.write(text2);
|
|
182870
|
-
};
|
|
182871
|
-
react.exports.useEffect(() => {
|
|
182872
|
-
if (!terminal) {
|
|
182873
|
-
const term = new xterm.exports.Terminal(defaultOptions2);
|
|
182874
|
-
setTerminal(term);
|
|
182875
|
-
}
|
|
182876
|
-
}, []);
|
|
182877
|
-
react.exports.useEffect(() => {
|
|
182878
|
-
if (!terminal)
|
|
182879
|
-
return;
|
|
182880
|
-
if (dockerStatus === "STOP") {
|
|
182881
|
-
initTerminalText(terminal, "\u5E94\u7528\u672A\u542F\u52A8\r\n");
|
|
182882
|
-
} else {
|
|
182883
|
-
initTerminalText(terminal, oTStore.getState().dockerInfo.consoleHistory);
|
|
182884
|
-
}
|
|
182885
|
-
}, [terminal]);
|
|
182886
|
-
react.exports.useEffect(() => {
|
|
182887
|
-
const crdt = CRDTInfo.console;
|
|
182888
|
-
if (terminal && crdt) {
|
|
182889
|
-
if (crdt.doc.value === "^C") {
|
|
182890
|
-
writeText(terminal, crdt.doc.value);
|
|
182891
|
-
initTerminalText(terminal, "");
|
|
182892
|
-
return;
|
|
182893
|
-
}
|
|
182894
|
-
writeText(terminal, crdt.doc.value || "");
|
|
182895
|
-
}
|
|
182896
|
-
}, [CRDTInfo.console]);
|
|
182897
|
-
react.exports.useEffect(() => {
|
|
182898
|
-
if (!terminal)
|
|
182899
|
-
return;
|
|
182900
|
-
if (dockerStatus === "STOP") {
|
|
182901
|
-
setTimeout(() => {
|
|
182902
|
-
initTerminalText(terminal, "\u5E94\u7528\u672A\u542F\u52A8\r\n");
|
|
182903
|
-
}, 400);
|
|
182904
|
-
} else {
|
|
182905
|
-
initTerminalText(terminal, "");
|
|
182906
|
-
}
|
|
182907
|
-
}, [dockerStatus]);
|
|
182908
|
-
return /* @__PURE__ */ jsx("div", {
|
|
182909
|
-
style: {
|
|
182910
|
-
height: "100%",
|
|
182911
|
-
width: "100%"
|
|
182912
|
-
},
|
|
182913
|
-
children: /* @__PURE__ */ jsx(XTerm, __spreadValues({
|
|
182914
|
-
terminal
|
|
182915
|
-
}, props))
|
|
182916
|
-
});
|
|
182917
|
-
};
|
|
182918
183042
|
const ToolBarWrapper = newStyled.div`
|
|
182919
183043
|
position: relative;
|
|
182920
183044
|
display: flex;
|
|
@@ -182987,8 +183111,8 @@ const ButtonContent = ({
|
|
|
182987
183111
|
})()
|
|
182988
183112
|
});
|
|
182989
183113
|
};
|
|
182990
|
-
const ToolBar = (
|
|
182991
|
-
var props = __objRest(
|
|
183114
|
+
const ToolBar = (_q) => {
|
|
183115
|
+
var props = __objRest(_q, []);
|
|
182992
183116
|
const io = useOT((state) => state.socket);
|
|
182993
183117
|
const pStatus = oTStore((state) => state.playgroundStatus);
|
|
182994
183118
|
const dStatus = oTStore((state) => state.dockerStatus);
|
|
@@ -183054,140 +183178,6 @@ const ToolBar = (_o) => {
|
|
|
183054
183178
|
})]
|
|
183055
183179
|
});
|
|
183056
183180
|
};
|
|
183057
|
-
const PROTOCOL = "https://";
|
|
183058
|
-
const NavBar = newStyled.div`
|
|
183059
|
-
background-color: white;
|
|
183060
|
-
height: 30px;
|
|
183061
|
-
display: flex;
|
|
183062
|
-
align-items: center;
|
|
183063
|
-
|
|
183064
|
-
i {
|
|
183065
|
-
margin: 0 10px;
|
|
183066
|
-
width: 24px;
|
|
183067
|
-
height: 24px;
|
|
183068
|
-
border-radius: 50%;
|
|
183069
|
-
display: flex;
|
|
183070
|
-
justify-content: center;
|
|
183071
|
-
align-items: center;
|
|
183072
|
-
|
|
183073
|
-
&.disabled {
|
|
183074
|
-
color: #f2fffe;
|
|
183075
|
-
&:hover {
|
|
183076
|
-
background-color: white;
|
|
183077
|
-
}
|
|
183078
|
-
}
|
|
183079
|
-
|
|
183080
|
-
&:hover {
|
|
183081
|
-
background-color: #e0e0e0;
|
|
183082
|
-
}
|
|
183083
|
-
}
|
|
183084
|
-
|
|
183085
|
-
input {
|
|
183086
|
-
flex: 1;
|
|
183087
|
-
display: inline-block;
|
|
183088
|
-
height: 26px;
|
|
183089
|
-
line-height: 26px;
|
|
183090
|
-
padding: 0 8px;
|
|
183091
|
-
border: 1px solid #adacac;
|
|
183092
|
-
border-radius: 5px;
|
|
183093
|
-
}
|
|
183094
|
-
`;
|
|
183095
|
-
const StopMask = newStyled.div`
|
|
183096
|
-
width: 100%;
|
|
183097
|
-
height: calc(100% - 30px);
|
|
183098
|
-
position: absolute;
|
|
183099
|
-
display: flex;
|
|
183100
|
-
justify-content: center;
|
|
183101
|
-
align-items: center;
|
|
183102
|
-
font-size: 18px;
|
|
183103
|
-
color: #ffffff;
|
|
183104
|
-
background-color: #5a5a5a;
|
|
183105
|
-
opacity: 0.6;
|
|
183106
|
-
`;
|
|
183107
|
-
const OutputBrowser = (_p) => {
|
|
183108
|
-
var _q = _p, {
|
|
183109
|
-
url: url2
|
|
183110
|
-
} = _q, props = __objRest(_q, [
|
|
183111
|
-
"url"
|
|
183112
|
-
]);
|
|
183113
|
-
const pStatus = oTStore((state) => state.playgroundStatus);
|
|
183114
|
-
const dStatus = oTStore((state) => state.dockerStatus);
|
|
183115
|
-
const [playgroundStatus, setPlaygroundStatus] = react.exports.useState("EMPTY");
|
|
183116
|
-
const [dockerStatus, setDockerStatus] = react.exports.useState("STOP");
|
|
183117
|
-
const urlWithProtocol = (url22) => {
|
|
183118
|
-
if (!url22)
|
|
183119
|
-
return `${PROTOCOL}showmebug.com`;
|
|
183120
|
-
if (url22.indexOf("http://") !== 0 && url22.indexOf("https://") !== 0) {
|
|
183121
|
-
url22 = `${PROTOCOL}${url22}`;
|
|
183122
|
-
}
|
|
183123
|
-
return url22;
|
|
183124
|
-
};
|
|
183125
|
-
react.exports.useEffect(() => {
|
|
183126
|
-
setPlaygroundStatus(pStatus);
|
|
183127
|
-
}, [pStatus]);
|
|
183128
|
-
react.exports.useEffect(() => {
|
|
183129
|
-
setDockerStatus(dStatus);
|
|
183130
|
-
setTimeout(() => {
|
|
183131
|
-
onRefresh();
|
|
183132
|
-
}, 800);
|
|
183133
|
-
}, [dStatus]);
|
|
183134
|
-
const iframeRef = react.exports.useRef(null);
|
|
183135
|
-
const [iframeSrc, setIframeSrc] = react.exports.useState(urlWithProtocol(url2));
|
|
183136
|
-
react.exports.useEffect(() => {
|
|
183137
|
-
setIframeSrc(urlWithProtocol(url2));
|
|
183138
|
-
}, [url2]);
|
|
183139
|
-
react.exports.useEffect(() => {
|
|
183140
|
-
}, [iframeRef]);
|
|
183141
|
-
const onEnterKey = (e2) => {
|
|
183142
|
-
if (e2.keyCode !== 13)
|
|
183143
|
-
return;
|
|
183144
|
-
const url22 = urlWithProtocol(e2.target.value);
|
|
183145
|
-
setIframeSrc(url22);
|
|
183146
|
-
iframeRef.current.contentWindow.location.replace(url22);
|
|
183147
|
-
};
|
|
183148
|
-
const onRefresh = () => {
|
|
183149
|
-
iframeRef.current.contentWindow.location.replace(iframeSrc);
|
|
183150
|
-
};
|
|
183151
|
-
const onOpenInNewTab = () => {
|
|
183152
|
-
window.open(iframeSrc);
|
|
183153
|
-
};
|
|
183154
|
-
react.exports.useEffect(() => {
|
|
183155
|
-
if (playgroundStatus === "EMPTY")
|
|
183156
|
-
return;
|
|
183157
|
-
if (playgroundStatus === "ACTIVE" && dockerStatus === "RUNNING") {
|
|
183158
|
-
if (iframeSrc !== "http://" && iframeSrc !== "https://") {
|
|
183159
|
-
iframeRef.current.contentWindow.location.replace(iframeSrc);
|
|
183160
|
-
}
|
|
183161
|
-
}
|
|
183162
|
-
}, [playgroundStatus, dockerStatus]);
|
|
183163
|
-
return /* @__PURE__ */ jsxs(Fragment, {
|
|
183164
|
-
children: [/* @__PURE__ */ jsxs(NavBar, {
|
|
183165
|
-
children: [/* @__PURE__ */ jsx("i", {
|
|
183166
|
-
className: "d42 text-xl reload cursor-pointer",
|
|
183167
|
-
onClick: onRefresh
|
|
183168
|
-
}), /* @__PURE__ */ jsx("input", {
|
|
183169
|
-
type: "text",
|
|
183170
|
-
value: iframeSrc,
|
|
183171
|
-
onChange: (e2) => setIframeSrc(e2.target.value),
|
|
183172
|
-
onKeyDown: onEnterKey
|
|
183173
|
-
}), /* @__PURE__ */ jsx("i", {
|
|
183174
|
-
className: "d42 text-xl file-copy cursor-pointer",
|
|
183175
|
-
onClick: onOpenInNewTab
|
|
183176
|
-
})]
|
|
183177
|
-
}), dockerStatus === "STOP" && /* @__PURE__ */ jsx(StopMask, {
|
|
183178
|
-
children: /* @__PURE__ */ jsx("span", {
|
|
183179
|
-
children: "\u70B9\u51FB\u201C\u8FD0\u884C\u201D\uFF0C\u542F\u52A8\u5E94\u7528"
|
|
183180
|
-
})
|
|
183181
|
-
}), /* @__PURE__ */ jsx("iframe", {
|
|
183182
|
-
ref: iframeRef,
|
|
183183
|
-
src: iframeSrc,
|
|
183184
|
-
style: {
|
|
183185
|
-
width: "100%",
|
|
183186
|
-
height: "calc(100% - 30px)"
|
|
183187
|
-
}
|
|
183188
|
-
})]
|
|
183189
|
-
});
|
|
183190
|
-
};
|
|
183191
183181
|
var loglevel = { exports: {} };
|
|
183192
183182
|
(function(module2) {
|
|
183193
183183
|
(function(root2, definition) {
|