@dao42/d42paas-front 0.7.51 → 0.7.55

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.
@@ -15087,14 +15087,29 @@ create$5((set2) => ({
15087
15087
  syncCursor: arg
15088
15088
  }))
15089
15089
  }));
15090
+ const followingUserStore = create$5((set2) => ({
15091
+ followingUsers: [],
15092
+ setFollowingUsers: (arg) => set2(() => ({
15093
+ followingUsers: arg
15094
+ }))
15095
+ }));
15090
15096
  const shadowUserStore = create$5(persist((set2) => ({
15091
15097
  shadowUser: {},
15092
15098
  switchShadowUser: (id2) => set2(() => {
15099
+ const followingUser = userStore.getState().userInfo;
15100
+ const io = useOT.getState().socket;
15093
15101
  let user;
15094
15102
  if (id2 !== void 0) {
15095
15103
  user = userListStore.getState().userList.find((user2) => user2.userId === id2);
15096
15104
  console.log(`\u5DF2\u5207\u6362\u81F3\u3010${user.username}\u3011\u89C6\u89D2`);
15105
+ io == null ? void 0 : io.emit("following", {
15106
+ user,
15107
+ followingUser
15108
+ });
15097
15109
  } else {
15110
+ io == null ? void 0 : io.emit("unFollowing", {
15111
+ followingUser
15112
+ });
15098
15113
  console.log(`\u5DF2\u9000\u51FA\u8DDF\u968F\u89C6\u89D2`);
15099
15114
  }
15100
15115
  return {
@@ -28602,6 +28617,24 @@ const PlaygroundInit = (arg) => {
28602
28617
  })];
28603
28618
  setUserList(userInfoList);
28604
28619
  });
28620
+ io.on("following", (d2) => {
28621
+ const users_server = JSON.parse(d2);
28622
+ const followingUsers = users_server.filter(({
28623
+ user
28624
+ }) => IsMe(user));
28625
+ followingUserStore.getState().setFollowingUsers(followingUsers.map(({
28626
+ followingUser
28627
+ }) => followingUser));
28628
+ });
28629
+ io.on("unFollowing", (d2) => {
28630
+ const {
28631
+ followingUsers,
28632
+ setFollowingUsers
28633
+ } = followingUserStore.getState();
28634
+ const user = JSON.parse(d2);
28635
+ followingUsers.splice(lodash$2.exports.findIndex(followingUsers, (f2) => f2.userId === user.followingUser.userId), 1);
28636
+ setFollowingUsers(followingUsers);
28637
+ });
28605
28638
  io.on("playgroundInfo", (data) => {
28606
28639
  var _a2;
28607
28640
  const {
@@ -44749,9 +44782,11 @@ class DaoPaaS {
44749
44782
  messageAndErrorInjection() {
44750
44783
  dockerState.subscribe((state2) => state2, (pre, next2) => {
44751
44784
  this.trigger(lodash$2.exports.pick(pre, ["dockerStatus"]), lodash$2.exports.pick(next2, ["dockerStatus"]));
44785
+ this.trigger(lodash$2.exports.pick(pre, ["lan"]), lodash$2.exports.pick(next2, ["dockerStatus"]));
44752
44786
  });
44753
44787
  oTStore.subscribe((state2) => state2, (pre, next2) => {
44754
44788
  this.trigger(lodash$2.exports.pick(pre, ["playgroundStatus"]), lodash$2.exports.pick(next2, ["playgroundStatus"]));
44789
+ this.trigger(lodash$2.exports.pick(pre.dockerInfo, ["language"]), lodash$2.exports.pick(next2.dockerInfo, ["language"]));
44755
44790
  });
44756
44791
  ErrorMsgState.subscribe((state2) => state2, (next2, pre) => {
44757
44792
  this.trigger("error", lodash$2.exports.pick(next2, "message"));
@@ -44766,6 +44801,13 @@ class DaoPaaS {
44766
44801
  followingUser: pre.shadowUser
44767
44802
  });
44768
44803
  });
44804
+ followingUserStore.subscribe((next2, pre) => {
44805
+ this.trigger({
44806
+ usersFollowYou: pre.followingUsers
44807
+ }, {
44808
+ usersFollowYou: pre.followingUsers
44809
+ });
44810
+ });
44769
44811
  }
44770
44812
  trigger(_d2, data) {
44771
44813
  if (_d2 === "error") {
@@ -44877,14 +44919,14 @@ class DaoPaaS {
44877
44919
  props: arg.props || omitObj
44878
44920
  });
44879
44921
  break;
44880
- case "Browser":
44881
- this.Browser({
44922
+ case "Shell":
44923
+ this.Shell({
44882
44924
  container: arg.container,
44883
44925
  props: arg.props || omitObj
44884
44926
  });
44885
44927
  break;
44886
- case "Shell":
44887
- this.Shell({
44928
+ case "Browser":
44929
+ this.Browser({
44888
44930
  container: arg.container,
44889
44931
  props: arg.props || omitObj
44890
44932
  });
@@ -174946,13 +174988,21 @@ const EditorLayout = newStyled.div`
174946
174988
  }
174947
174989
 
174948
174990
  .margin-view-overlays {
174949
- background-color: ${(props2) => props2.theme.marginViewOverlays};
174991
+ background-color: ${(props2) => props2.theme.marginViewOverlaysColor};
174950
174992
 
174951
174993
  .line-numbers {
174952
- color: ${(props2) => props2.theme.lineNumbers};
174953
-
174994
+ color: ${(props2) => props2.theme.lineNumbersColor};
174995
+ width: ${(props2) => {
174996
+ var _a2;
174997
+ return (_a2 = props2.theme.lineNumbersWidth) != null ? _a2 : "18px";
174998
+ }} !important;
174999
+ left: ${(props2) => {
175000
+ var _a2;
175001
+ return (_a2 = props2.theme.lineNumbersLeft) != null ? _a2 : "36px";
175002
+ }} !important;
174954
175003
  &.active-line-number {
174955
- color: ${(props2) => props2.theme.activeLineNumber};
175004
+ /* color: ${(props2) => props2.theme.activeLineNumberColor}; */
175005
+ color: ${(props2) => props2.theme.activeLineNumberColor};
174956
175006
  }
174957
175007
  }
174958
175008
  }
@@ -220369,214 +220419,351 @@ const Markdown = ({
220369
220419
  })
220370
220420
  }), document.body);
220371
220421
  };
220372
- const Dracula = {
220373
- base: "vs-dark",
220374
- inherit: true,
220375
- rules: [
220376
- {
220377
- background: "282a36",
220378
- token: ""
220379
- },
220380
- {
220381
- foreground: "6272a4",
220382
- token: "comment"
220383
- },
220384
- {
220385
- foreground: "f1fa8c",
220386
- token: "string"
220387
- },
220388
- {
220389
- foreground: "bd93f9",
220390
- token: "constant.numeric"
220391
- },
220392
- {
220393
- foreground: "bd93f9",
220394
- token: "constant.language"
220395
- },
220396
- {
220397
- foreground: "bd93f9",
220398
- token: "constant.character"
220399
- },
220400
- {
220401
- foreground: "bd93f9",
220402
- token: "constant.other"
220403
- },
220404
- {
220405
- foreground: "ffb86c",
220406
- token: "variable.other.readwrite.instance"
220407
- },
220408
- {
220409
- foreground: "ff79c6",
220410
- token: "constant.character.escaped"
220411
- },
220412
- {
220413
- foreground: "ff79c6",
220414
- token: "constant.character.escape"
220415
- },
220416
- {
220417
- foreground: "ff79c6",
220418
- token: "string source"
220419
- },
220420
- {
220421
- foreground: "ff79c6",
220422
- token: "string source.ruby"
220423
- },
220424
- {
220425
- foreground: "ff79c6",
220426
- token: "keyword"
220427
- },
220428
- {
220429
- foreground: "ff79c6",
220430
- token: "storage"
220431
- },
220432
- {
220433
- foreground: "8be9fd",
220434
- fontStyle: "italic",
220435
- token: "storage.type"
220436
- },
220437
- {
220438
- foreground: "50fa7b",
220439
- fontStyle: "underline",
220440
- token: "entity.name.class"
220441
- },
220442
- {
220443
- foreground: "50fa7b",
220444
- fontStyle: "italic underline",
220445
- token: "entity.other.inherited-class"
220446
- },
220447
- {
220448
- foreground: "50fa7b",
220449
- token: "entity.name.function"
220450
- },
220451
- {
220452
- foreground: "ffb86c",
220453
- fontStyle: "italic",
220454
- token: "variable.parameter"
220455
- },
220456
- {
220457
- foreground: "ff79c6",
220458
- token: "entity.name.tag"
220459
- },
220460
- {
220461
- foreground: "50fa7b",
220462
- token: "entity.other.attribute-name"
220463
- },
220464
- {
220465
- foreground: "8be9fd",
220466
- token: "support.function"
220467
- },
220468
- {
220469
- foreground: "6be5fd",
220470
- token: "support.constant"
220471
- },
220472
- {
220473
- foreground: "66d9ef",
220474
- fontStyle: " italic",
220475
- token: "support.type"
220476
- },
220477
- {
220478
- foreground: "66d9ef",
220479
- fontStyle: " italic",
220480
- token: "support.class"
220481
- },
220482
- {
220483
- foreground: "f8f8f0",
220484
- background: "ff79c6",
220485
- token: "invalid"
220486
- },
220487
- {
220488
- foreground: "f8f8f0",
220489
- background: "bd93f9",
220490
- token: "invalid.deprecated"
220491
- },
220492
- {
220493
- foreground: "cfcfc2",
220494
- token: "meta.structure.dictionary.json string.quoted.double.json"
220495
- },
220496
- {
220497
- foreground: "6272a4",
220498
- token: "meta.diff"
220499
- },
220500
- {
220501
- foreground: "6272a4",
220502
- token: "meta.diff.header"
220503
- },
220504
- {
220505
- foreground: "ff79c6",
220506
- token: "markup.deleted"
220507
- },
220508
- {
220509
- foreground: "50fa7b",
220510
- token: "markup.inserted"
220511
- },
220512
- {
220513
- foreground: "e6db74",
220514
- token: "markup.changed"
220515
- },
220516
- {
220517
- foreground: "bd93f9",
220518
- token: "constant.numeric.line-number.find-in-files - match"
220519
- },
220520
- {
220521
- foreground: "e6db74",
220522
- token: "entity.name.filename"
220523
- },
220524
- {
220525
- foreground: "f83333",
220526
- token: "message.error"
220527
- },
220528
- {
220529
- foreground: "eeeeee",
220530
- token: "punctuation.definition.string.begin.json - meta.structure.dictionary.value.json"
220531
- },
220532
- {
220533
- foreground: "eeeeee",
220534
- token: "punctuation.definition.string.end.json - meta.structure.dictionary.value.json"
220535
- },
220536
- {
220537
- foreground: "8be9fd",
220538
- token: "meta.structure.dictionary.json string.quoted.double.json"
220539
- },
220540
- {
220541
- foreground: "f1fa8c",
220542
- token: "meta.structure.dictionary.value.json string.quoted.double.json"
220543
- },
220544
- {
220545
- foreground: "50fa7b",
220546
- token: "meta meta meta meta meta meta meta.structure.dictionary.value string"
220547
- },
220548
- {
220549
- foreground: "ffb86c",
220550
- token: "meta meta meta meta meta meta.structure.dictionary.value string"
220551
- },
220552
- {
220553
- foreground: "ff79c6",
220554
- token: "meta meta meta meta meta.structure.dictionary.value string"
220555
- },
220556
- {
220557
- foreground: "bd93f9",
220558
- token: "meta meta meta meta.structure.dictionary.value string"
220559
- },
220560
- {
220561
- foreground: "50fa7b",
220562
- token: "meta meta meta.structure.dictionary.value string"
220563
- },
220564
- {
220565
- foreground: "ffb86c",
220566
- token: "meta meta.structure.dictionary.value string"
220422
+ const Dracula = (theme) => {
220423
+ var _a2, _b2, _c2, _d2, _e2, _f2;
220424
+ return {
220425
+ base: "vs-dark",
220426
+ inherit: true,
220427
+ rules: [
220428
+ {
220429
+ background: "282a36",
220430
+ token: ""
220431
+ },
220432
+ {
220433
+ foreground: "6272a4",
220434
+ token: "comment"
220435
+ },
220436
+ {
220437
+ foreground: "f1fa8c",
220438
+ token: "string"
220439
+ },
220440
+ {
220441
+ foreground: "bd93f9",
220442
+ token: "constant.numeric"
220443
+ },
220444
+ {
220445
+ foreground: "bd93f9",
220446
+ token: "constant.language"
220447
+ },
220448
+ {
220449
+ foreground: "bd93f9",
220450
+ token: "constant.character"
220451
+ },
220452
+ {
220453
+ foreground: "bd93f9",
220454
+ token: "constant.other"
220455
+ },
220456
+ {
220457
+ foreground: "ffb86c",
220458
+ token: "variable.other.readwrite.instance"
220459
+ },
220460
+ {
220461
+ foreground: "ff79c6",
220462
+ token: "constant.character.escaped"
220463
+ },
220464
+ {
220465
+ foreground: "ff79c6",
220466
+ token: "constant.character.escape"
220467
+ },
220468
+ {
220469
+ foreground: "ff79c6",
220470
+ token: "string source"
220471
+ },
220472
+ {
220473
+ foreground: "ff79c6",
220474
+ token: "string source.ruby"
220475
+ },
220476
+ {
220477
+ foreground: "ff79c6",
220478
+ token: "keyword"
220479
+ },
220480
+ {
220481
+ foreground: "ff79c6",
220482
+ token: "storage"
220483
+ },
220484
+ {
220485
+ foreground: "8be9fd",
220486
+ fontStyle: "italic",
220487
+ token: "storage.type"
220488
+ },
220489
+ {
220490
+ foreground: "50fa7b",
220491
+ fontStyle: "underline",
220492
+ token: "entity.name.class"
220493
+ },
220494
+ {
220495
+ foreground: "50fa7b",
220496
+ fontStyle: "italic underline",
220497
+ token: "entity.other.inherited-class"
220498
+ },
220499
+ {
220500
+ foreground: "50fa7b",
220501
+ token: "entity.name.function"
220502
+ },
220503
+ {
220504
+ foreground: "ffb86c",
220505
+ fontStyle: "italic",
220506
+ token: "variable.parameter"
220507
+ },
220508
+ {
220509
+ foreground: "ff79c6",
220510
+ token: "entity.name.tag"
220511
+ },
220512
+ {
220513
+ foreground: "50fa7b",
220514
+ token: "entity.other.attribute-name"
220515
+ },
220516
+ {
220517
+ foreground: "8be9fd",
220518
+ token: "support.function"
220519
+ },
220520
+ {
220521
+ foreground: "6be5fd",
220522
+ token: "support.constant"
220523
+ },
220524
+ {
220525
+ foreground: "66d9ef",
220526
+ fontStyle: " italic",
220527
+ token: "support.type"
220528
+ },
220529
+ {
220530
+ foreground: "66d9ef",
220531
+ fontStyle: " italic",
220532
+ token: "support.class"
220533
+ },
220534
+ {
220535
+ foreground: "f8f8f0",
220536
+ background: "ff79c6",
220537
+ token: "invalid"
220538
+ },
220539
+ {
220540
+ foreground: "f8f8f0",
220541
+ background: "bd93f9",
220542
+ token: "invalid.deprecated"
220543
+ },
220544
+ {
220545
+ foreground: "cfcfc2",
220546
+ token: "meta.structure.dictionary.json string.quoted.double.json"
220547
+ },
220548
+ {
220549
+ foreground: "6272a4",
220550
+ token: "meta.diff"
220551
+ },
220552
+ {
220553
+ foreground: "6272a4",
220554
+ token: "meta.diff.header"
220555
+ },
220556
+ {
220557
+ foreground: "ff79c6",
220558
+ token: "markup.deleted"
220559
+ },
220560
+ {
220561
+ foreground: "50fa7b",
220562
+ token: "markup.inserted"
220563
+ },
220564
+ {
220565
+ foreground: "e6db74",
220566
+ token: "markup.changed"
220567
+ },
220568
+ {
220569
+ foreground: "bd93f9",
220570
+ token: "constant.numeric.line-number.find-in-files - match"
220571
+ },
220572
+ {
220573
+ foreground: "e6db74",
220574
+ token: "entity.name.filename"
220575
+ },
220576
+ {
220577
+ foreground: "f83333",
220578
+ token: "message.error"
220579
+ },
220580
+ {
220581
+ foreground: "eeeeee",
220582
+ token: "punctuation.definition.string.begin.json - meta.structure.dictionary.value.json"
220583
+ },
220584
+ {
220585
+ foreground: "eeeeee",
220586
+ token: "punctuation.definition.string.end.json - meta.structure.dictionary.value.json"
220587
+ },
220588
+ {
220589
+ foreground: "8be9fd",
220590
+ token: "meta.structure.dictionary.json string.quoted.double.json"
220591
+ },
220592
+ {
220593
+ foreground: "f1fa8c",
220594
+ token: "meta.structure.dictionary.value.json string.quoted.double.json"
220595
+ },
220596
+ {
220597
+ foreground: "50fa7b",
220598
+ token: "meta meta meta meta meta meta meta.structure.dictionary.value string"
220599
+ },
220600
+ {
220601
+ foreground: "ffb86c",
220602
+ token: "meta meta meta meta meta meta.structure.dictionary.value string"
220603
+ },
220604
+ {
220605
+ foreground: "ff79c6",
220606
+ token: "meta meta meta meta meta.structure.dictionary.value string"
220607
+ },
220608
+ {
220609
+ foreground: "bd93f9",
220610
+ token: "meta meta meta meta.structure.dictionary.value string"
220611
+ },
220612
+ {
220613
+ foreground: "50fa7b",
220614
+ token: "meta meta meta.structure.dictionary.value string"
220615
+ },
220616
+ {
220617
+ foreground: "ffb86c",
220618
+ token: "meta meta.structure.dictionary.value string"
220619
+ }
220620
+ ],
220621
+ colors: {
220622
+ "editor.foreground": (_b2 = (_a2 = theme == null ? void 0 : theme.editor) == null ? void 0 : _a2.foreground) != null ? _b2 : "#f8f8f0",
220623
+ "editor.background": (_d2 = (_c2 = theme == null ? void 0 : theme.editor) == null ? void 0 : _c2.background) != null ? _d2 : "#15171c",
220624
+ "editor.lineHighlightBackground": (_f2 = (_e2 = theme == null ? void 0 : theme.editor) == null ? void 0 : _e2.lineHighlightBackground) != null ? _f2 : "#15171c",
220625
+ "editor.selectionBackground": "#44475a",
220626
+ "editorCursor.foreground": "#f8f8f0",
220627
+ "editorWhitespace.foreground": "#3B3A32",
220628
+ "editorIndentGuide.activeBackground": "#9D550FB0",
220629
+ "editor.selectionHighlightBorder": "#222218"
220567
220630
  }
220568
- ],
220569
- colors: {
220570
- "editor.foreground": "#f8f8f2",
220571
- "editor.background": "#282a36",
220572
- "editor.selectionBackground": "#44475a",
220573
- "editor.lineHighlightBackground": "#44475a",
220574
- "editorCursor.foreground": "#f8f8f0",
220575
- "editorWhitespace.foreground": "#3B3A32",
220576
- "editorIndentGuide.activeBackground": "#9D550FB0",
220577
- "editor.selectionHighlightBorder": "#222218"
220631
+ };
220632
+ };
220633
+ const FileTreeStackLayout = newStyled.ul`
220634
+ .active {
220635
+ background-color: ${(props2) => props2.menuStyle.backgroundColor};
220636
+ box-shadow: 0px 1px 0px 0 #333;
220637
+ border-right: 1px solid ${(props2) => props2.menuStyle.backgroundColor};
220638
+ }
220639
+
220640
+ width: 100%;
220641
+ height: ${(props2) => props2.menuStyle.height};
220642
+ transform: translate(0, -1px);
220643
+ overflow-x: auto;
220644
+ flex-wrap: nowrap;
220645
+
220646
+ li {
220647
+ /* width: 100px; */
220648
+ height: 100%;
220649
+ padding: 5px 25px;
220650
+ color: ${(props2) => props2.menuStyle.textColor};
220651
+ font-size: 12px;
220652
+ flex: 0 0 auto;
220653
+ &:hover {
220654
+ background: ${(props2) => props2.menuStyle.hoverBgColor};
220655
+ color: ${(props2) => props2.menuStyle.hoverTextColor};
220656
+ }
220657
+ }
220658
+
220659
+ .tree-closer {
220660
+ right: 4px;
220661
+ font-size: 14px;
220662
+ opacity: 0;
220663
+ line-height: 0;
220664
+ transition: opacity 0.2s ease-in-out;
220665
+ color: ${(props2) => props2.menuStyle.iconColor};
220666
+ &.hover {
220667
+ opacity: 1;
220668
+ color: ${(props2) => props2.menuStyle.hoverIconColor};
220669
+ }
220670
+ }
220671
+ `;
220672
+ const FileListStack = ({
220673
+ editor: editor2,
220674
+ switchModel,
220675
+ menuStyle = {
220676
+ backgroundColor: "#005391",
220677
+ textColor: "#fff",
220678
+ hoverBgColor: "rgb(37 45 124 / 80%)",
220679
+ hoverTextColor: "#fff",
220680
+ iconColor: "#fff",
220681
+ hoverIconColor: "#fff",
220682
+ height: "35px"
220578
220683
  }
220684
+ }) => {
220685
+ const switchDoc2 = oTStore((state2) => state2.switchDoc);
220686
+ oTStore((state2) => state2.dockerInfo);
220687
+ const docFile = oTStore((state2) => state2.doc);
220688
+ const fileTreeStack = editorStore((state2) => state2.fileTreeStack);
220689
+ const setFileTreeStack = editorStore((state2) => state2.setFileTreeStack);
220690
+ const ref = useHorizontalScroll();
220691
+ const closeCurrentFile = (evt, index2) => {
220692
+ evt.preventDefault();
220693
+ evt.stopPropagation();
220694
+ const _fileTreeStackList = [...fileTreeStack];
220695
+ _fileTreeStackList.splice(index2, 1);
220696
+ setFileTreeStack(_fileTreeStackList);
220697
+ if (_fileTreeStackList.length === 0) {
220698
+ switchDoc2({
220699
+ path: "",
220700
+ value: ""
220701
+ });
220702
+ editor2.getModel().setValue("");
220703
+ } else {
220704
+ switchModel(_fileTreeStackList.slice(-1)[0].model);
220705
+ }
220706
+ };
220707
+ return fileTreeStack && fileTreeStack.length > 0 ? /* @__PURE__ */ jsx(FileTreeStackLayout, {
220708
+ menuStyle,
220709
+ id: "menu-list",
220710
+ ref,
220711
+ className: "flex flex-row file-list-container items-center flex-shrink-0 scroll-smooth no-scrollbar overflow-x-scroll bg-codezone-black overflow-auto touch-pan-x",
220712
+ children: fileTreeStack == null ? void 0 : fileTreeStack.map((f2, index2) => /* @__PURE__ */ jsxs("li", {
220713
+ className: `
220714
+ flex
220715
+ flex-row
220716
+ flex-grow-0
220717
+ relative
220718
+ flex-shrink-0
220719
+ justify-center
220720
+ items-center
220721
+ cursor-pointer
220722
+ ${f2.path === (docFile == null ? void 0 : docFile.path) ? "active" : ""}
220723
+ `,
220724
+ onClick: () => {
220725
+ switchModel(f2.model);
220726
+ },
220727
+ onDoubleClick: (evt) => {
220728
+ closeCurrentFile(evt, index2);
220729
+ },
220730
+ onMouseEnter: (evt) => {
220731
+ var _a2, _b2, _c2;
220732
+ (_c2 = (_b2 = (_a2 = evt.currentTarget) == null ? void 0 : _a2.lastElementChild) == null ? void 0 : _b2.classList) == null ? void 0 : _c2.add("hover");
220733
+ },
220734
+ onMouseLeave: (evt) => {
220735
+ var _a2, _b2, _c2;
220736
+ (_c2 = (_b2 = (_a2 = evt.currentTarget) == null ? void 0 : _a2.lastElementChild) == null ? void 0 : _b2.classList) == null ? void 0 : _c2.remove("hover");
220737
+ },
220738
+ children: [f2.label.split("/").slice(-1)[0], /* @__PURE__ */ jsx("i", {
220739
+ className: "d42 close tree-closer absolute",
220740
+ onClick: (evt) => {
220741
+ closeCurrentFile(evt, index2);
220742
+ }
220743
+ })]
220744
+ }, f2.path))
220745
+ }) : null;
220579
220746
  };
220747
+ function useHorizontalScroll() {
220748
+ const elRef = react.exports.useRef(null);
220749
+ const el = elRef.current;
220750
+ const onWheel = (e2) => {
220751
+ if (e2.deltaY == 0)
220752
+ return;
220753
+ e2.preventDefault();
220754
+ el == null ? void 0 : el.scrollTo({
220755
+ left: el.scrollLeft + e2.deltaY * 10,
220756
+ behavior: "smooth"
220757
+ });
220758
+ };
220759
+ react.exports.useEffect(() => {
220760
+ if (el) {
220761
+ el.addEventListener("wheel", onWheel);
220762
+ return () => el.removeEventListener("wheel", onWheel);
220763
+ }
220764
+ }, [el]);
220765
+ return elRef;
220766
+ }
220580
220767
  const APP_DIR = "/home/runner/app";
220581
220768
  let editor;
220582
220769
  const docServer = new Map();
@@ -220866,7 +221053,7 @@ const Editor = ({
220866
221053
  io == null ? void 0 : io.emit("fileTreeOp", JSON.stringify(payload));
220867
221054
  }
220868
221055
  });
220869
- editor$1.defineTheme("myCoolTheme", Dracula);
221056
+ editor$1.defineTheme("myCoolTheme", Dracula(theme));
220870
221057
  editor$1.setTheme("myCoolTheme");
220871
221058
  setClientEditor(new MonacoAdapter(editor, serviceWorkerOrigin));
220872
221059
  setOtherClients(new ClientMeta(editor, userList.filter((x2) => !IsMe(x2))));
@@ -221036,7 +221223,7 @@ const Editor = ({
221036
221223
  style: containerStyle,
221037
221224
  theme,
221038
221225
  className: `editor-container flex flex-col`,
221039
- children: [/* @__PURE__ */ jsx(FileTreeStack, {
221226
+ children: [/* @__PURE__ */ jsx(FileListStack, {
221040
221227
  editor,
221041
221228
  menuStyle,
221042
221229
  switchModel,
@@ -221050,139 +221237,6 @@ const Editor = ({
221050
221237
  })]
221051
221238
  });
221052
221239
  };
221053
- const FileTreeStackLayout = newStyled.ul`
221054
- .active {
221055
- background-color: ${(props2) => props2.menuStyle.backgroundColor};
221056
- box-shadow: 0px 1px 0px 0 #333;
221057
- border-right: 1px solid ${(props2) => props2.menuStyle.backgroundColor};
221058
- }
221059
-
221060
- width: 100%;
221061
- height: 35px;
221062
- transform: translate(0, -1px);
221063
- overflow-x: auto;
221064
- flex-wrap: nowrap;
221065
- li {
221066
- /* width: 100px; */
221067
- height: 100%;
221068
- padding: 5px 25px;
221069
- color: ${(props2) => props2.menuStyle.textColor};
221070
- font-size: 12px;
221071
- flex: 0 0 auto;
221072
- &:hover {
221073
- background: ${(props2) => props2.menuStyle.hoverBgColor};
221074
- color: ${(props2) => props2.menuStyle.hoverTextColor};
221075
- }
221076
- }
221077
-
221078
- .tree-closer {
221079
- right: 4px;
221080
- font-size: 14px;
221081
- opacity: 0;
221082
- line-height: 0;
221083
- transition: opacity 0.2s ease-in-out;
221084
- color: ${(props2) => props2.menuStyle.iconColor};
221085
- &.hover {
221086
- opacity: 1;
221087
- color: ${(props2) => props2.menuStyle.hoverIconColor};
221088
- }
221089
- }
221090
- `;
221091
- const FileTreeStack = ({
221092
- editor: editor2,
221093
- switchModel,
221094
- clearPlayground,
221095
- menuStyle = {
221096
- backgroundColor: "#005391",
221097
- textColor: "#fff",
221098
- hoverBgColor: "rgb(37 45 124 / 80%)",
221099
- hoverTextColor: "#fff",
221100
- iconColor: "#fff",
221101
- hoverIconColor: "#fff"
221102
- }
221103
- }) => {
221104
- const switchDoc2 = oTStore((state2) => state2.switchDoc);
221105
- oTStore((state2) => state2.dockerInfo);
221106
- const docFile = oTStore((state2) => state2.doc);
221107
- const fileTreeStack = editorStore((state2) => state2.fileTreeStack);
221108
- const setFileTreeStack = editorStore((state2) => state2.setFileTreeStack);
221109
- const ref = useHorizontalScroll();
221110
- const closeCurrentFile = (evt, index2) => {
221111
- evt.preventDefault();
221112
- evt.stopPropagation();
221113
- const _fileTreeStackList = [...fileTreeStack];
221114
- _fileTreeStackList.splice(index2, 1);
221115
- setFileTreeStack(_fileTreeStackList);
221116
- if (_fileTreeStackList.length === 0) {
221117
- switchDoc2({
221118
- path: "",
221119
- value: ""
221120
- });
221121
- editor2.getModel().setValue("");
221122
- } else {
221123
- switchModel(_fileTreeStackList.slice(-1)[0].model);
221124
- }
221125
- };
221126
- return fileTreeStack && fileTreeStack.length > 0 ? /* @__PURE__ */ jsx(FileTreeStackLayout, {
221127
- menuStyle,
221128
- id: "menu-list",
221129
- ref,
221130
- className: "flex flex-row file-list-container items-center flex-shrink-0 scroll-smooth no-scrollbar overflow-x-scroll bg-codezone-black overflow-auto touch-pan-x",
221131
- children: fileTreeStack == null ? void 0 : fileTreeStack.map((f2, index2) => /* @__PURE__ */ jsxs("li", {
221132
- className: `
221133
- flex
221134
- flex-row
221135
- flex-grow-0
221136
- relative
221137
- flex-shrink-0
221138
- justify-center
221139
- items-center
221140
- cursor-pointer
221141
- ${f2.path === (docFile == null ? void 0 : docFile.path) ? "active" : ""}
221142
- `,
221143
- onClick: () => {
221144
- switchModel(f2.model);
221145
- },
221146
- onDoubleClick: (evt) => {
221147
- closeCurrentFile(evt, index2);
221148
- },
221149
- onMouseEnter: (evt) => {
221150
- var _a2, _b2, _c2;
221151
- (_c2 = (_b2 = (_a2 = evt.currentTarget) == null ? void 0 : _a2.lastElementChild) == null ? void 0 : _b2.classList) == null ? void 0 : _c2.add("hover");
221152
- },
221153
- onMouseLeave: (evt) => {
221154
- var _a2, _b2, _c2;
221155
- (_c2 = (_b2 = (_a2 = evt.currentTarget) == null ? void 0 : _a2.lastElementChild) == null ? void 0 : _b2.classList) == null ? void 0 : _c2.remove("hover");
221156
- },
221157
- children: [f2.label.split("/").slice(-1)[0], /* @__PURE__ */ jsx("i", {
221158
- className: "d42 close tree-closer absolute",
221159
- onClick: (evt) => {
221160
- closeCurrentFile(evt, index2);
221161
- }
221162
- })]
221163
- }, f2.path))
221164
- }) : null;
221165
- };
221166
- function useHorizontalScroll() {
221167
- const elRef = react.exports.useRef(null);
221168
- const el = elRef.current;
221169
- const onWheel = (e2) => {
221170
- if (e2.deltaY == 0)
221171
- return;
221172
- e2.preventDefault();
221173
- el == null ? void 0 : el.scrollTo({
221174
- left: el.scrollLeft + e2.deltaY * 10,
221175
- behavior: "smooth"
221176
- });
221177
- };
221178
- react.exports.useEffect(() => {
221179
- if (el) {
221180
- el.addEventListener("wheel", onWheel);
221181
- return () => el.removeEventListener("wheel", onWheel);
221182
- }
221183
- }, [el]);
221184
- return elRef;
221185
- }
221186
221240
  var index$4 = /* @__PURE__ */ Object.freeze({
221187
221241
  __proto__: null,
221188
221242
  [Symbol.toStringTag]: "Module",
@@ -228418,7 +228472,7 @@ const NavBar = newStyled.div`
228418
228472
  height: 30px;
228419
228473
  display: flex;
228420
228474
  align-items: center;
228421
-
228475
+ background-color: ${(props2) => props2.navBgColor};
228422
228476
  .reload {
228423
228477
  color: ${(props2) => props2.freshIconColor};
228424
228478
  }
@@ -228428,7 +228482,9 @@ const NavBar = newStyled.div`
228428
228482
  }
228429
228483
 
228430
228484
  input {
228431
- color: ${(props2) => props2.inputColor};
228485
+ color: ${(props2) => props2.inputTextColor};
228486
+ background-color: ${(props2) => props2.inputBgColor};
228487
+ border: ${(props2) => props2.navBorder};
228432
228488
  }
228433
228489
 
228434
228490
  i {
@@ -228458,7 +228514,6 @@ const NavBar = newStyled.div`
228458
228514
  height: 26px;
228459
228515
  line-height: 26px;
228460
228516
  padding: 0 8px;
228461
- border: 1px solid #adacac;
228462
228517
  border-radius: 5px;
228463
228518
  }
228464
228519
  `;
@@ -228477,14 +228532,22 @@ const StopMask = newStyled.div`
228477
228532
  const OutputBrowser = (_g2) => {
228478
228533
  var _h2 = _g2, {
228479
228534
  showURL = false,
228480
- freshIconColor = "#00bcd4",
228481
- inputColor = "#adacac",
228482
- openIconColor = "#adacac"
228535
+ bgColor = "#f2f2f2",
228536
+ freshIconColor = "#0487D9",
228537
+ inputTextColor = "#0487D9",
228538
+ openIconColor = "#0487D9",
228539
+ inputBgColor = "#000",
228540
+ navBgColor = "#000",
228541
+ navBorder = "0 solid transparent"
228483
228542
  } = _h2, props2 = __objRest(_h2, [
228484
228543
  "showURL",
228544
+ "bgColor",
228485
228545
  "freshIconColor",
228486
- "inputColor",
228487
- "openIconColor"
228546
+ "inputTextColor",
228547
+ "openIconColor",
228548
+ "inputBgColor",
228549
+ "navBgColor",
228550
+ "navBorder"
228488
228551
  ]);
228489
228552
  var _a2;
228490
228553
  const pStatus = oTStore((state2) => state2.playgroundStatus);
@@ -228541,11 +228604,14 @@ const OutputBrowser = (_g2) => {
228541
228604
  return /* @__PURE__ */ jsx(FollowLayout, {
228542
228605
  name: "browser",
228543
228606
  children: /* @__PURE__ */ jsxs(BrowserLayout, {
228544
- className: "w-full h-full",
228607
+ className: "browser-container w-full h-full",
228545
228608
  children: [showURL ? /* @__PURE__ */ jsxs(NavBar, {
228609
+ navBgColor,
228546
228610
  freshIconColor,
228547
- inputColor,
228611
+ inputTextColor,
228612
+ inputBgColor,
228548
228613
  openIconColor,
228614
+ navBorder,
228549
228615
  children: [/* @__PURE__ */ jsx("i", {
228550
228616
  className: "d42 text-xl reload cursor-pointer",
228551
228617
  onClick: onRefresh