@dao42/d42paas-front 0.7.48 → 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`);
@@ -44490,7 +44494,6 @@ const CmdKey = () => {
44490
44494
  const [replayList, setReplayList] = react.exports.useState(null);
44491
44495
  const [hotkeys2, setHotkeys] = react.exports.useState(actions);
44492
44496
  react.exports.useEffect(() => {
44493
- console.log("leva init");
44494
44497
  if (ninjaKeys.current) {
44495
44498
  ninjaKeys.current.data = hotkeys2;
44496
44499
  }
@@ -44851,7 +44854,6 @@ class DaoPaaS {
44851
44854
  mapRender(components) {
44852
44855
  components == null ? void 0 : components.forEach((arg, _index) => {
44853
44856
  const omitObj = lodash$2.exports.omit(__spreadValues({}, arg), ["item", "container"]);
44854
- lodash$2.exports.omit(arg, ["item", "container"]);
44855
44857
  switch (arg.item) {
44856
44858
  case "Page":
44857
44859
  this.Page({
@@ -44933,7 +44935,6 @@ class DaoPaaS {
44933
44935
  props: props2
44934
44936
  }) {
44935
44937
  this.editorDOM = container ? isHTMLElement$1(container) : this.editorDOM;
44936
- console.log(props2, 374);
44937
44938
  reactDom.exports.render(/* @__PURE__ */ jsx(react.exports.Suspense, {
44938
44939
  fallback: /* @__PURE__ */ jsx(Loading, {}),
44939
44940
  children: /* @__PURE__ */ jsx(LazyTreeComponent, __spreadValues({}, props2))
@@ -174564,8 +174565,8 @@ const FileTree = ({
174564
174565
  return /* @__PURE__ */ jsx(FollowLayout, {
174565
174566
  name: "file",
174566
174567
  children: /* @__PURE__ */ jsxs(TreeRootLayout, {
174568
+ className: "tree-root-containe",
174567
174569
  ref: treeRef,
174568
- className: `tree-root-layout`,
174569
174570
  dropBgColor,
174570
174571
  dropTextColor,
174571
174572
  hoverBgColor,
@@ -174949,13 +174950,21 @@ const EditorLayout = newStyled.div`
174949
174950
  }
174950
174951
 
174951
174952
  .margin-view-overlays {
174952
- background-color: ${(props2) => props2.theme.marginViewOverlays};
174953
+ background-color: ${(props2) => props2.theme.marginViewOverlaysColor};
174953
174954
 
174954
174955
  .line-numbers {
174955
- color: ${(props2) => props2.theme.lineNumbers};
174956
-
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;
174957
174965
  &.active-line-number {
174958
- color: ${(props2) => props2.theme.activeLineNumber};
174966
+ /* color: ${(props2) => props2.theme.activeLineNumberColor}; */
174967
+ color: ${(props2) => props2.theme.activeLineNumberColor};
174959
174968
  }
174960
174969
  }
174961
174970
  }
@@ -190158,6 +190167,7 @@ class MonacoAdapter {
190158
190167
  action && action.apply(this, args);
190159
190168
  }
190160
190169
  onChange(evt) {
190170
+ console.log("eol", evt.eol);
190161
190171
  if (!evt.changes)
190162
190172
  return;
190163
190173
  if (!this.ignoreNextChange) {
@@ -190170,7 +190180,7 @@ class MonacoAdapter {
190170
190180
  const {
190171
190181
  operation,
190172
190182
  liveOperationCode
190173
- } = operationFromMonacoChanges(evt, this.liveOperationCode);
190183
+ } = operationFromMonacoChanges(evt, this.liveOperationCode.replace(/\r\n/gim, "\n"));
190174
190184
  this.liveOperationCode = liveOperationCode;
190175
190185
  this.trigger("change", operation);
190176
190186
  } catch (err) {
@@ -220371,214 +220381,351 @@ const Markdown = ({
220371
220381
  })
220372
220382
  }), document.body);
220373
220383
  };
