@dao42/d42paas-front 0.7.35 → 0.7.36
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 +515 -100
- package/dist/DaoPaaS.umd.js +644 -536
- package/dist/editor.d.ts +58 -18
- package/dist/style.css +2 -2
- package/package.json +1 -1
package/dist/DaoPaaS.es.js
CHANGED
|
@@ -14944,6 +14944,12 @@ const dockerState = create$5(subscribeWithSelector$1((set2) => ({
|
|
|
14944
14944
|
dockerStatus: arg
|
|
14945
14945
|
})
|
|
14946
14946
|
})));
|
|
14947
|
+
const ErrorMsgState = create$5(subscribeWithSelector$1((set2) => ({
|
|
14948
|
+
message: {},
|
|
14949
|
+
setMessage: (arg) => set2({
|
|
14950
|
+
message: arg
|
|
14951
|
+
})
|
|
14952
|
+
})));
|
|
14947
14953
|
const oTStore = create$5(subscribeWithSelector$1((set2) => ({
|
|
14948
14954
|
asyncType: void 0,
|
|
14949
14955
|
appStatus: "code",
|
|
@@ -28639,6 +28645,25 @@ const PlaygroundInit = (arg) => {
|
|
|
28639
28645
|
io.on("dockerStatus", (data) => {
|
|
28640
28646
|
setDockerStatus(data || "STOP");
|
|
28641
28647
|
});
|
|
28648
|
+
io.on("folderEvent", async (d2) => {
|
|
28649
|
+
var _a2, _b2;
|
|
28650
|
+
const _d2 = JSON.parse(d2);
|
|
28651
|
+
setCRDTInfo2(_d2);
|
|
28652
|
+
setAsyncType("file");
|
|
28653
|
+
setReplaySource(__spreadProps(__spreadValues({}, _d2), {
|
|
28654
|
+
event: "file"
|
|
28655
|
+
}));
|
|
28656
|
+
const localReplayFile = await (await daopaasDB()).get("replayFiles", _d2.file.path);
|
|
28657
|
+
if (!localReplayFile) {
|
|
28658
|
+
setLocalReplayFile((_a2 = _d2 == null ? void 0 : _d2.file) == null ? void 0 : _a2.path, {
|
|
28659
|
+
value: _d2.file.value,
|
|
28660
|
+
revision: 0,
|
|
28661
|
+
path: _d2.file.path
|
|
28662
|
+
});
|
|
28663
|
+
}
|
|
28664
|
+
if (((_b2 = shadowUserStore.getState().shadowUser) == null ? void 0 : _b2.uuid) || IsMe(_d2 == null ? void 0 : _d2.userInfo) && _d2.file)
|
|
28665
|
+
;
|
|
28666
|
+
});
|
|
28642
28667
|
io.on("fileContent", async (d2) => {
|
|
28643
28668
|
var _a2, _b2;
|
|
28644
28669
|
const _d2 = JSON.parse(d2);
|
|
@@ -28704,6 +28729,9 @@ const PlaygroundInit = (arg) => {
|
|
|
28704
28729
|
event: "media"
|
|
28705
28730
|
}));
|
|
28706
28731
|
});
|
|
28732
|
+
io.on("errorHandler", (d2) => {
|
|
28733
|
+
ErrorMsgState.getState().setMessage(d2);
|
|
28734
|
+
});
|
|
28707
28735
|
io.on("disconnect", (reason) => {
|
|
28708
28736
|
if (reason === "io server disconnect") {
|
|
28709
28737
|
return;
|
|
@@ -44602,6 +44630,7 @@ class DaoPaaS {
|
|
|
44602
44630
|
__publicField(this, "playgroundId");
|
|
44603
44631
|
__publicField(this, "serviceWorkerOrigin");
|
|
44604
44632
|
__publicField(this, "onMessage");
|
|
44633
|
+
__publicField(this, "onError");
|
|
44605
44634
|
this.mode = mode;
|
|
44606
44635
|
this.ticket = ticket;
|
|
44607
44636
|
this.playgroundId = playgroundId;
|
|
@@ -44612,6 +44641,7 @@ class DaoPaaS {
|
|
|
44612
44641
|
this.paasDomain = paasDomain;
|
|
44613
44642
|
this.components = components;
|
|
44614
44643
|
this.onMessage = onMessage;
|
|
44644
|
+
this.onError = onError;
|
|
44615
44645
|
this.serviceWorkerOrigin = serviceWorkerOrigin;
|
|
44616
44646
|
sessionStorage.setItem("playgroundId", playgroundId);
|
|
44617
44647
|
this.init();
|
|
@@ -44712,11 +44742,21 @@ class DaoPaaS {
|
|
|
44712
44742
|
dockerState.subscribe((state2) => state2, (pre, next2) => {
|
|
44713
44743
|
this.trigger(lodash$2.exports.pick(pre, ["dockerStatus"]), lodash$2.exports.pick(next2, ["dockerStatus"]));
|
|
44714
44744
|
});
|
|
44745
|
+
oTStore.subscribe((state2) => state2, (pre, next2) => {
|
|
44746
|
+
this.trigger(lodash$2.exports.pick(pre, ["playgroundStatus"]), lodash$2.exports.pick(next2, ["playgroundStatus"]));
|
|
44747
|
+
});
|
|
44748
|
+
ErrorMsgState.subscribe((state2) => state2, (next2, pre) => {
|
|
44749
|
+
this.trigger("error", lodash$2.exports.pick(next2, "message"));
|
|
44750
|
+
});
|
|
44715
44751
|
userListStore.subscribe((next2, pre) => {
|
|
44716
44752
|
this.trigger(lodash$2.exports.pick(pre, ["userList"]), lodash$2.exports.pick(next2, ["userList"]));
|
|
44717
44753
|
});
|
|
44718
44754
|
}
|
|
44719
44755
|
trigger(_d2, data) {
|
|
44756
|
+
if (_d2 === "error") {
|
|
44757
|
+
this.on(data, _d2);
|
|
44758
|
+
return;
|
|
44759
|
+
}
|
|
44720
44760
|
this.on(data);
|
|
44721
44761
|
}
|
|
44722
44762
|
clearIDB(callback) {
|
|
@@ -44785,8 +44825,12 @@ class DaoPaaS {
|
|
|
44785
44825
|
isRecording: !!setBoolean
|
|
44786
44826
|
});
|
|
44787
44827
|
}
|
|
44788
|
-
on(data) {
|
|
44789
|
-
|
|
44828
|
+
on(data, type) {
|
|
44829
|
+
if (type === "error") {
|
|
44830
|
+
this.onError && this.onError(data);
|
|
44831
|
+
} else {
|
|
44832
|
+
this.onMessage && this.onMessage(data);
|
|
44833
|
+
}
|
|
44790
44834
|
}
|
|
44791
44835
|
mapRender(components) {
|
|
44792
44836
|
components == null ? void 0 : components.forEach(({
|
|
@@ -44854,6 +44898,7 @@ class DaoPaaS {
|
|
|
44854
44898
|
props: props2
|
|
44855
44899
|
}) {
|
|
44856
44900
|
this.editorDOM = container ? isHTMLElement$1(container) : this.editorDOM;
|
|
44901
|
+
console.log(props2, 374);
|
|
44857
44902
|
reactDom.exports.render(/* @__PURE__ */ jsx(react.exports.Suspense, {
|
|
44858
44903
|
fallback: /* @__PURE__ */ jsx(Loading, {}),
|
|
44859
44904
|
children: /* @__PURE__ */ jsx(LazyEditorComponent$1, __spreadProps(__spreadValues({}, props2), {
|
|
@@ -173945,9 +173990,125 @@ class EditorData {
|
|
|
173945
173990
|
}
|
|
173946
173991
|
}
|
|
173947
173992
|
__publicField(EditorData, "EditorData");
|
|
173993
|
+
const FolderSVG = (props2) => /* @__PURE__ */ jsx("svg", {
|
|
173994
|
+
className: props2.className,
|
|
173995
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
173996
|
+
width: "12",
|
|
173997
|
+
height: "10",
|
|
173998
|
+
viewBox: "0 0 12 10",
|
|
173999
|
+
fill: "none",
|
|
174000
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
174001
|
+
fillRule: "evenodd",
|
|
174002
|
+
clipRule: "evenodd",
|
|
174003
|
+
d: "M0.398438 0.800006C0.398438 0.41341 0.711841 0.100006 1.09844 0.100006H5.29844C5.68503 0.100006 5.99844 0.41341 5.99844 0.800006C5.99844 1.1866 6.31183 1.50001 6.69844 1.50001H10.8984C11.285 1.50001 11.5984 1.81341 11.5984 2.20001V9.20001C11.5984 9.58662 11.285 9.90001 10.8984 9.90001H1.09844C0.711841 9.90001 0.398438 9.58662 0.398438 9.20001V2.90001V2.20001V0.800006ZM10.0234 3.27501H6.17344V4.32501H10.0234V3.27501Z",
|
|
174004
|
+
fill: "#999999"
|
|
174005
|
+
})
|
|
174006
|
+
});
|
|
174007
|
+
const FileSVG = react.exports.forwardRef((_props, ref) => /* @__PURE__ */ jsx("svg", {
|
|
174008
|
+
className: `flex-shrink-0 ${(_props == null ? void 0 : _props.className) ? _props == null ? void 0 : _props.className : ""}`,
|
|
174009
|
+
ref,
|
|
174010
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
174011
|
+
width: "10",
|
|
174012
|
+
height: "11",
|
|
174013
|
+
viewBox: "0 0 10 11",
|
|
174014
|
+
fill: "none",
|
|
174015
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
174016
|
+
fillRule: "evenodd",
|
|
174017
|
+
clipRule: "evenodd",
|
|
174018
|
+
d: "M0.801562 0.100006C0.414966 0.100006 0.101562 0.41341 0.101562 0.800006V9.90001C0.101562 10.2866 0.414966 10.6 0.801562 10.6H9.20156C9.58817 10.6 9.90156 10.2866 9.90156 9.90001V3.88995C9.90156 3.70431 9.82778 3.52625 9.69653 3.39498L8.15156 1.85001L6.60659 0.305029C6.47534 0.173758 6.29726 0.100006 6.11162 0.100006H0.801562ZM6.22656 3.77501V1.67501H5.17656V4.30001C5.17656 4.58995 5.41162 4.82501 5.70156 4.82501H8.32656V3.77501H6.22656Z",
|
|
174019
|
+
fill: "#666666"
|
|
174020
|
+
})
|
|
174021
|
+
}));
|
|
174022
|
+
FileSVG.displayName = "FileSVG";
|
|
173948
174023
|
const TreeRootLayout = newStyled.div`
|
|
173949
174024
|
height: 100%;
|
|
173950
174025
|
overflow: auto;
|
|
174026
|
+
|
|
174027
|
+
.folder-svg {
|
|
174028
|
+
margin: 0 0.5rem 0 0.2rem;
|
|
174029
|
+
}
|
|
174030
|
+
|
|
174031
|
+
.file-svg {
|
|
174032
|
+
margin: 0 0.5rem 0 0.2rem;
|
|
174033
|
+
}
|
|
174034
|
+
|
|
174035
|
+
ul.rct-tree-items-container {
|
|
174036
|
+
position: relative;
|
|
174037
|
+
ul.rct-tree-items-container:after {
|
|
174038
|
+
content: '';
|
|
174039
|
+
position: absolute;
|
|
174040
|
+
top: 0;
|
|
174041
|
+
height: 100%;
|
|
174042
|
+
width: 1px;
|
|
174043
|
+
z-index: 8888;
|
|
174044
|
+
left: 8px;
|
|
174045
|
+
background: rgba(255, 255, 255, 0.1);
|
|
174046
|
+
}
|
|
174047
|
+
}
|
|
174048
|
+
|
|
174049
|
+
.rct-tree-root {
|
|
174050
|
+
background: ${(props2) => props2.bgColor};
|
|
174051
|
+
color: ${(props2) => props2.fontColor};
|
|
174052
|
+
overflow: auto;
|
|
174053
|
+
}
|
|
174054
|
+
|
|
174055
|
+
.rct-tree-root.root-drag-over {
|
|
174056
|
+
background-color: ${(props2) => props2.hoverBgColor};
|
|
174057
|
+
}
|
|
174058
|
+
|
|
174059
|
+
.rct-tree-item-li {
|
|
174060
|
+
.rct-tree-item-title-container {
|
|
174061
|
+
.rct-tree-item-arrow {
|
|
174062
|
+
flex-shrink: 0;
|
|
174063
|
+
}
|
|
174064
|
+
.rct-tree-item-avatar {
|
|
174065
|
+
width: 20px;
|
|
174066
|
+
height: 20px;
|
|
174067
|
+
margin-left: 10px;
|
|
174068
|
+
background-color: white;
|
|
174069
|
+
right: 5px;
|
|
174070
|
+
}
|
|
174071
|
+
.rct-tree-item-toolbar {
|
|
174072
|
+
display: none;
|
|
174073
|
+
}
|
|
174074
|
+
&:hover {
|
|
174075
|
+
.rct-tree-item-toolbar {
|
|
174076
|
+
display: flex;
|
|
174077
|
+
gap: 8px;
|
|
174078
|
+
}
|
|
174079
|
+
}
|
|
174080
|
+
}
|
|
174081
|
+
}
|
|
174082
|
+
|
|
174083
|
+
.rct-tree-root-focus {
|
|
174084
|
+
outline: none;
|
|
174085
|
+
.rct-tree-item-li-selected {
|
|
174086
|
+
.rct-tree-item-title-container-selected {
|
|
174087
|
+
color: ${(props2) => props2.hoverTextColor};
|
|
174088
|
+
background-color: ${(props2) => props2.hoverBgColor};
|
|
174089
|
+
border-radius: 4px;
|
|
174090
|
+
}
|
|
174091
|
+
}
|
|
174092
|
+
}
|
|
174093
|
+
|
|
174094
|
+
.rct-tree-root-focus {
|
|
174095
|
+
.rct-tree-item-title-container-focused {
|
|
174096
|
+
border-color: transparent;
|
|
174097
|
+
}
|
|
174098
|
+
}
|
|
174099
|
+
|
|
174100
|
+
:not(.rct-tree-root-focus) {
|
|
174101
|
+
.rct-tree-item-title-container-focused {
|
|
174102
|
+
border-color: transparent;
|
|
174103
|
+
}
|
|
174104
|
+
.rct-tree-item-li-selected {
|
|
174105
|
+
.rct-tree-item-title-container-selected {
|
|
174106
|
+
color: ${(props2) => props2.hoverTextColor};
|
|
174107
|
+
background-color: ${(props2) => props2.hoverBgColor};
|
|
174108
|
+
border-radius: 4px;
|
|
174109
|
+
}
|
|
174110
|
+
}
|
|
174111
|
+
}
|
|
173951
174112
|
`;
|
|
173952
174113
|
function addChildrenArray(children, parent2) {
|
|
173953
174114
|
var _a2, _b2;
|
|
@@ -174016,7 +174177,13 @@ const getStringFromFile = async (file) => {
|
|
|
174016
174177
|
};
|
|
174017
174178
|
const FileTree = ({
|
|
174018
174179
|
onCustomSelect,
|
|
174019
|
-
|
|
174180
|
+
dropBgColor = "pink",
|
|
174181
|
+
dropTextColor = "black",
|
|
174182
|
+
hoverBgColor = "rgb(37 45 124 / 80%)",
|
|
174183
|
+
hoverTextColor = "#fff",
|
|
174184
|
+
bgColor = "#15171c",
|
|
174185
|
+
fontColor = "#fff",
|
|
174186
|
+
onClick
|
|
174020
174187
|
}) => {
|
|
174021
174188
|
const addedFolder = {
|
|
174022
174189
|
target: "",
|
|
@@ -174074,6 +174241,10 @@ const FileTree = ({
|
|
|
174074
174241
|
path: items[0]
|
|
174075
174242
|
}
|
|
174076
174243
|
};
|
|
174244
|
+
onClick && onClick({
|
|
174245
|
+
uri: `${fileTree.data.uri}${items[0]}`,
|
|
174246
|
+
path: items[0]
|
|
174247
|
+
});
|
|
174077
174248
|
(_a2 = useOT.getState().socket) == null ? void 0 : _a2.emit("fileContent", JSON.stringify(crdt));
|
|
174078
174249
|
}
|
|
174079
174250
|
}
|
|
@@ -174356,8 +174527,14 @@ const FileTree = ({
|
|
|
174356
174527
|
return /* @__PURE__ */ jsx(FollowLayout, {
|
|
174357
174528
|
name: "file",
|
|
174358
174529
|
children: /* @__PURE__ */ jsxs(TreeRootLayout, {
|
|
174359
|
-
className: `tree-root-layout ${className ? className : ""}`,
|
|
174360
174530
|
ref: treeRef,
|
|
174531
|
+
className: `tree-root-layout`,
|
|
174532
|
+
dropBgColor,
|
|
174533
|
+
dropTextColor,
|
|
174534
|
+
hoverBgColor,
|
|
174535
|
+
hoverTextColor,
|
|
174536
|
+
bgColor,
|
|
174537
|
+
fontColor,
|
|
174361
174538
|
children: [/* @__PURE__ */ jsx("input", {
|
|
174362
174539
|
id: "manual-upload-file",
|
|
174363
174540
|
type: "file",
|
|
@@ -174404,13 +174581,11 @@ const FileTree = ({
|
|
|
174404
174581
|
context,
|
|
174405
174582
|
children
|
|
174406
174583
|
}) => {
|
|
174584
|
+
var _a2;
|
|
174407
174585
|
return /* @__PURE__ */ jsxs("div", __spreadProps(__spreadValues({}, context.itemContainerWithChildrenProps), {
|
|
174408
174586
|
className: ["rct-tree-item-li", context.isSelected ? "rct-tree-item-li-selected" : "", context.isExpanded ? "rct-tree-item-li-expanded" : "", context.isFocused ? "rct-tree-item-li-focused" : "", children ? "rct-tree-item-li-hasChildren" : ""].join(" "),
|
|
174409
174587
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
174410
174588
|
className: ["rct-tree-item-title-container", context.isSelected ? "rct-tree-item-title-container-selected" : "", context.isExpanded ? "rct-tree-item-title-container-expanded" : "", context.isFocused ? "rct-tree-item-title-container-focused" : "", children ? "rct-tree-item-title-container-hasChildren" : ""].join(" "),
|
|
174411
|
-
style: {
|
|
174412
|
-
paddingLeft: `${depth}0px`
|
|
174413
|
-
},
|
|
174414
174589
|
children: [remoteUserList[context.interactiveElementProps["data-rct-item-id"]] && remoteUserList[context.interactiveElementProps["data-rct-item-id"]].map((remoteUser) => /* @__PURE__ */ jsx("div", {
|
|
174415
174590
|
className: "rct-tree-item-avatar rounded-full absolute border",
|
|
174416
174591
|
style: {
|
|
@@ -174483,8 +174658,8 @@ const FileTree = ({
|
|
|
174483
174658
|
children: /* @__PURE__ */ jsx("button", {
|
|
174484
174659
|
className: "w-full justify-center my-2",
|
|
174485
174660
|
onClick: () => {
|
|
174486
|
-
var
|
|
174487
|
-
setRenameValue((
|
|
174661
|
+
var _a3;
|
|
174662
|
+
setRenameValue((_a3 = title == null ? void 0 : title.props) == null ? void 0 : _a3.children);
|
|
174488
174663
|
setRenameItem(context.interactiveElementProps["data-rct-item-id"]);
|
|
174489
174664
|
},
|
|
174490
174665
|
children: "\u91CD\u547D\u540D"
|
|
@@ -174521,9 +174696,13 @@ const FileTree = ({
|
|
|
174521
174696
|
break;
|
|
174522
174697
|
}
|
|
174523
174698
|
}
|
|
174524
|
-
}) : /* @__PURE__ */
|
|
174699
|
+
}) : /* @__PURE__ */ jsxs("button", __spreadProps(__spreadValues(__spreadValues({}, context.itemContainerWithoutChildrenProps), context.interactiveElementProps), {
|
|
174525
174700
|
className: ["rct-tree-item-button", context.isSelected ? "rct-tree-item-button-selected" : "", context.isExpanded ? "rct-tree-item-button-expanded" : "", context.isFocused ? "rct-tree-item-button-focused" : "", children ? "rct-tree-item-button-hasChildren" : ""].join(" "),
|
|
174526
|
-
children:
|
|
174701
|
+
children: [((_a2 = arrow == null ? void 0 : arrow.props) == null ? void 0 : _a2.className.includes("rct-tree-item-arrow-hasChildren")) ? /* @__PURE__ */ jsx(FolderSVG, {
|
|
174702
|
+
className: "folder-svg"
|
|
174703
|
+
}) : /* @__PURE__ */ jsx(FileSVG, {
|
|
174704
|
+
className: "file-svg"
|
|
174705
|
+
}), title]
|
|
174527
174706
|
}))]
|
|
174528
174707
|
}), children]
|
|
174529
174708
|
}));
|
|
@@ -174732,41 +174911,14 @@ const EditorLayout = newStyled.div`
|
|
|
174732
174911
|
color: #666;
|
|
174733
174912
|
}
|
|
174734
174913
|
|
|
174735
|
-
.
|
|
174736
|
-
|
|
174737
|
-
height: 35px;
|
|
174738
|
-
transform: translate(0, -1px);
|
|
174739
|
-
overflow-x: auto;
|
|
174740
|
-
flex-wrap: nowrap;
|
|
174741
|
-
li {
|
|
174742
|
-
/* width: 100px; */
|
|
174743
|
-
height: 100%;
|
|
174744
|
-
padding: 5px 25px;
|
|
174745
|
-
color: #fff;
|
|
174746
|
-
font-size: 12px;
|
|
174747
|
-
flex: 0 0 auto;
|
|
174748
|
-
&:hover {
|
|
174749
|
-
background: #005391;
|
|
174750
|
-
}
|
|
174751
|
-
}
|
|
174914
|
+
.margin-view-overlays {
|
|
174915
|
+
background-color: ${(props2) => props2.theme.marginViewOverlays};
|
|
174752
174916
|
|
|
174753
|
-
.
|
|
174754
|
-
|
|
174917
|
+
.line-numbers {
|
|
174918
|
+
color: ${(props2) => props2.theme.lineNumbers};
|
|
174755
174919
|
|
|
174756
|
-
|
|
174757
|
-
|
|
174758
|
-
/* border-left: 1px solid rgb(42 96 231); */
|
|
174759
|
-
/* background: red; */
|
|
174760
|
-
}
|
|
174761
|
-
|
|
174762
|
-
.tree-closer {
|
|
174763
|
-
right: 4px;
|
|
174764
|
-
font-size: 14px;
|
|
174765
|
-
opacity: 0;
|
|
174766
|
-
line-height: 0;
|
|
174767
|
-
transition: opacity 0.2s ease-in-out;
|
|
174768
|
-
&.hover {
|
|
174769
|
-
opacity: 1;
|
|
174920
|
+
&.active-line-number {
|
|
174921
|
+
color: ${(props2) => props2.theme.activeLineNumber};
|
|
174770
174922
|
}
|
|
174771
174923
|
}
|
|
174772
174924
|
}
|
|
@@ -220182,6 +220334,214 @@ const Markdown = ({
|
|
|
220182
220334
|
})
|
|
220183
220335
|
}), document.body);
|
|
220184
220336
|
};
|
|
220337
|
+
const Dracula = {
|
|
220338
|
+
base: "vs-dark",
|
|
220339
|
+
inherit: true,
|
|
220340
|
+
rules: [
|
|
220341
|
+
{
|
|
220342
|
+
background: "282a36",
|
|
220343
|
+
token: ""
|
|
220344
|
+
},
|
|
220345
|
+
{
|
|
220346
|
+
foreground: "6272a4",
|
|
220347
|
+
token: "comment"
|
|
220348
|
+
},
|
|
220349
|
+
{
|
|
220350
|
+
foreground: "f1fa8c",
|
|
220351
|
+
token: "string"
|
|
220352
|
+
},
|
|
220353
|
+
{
|
|
220354
|
+
foreground: "bd93f9",
|
|
220355
|
+
token: "constant.numeric"
|
|
220356
|
+
},
|
|
220357
|
+
{
|
|
220358
|
+
foreground: "bd93f9",
|
|
220359
|
+
token: "constant.language"
|
|
220360
|
+
},
|
|
220361
|
+
{
|
|
220362
|
+
foreground: "bd93f9",
|
|
220363
|
+
token: "constant.character"
|
|
220364
|
+
},
|
|
220365
|
+
{
|
|
220366
|
+
foreground: "bd93f9",
|
|
220367
|
+
token: "constant.other"
|
|
220368
|
+
},
|
|
220369
|
+
{
|
|
220370
|
+
foreground: "ffb86c",
|
|
220371
|
+
token: "variable.other.readwrite.instance"
|
|
220372
|
+
},
|
|
220373
|
+
{
|
|
220374
|
+
foreground: "ff79c6",
|
|
220375
|
+
token: "constant.character.escaped"
|
|
220376
|
+
},
|
|
220377
|
+
{
|
|
220378
|
+
foreground: "ff79c6",
|
|
220379
|
+
token: "constant.character.escape"
|
|
220380
|
+
},
|
|
220381
|
+
{
|
|
220382
|
+
foreground: "ff79c6",
|
|
220383
|
+
token: "string source"
|
|
220384
|
+
},
|
|
220385
|
+
{
|
|
220386
|
+
foreground: "ff79c6",
|
|
220387
|
+
token: "string source.ruby"
|
|
220388
|
+
},
|
|
220389
|
+
{
|
|
220390
|
+
foreground: "ff79c6",
|
|
220391
|
+
token: "keyword"
|
|
220392
|
+
},
|
|
220393
|
+
{
|
|
220394
|
+
foreground: "ff79c6",
|
|
220395
|
+
token: "storage"
|
|
220396
|
+
},
|
|
220397
|
+
{
|
|
220398
|
+
foreground: "8be9fd",
|
|
220399
|
+
fontStyle: "italic",
|
|
220400
|
+
token: "storage.type"
|
|
220401
|
+
},
|
|
220402
|
+
{
|
|
220403
|
+
foreground: "50fa7b",
|
|
220404
|
+
fontStyle: "underline",
|
|
220405
|
+
token: "entity.name.class"
|
|
220406
|
+
},
|
|
220407
|
+
{
|
|
220408
|
+
foreground: "50fa7b",
|
|
220409
|
+
fontStyle: "italic underline",
|
|
220410
|
+
token: "entity.other.inherited-class"
|
|
220411
|
+
},
|
|
220412
|
+
{
|
|
220413
|
+
foreground: "50fa7b",
|
|
220414
|
+
token: "entity.name.function"
|
|
220415
|
+
},
|
|
220416
|
+
{
|
|
220417
|
+
foreground: "ffb86c",
|
|
220418
|
+
fontStyle: "italic",
|
|
220419
|
+
token: "variable.parameter"
|
|
220420
|
+
},
|
|
220421
|
+
{
|
|
220422
|
+
foreground: "ff79c6",
|
|
220423
|
+
token: "entity.name.tag"
|
|
220424
|
+
},
|
|
220425
|
+
{
|
|
220426
|
+
foreground: "50fa7b",
|
|
220427
|
+
token: "entity.other.attribute-name"
|
|
220428
|
+
},
|
|
220429
|
+
{
|
|
220430
|
+
foreground: "8be9fd",
|
|
220431
|
+
token: "support.function"
|
|
220432
|
+
},
|
|
220433
|
+
{
|
|
220434
|
+
foreground: "6be5fd",
|
|
220435
|
+
token: "support.constant"
|
|
220436
|
+
},
|
|
220437
|
+
{
|
|
220438
|
+
foreground: "66d9ef",
|
|
220439
|
+
fontStyle: " italic",
|
|
220440
|
+
token: "support.type"
|
|
220441
|
+
},
|
|
220442
|
+
{
|
|
220443
|
+
foreground: "66d9ef",
|
|
220444
|
+
fontStyle: " italic",
|
|
220445
|
+
token: "support.class"
|
|
220446
|
+
},
|
|
220447
|
+
{
|
|
220448
|
+
foreground: "f8f8f0",
|
|
220449
|
+
background: "ff79c6",
|
|
220450
|
+
token: "invalid"
|
|
220451
|
+
},
|
|
220452
|
+
{
|
|
220453
|
+
foreground: "f8f8f0",
|
|
220454
|
+
background: "bd93f9",
|
|
220455
|
+
token: "invalid.deprecated"
|
|
220456
|
+
},
|
|
220457
|
+
{
|
|
220458
|
+
foreground: "cfcfc2",
|
|
220459
|
+
token: "meta.structure.dictionary.json string.quoted.double.json"
|
|
220460
|
+
},
|
|
220461
|
+
{
|
|
220462
|
+
foreground: "6272a4",
|
|
220463
|
+
token: "meta.diff"
|
|
220464
|
+
},
|
|
220465
|
+
{
|
|
220466
|
+
foreground: "6272a4",
|
|
220467
|
+
token: "meta.diff.header"
|
|
220468
|
+
},
|
|
220469
|
+
{
|
|
220470
|
+
foreground: "ff79c6",
|
|
220471
|
+
token: "markup.deleted"
|
|
220472
|
+
},
|
|
220473
|
+
{
|
|
220474
|
+
foreground: "50fa7b",
|
|
220475
|
+
token: "markup.inserted"
|
|
220476
|
+
},
|
|
220477
|
+
{
|
|
220478
|
+
foreground: "e6db74",
|
|
220479
|
+
token: "markup.changed"
|
|
220480
|
+
},
|
|
220481
|
+
{
|
|
220482
|
+
foreground: "bd93f9",
|
|
220483
|
+
token: "constant.numeric.line-number.find-in-files - match"
|
|
220484
|
+
},
|
|
220485
|
+
{
|
|
220486
|
+
foreground: "e6db74",
|
|
220487
|
+
token: "entity.name.filename"
|
|
220488
|
+
},
|
|
220489
|
+
{
|
|
220490
|
+
foreground: "f83333",
|
|
220491
|
+
token: "message.error"
|
|
220492
|
+
},
|
|
220493
|
+
{
|
|
220494
|
+
foreground: "eeeeee",
|
|
220495
|
+
token: "punctuation.definition.string.begin.json - meta.structure.dictionary.value.json"
|
|
220496
|
+
},
|
|
220497
|
+
{
|
|
220498
|
+
foreground: "eeeeee",
|
|
220499
|
+
token: "punctuation.definition.string.end.json - meta.structure.dictionary.value.json"
|
|
220500
|
+
},
|
|
220501
|
+
{
|
|
220502
|
+
foreground: "8be9fd",
|
|
220503
|
+
token: "meta.structure.dictionary.json string.quoted.double.json"
|
|
220504
|
+
},
|
|
220505
|
+
{
|
|
220506
|
+
foreground: "f1fa8c",
|
|
220507
|
+
token: "meta.structure.dictionary.value.json string.quoted.double.json"
|
|
220508
|
+
},
|
|
220509
|
+
{
|
|
220510
|
+
foreground: "50fa7b",
|
|
220511
|
+
token: "meta meta meta meta meta meta meta.structure.dictionary.value string"
|
|
220512
|
+
},
|
|
220513
|
+
{
|
|
220514
|
+
foreground: "ffb86c",
|
|
220515
|
+
token: "meta meta meta meta meta meta.structure.dictionary.value string"
|
|
220516
|
+
},
|
|
220517
|
+
{
|
|
220518
|
+
foreground: "ff79c6",
|
|
220519
|
+
token: "meta meta meta meta meta.structure.dictionary.value string"
|
|
220520
|
+
},
|
|
220521
|
+
{
|
|
220522
|
+
foreground: "bd93f9",
|
|
220523
|
+
token: "meta meta meta meta.structure.dictionary.value string"
|
|
220524
|
+
},
|
|
220525
|
+
{
|
|
220526
|
+
foreground: "50fa7b",
|
|
220527
|
+
token: "meta meta meta.structure.dictionary.value string"
|
|
220528
|
+
},
|
|
220529
|
+
{
|
|
220530
|
+
foreground: "ffb86c",
|
|
220531
|
+
token: "meta meta.structure.dictionary.value string"
|
|
220532
|
+
}
|
|
220533
|
+
],
|
|
220534
|
+
colors: {
|
|
220535
|
+
"editor.foreground": "#f8f8f2",
|
|
220536
|
+
"editor.background": "#282a36",
|
|
220537
|
+
"editor.selectionBackground": "#44475a",
|
|
220538
|
+
"editor.lineHighlightBackground": "#44475a",
|
|
220539
|
+
"editorCursor.foreground": "#f8f8f0",
|
|
220540
|
+
"editorWhitespace.foreground": "#3B3A32",
|
|
220541
|
+
"editorIndentGuide.activeBackground": "#9D550FB0",
|
|
220542
|
+
"editor.selectionHighlightBorder": "#222218"
|
|
220543
|
+
}
|
|
220544
|
+
};
|
|
220185
220545
|
const APP_DIR = "/home/runner/app";
|
|
220186
220546
|
let editor;
|
|
220187
220547
|
const docServer = new Map();
|
|
@@ -220200,7 +220560,7 @@ const Editor = ({
|
|
|
220200
220560
|
editorStyle,
|
|
220201
220561
|
serviceWorkerOrigin,
|
|
220202
220562
|
useLsp,
|
|
220203
|
-
|
|
220563
|
+
theme
|
|
220204
220564
|
}) => {
|
|
220205
220565
|
const divEl = react.exports.useRef(null);
|
|
220206
220566
|
const [clientEditor, setClientEditor] = react.exports.useState(null);
|
|
@@ -220471,24 +220831,8 @@ const Editor = ({
|
|
|
220471
220831
|
io == null ? void 0 : io.emit("fileTreeOp", JSON.stringify(payload));
|
|
220472
220832
|
}
|
|
220473
220833
|
});
|
|
220474
|
-
editor$1.defineTheme("myCoolTheme",
|
|
220475
|
-
|
|
220476
|
-
inherit: false,
|
|
220477
|
-
rules: [{
|
|
220478
|
-
token: "green",
|
|
220479
|
-
background: "FF0000",
|
|
220480
|
-
foreground: "00FF00",
|
|
220481
|
-
fontStyle: "italic"
|
|
220482
|
-
}, {
|
|
220483
|
-
token: "red",
|
|
220484
|
-
foreground: "FF0000",
|
|
220485
|
-
fontStyle: "bold underline"
|
|
220486
|
-
}],
|
|
220487
|
-
colors: {
|
|
220488
|
-
"editor.foreground": "#FFFFFF",
|
|
220489
|
-
"editor.background": "#000000"
|
|
220490
|
-
}
|
|
220491
|
-
});
|
|
220834
|
+
editor$1.defineTheme("myCoolTheme", Dracula);
|
|
220835
|
+
editor$1.setTheme("myCoolTheme");
|
|
220492
220836
|
setClientEditor(new MonacoAdapter(editor, serviceWorkerOrigin));
|
|
220493
220837
|
setOtherClients(new ClientMeta(editor, userList.filter((x2) => !IsMe(x2))));
|
|
220494
220838
|
serviceBinder();
|
|
@@ -220655,7 +220999,8 @@ const Editor = ({
|
|
|
220655
220999
|
}
|
|
220656
221000
|
}), /* @__PURE__ */ jsxs(EditorLayout, {
|
|
220657
221001
|
style: containerStyle,
|
|
220658
|
-
|
|
221002
|
+
theme,
|
|
221003
|
+
className: `editor-layout flex flex-col`,
|
|
220659
221004
|
children: [/* @__PURE__ */ jsx(FileTreeStack, {
|
|
220660
221005
|
editor,
|
|
220661
221006
|
menuStyle,
|
|
@@ -220670,11 +221015,56 @@ const Editor = ({
|
|
|
220670
221015
|
})]
|
|
220671
221016
|
});
|
|
220672
221017
|
};
|
|
221018
|
+
const FileTreeStackLayout = newStyled.ul`
|
|
221019
|
+
.active {
|
|
221020
|
+
background-color: ${(props2) => props2.menuStyle.backgroundColor};
|
|
221021
|
+
box-shadow: 0px 1px 0px 0 #333;
|
|
221022
|
+
border-right: 1px solid ${(props2) => props2.menuStyle.backgroundColor};
|
|
221023
|
+
}
|
|
221024
|
+
|
|
221025
|
+
width: 100%;
|
|
221026
|
+
height: 35px;
|
|
221027
|
+
transform: translate(0, -1px);
|
|
221028
|
+
overflow-x: auto;
|
|
221029
|
+
flex-wrap: nowrap;
|
|
221030
|
+
li {
|
|
221031
|
+
/* width: 100px; */
|
|
221032
|
+
height: 100%;
|
|
221033
|
+
padding: 5px 25px;
|
|
221034
|
+
color: ${(props2) => props2.menuStyle.textColor};
|
|
221035
|
+
font-size: 12px;
|
|
221036
|
+
flex: 0 0 auto;
|
|
221037
|
+
&:hover {
|
|
221038
|
+
background: ${(props2) => props2.menuStyle.hoverBgColor};
|
|
221039
|
+
color: ${(props2) => props2.menuStyle.hoverTextColor};
|
|
221040
|
+
}
|
|
221041
|
+
}
|
|
221042
|
+
|
|
221043
|
+
.tree-closer {
|
|
221044
|
+
right: 4px;
|
|
221045
|
+
font-size: 14px;
|
|
221046
|
+
opacity: 0;
|
|
221047
|
+
line-height: 0;
|
|
221048
|
+
transition: opacity 0.2s ease-in-out;
|
|
221049
|
+
color: ${(props2) => props2.menuStyle.iconColor};
|
|
221050
|
+
&.hover {
|
|
221051
|
+
opacity: 1;
|
|
221052
|
+
color: ${(props2) => props2.menuStyle.hoverIconColor};
|
|
221053
|
+
}
|
|
221054
|
+
}
|
|
221055
|
+
`;
|
|
220673
221056
|
const FileTreeStack = ({
|
|
220674
221057
|
editor: editor2,
|
|
220675
|
-
menuStyle,
|
|
220676
221058
|
switchModel,
|
|
220677
|
-
clearPlayground
|
|
221059
|
+
clearPlayground,
|
|
221060
|
+
menuStyle = {
|
|
221061
|
+
backgroundColor: "#005391",
|
|
221062
|
+
textColor: "#fff",
|
|
221063
|
+
hoverBgColor: "rgb(37 45 124 / 80%)",
|
|
221064
|
+
hoverTextColor: "#fff",
|
|
221065
|
+
iconColor: "#fff",
|
|
221066
|
+
hoverIconColor: "#fff"
|
|
221067
|
+
}
|
|
220678
221068
|
}) => {
|
|
220679
221069
|
const switchDoc2 = oTStore((state2) => state2.switchDoc);
|
|
220680
221070
|
oTStore((state2) => state2.dockerInfo);
|
|
@@ -220698,11 +221088,11 @@ const FileTreeStack = ({
|
|
|
220698
221088
|
switchModel(_fileTreeStackList.slice(-1)[0].model);
|
|
220699
221089
|
}
|
|
220700
221090
|
};
|
|
220701
|
-
return fileTreeStack && fileTreeStack.length > 0 ? /* @__PURE__ */ jsx(
|
|
220702
|
-
|
|
221091
|
+
return fileTreeStack && fileTreeStack.length > 0 ? /* @__PURE__ */ jsx(FileTreeStackLayout, {
|
|
221092
|
+
menuStyle,
|
|
220703
221093
|
id: "menu-list",
|
|
220704
221094
|
ref,
|
|
220705
|
-
className: "
|
|
221095
|
+
className: "flex flex-row stack-list items-center flex-shrink-0 scroll-smooth no-scrollbar overflow-x-scroll bg-codezone-black overflow-auto touch-pan-x",
|
|
220706
221096
|
children: fileTreeStack == null ? void 0 : fileTreeStack.map((f2, index2) => /* @__PURE__ */ jsxs("li", {
|
|
220707
221097
|
className: `
|
|
220708
221098
|
flex
|
|
@@ -227987,12 +228377,25 @@ var index$3 = /* @__PURE__ */ Object.freeze({
|
|
|
227987
228377
|
"default": Console
|
|
227988
228378
|
});
|
|
227989
228379
|
const PROTOCOL = "https://";
|
|
228380
|
+
const BrowserLayout = newStyled.div``;
|
|
227990
228381
|
const NavBar = newStyled.div`
|
|
227991
228382
|
background-color: white;
|
|
227992
228383
|
height: 30px;
|
|
227993
228384
|
display: flex;
|
|
227994
228385
|
align-items: center;
|
|
227995
228386
|
|
|
228387
|
+
.reload {
|
|
228388
|
+
color: ${(props2) => props2.freshIconColor};
|
|
228389
|
+
}
|
|
228390
|
+
|
|
228391
|
+
.file-copy {
|
|
228392
|
+
color: ${(props2) => props2.openIconColor};
|
|
228393
|
+
}
|
|
228394
|
+
|
|
228395
|
+
input {
|
|
228396
|
+
color: ${(props2) => props2.inputColor};
|
|
228397
|
+
}
|
|
228398
|
+
|
|
227996
228399
|
i {
|
|
227997
228400
|
margin: 0 10px;
|
|
227998
228401
|
width: 24px;
|
|
@@ -228038,9 +228441,15 @@ const StopMask = newStyled.div`
|
|
|
228038
228441
|
`;
|
|
228039
228442
|
const OutputBrowser = (_g2) => {
|
|
228040
228443
|
var _h2 = _g2, {
|
|
228041
|
-
showURL = false
|
|
228444
|
+
showURL = false,
|
|
228445
|
+
freshIconColor = "#00bcd4",
|
|
228446
|
+
inputColor = "#adacac",
|
|
228447
|
+
openIconColor = "#adacac"
|
|
228042
228448
|
} = _h2, props2 = __objRest(_h2, [
|
|
228043
|
-
"showURL"
|
|
228449
|
+
"showURL",
|
|
228450
|
+
"freshIconColor",
|
|
228451
|
+
"inputColor",
|
|
228452
|
+
"openIconColor"
|
|
228044
228453
|
]);
|
|
228045
228454
|
var _a2;
|
|
228046
228455
|
const pStatus = oTStore((state2) => state2.playgroundStatus);
|
|
@@ -228094,33 +228503,39 @@ const OutputBrowser = (_g2) => {
|
|
|
228094
228503
|
}
|
|
228095
228504
|
}
|
|
228096
228505
|
}, [playgroundStatus, dockerStatus]);
|
|
228097
|
-
return /* @__PURE__ */
|
|
228506
|
+
return /* @__PURE__ */ jsx(FollowLayout, {
|
|
228098
228507
|
name: "browser",
|
|
228099
|
-
children:
|
|
228100
|
-
|
|
228101
|
-
|
|
228102
|
-
|
|
228103
|
-
|
|
228104
|
-
|
|
228105
|
-
|
|
228106
|
-
|
|
228107
|
-
|
|
228108
|
-
|
|
228109
|
-
|
|
228110
|
-
|
|
228508
|
+
children: /* @__PURE__ */ jsxs(BrowserLayout, {
|
|
228509
|
+
className: "w-full h-full",
|
|
228510
|
+
children: [showURL ? /* @__PURE__ */ jsxs(NavBar, {
|
|
228511
|
+
freshIconColor,
|
|
228512
|
+
inputColor,
|
|
228513
|
+
openIconColor,
|
|
228514
|
+
children: [/* @__PURE__ */ jsx("i", {
|
|
228515
|
+
className: "d42 text-xl reload cursor-pointer",
|
|
228516
|
+
onClick: onRefresh
|
|
228517
|
+
}), /* @__PURE__ */ jsx("input", {
|
|
228518
|
+
type: "text",
|
|
228519
|
+
value: iframeSrc,
|
|
228520
|
+
onChange: (e2) => setIframeSrc(e2.target.value),
|
|
228521
|
+
onKeyDown: onEnterKey
|
|
228522
|
+
}), /* @__PURE__ */ jsx("i", {
|
|
228523
|
+
className: "d42 text-xl file-copy cursor-pointer",
|
|
228524
|
+
onClick: onOpenInNewTab
|
|
228525
|
+
})]
|
|
228526
|
+
}) : null, dockerStatus === "STOP" && /* @__PURE__ */ jsx(StopMask, {
|
|
228527
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
228528
|
+
children: "\u70B9\u51FB\u201C\u8FD0\u884C\u201D\uFF0C\u542F\u52A8\u5E94\u7528"
|
|
228529
|
+
})
|
|
228530
|
+
}), /* @__PURE__ */ jsx("iframe", {
|
|
228531
|
+
ref: iframeRef,
|
|
228532
|
+
src: iframeSrc,
|
|
228533
|
+
style: {
|
|
228534
|
+
width: "100%",
|
|
228535
|
+
height: "calc(100% - 30px)"
|
|
228536
|
+
}
|
|
228111
228537
|
})]
|
|
228112
|
-
})
|
|
228113
|
-
children: /* @__PURE__ */ jsx("span", {
|
|
228114
|
-
children: "\u70B9\u51FB\u201C\u8FD0\u884C\u201D\uFF0C\u542F\u52A8\u5E94\u7528"
|
|
228115
|
-
})
|
|
228116
|
-
}), /* @__PURE__ */ jsx("iframe", {
|
|
228117
|
-
ref: iframeRef,
|
|
228118
|
-
src: iframeSrc,
|
|
228119
|
-
style: {
|
|
228120
|
-
width: "100%",
|
|
228121
|
-
height: "calc(100% - 30px)"
|
|
228122
|
-
}
|
|
228123
|
-
})]
|
|
228538
|
+
})
|
|
228124
228539
|
});
|
|
228125
228540
|
};
|
|
228126
228541
|
var index$2 = /* @__PURE__ */ Object.freeze({
|
|
@@ -228885,9 +229300,9 @@ const HeaderLayout = newStyled.header`
|
|
|
228885
229300
|
`;
|
|
228886
229301
|
const ContainerLayout = newStyled.div`
|
|
228887
229302
|
height: calc(100% - 4.625rem);
|
|
228888
|
-
section {
|
|
229303
|
+
/* section {
|
|
228889
229304
|
height: calc(100% - 0.625rem);
|
|
228890
|
-
}
|
|
229305
|
+
} */
|
|
228891
229306
|
`;
|
|
228892
229307
|
const RunnerLayout = newStyled.section`
|
|
228893
229308
|
background: #202327;
|
|
@@ -228960,7 +229375,6 @@ const Index = (props2) => {
|
|
|
228960
229375
|
count: 10
|
|
228961
229376
|
}),
|
|
228962
229377
|
children: /* @__PURE__ */ jsx(LazyEditorComponent, {
|
|
228963
|
-
className: "editor-custom-style",
|
|
228964
229378
|
serviceWorkerOrigin: props2.serviceWorkerOrigin,
|
|
228965
229379
|
useLsp: true
|
|
228966
229380
|
})
|
|
@@ -228970,7 +229384,8 @@ const Index = (props2) => {
|
|
|
228970
229384
|
children: [/* @__PURE__ */ jsx(PreviewWrapper, {
|
|
228971
229385
|
className: "mb-2.5 relative",
|
|
228972
229386
|
children: /* @__PURE__ */ jsx(OutputBrowser, {
|
|
228973
|
-
url: url2
|
|
229387
|
+
url: url2,
|
|
229388
|
+
showURL: true
|
|
228974
229389
|
})
|
|
228975
229390
|
}), /* @__PURE__ */ jsx(Tabs, {
|
|
228976
229391
|
className: "mb-1",
|