@dao42/d42paas-front 0.5.53 → 0.5.54

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.
@@ -187622,6 +187622,51 @@ function WorkerWrapper() {
187622
187622
  "type": "module"
187623
187623
  });
187624
187624
  }
187625
+ const EditorLayout = newStyled.div`
187626
+ width: 100%;
187627
+ .contentWidgets {
187628
+ visibility: hidden;
187629
+ }
187630
+ .monaco-label {
187631
+ font-size: 12px;
187632
+ border-radius: 2px;
187633
+ padding: 2px 10px;
187634
+ transform: scale(0.8);
187635
+ visibility: hidden;
187636
+ }
187637
+ .label-visible {
187638
+ visibility: visible !important;
187639
+ }
187640
+
187641
+ .stack-list {
187642
+ width: 100%;
187643
+ height: 40px;
187644
+ transform: translate(0, -1px);
187645
+ overflow-x: auto;
187646
+ flex-wrap: nowrap;
187647
+ li {
187648
+ /* width: 100px; */
187649
+ height: 100%;
187650
+ padding: 15px;
187651
+ color: #fff;
187652
+ font-size: 12px;
187653
+ flex: 0 0 auto;
187654
+ }
187655
+
187656
+ .active {
187657
+ background: #1e1e1e;
187658
+ box-shadow: 0px 1px 0px 0 #333;
187659
+ /* border-left: 1px solid rgb(42 96 231);
187660
+ border-right: 1px solid rgb(42 96 231); */
187661
+ /* background: red; */
187662
+ }
187663
+ }
187664
+ `;
187665
+ const ContentLayout = newStyled.div`
187666
+ flex: 1;
187667
+ ${(props2) => props2.userList.map((u2) => "." + u2.role + "{background:" + u2.color + ";width: 2px !important;}")}
187668
+ ${(props2) => props2.userList.map((u2) => "." + u2.role + "-selection{background:" + u2.color + "a6;color: #fff;width: 2px !important;}")}
187669
+ `;
187625
187670
  self.MonacoEnvironment = {
187626
187671
  getWorker(_2, label) {
187627
187672
  if (label === "json") {
@@ -187678,51 +187723,6 @@ const useValue = create$3((set2) => ({
187678
187723
  }))
187679
187724
  }));
187680
187725
  let editor;
