@dao42/d42paas-front 0.5.22 → 0.5.27
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 +334 -348
- package/dist/DaoPaaS.umd.js +410 -407
- package/dist/editor.d.ts +96 -14
- 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,11 +174711,11 @@ 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; */
|
|
174699
174718
|
}
|
|
174700
|
-
|
|
174701
174719
|
}
|
|
174702
174720
|
`;
|
|
174703
174721
|
const ContentLayout = newStyled.div`
|
|
@@ -174786,7 +174804,6 @@ const Editor = ({
|
|
|
174786
174804
|
keepString += i2 === 0 ? 0 : change.text.length;
|
|
174787
174805
|
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
174806
|
}).reduce((a2, b2) => a2.compose(b2));
|
|
174789
|
-
setLocalFile((doc2 == null ? void 0 : doc2.path) ? doc2 == null ? void 0 : doc2.path : "singleFile", editor.getValue());
|
|
174790
174807
|
client2.applyClient(operation);
|
|
174791
174808
|
} else {
|
|
174792
174809
|
setValue(changes[0].text);
|
|
@@ -174859,7 +174876,7 @@ const Editor = ({
|
|
|
174859
174876
|
setLocalFile(doc2.path, file.value);
|
|
174860
174877
|
}
|
|
174861
174878
|
};
|
|
174862
|
-
const lspServerInject = (
|
|
174879
|
+
const lspServerInject = (_lan, disable) => {
|
|
174863
174880
|
languages.register({
|
|
174864
174881
|
id: "ruby",
|
|
174865
174882
|
extensions: [".rb"],
|
|
@@ -174875,45 +174892,7 @@ const Editor = ({
|
|
|
174875
174892
|
extensions: [".ts"],
|
|
174876
174893
|
aliases: ["TypeScript", "ts", "TS", "typescript"]
|
|
174877
174894
|
});
|
|
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
|
-
});
|
|
174895
|
+
return;
|
|
174917
174896
|
};
|
|
174918
174897
|
const switchModel = (model) => {
|
|
174919
174898
|
const {
|
|
@@ -175135,7 +175114,7 @@ const Editor = ({
|
|
|
175135
175114
|
setUsersDelta(USERLISTSTORE.userList.filter((u2) => !IsMe(u2)).map((x2) => {
|
|
175136
175115
|
return __spreadProps(__spreadValues({}, x2), {
|
|
175137
175116
|
label: {
|
|
175138
|
-
domNode:
|
|
175117
|
+
domNode: null,
|
|
175139
175118
|
getId: function() {
|
|
175140
175119
|
return `label-${x2.uuid}`;
|
|
175141
175120
|
},
|
|
@@ -175185,7 +175164,7 @@ const Editor = ({
|
|
|
175185
175164
|
})]
|
|
175186
175165
|
});
|
|
175187
175166
|
};
|
|
175188
|
-
var index$
|
|
175167
|
+
var index$4 = /* @__PURE__ */ Object.freeze({
|
|
175189
175168
|
__proto__: null,
|
|
175190
175169
|
[Symbol.toStringTag]: "Module",
|
|
175191
175170
|
Editor
|
|
@@ -182312,12 +182291,234 @@ const XTerm = (_a2) => {
|
|
|
182312
182291
|
})
|
|
182313
182292
|
});
|
|
182314
182293
|
};
|
|
182315
|
-
const
|
|
182294
|
+
const Console = (_c2) => {
|
|
182316
182295
|
var _d2 = _c2, {
|
|
182317
182296
|
options
|
|
182318
182297
|
} = _d2, props = __objRest(_d2, [
|
|
182319
182298
|
"options"
|
|
182320
182299
|
]);
|
|
182300
|
+
const defaultOptions2 = __spreadValues({
|
|
182301
|
+
convertEol: true,
|
|
182302
|
+
fontSize: 12,
|
|
182303
|
+
fontFamily: "Monaco, Menlo, monospace",
|
|
182304
|
+
lineHeight: 1,
|
|
182305
|
+
cursorBlink: true,
|
|
182306
|
+
cursorWidth: 1,
|
|
182307
|
+
cursorStyle: "block",
|
|
182308
|
+
rightClickSelectsWord: true,
|
|
182309
|
+
theme: {
|
|
182310
|
+
background: "#1E1E1E"
|
|
182311
|
+
}
|
|
182312
|
+
}, options);
|
|
182313
|
+
const [terminal, setTerminal] = react.exports.useState(null);
|
|
182314
|
+
const {
|
|
182315
|
+
CRDTInfo
|
|
182316
|
+
} = oTStore((state) => state);
|
|
182317
|
+
const {
|
|
182318
|
+
dockerStatus
|
|
182319
|
+
} = oTStore((state) => state);
|
|
182320
|
+
const initTerminalText = (terminal2, text2) => {
|
|
182321
|
+
terminal2.write("\r\n");
|
|
182322
|
+
terminal2.clear();
|
|
182323
|
+
writeText(terminal2, text2);
|
|
182324
|
+
};
|
|
182325
|
+
const writeText = (terminal2, text2) => {
|
|
182326
|
+
terminal2.write(text2);
|
|
182327
|
+
};
|
|
182328
|
+
react.exports.useEffect(() => {
|
|
182329
|
+
if (!terminal) {
|
|
182330
|
+
const term = new xterm.exports.Terminal(defaultOptions2);
|
|
182331
|
+
setTerminal(term);
|
|
182332
|
+
}
|
|
182333
|
+
}, []);
|
|
182334
|
+
react.exports.useEffect(() => {
|
|
182335
|
+
if (!terminal)
|
|
182336
|
+
return;
|
|
182337
|
+
if (dockerStatus === "STOP") {
|
|
182338
|
+
initTerminalText(terminal, "\u5E94\u7528\u672A\u542F\u52A8\r\n");
|
|
182339
|
+
} else {
|
|
182340
|
+
initTerminalText(terminal, oTStore.getState().dockerInfo.consoleHistory);
|
|
182341
|
+
}
|
|
182342
|
+
}, [terminal]);
|
|
182343
|
+
react.exports.useEffect(() => {
|
|
182344
|
+
if (!terminal)
|
|
182345
|
+
return;
|
|
182346
|
+
const crdt = CRDTInfo.console;
|
|
182347
|
+
if (crdt) {
|
|
182348
|
+
writeText(terminal, crdt.doc.value || "");
|
|
182349
|
+
}
|
|
182350
|
+
}, [CRDTInfo.console]);
|
|
182351
|
+
react.exports.useEffect(() => {
|
|
182352
|
+
if (!terminal)
|
|
182353
|
+
return;
|
|
182354
|
+
if (dockerStatus === "STOP") {
|
|
182355
|
+
setTimeout(() => {
|
|
182356
|
+
writeText(terminal, "\r\n\u5E94\u7528\u672A\u542F\u52A8\r\n");
|
|
182357
|
+
}, 400);
|
|
182358
|
+
} else {
|
|
182359
|
+
initTerminalText(terminal, "");
|
|
182360
|
+
}
|
|
182361
|
+
}, [dockerStatus]);
|
|
182362
|
+
return /* @__PURE__ */ jsx("div", {
|
|
182363
|
+
style: {
|
|
182364
|
+
height: "100%",
|
|
182365
|
+
width: "100%"
|
|
182366
|
+
},
|
|
182367
|
+
children: /* @__PURE__ */ jsx(XTerm, __spreadValues({
|
|
182368
|
+
terminal
|
|
182369
|
+
}, props))
|
|
182370
|
+
});
|
|
182371
|
+
};
|
|
182372
|
+
var index$3 = /* @__PURE__ */ Object.freeze({
|
|
182373
|
+
__proto__: null,
|
|
182374
|
+
[Symbol.toStringTag]: "Module",
|
|
182375
|
+
"default": Console
|
|
182376
|
+
});
|
|
182377
|
+
const PROTOCOL = "https://";
|
|
182378
|
+
const NavBar = newStyled.div`
|
|
182379
|
+
background-color: white;
|
|
182380
|
+
height: 30px;
|
|
182381
|
+
display: flex;
|
|
182382
|
+
align-items: center;
|
|
182383
|
+
|
|
182384
|
+
i {
|
|
182385
|
+
margin: 0 10px;
|
|
182386
|
+
width: 24px;
|
|
182387
|
+
height: 24px;
|
|
182388
|
+
border-radius: 50%;
|
|
182389
|
+
display: flex;
|
|
182390
|
+
justify-content: center;
|
|
182391
|
+
align-items: center;
|
|
182392
|
+
|
|
182393
|
+
&.disabled {
|
|
182394
|
+
color: #f2fffe;
|
|
182395
|
+
&:hover {
|
|
182396
|
+
background-color: white;
|
|
182397
|
+
}
|
|
182398
|
+
}
|
|
182399
|
+
|
|
182400
|
+
&:hover {
|
|
182401
|
+
background-color: #e0e0e0;
|
|
182402
|
+
}
|
|
182403
|
+
}
|
|
182404
|
+
|
|
182405
|
+
input {
|
|
182406
|
+
flex: 1;
|
|
182407
|
+
display: inline-block;
|
|
182408
|
+
height: 26px;
|
|
182409
|
+
line-height: 26px;
|
|
182410
|
+
padding: 0 8px;
|
|
182411
|
+
border: 1px solid #adacac;
|
|
182412
|
+
border-radius: 5px;
|
|
182413
|
+
}
|
|
182414
|
+
`;
|
|
182415
|
+
const StopMask = newStyled.div`
|
|
182416
|
+
width: 100%;
|
|
182417
|
+
height: calc(100% - 30px);
|
|
182418
|
+
position: absolute;
|
|
182419
|
+
display: flex;
|
|
182420
|
+
justify-content: center;
|
|
182421
|
+
align-items: center;
|
|
182422
|
+
font-size: 18px;
|
|
182423
|
+
color: #ffffff;
|
|
182424
|
+
background-color: #5a5a5a;
|
|
182425
|
+
opacity: 0.6;
|
|
182426
|
+
`;
|
|
182427
|
+
const OutputBrowser = (_e2) => {
|
|
182428
|
+
var _f2 = _e2, {
|
|
182429
|
+
url: url2
|
|
182430
|
+
} = _f2, props = __objRest(_f2, [
|
|
182431
|
+
"url"
|
|
182432
|
+
]);
|
|
182433
|
+
const pStatus = oTStore((state) => state.playgroundStatus);
|
|
182434
|
+
const dStatus = oTStore((state) => state.dockerStatus);
|
|
182435
|
+
const [playgroundStatus, setPlaygroundStatus] = react.exports.useState("EMPTY");
|
|
182436
|
+
const [dockerStatus, setDockerStatus] = react.exports.useState("STOP");
|
|
182437
|
+
const urlWithProtocol = (url22) => {
|
|
182438
|
+
if (!url22)
|
|
182439
|
+
return `${PROTOCOL}showmebug.com`;
|
|
182440
|
+
if (url22.indexOf("http://") !== 0 && url22.indexOf("https://") !== 0) {
|
|
182441
|
+
url22 = `${PROTOCOL}${url22}`;
|
|
182442
|
+
}
|
|
182443
|
+
return url22;
|
|
182444
|
+
};
|
|
182445
|
+
react.exports.useEffect(() => {
|
|
182446
|
+
setPlaygroundStatus(pStatus);
|
|
182447
|
+
}, [pStatus]);
|
|
182448
|
+
react.exports.useEffect(() => {
|
|
182449
|
+
setDockerStatus(dStatus);
|
|
182450
|
+
setTimeout(() => {
|
|
182451
|
+
onRefresh();
|
|
182452
|
+
}, 800);
|
|
182453
|
+
}, [dStatus]);
|
|
182454
|
+
const iframeRef = react.exports.useRef(null);
|
|
182455
|
+
const [iframeSrc, setIframeSrc] = react.exports.useState(urlWithProtocol(url2));
|
|
182456
|
+
react.exports.useEffect(() => {
|
|
182457
|
+
setIframeSrc(urlWithProtocol(url2));
|
|
182458
|
+
}, [url2]);
|
|
182459
|
+
react.exports.useEffect(() => {
|
|
182460
|
+
}, [iframeRef]);
|
|
182461
|
+
const onEnterKey = (e2) => {
|
|
182462
|
+
if (e2.keyCode !== 13)
|
|
182463
|
+
return;
|
|
182464
|
+
const url22 = urlWithProtocol(e2.target.value);
|
|
182465
|
+
setIframeSrc(url22);
|
|
182466
|
+
iframeRef.current.contentWindow.location.replace(url22);
|
|
182467
|
+
};
|
|
182468
|
+
const onRefresh = () => {
|
|
182469
|
+
iframeRef.current.contentWindow.location.replace(iframeSrc);
|
|
182470
|
+
};
|
|
182471
|
+
const onOpenInNewTab = () => {
|
|
182472
|
+
window.open(iframeSrc);
|
|
182473
|
+
};
|
|
182474
|
+
react.exports.useEffect(() => {
|
|
182475
|
+
if (playgroundStatus === "EMPTY")
|
|
182476
|
+
return;
|
|
182477
|
+
if (playgroundStatus === "ACTIVE" && dockerStatus === "RUNNING") {
|
|
182478
|
+
if (iframeSrc !== "http://" && iframeSrc !== "https://") {
|
|
182479
|
+
iframeRef.current.contentWindow.location.replace(iframeSrc);
|
|
182480
|
+
}
|
|
182481
|
+
}
|
|
182482
|
+
}, [playgroundStatus, dockerStatus]);
|
|
182483
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
182484
|
+
children: [/* @__PURE__ */ jsxs(NavBar, {
|
|
182485
|
+
children: [/* @__PURE__ */ jsx("i", {
|
|
182486
|
+
className: "d42 text-xl reload cursor-pointer",
|
|
182487
|
+
onClick: onRefresh
|
|
182488
|
+
}), /* @__PURE__ */ jsx("input", {
|
|
182489
|
+
type: "text",
|
|
182490
|
+
value: iframeSrc,
|
|
182491
|
+
onChange: (e2) => setIframeSrc(e2.target.value),
|
|
182492
|
+
onKeyDown: onEnterKey
|
|
182493
|
+
}), /* @__PURE__ */ jsx("i", {
|
|
182494
|
+
className: "d42 text-xl file-copy cursor-pointer",
|
|
182495
|
+
onClick: onOpenInNewTab
|
|
182496
|
+
})]
|
|
182497
|
+
}), dockerStatus === "STOP" && /* @__PURE__ */ jsx(StopMask, {
|
|
182498
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
182499
|
+
children: "\u70B9\u51FB\u201C\u8FD0\u884C\u201D\uFF0C\u542F\u52A8\u5E94\u7528"
|
|
182500
|
+
})
|
|
182501
|
+
}), /* @__PURE__ */ jsx("iframe", {
|
|
182502
|
+
ref: iframeRef,
|
|
182503
|
+
src: iframeSrc,
|
|
182504
|
+
style: {
|
|
182505
|
+
width: "100%",
|
|
182506
|
+
height: "calc(100% - 30px)"
|
|
182507
|
+
}
|
|
182508
|
+
})]
|
|
182509
|
+
});
|
|
182510
|
+
};
|
|
182511
|
+
var index$2 = /* @__PURE__ */ Object.freeze({
|
|
182512
|
+
__proto__: null,
|
|
182513
|
+
[Symbol.toStringTag]: "Module",
|
|
182514
|
+
"default": OutputBrowser
|
|
182515
|
+
});
|
|
182516
|
+
const TerminalComponent = (_g2) => {
|
|
182517
|
+
var _h2 = _g2, {
|
|
182518
|
+
options
|
|
182519
|
+
} = _h2, props = __objRest(_h2, [
|
|
182520
|
+
"options"
|
|
182521
|
+
]);
|
|
182321
182522
|
const defaultOptions2 = __spreadValues({}, options);
|
|
182322
182523
|
const userLabel = document.createElement("div");
|
|
182323
182524
|
userLabel.classList.add("xterm-helper-user-label");
|
|
@@ -182357,23 +182558,23 @@ const TerminalComponent = (_c2) => {
|
|
|
182357
182558
|
}
|
|
182358
182559
|
}, []);
|
|
182359
182560
|
react.exports.useEffect(() => {
|
|
182360
|
-
var _a2, _b2,
|
|
182561
|
+
var _a2, _b2, _c2, _d2;
|
|
182361
182562
|
if (!terminal)
|
|
182362
182563
|
return;
|
|
182363
182564
|
if (CRDTInfo.terminal) {
|
|
182364
|
-
initTerminalText(terminal, ((
|
|
182565
|
+
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) || "");
|
|
182365
182566
|
}
|
|
182366
182567
|
}, [terminal]);
|
|
182367
182568
|
react.exports.useEffect(() => {
|
|
182368
|
-
var _a2, _b2,
|
|
182569
|
+
var _a2, _b2, _c2;
|
|
182369
182570
|
const crdt = CRDTInfo.terminal;
|
|
182370
182571
|
if (terminal && crdt) {
|
|
182371
182572
|
if (((_a2 = crdt == null ? void 0 : crdt.doc) == null ? void 0 : _a2.action) === "Get") {
|
|
182372
|
-
initTerminalText(terminal,
|
|
182573
|
+
initTerminalText(terminal, crdt.doc.value);
|
|
182373
182574
|
return;
|
|
182374
182575
|
}
|
|
182375
|
-
writeText(terminal, ((
|
|
182376
|
-
const postUser = userListStore.getState().userList[(
|
|
182576
|
+
writeText(terminal, ((_b2 = crdt == null ? void 0 : crdt.doc) == null ? void 0 : _b2.value) || "");
|
|
182577
|
+
const postUser = userListStore.getState().userList[(_c2 = CRDTInfo == null ? void 0 : CRDTInfo.userInfo) == null ? void 0 : _c2.uuid];
|
|
182377
182578
|
if (postUser && !IsMe(CRDTInfo.userInfo)) {
|
|
182378
182579
|
const helperContainer = terminal._core._helperContainer;
|
|
182379
182580
|
userLabel.innerText = postUser.name;
|
|
@@ -182420,12 +182621,12 @@ var index$1 = /* @__PURE__ */ Object.freeze({
|
|
|
182420
182621
|
[Symbol.toStringTag]: "Module",
|
|
182421
182622
|
"default": TerminalComponent
|
|
182422
182623
|
});
|
|
182423
|
-
const Tabs = (
|
|
182424
|
-
var
|
|
182624
|
+
const Tabs = (_i) => {
|
|
182625
|
+
var _j = _i, {
|
|
182425
182626
|
activeKey,
|
|
182426
182627
|
onSelect,
|
|
182427
182628
|
tabItems
|
|
182428
|
-
} =
|
|
182629
|
+
} = _j, props = __objRest(_j, [
|
|
182429
182630
|
"activeKey",
|
|
182430
182631
|
"onSelect",
|
|
182431
182632
|
"tabItems"
|
|
@@ -182743,10 +182944,10 @@ const AvatarLayout = newStyled.div`
|
|
|
182743
182944
|
border-color: ${(props) => props.user.color};
|
|
182744
182945
|
background-image: ${(props) => 'url("' + props.user.avatar + '")'};
|
|
182745
182946
|
`;
|
|
182746
|
-
const Avatar = (
|
|
182747
|
-
var
|
|
182947
|
+
const Avatar = (_k) => {
|
|
182948
|
+
var _l = _k, {
|
|
182748
182949
|
user
|
|
182749
|
-
} =
|
|
182950
|
+
} = _l, props = __objRest(_l, [
|
|
182750
182951
|
"user"
|
|
182751
182952
|
]);
|
|
182752
182953
|
return /* @__PURE__ */ jsx(AvatarLayout, __spreadValues({
|
|
@@ -182755,8 +182956,8 @@ const Avatar = (_g2) => {
|
|
|
182755
182956
|
}, props));
|
|
182756
182957
|
};
|
|
182757
182958
|
const SkeletonThemeContext = React.createContext({});
|
|
182758
|
-
function SkeletonTheme(
|
|
182759
|
-
var
|
|
182959
|
+
function SkeletonTheme(_m) {
|
|
182960
|
+
var _n = _m, { children } = _n, styleOptions = __objRest(_n, ["children"]);
|
|
182760
182961
|
return React.createElement(SkeletonThemeContext.Provider, { value: styleOptions }, children);
|
|
182761
182962
|
}
|
|
182762
182963
|
const defaultEnableAnimation = true;
|
|
@@ -182782,8 +182983,8 @@ function styleOptionsToCssProperties({ baseColor, highlightColor, width, height,
|
|
|
182782
182983
|
style["--highlight-color"] = highlightColor;
|
|
182783
182984
|
return style;
|
|
182784
182985
|
}
|
|
182785
|
-
function Skeleton$1(
|
|
182786
|
-
var
|
|
182986
|
+
function Skeleton$1(_o) {
|
|
182987
|
+
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
182988
|
var _a2, _b2;
|
|
182788
182989
|
const contextStyleOptions = React.useContext(SkeletonThemeContext);
|
|
182789
182990
|
const styleOptions = __spreadProps(__spreadValues(__spreadValues({}, contextStyleOptions), propsStyleOptions), {
|
|
@@ -182834,87 +183035,6 @@ function Box({
|
|
|
182834
183035
|
children
|
|
182835
183036
|
});
|
|
182836
183037
|
}
|
|
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
183038
|
const ToolBarWrapper = newStyled.div`
|
|
182919
183039
|
position: relative;
|
|
182920
183040
|
display: flex;
|
|
@@ -182987,8 +183107,8 @@ const ButtonContent = ({
|
|
|
182987
183107
|
})()
|
|
182988
183108
|
});
|
|
182989
183109
|
};
|
|
182990
|
-
const ToolBar = (
|
|
182991
|
-
var props = __objRest(
|
|
183110
|
+
const ToolBar = (_q) => {
|
|
183111
|
+
var props = __objRest(_q, []);
|
|
182992
183112
|
const io = useOT((state) => state.socket);
|
|
182993
183113
|
const pStatus = oTStore((state) => state.playgroundStatus);
|
|
182994
183114
|
const dStatus = oTStore((state) => state.dockerStatus);
|
|
@@ -183054,140 +183174,6 @@ const ToolBar = (_o) => {
|
|
|
183054
183174
|
})]
|
|
183055
183175
|
});
|
|
183056
183176
|
};
|
|
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
183177
|
var loglevel = { exports: {} };
|
|
183192
183178
|
(function(module2) {
|
|
183193
183179
|
(function(root2, definition) {
|