220374
- const Dracula = {
220375
- base: "vs-dark",
220376
- inherit: true,
220377
- rules: [
220378
- {
220379
- background: "282a36",
220380
- token: ""
220381
- },
220382
- {
220383
- foreground: "6272a4",
220384
- token: "comment"
220385
- },
220386
- {
220387
- foreground: "f1fa8c",
220388
- token: "string"
220389
- },
220390
- {
220391
- foreground: "bd93f9",
220392
- token: "constant.numeric"
220393
- },
220394
- {
220395
- foreground: "bd93f9",
220396
- token: "constant.language"
220397
- },
220398
- {
220399
- foreground: "bd93f9",
220400
- token: "constant.character"
220401
- },
220402
- {
220403
- foreground: "bd93f9",
220404
- token: "constant.other"
220405
- },
220406
- {
220407
- foreground: "ffb86c",
220408
- token: "variable.other.readwrite.instance"
220409
- },
220410
- {
220411
- foreground: "ff79c6",
220412
- token: "constant.character.escaped"
220413
- },
220414
- {
220415
- foreground: "ff79c6",
220416
- token: "constant.character.escape"
220417
- },
220418
- {
220419
- foreground: "ff79c6",
220420
- token: "string source"
220421
- },
220422
- {
220423
- foreground: "ff79c6",
220424
- token: "string source.ruby"
220425
- },
220426
- {
220427
- foreground: "ff79c6",
220428
- token: "keyword"
220429
- },
220430
- {
220431
- foreground: "ff79c6",
220432
- token: "storage"
220433
- },
220434
- {
220435
- foreground: "8be9fd",
220436
- fontStyle: "italic",
220437
- token: "storage.type"
220438
- },
220439
- {
220440
- foreground: "50fa7b",
220441
- fontStyle: "underline",
220442
- token: "entity.name.class"
220443
- },
220444
- {
220445
- foreground: "50fa7b",
220446
- fontStyle: "italic underline",
220447
- token: "entity.other.inherited-class"
220448
- },
220449
- {
220450
- foreground: "50fa7b",
220451
- token: "entity.name.function"
220452
- },
220453
- {
220454
- foreground: "ffb86c",
220455
- fontStyle: "italic",
220456
- token: "variable.parameter"
220457
- },
220458
- {
220459
- foreground: "ff79c6",
220460
- token: "entity.name.tag"
220461
- },
220462
- {
220463
- foreground: "50fa7b",
220464
- token: "entity.other.attribute-name"
220465
- },
220466
- {
220467
- foreground: "8be9fd",
220468
- token: "support.function"
220469
- },
220470
- {
220471
- foreground: "6be5fd",
220472
- token: "support.constant"
220473
- },
220474
- {
220475
- foreground: "66d9ef",
220476
- fontStyle: " italic",
220477
- token: "support.type"
220478
- },
220479
- {
220480
- foreground: "66d9ef",
220481
- fontStyle: " italic",
220482
- token: "support.class"
220483
- },
220484
- {
220485
- foreground: "f8f8f0",
220486
- background: "ff79c6",
220487
- token: "invalid"
220488
- },
220489
- {
220490
- foreground: "f8f8f0",
220491
- background: "bd93f9",
220492
- token: "invalid.deprecated"
220493
- },
220494
- {
220495
- foreground: "cfcfc2",
220496
- token: "meta.structure.dictionary.json string.quoted.double.json"
220497
- },
220498
- {
220499
- foreground: "6272a4",
220500
- token: "meta.diff"
220501
- },
220502
- {
220503
- foreground: "6272a4",
220504
- token: "meta.diff.header"
220505
- },
220506
- {
220507
- foreground: "ff79c6",
220508
- token: "markup.deleted"
220509
- },
220510
- {
220511
- foreground: "50fa7b",
220512
- token: "markup.inserted"
220513
- },
220514
- {
220515
- foreground: "e6db74",
220516
- token: "markup.changed"
220517
- },
220518
- {
220519
- foreground: "bd93f9",
220520
- token: "constant.numeric.line-number.find-in-files - match"
220521
- },
220522
- {
220523
- foreground: "e6db74",
220524
- token: "entity.name.filename"
220525
- },
220526
- {
220527
- foreground: "f83333",
220528
- token: "message.error"
220529
- },
220530
- {
220531
- foreground: "eeeeee",
220532
- token: "punctuation.definition.string.begin.json - meta.structure.dictionary.value.json"
220533
- },
220534
- {
220535
- foreground: "eeeeee",
220536
- token: "punctuation.definition.string.end.json - meta.structure.dictionary.value.json"
220537
- },
220538
- {
220539
- foreground: "8be9fd",
220540
- token: "meta.structure.dictionary.json string.quoted.double.json"
220541
- },
220542
- {
220543
- foreground: "f1fa8c",
220544
- token: "meta.structure.dictionary.value.json string.quoted.double.json"
220545
- },
220546
- {
220547
- foreground: "50fa7b",
220548
- token: "meta meta meta meta meta meta meta.structure.dictionary.value string"
220549
- },
220550
- {
220551
- foreground: "ffb86c",
220552
- token: "meta meta meta meta meta meta.structure.dictionary.value string"
220553
- },
220554
- {
220555
- foreground: "ff79c6",
220556
- token: "meta meta meta meta meta.structure.dictionary.value string"
220557
- },
220558
- {
220559
- foreground: "bd93f9",
220560
- token: "meta meta meta meta.structure.dictionary.value string"
220561
- },
220562
- {
220563
- foreground: "50fa7b",
220564
- token: "meta meta meta.structure.dictionary.value string"
220565
- },
220566
- {
220567
- foreground: "ffb86c",
220568
- 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"
220592
+ }
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};
220569
220631
  }
