@dao42/d42paas-front 0.7.51 → 0.7.52

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.
@@ -15090,9 +15090,13 @@ create$5((set2) => ({
15090
15090
  const shadowUserStore = create$5(persist((set2) => ({
15091
15091
  shadowUser: {},
15092
15092
  switchShadowUser: (id2) => set2(() => {
15093
+ var _a2;
15093
15094
  let user;
15094
15095
  if (id2 !== void 0) {
15095
15096
  user = userListStore.getState().userList.find((user2) => user2.userId === id2);
15097
+ (_a2 = useOT.getState().socket) == null ? void 0 : _a2.emit("following", {
15098
+ user
15099
+ });
15096
15100
  console.log(`\u5DF2\u5207\u6362\u81F3\u3010${user.username}\u3011\u89C6\u89D2`);
15097
15101
  } else {
15098
15102
  console.log(`\u5DF2\u9000\u51FA\u8DDF\u968F\u89C6\u89D2`);
@@ -174946,13 +174950,21 @@ const EditorLayout = newStyled.div`
174946
174950
  }
174947
174951
 
174948
174952
  .margin-view-overlays {
174949
- background-color: ${(props2) => props2.theme.marginViewOverlays};
174953
+ background-color: ${(props2) => props2.theme.marginViewOverlaysColor};
174950
174954
 
174951
174955
  .line-numbers {
174952
- color: ${(props2) => props2.theme.lineNumbers};
174953
-
174956
+ color: ${(props2) => props2.theme.lineNumbersColor};
174957
+ width: ${(props2) => {
174958
+ var _a2;
174959
+ return (_a2 = props2.theme.lineNumbersWidth) != null ? _a2 : "18px";
174960
+ }} !important;
174961
+ left: ${(props2) => {
174962
+ var _a2;
174963
+ return (_a2 = props2.theme.lineNumbersLeft) != null ? _a2 : "36px";
174964
+ }} !important;
174954
174965
  &.active-line-number {
174955
- color: ${(props2) => props2.theme.activeLineNumber};
174966
+ /* color: ${(props2) => props2.theme.activeLineNumberColor}; */
174967
+ color: ${(props2) => props2.theme.activeLineNumberColor};
174956
174968
  }
174957
174969
  }
174958
174970
  }
@@ -220369,214 +220381,351 @@ const Markdown = ({
220369
220381
  })
220370
220382
  }), document.body);
220371
220383
  };
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"
220384
+ const Dracula = (theme) => {
220385
+ var _a2, _b2, _c2, _d2, _e2, _f2;
220386
+ return {
220387
+ base: "vs-dark",
220388
+ inherit: true,
220389
+ rules: [
220390
+ {
220391
+ background: "282a36",
220392
+ token: ""
220393
+ },
220394
+ {
220395
+ foreground: "6272a4",
220396
+ token: "comment"
220397
+ },
220398
+ {
220399
+ foreground: "f1fa8c",
220400
+ token: "string"
220401
+ },
220402
+ {
220403
+ foreground: "bd93f9",
220404
+ token: "constant.numeric"
220405
+ },
220406
+ {
220407
+ foreground: "bd93f9",
220408
+ token: "constant.language"
220409
+ },
220410
+ {
220411
+ foreground: "bd93f9",
220412
+ token: "constant.character"
220413
+ },
220414
+ {
220415
+ foreground: "bd93f9",
220416
+ token: "constant.other"
220417
+ },
220418
+ {
220419
+ foreground: "ffb86c",
220420
+ token: "variable.other.readwrite.instance"
220421
+ },
220422
+ {
220423
+ foreground: "ff79c6",
220424
+ token: "constant.character.escaped"
220425
+ },
220426
+ {
220427
+ foreground: "ff79c6",
220428
+ token: "constant.character.escape"
220429
+ },
220430
+ {
220431
+ foreground: "ff79c6",
220432
+ token: "string source"
220433
+ },
220434
+ {
220435
+ foreground: "ff79c6",
220436
+ token: "string source.ruby"
220437
+ },
220438
+ {
220439
+ foreground: "ff79c6",
220440
+ token: "keyword"
220441
+ },
220442
+ {
220443
+ foreground: "ff79c6",
220444
+ token: "storage"
220445
+ },
220446
+ {
220447
+ foreground: "8be9fd",
220448
+ fontStyle: "italic",
220449
+ token: "storage.type"
220450
+ },
220451
+ {
220452
+ foreground: "50fa7b",
220453
+ fontStyle: "underline",
220454
+ token: "entity.name.class"
220455
+ },
220456
+ {
220457
+ foreground: "50fa7b",
220458
+ fontStyle: "italic underline",
220459
+ token: "entity.other.inherited-class"
220460
+ },
220461
+ {
220462
+ foreground: "50fa7b",
220463
+ token: "entity.name.function"
220464
+ },
220465
+ {
220466
+ foreground: "ffb86c",
220467
+ fontStyle: "italic",
220468
+ token: "variable.parameter"
220469
+ },
220470
+ {
220471
+ foreground: "ff79c6",
220472
+ token: "entity.name.tag"
220473
+ },
220474
+ {
220475
+ foreground: "50fa7b",
220476
+ token: "entity.other.attribute-name"
220477
+ },
220478
+ {
220479
+ foreground: "8be9fd",
220480
+ token: "support.function"
220481
+ },
220482
+ {
220483
+ foreground: "6be5fd",
220484
+ token: "support.constant"
220485
+ },
220486
+ {
220487
+ foreground: "66d9ef",
220488
+ fontStyle: " italic",
220489
+ token: "support.type"
220490
+ },
220491
+ {
220492
+ foreground: "66d9ef",
220493
+ fontStyle: " italic",
220494
+ token: "support.class"
220495
+ },
220496
+ {
220497
+ foreground: "f8f8f0",
220498
+ background: "ff79c6",
220499
+ token: "invalid"
220500
+ },
220501
+ {
220502
+ foreground: "f8f8f0",
220503
+ background: "bd93f9",
220504
+ token: "invalid.deprecated"
220505
+ },
220506
+ {
220507
+ foreground: "cfcfc2",
220508
+ token: "meta.structure.dictionary.json string.quoted.double.json"
220509
+ },
220510
+ {
220511
+ foreground: "6272a4",
220512
+ token: "meta.diff"
220513
+ },
220514
+ {
220515
+ foreground: "6272a4",
220516
+ token: "meta.diff.header"
220517
+ },
220518
+ {
220519
+ foreground: "ff79c6",
220520
+ token: "markup.deleted"
220521
+ },
220522
+ {
220523
+ foreground: "50fa7b",
220524
+ token: "markup.inserted"
220525
+ },
220526
+ {
220527
+ foreground: "e6db74",
220528
+ token: "markup.changed"
220529
+ },
220530
+ {
220531
+ foreground: "bd93f9",
220532
+ token: "constant.numeric.line-number.find-in-files - match"
220533
+ },
220534
+ {
220535
+ foreground: "e6db74",
220536
+ token: "entity.name.filename"
220537
+ },
220538
+ {
220539
+ foreground: "f83333",
220540
+ token: "message.error"
220541
+ },
220542
+ {
220543
+ foreground: "eeeeee",
220544
+ token: "punctuation.definition.string.begin.json - meta.structure.dictionary.value.json"
220545
+ },
220546
+ {
220547
+ foreground: "eeeeee",
220548
+ token: "punctuation.definition.string.end.json - meta.structure.dictionary.value.json"
220549
+ },
220550
+ {
220551
+ foreground: "8be9fd",
220552
+ token: "meta.structure.dictionary.json string.quoted.double.json"
220553
+ },
220554
+ {
220555
+ foreground: "f1fa8c",
220556
+ token: "meta.structure.dictionary.value.json string.quoted.double.json"
220557
+ },
220558
+ {
220559
+ foreground: "50fa7b",
220560
+ token: "meta meta meta meta meta meta meta.structure.dictionary.value string"
220561
+ },
220562
+ {
220563
+ foreground: "ffb86c",
220564
+ token: "meta meta meta meta meta meta.structure.dictionary.value string"
220565
+ },
220566
+ {
220567
+ foreground: "ff79c6",
220568
+ token: "meta meta meta meta meta.structure.dictionary.value string"
220569
+ },
220570
+ {
220571
+ foreground: "bd93f9",
220572
+ token: "meta meta meta meta.structure.dictionary.value string"
220573
+ },
220574
+ {
220575
+ foreground: "50fa7b",
220576
+ token: "meta meta meta.structure.dictionary.value string"
220577
+ },
220578
+ {
220579
+ foreground: "ffb86c",
220580
+ token: "meta meta.structure.dictionary.value string"
220581
+ }
220582
+ ],
220583
+ colors: {
220584
+ "editor.foreground": (_b2 = (_a2 = theme == null ? void 0 : theme.editor) == null ? void 0 : _a2.foreground) != null ? _b2 : "#f8f8f0",
220585
+ "editor.background": (_d2 = (_c2 = theme == null ? void 0 : theme.editor) == null ? void 0 : _c2.background) != null ? _d2 : "#15171c",
220586
+ "editor.lineHighlightBackground": (_f2 = (_e2 = theme == null ? void 0 : theme.editor) == null ? void 0 : _e2.lineHighlightBackground) != null ? _f2 : "#15171c",
220587
+ "editor.selectionBackground": "#44475a",
220588
+ "editorCursor.foreground": "#f8f8f0",
220589
+ "editorWhitespace.foreground": "#3B3A32",
220590
+ "editorIndentGuide.activeBackground": "#9D550FB0",
220591
+ "editor.selectionHighlightBorder": "#222218"
220567
220592
  }
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"
220593
+ };
220594
+ };
220595
+ const FileTreeStackLayout = newStyled.ul`
220596
+ .active {
220597
+ background-color: ${(props2) => props2.menuStyle.backgroundColor};
220598
+ box-shadow: 0px 1px 0px 0 #333;
220599
+ border-right: 1px solid ${(props2) => props2.menuStyle.backgroundColor};
220600
+ }
220601
+
220602
+ width: 100%;
220603
+ height: ${(props2) => props2.menuStyle.height};
220604
+ transform: translate(0, -1px);
220605
+ overflow-x: auto;
220606
+ flex-wrap: nowrap;
220607
+
220608
+ li {
220609
+ /* width: 100px; */
220610
+ height: 100%;
220611
+ padding: 5px 25px;
220612
+ color: ${(props2) => props2.menuStyle.textColor};
220613
+ font-size: 12px;
220614
+ flex: 0 0 auto;
220615
+ &:hover {
220616
+ background: ${(props2) => props2.menuStyle.hoverBgColor};
220617
+ color: ${(props2) => props2.menuStyle.hoverTextColor};
220618
+ }
220619
+ }
220620
+
220621
+ .tree-closer {
220622
+ right: 4px;
220623
+ font-size: 14px;
220624
+ opacity: 0;
220625
+ line-height: 0;
220626
+ transition: opacity 0.2s ease-in-out;
220627
+ color: ${(props2) => props2.menuStyle.iconColor};
220628
+ &.hover {
220629
+ opacity: 1;
220630
+ color: ${(props2) => props2.menuStyle.hoverIconColor};
220631
+ }
220632
+ }
220633
+ `;
220634
+ const FileListStack = ({
220635
+ editor: editor2,
220636
+ switchModel,
220637
+ menuStyle = {
220638
+ backgroundColor: "#005391",
220639
+ textColor: "#fff",
220640
+ hoverBgColor: "rgb(37 45 124 / 80%)",
220641
+ hoverTextColor: "#fff",
220642
+ iconColor: "#fff",
220643
+ hoverIconColor: "#fff",
220644
+ height: "35px"
220578
220645
  }
220646
+ }) => {
220647
+ const switchDoc2 = oTStore((state2) => state2.switchDoc);
220648
+ oTStore((state2) => state2.dockerInfo);
220649
+ const docFile = oTStore((state2) => state2.doc);
220650
+ const fileTreeStack = editorStore((state2) => state2.fileTreeStack);
220651
+ const setFileTreeStack = editorStore((state2) => state2.setFileTreeStack);
220652
+ const ref = useHorizontalScroll();
220653
+ const closeCurrentFile = (evt, index2) => {
220654
+ evt.preventDefault();
220655
+ evt.stopPropagation();
220656
+ const _fileTreeStackList = [...fileTreeStack];
220657
+ _fileTreeStackList.splice(index2, 1);
220658
+ setFileTreeStack(_fileTreeStackList);
220659
+ if (_fileTreeStackList.length === 0) {
220660
+ switchDoc2({
220661
+ path: "",
220662
+ value: ""
220663
+ });
220664
+ editor2.getModel().setValue("");
220665
+ } else {
220666
+ switchModel(_fileTreeStackList.slice(-1)[0].model);
220667
+ }
220668
+ };
220669
+ return fileTreeStack && fileTreeStack.length > 0 ? /* @__PURE__ */ jsx(FileTreeStackLayout, {
220670
+ menuStyle,
220671
+ id: "menu-list",
220672
+ ref,
220673
+ 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",
220674
+ children: fileTreeStack == null ? void 0 : fileTreeStack.map((f2, index2) => /* @__PURE__ */ jsxs("li", {
220675
+ className: `
220676
+ flex
220677
+ flex-row
220678
+ flex-grow-0
220679
+ relative
220680
+ flex-shrink-0
220681
+ justify-center
220682
+ items-center
220683
+ cursor-pointer
220684
+ ${f2.path === (docFile == null ? void 0 : docFile.path) ? "active" : ""}
220685
+ `,
220686
+ onClick: () => {
220687
+ switchModel(f2.model);
220688
+ },
220689
+ onDoubleClick: (evt) => {
220690
+ closeCurrentFile(evt, index2);
220691
+ },
220692
+ onMouseEnter: (evt) => {
220693
+ var _a2, _b2, _c2;
220694
+ (_c2 = (_b2 = (_a2 = evt.currentTarget) == null ? void 0 : _a2.lastElementChild) == null ? void 0 : _b2.classList) == null ? void 0 : _c2.add("hover");
220695
+ },
220696
+ onMouseLeave: (evt) => {
220697
+ var _a2, _b2, _c2;
220698
+ (_c2 = (_b2 = (_a2 = evt.currentTarget) == null ? void 0 : _a2.lastElementChild) == null ? void 0 : _b2.classList) == null ? void 0 : _c2.remove("hover");
220699
+ },
220700
+ children: [f2.label.split("/").slice(-1)[0], /* @__PURE__ */ jsx("i", {
220701
+ className: "d42 close tree-closer absolute",
220702
+ onClick: (evt) => {
220703
+ closeCurrentFile(evt, index2);
220704
+ }
220705
+ })]
220706
+ }, f2.path))
220707
+ }) : null;
220579
220708
  };
220709
+ function useHorizontalScroll() {
220710
+ const elRef = react.exports.useRef(null);
220711
+ const el = elRef.current;
220712
+ const onWheel = (e2) => {
220713
+ if (e2.deltaY == 0)
220714
+ return;
220715
+ e2.preventDefault();
220716
+ el == null ? void 0 : el.scrollTo({
220717
+ left: el.scrollLeft + e2.deltaY * 10,
220718
+ behavior: "smooth"
220719
+ });
220720
+ };
220721
+ react.exports.useEffect(() => {
220722
+ if (el) {
220723
+ el.addEventListener("wheel", onWheel);
220724
+ return () => el.removeEventListener("wheel", onWheel);
220725
+ }
220726
+ }, [el]);
220727
+ return elRef;
220728
+ }
220580
220729
  const APP_DIR = "/home/runner/app";
220581
220730
  let editor;
220582
220731
  const docServer = new Map();
@@ -220866,7 +221015,7 @@ const Editor = ({
220866
221015
  io == null ? void 0 : io.emit("fileTreeOp", JSON.stringify(payload));
220867
221016
  }
220868
221017
  });
220869
- editor$1.defineTheme("myCoolTheme", Dracula);
221018
+ editor$1.defineTheme("myCoolTheme", Dracula(theme));
220870
221019
  editor$1.setTheme("myCoolTheme");
220871
221020
  setClientEditor(new MonacoAdapter(editor, serviceWorkerOrigin));
220872
221021
  setOtherClients(new ClientMeta(editor, userList.filter((x2) => !IsMe(x2))));
@@ -221036,7 +221185,7 @@ const Editor = ({
221036
221185
  style: containerStyle,
221037
221186
  theme,
221038
221187
  className: `editor-container flex flex-col`,
221039
- children: [/* @__PURE__ */ jsx(FileTreeStack, {
221188
+ children: [/* @__PURE__ */ jsx(FileListStack, {
221040
221189
  editor,
221041
221190
  menuStyle,
221042
221191
  switchModel,
@@ -221050,139 +221199,6 @@ const Editor = ({
221050
221199
  })]
221051
221200
  });
221052
221201
  };
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
221202
  var index$4 = /* @__PURE__ */ Object.freeze({
221187
221203
  __proto__: null,
221188
221204
  [Symbol.toStringTag]: "Module",
@@ -228418,7 +228434,7 @@ const NavBar = newStyled.div`
228418
228434
  height: 30px;
228419
228435
  display: flex;
228420
228436
  align-items: center;
228421
-
228437
+ background-color: ${(props2) => props2.navBgColor};
228422
228438
  .reload {
228423
228439
  color: ${(props2) => props2.freshIconColor};
228424
228440
  }
@@ -228428,7 +228444,9 @@ const NavBar = newStyled.div`
228428
228444
  }
228429
228445
 
228430
228446
  input {
228431
- color: ${(props2) => props2.inputColor};
228447
+ color: ${(props2) => props2.inputTextColor};
228448
+ background-color: ${(props2) => props2.inputBgColor};
228449
+ border: ${(props2) => props2.navBorder};
228432
228450
  }
228433
228451
 
228434
228452
  i {
@@ -228458,7 +228476,6 @@ const NavBar = newStyled.div`
228458
228476
  height: 26px;
228459
228477
  line-height: 26px;
228460
228478
  padding: 0 8px;
228461
- border: 1px solid #adacac;
228462
228479
  border-radius: 5px;
228463
228480
  }
228464
228481
  `;
@@ -228477,14 +228494,22 @@ const StopMask = newStyled.div`
228477
228494
  const OutputBrowser = (_g2) => {
228478
228495
  var _h2 = _g2, {
228479
228496
  showURL = false,
228480
- freshIconColor = "#00bcd4",
228481
- inputColor = "#adacac",
228482
- openIconColor = "#adacac"
228497
+ bgColor = "#f2f2f2",
228498
+ freshIconColor = "#0487D9",
228499
+ inputTextColor = "#0487D9",
228500
+ openIconColor = "#0487D9",
228501
+ inputBgColor = "#000",
228502
+ navBgColor = "#000",
228503
+ navBorder = "0 solid transparent"
228483
228504
  } = _h2, props2 = __objRest(_h2, [
228484
228505
  "showURL",
228506
+ "bgColor",
228485
228507
  "freshIconColor",
228486
- "inputColor",
228487
- "openIconColor"
228508
+ "inputTextColor",
228509
+ "openIconColor",
228510
+ "inputBgColor",
228511
+ "navBgColor",
228512
+ "navBorder"
228488
228513
  ]);
228489
228514
  var _a2;
228490
228515
  const pStatus = oTStore((state2) => state2.playgroundStatus);
@@ -228541,11 +228566,14 @@ const OutputBrowser = (_g2) => {
228541
228566
  return /* @__PURE__ */ jsx(FollowLayout, {
228542
228567
  name: "browser",
228543
228568
  children: /* @__PURE__ */ jsxs(BrowserLayout, {
228544
- className: "w-full h-full",
228569
+ className: "browser-container w-full h-full",
228545
228570
  children: [showURL ? /* @__PURE__ */ jsxs(NavBar, {
228571
+ navBgColor,
228546
228572
  freshIconColor,
228547
- inputColor,
228573
+ inputTextColor,
228574
+ inputBgColor,
228548
228575
  openIconColor,
228576
+ navBorder,
228549
228577
  children: [/* @__PURE__ */ jsx("i", {
228550
228578
  className: "d42 text-xl reload cursor-pointer",
228551
228579
  onClick: onRefresh