187681
- const EditorLayout = newStyled.div`
187682
- width: 100%;
187683
- .contentWidgets {
187684
- visibility: hidden;
187685
- }
187686
- .monaco-label {
187687
- font-size: 12px;
187688
- border-radius: 2px;
187689
- padding: 2px 10px;
187690
- transform: scale(0.8);
187691
- visibility: hidden;
187692
- }
187693
- .label-visible {
187694
- visibility: visible !important;
187695
- }
187696
-
187697
- .stack-list {
187698
- width: 100%;
187699
- height: 40px;
187700
- transform: translate(0, -1px);
187701
- overflow-x: auto;
187702
- flex-wrap: nowrap;
187703
- li {
187704
- /* width: 100px; */
187705
- height: 100%;
187706
- padding: 15px;
187707
- color: #fff;
187708
- font-size: 12px;
187709
- flex: 0 0 auto;
187710
- }
187711
-
187712
- .active {
187713
- background: #1e1e1e;
187714
- box-shadow: 0px 1px 0px 0 #333;
187715
- /* border-left: 1px solid rgb(42 96 231);
187716
- border-right: 1px solid rgb(42 96 231); */
187717
- /* background: red; */
187718
- }
187719
- }
187720
- `;
187721
- const ContentLayout = newStyled.div`
187722
- flex: 1;
187723
- ${(props2) => props2.userList.map((u2) => "." + u2.role + "{background:" + u2.color + ";width: 2px !important;}")}
187724
- ${(props2) => props2.userList.map((u2) => "." + u2.role + "-selection{background:" + u2.color + "a6;color: #fff;width: 2px !important;}")}
187725
- `;
187726
187726
  const Editor = ({
187727
187727
  doc: doc2,
187728
187728
  containerStyle,
@@ -187739,7 +187739,7 @@ const Editor = ({
187739
187739
  const setValue2 = useValue((state) => state.setValue);
187740
187740
  useValue((state) => state.setDelta);
187741
187741
  const [FileTreeStack, setFileTreeStack] = react.exports.useState([]);
187742
- const throttled = lodash$2.exports.throttle((callback) => {
187742
+ const debounced = lodash$2.exports.debounce((callback) => {
187743
187743
  callback();
187744
187744
  }, 300);
187745
187745
  const receiveOperation = (revision, operation, _path) => {
@@ -187793,6 +187793,7 @@ const Editor = ({
187793
187793
  }
187794
187794
  });
187795
187795
  editor.onDidScrollChange((evt) => {
187796
+ var _a2, _b2;
187796
187797
  if (!evt.scrollLeftChanged && !evt.scrollTopChanged)
187797
187798
  return;
187798
187799
  const {
@@ -187809,10 +187810,7 @@ const Editor = ({
187809
187810
  leftPercent
187810
187811
  }
187811
187812
  };
187812
- throttled(() => {
187813
- var _a2, _b2;
187814
- (_b2 = (_a2 = useOT.getState()) == null ? void 0 : _a2.socket) == null ? void 0 : _b2.emit("extraSync", JSON.stringify(crdt));
187815
- });
187813
+ (_b2 = (_a2 = useOT.getState()) == null ? void 0 : _a2.socket) == null ? void 0 : _b2.emit("extraSync", JSON.stringify(crdt));
187816
187814
  });
187817
187815
  editor.createContextKey("save", true);
187818
187816
  editor.addCommand(KeyMod.CtrlCmd | KeyCode.KeyS, () => {
@@ -187829,7 +187827,6 @@ const Editor = ({
187829
187827
  });
187830
187828
  }, "save");
187831
187829
  client2.sendOperation = function(revision, operation) {
187832
- var _a2, _b2;
187833
187830
  if (oTStore.getState().appStatus === "replay")
187834
187831
  return;
187835
187832
  const {
@@ -187851,7 +187848,10 @@ const Editor = ({
187851
187848
  path: doc22 == null ? void 0 : doc22.path
187852
187849
  }
187853
187850
  };
187854
- (_b2 = (_a2 = useOT.getState()) == null ? void 0 : _a2.socket) == null ? void 0 : _b2.emit("editFile", JSON.stringify(crdt));
187851
+ debounced(() => {
187852
+ var _a2, _b2;
187853
+ (_b2 = (_a2 = useOT.getState()) == null ? void 0 : _a2.socket) == null ? void 0 : _b2.emit("editFile", JSON.stringify(crdt));
187854
+ });
187855
187855
  };
187856
187856
  };
187857
187857
  const updateLspOps = ({
@@ -188002,6 +188002,7 @@ const Editor = ({
188002
188002
  window.ot = ot;
188003
188003
  };
188004
188004
  react.exports.useEffect(() => {
188005
+ window.ot = ot;
188005
188006
  editorInit();
188006
188007
  return () => {
188007
188008
  editor.dispose();
@@ -195673,13 +195674,14 @@ const TerminalComponent = (_i) => {
195673
195674
  writeText(terminal, ((_b2 = crdt == null ? void 0 : crdt.doc) == null ? void 0 : _b2.value) || "");
195674
195675
  if (!CRDTInfo.userInfo.uuid)
195675
195676
  return;
195677
+ console.log(CRDTInfo.userInfo.uuid);
195676
195678
  const postUser = userListStore.getState().userList.find(({
195677
195679
  uuid: uuid2
195678
195680
  }) => uuid2 === CRDTInfo.userInfo.uuid);
195679
195681
  if (postUser && !IsMe(CRDTInfo.userInfo)) {
195680
195682
  const helperContainer = (_c2 = terminal == null ? void 0 : terminal._core) == null ? void 0 : _c2._helperContainer;
195681
195683
  const childNode = helperContainer == null ? void 0 : helperContainer.firstChild;
195682
- userLabel.innerText = postUser.name;
195684
+ userLabel.innerText = postUser.username;
195683
195685
  userLabel.style.backgroundColor = postUser.color;
195684
195686
  userLabel.style.top = childNode.style.top;
195685
195687
  userLabel.style.left = childNode.style.left;