220570
- ],
220571
- colors: {
220572
- "editor.foreground": "#f8f8f2",
220573
- "editor.background": "#282a36",
220574
- "editor.selectionBackground": "#44475a",
220575
- "editor.lineHighlightBackground": "#44475a",
220576
- "editorCursor.foreground": "#f8f8f0",
220577
- "editorWhitespace.foreground": "#3B3A32",
220578
- "editorIndentGuide.activeBackground": "#9D550FB0",
220579
- "editor.selectionHighlightBorder": "#222218"
220580
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"
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;
220581
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
+ }
220582
220729
  const APP_DIR = "/home/runner/app";
220583
220730
  let editor;
220584
220731
  const docServer = new Map();
@@ -220630,7 +220777,7 @@ const Editor = ({
220630
220777
  setCRDTInfo22(__spreadProps(__spreadValues({}, CRDTInfo22), {
220631
220778
  file: {
220632
220779
  action: "Get",
220633
- value: model.getValue(),
220780
+ value: model.getValue(editor$1.EndOfLinePreference.LF),
220634
220781
  path: model.uri.path.replace(APP_DIR, "")
220635
220782
  }
220636
220783
  }));
@@ -220680,17 +220827,17 @@ const Editor = ({
220680
220827
  var _a2;
220681
220828
  const applyDoc = oTStore.getState().doc;
220682
220829
  console.log(clientEditor.liveOperationCode);
220830
+ client.applyClient(operation);
220683
220831
  setTimeout(() => {
220684
- client.applyClient(operation);
220685
220832
  setLocalFile((applyDoc == null ? void 0 : applyDoc.path) ? applyDoc == null ? void 0 : applyDoc.path : "singleFile", {
220686
- value: editor.getValue(),
220833
+ value: editor.getModel().getValue(editor$1.EndOfLinePreference.LF),
220687
220834
  revision: client.revision
220688
220835
  });
220689
220836
  }, 0);
220690
220837
  if ((_a2 = applyDoc == null ? void 0 : applyDoc.path) == null ? void 0 : _a2.includes("md")) {
220691
- setMarkdownVal(editor.getValue());
220838
+ setMarkdownVal(editor.getModel().getValue(editor$1.EndOfLinePreference.LF));
220692
220839
  }
220693
- setKeepVal(editor.getValue());
220840
+ setKeepVal(editor.getModel().getValue(editor$1.EndOfLinePreference.LF));
220694
220841
  };
220695
220842
  const onDidScroll = (evt) => {
220696
220843
  var _a2;
@@ -220868,7 +221015,7 @@ const Editor = ({
220868
221015
  io == null ? void 0 : io.emit("fileTreeOp", JSON.stringify(payload));
220869
221016
  }
220870
221017
  });
220871
- editor$1.defineTheme("myCoolTheme", Dracula);
221018
+ editor$1.defineTheme("myCoolTheme", Dracula(theme));
220872
221019
  editor$1.setTheme("myCoolTheme");
220873
221020
  setClientEditor(new MonacoAdapter(editor, serviceWorkerOrigin));
220874
221021
  setOtherClients(new ClientMeta(editor, userList.filter((x2) => !IsMe(x2))));
@@ -220905,7 +221052,7 @@ const Editor = ({
220905
221052
  setTimeout(() => {
220906
221053
  var _a3, _b3;
220907
221054
  if ((_b3 = (_a3 = _d2 == null ? void 0 : _d2.file) == null ? void 0 : _a3.path) == null ? void 0 : _b3.includes("md")) {
220908
- setMarkdownVal(editor.getValue());
221055
+ setMarkdownVal(editor.getModel().getValue(1));
220909
221056
  }
220910
221057
  }, 100);
220911
221058
  }
@@ -221037,8 +221184,8 @@ const Editor = ({
221037
221184
  }), /* @__PURE__ */ jsxs(EditorLayout, {
221038
221185
  style: containerStyle,
221039
221186
  theme,
221040
- className: `editor-layout flex flex-col`,
221041
- children: [/* @__PURE__ */ jsx(FileTreeStack, {
221187
+ className: `editor-container flex flex-col`,
221188
+ children: [/* @__PURE__ */ jsx(FileListStack, {
221042
221189
  editor,
221043
221190
  menuStyle,
221044
221191
  switchModel,
@@ -221046,145 +221193,12 @@ const Editor = ({
221046
221193
  }), /* @__PURE__ */ jsx(ContentLayout, {
221047
221194
  ref: divEl,
221048
221195
  userList: userListStore.getState().userList,
221049
- className: "editor-content flex-1",
221196
+ className: "editor-container flex-1",
221050
221197
  style: editorStyle
221051
221198
  })]
221052
221199
  })]
221053
221200
  });
221054
221201
  };
221055
- const FileTreeStackLayout = newStyled.ul`
221056
- .active {
221057
- background-color: ${(props2) => props2.menuStyle.backgroundColor};
221058
- box-shadow: 0px 1px 0px 0 #333;
221059
- border-right: 1px solid ${(props2) => props2.menuStyle.backgroundColor};
221060
- }
221061
-
221062
- width: 100%;
221063
- height: 35px;
221064
- transform: translate(0, -1px);
221065
- overflow-x: auto;
221066
- flex-wrap: nowrap;
221067
- li {
221068
- /* width: 100px; */
221069
- height: 100%;
221070
- padding: 5px 25px;
221071
- color: ${(props2) => props2.menuStyle.textColor};
221072
- font-size: 12px;
221073
- flex: 0 0 auto;
221074
- &:hover {
221075
- background: ${(props2) => props2.menuStyle.hoverBgColor};
221076
- color: ${(props2) => props2.menuStyle.hoverTextColor};
221077
- }
221078
- }
221079
-
221080
- .tree-closer {
221081
- right: 4px;
221082
- font-size: 14px;
221083
- opacity: 0;
221084
- line-height: 0;
221085
- transition: opacity 0.2s ease-in-out;
221086
- color: ${(props2) => props2.menuStyle.iconColor};
221087
- &.hover {
221088
- opacity: 1;
221089
- color: ${(props2) => props2.menuStyle.hoverIconColor};
221090
- }
221091
- }
221092
- `;
221093
- const FileTreeStack = ({
221094
- editor: editor2,
221095
- switchModel,
221096
- clearPlayground,
221097
- menuStyle = {
221098
- backgroundColor: "#005391",
221099
- textColor: "#fff",
221100
- hoverBgColor: "rgb(37 45 124 / 80%)",
221101
- hoverTextColor: "#fff",
221102
- iconColor: "#fff",
221103
- hoverIconColor: "#fff"
221104
- }
221105
- }) => {
221106
- const switchDoc2 = oTStore((state2) => state2.switchDoc);
221107
- oTStore((state2) => state2.dockerInfo);
221108
- const docFile = oTStore((state2) => state2.doc);
221109
- const fileTreeStack = editorStore((state2) => state2.fileTreeStack);
221110
- const setFileTreeStack = editorStore((state2) => state2.setFileTreeStack);
221111
- const ref = useHorizontalScroll();
221112
- const closeCurrentFile = (evt, index2) => {
221113
- evt.preventDefault();
221114
- evt.stopPropagation();
221115
- const _fileTreeStackList = [...fileTreeStack];
221116
- _fileTreeStackList.splice(index2, 1);
221117
- setFileTreeStack(_fileTreeStackList);
221118
- if (_fileTreeStackList.length === 0) {
221119
- switchDoc2({
221120
- path: "",
221121
- value: ""
221122
- });
221123
- editor2.getModel().setValue("");
221124
- } else {
221125
- switchModel(_fileTreeStackList.slice(-1)[0].model);
221126
- }
221127
- };
221128
- return fileTreeStack && fileTreeStack.length > 0 ? /* @__PURE__ */ jsx(FileTreeStackLayout, {
221129
- menuStyle,
221130
- id: "menu-list",
221131
- ref,
221132
- 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",
221133
- children: fileTreeStack == null ? void 0 : fileTreeStack.map((f2, index2) => /* @__PURE__ */ jsxs("li", {
221134
- className: `
221135
- flex
221136
- flex-row
221137
- flex-grow-0
221138
- relative
221139
- flex-shrink-0
221140
- justify-center
221141
- items-center
221142
- cursor-pointer
221143
- ${f2.path === (docFile == null ? void 0 : docFile.path) ? "active" : ""}
221144
- `,
221145
- onClick: () => {
221146
- switchModel(f2.model);
221147
- },
221148
- onDoubleClick: (evt) => {
221149
- closeCurrentFile(evt, index2);
221150
- },
221151
- onMouseEnter: (evt) => {
221152
- var _a2, _b2, _c2;
221153
- (_c2 = (_b2 = (_a2 = evt.currentTarget) == null ? void 0 : _a2.lastElementChild) == null ? void 0 : _b2.classList) == null ? void 0 : _c2.add("hover");
221154
- },
221155
- onMouseLeave: (evt) => {
221156
- var _a2, _b2, _c2;
221157
- (_c2 = (_b2 = (_a2 = evt.currentTarget) == null ? void 0 : _a2.lastElementChild) == null ? void 0 : _b2.classList) == null ? void 0 : _c2.remove("hover");
221158
- },
221159
- children: [f2.label.split("/").slice(-1)[0], /* @__PURE__ */ jsx("i", {
221160
- className: "d42 close tree-closer absolute",
221161
- onClick: (evt) => {
221162
- closeCurrentFile(evt, index2);
221163
- }
221164
- })]
221165
- }, f2.path))
221166
- }) : null;
221167
- };
221168
- function useHorizontalScroll() {
221169
- const elRef = react.exports.useRef(null);
221170
- const el = elRef.current;
221171
- const onWheel = (e2) => {
221172
- if (e2.deltaY == 0)
221173
- return;
221174
- e2.preventDefault();
221175
- el == null ? void 0 : el.scrollTo({
221176
- left: el.scrollLeft + e2.deltaY * 10,
221177
- behavior: "smooth"
221178
- });
221179
- };
221180
- react.exports.useEffect(() => {
221181
- if (el) {
221182
- el.addEventListener("wheel", onWheel);
221183
- return () => el.removeEventListener("wheel", onWheel);
221184
- }
221185
- }, [el]);
221186
- return elRef;
221187
- }
221188
221202
  var index$4 = /* @__PURE__ */ Object.freeze({
221189
221203
  __proto__: null,
221190
221204
  [Symbol.toStringTag]: "Module",
@@ -228397,7 +228411,7 @@ const Console = (_e2) => {
228397
228411
  }, [dockerStatus]);
228398
228412
  return /* @__PURE__ */ jsx(FollowLayout, {
228399
228413
  children: /* @__PURE__ */ jsx("div", {
228400
- className: props2.className ? props2.className : "",
228414
+ className: `console-container ${props2.className ? props2.className : ""}`,
228401
228415
  style: {
228402
228416
  height: "100%",
228403
228417
  width: "100%"
@@ -228420,7 +228434,7 @@ const NavBar = newStyled.div`
228420
228434
  height: 30px;
228421
228435
  display: flex;
228422
228436
  align-items: center;
228423
-
228437
+ background-color: ${(props2) => props2.navBgColor};
228424
228438
  .reload {
228425
228439
  color: ${(props2) => props2.freshIconColor};
228426
228440
  }
@@ -228430,7 +228444,9 @@ const NavBar = newStyled.div`
228430
228444
  }
228431
228445
 
228432
228446
  input {
228433
- color: ${(props2) => props2.inputColor};
228447
+ color: ${(props2) => props2.inputTextColor};
228448
+ background-color: ${(props2) => props2.inputBgColor};
228449
+ border: ${(props2) => props2.navBorder};
228434
228450
  }
228435
228451
 
228436
228452
  i {
@@ -228460,7 +228476,6 @@ const NavBar = newStyled.div`
228460
228476
  height: 26px;
228461
228477
  line-height: 26px;
228462
228478
  padding: 0 8px;
228463
- border: 1px solid #adacac;
228464
228479
  border-radius: 5px;
228465
228480
  }
228466
228481
  `;
@@ -228479,14 +228494,22 @@ const StopMask = newStyled.div`
228479
228494
  const OutputBrowser = (_g2) => {
228480
228495
  var _h2 = _g2, {
228481
228496
  showURL = false,
228482
- freshIconColor = "#00bcd4",
228483
- inputColor = "#adacac",
228484
- 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"
228485
228504
  } = _h2, props2 = __objRest(_h2, [
228486
228505
  "showURL",
228506
+ "bgColor",
228487
228507
  "freshIconColor",
228488
- "inputColor",
228489
- "openIconColor"
228508
+ "inputTextColor",
228509
+ "openIconColor",
228510
+ "inputBgColor",
228511
+ "navBgColor",
228512
+ "navBorder"
228490
228513
  ]);
228491
228514
  var _a2;
228492
228515
  const pStatus = oTStore((state2) => state2.playgroundStatus);
@@ -228543,11 +228566,14 @@ const OutputBrowser = (_g2) => {
228543
228566
  return /* @__PURE__ */ jsx(FollowLayout, {
228544
228567
  name: "browser",
228545
228568
  children: /* @__PURE__ */ jsxs(BrowserLayout, {
228546
- className: "w-full h-full",
228569
+ className: "browser-container w-full h-full",
228547
228570
  children: [showURL ? /* @__PURE__ */ jsxs(NavBar, {
228571
+ navBgColor,
228548
228572
  freshIconColor,
228549
- inputColor,
228573
+ inputTextColor,
228574
+ inputBgColor,
228550
228575
  openIconColor,
228576
+ navBorder,
228551
228577
  children: [/* @__PURE__ */ jsx("i", {
228552
228578
  className: "d42 text-xl reload cursor-pointer",
228553
228579
  onClick: onRefresh
@@ -228703,7 +228729,7 @@ const TerminalComponent = (_i) => {
228703
228729
  return /* @__PURE__ */ jsx(FollowLayout, {
228704
228730
  name: "terminal",
228705
228731
  children: /* @__PURE__ */ jsx("div", {
228706
- className: props2.className ? props2.className : "",
228732
+ className: "terminal-container shell-container",
228707
228733
  id: "terminal",
228708
228734
  style: {
228709
228735
  height: "100%",
@@ -229051,7 +229077,7 @@ const Avatar = (_m) => {
229051
229077
  "user"
229052
229078
  ]);
229053
229079
  return /* @__PURE__ */ jsx(AvatarLayout, __spreadValues({
229054
- className: "rounded-full motion-safe:hover:scale-110 h-8 w-8 self-center bg-cover bg-no-repeat bg-center border-2",
229080
+ className: "avatar-container rounded-full motion-safe:hover:scale-110 h-8 w-8 self-center bg-cover bg-no-repeat bg-center border-2",
229055
229081
  user
229056
229082
  }, props2));
229057
229083
  };