@dao42/d42paas-front 0.7.9 → 0.7.13

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.
@@ -44090,9 +44090,9 @@ const CmdKey = () => {
44090
44090
  (_b2 = (_a2 = useOT.getState()) == null ? void 0 : _a2.socket) == null ? void 0 : _b2.emit("active");
44091
44091
  }
44092
44092
  }, {
44093
- id: "active",
44093
+ id: "containerStop",
44094
44094
  title: "\u505C\u6B62\u5BB9\u5668",
44095
- hotkey: "a",
44095
+ hotkey: "cs",
44096
44096
  mdIcon: "input",
44097
44097
  handler: () => {
44098
44098
  var _a2, _b2;
@@ -189842,7 +189842,7 @@ class EditorData {
189842
189842
  language: language2,
189843
189843
  APP_DIR: APP_DIR2
189844
189844
  }, callback, cover = false) {
189845
- let gotModel = editor$1.getModels().find((x2) => new RegExp(path).test(x2.uri.path));
189845
+ let gotModel = editor$1.getModels().find((x2) => x2.uri.path.includes(path));
189846
189846
  if (!gotModel && !!cover) {
189847
189847
  gotModel = editor$1.createModel(value, language2, Uri.parse(`file://${APP_DIR2}${path}`));
189848
189848
  this.setFileTreeStack([
@@ -190154,8 +190154,8 @@ const Editor = ({
190154
190154
  editor.setModel(gotModel);
190155
190155
  clientEditor == null ? void 0 : clientEditor.updateModel();
190156
190156
  setFileTreeStack(EditorData.fileTreeStack);
190157
- clientEditor.onFocus();
190158
- clientEditor.onCursorActivity();
190157
+ clientEditor == null ? void 0 : clientEditor.onFocus();
190158
+ clientEditor == null ? void 0 : clientEditor.onCursorActivity();
190159
190159
  otherClients == null ? void 0 : otherClients.setCursors();
190160
190160
  if (file2) {
190161
190161
  docServer.set(file2.path, {
@@ -197795,41 +197795,32 @@ const TerminalComponent = (_h2) => {
197795
197795
  return;
197796
197796
  }
197797
197797
  writeText(terminal, ((_c2 = crdt == null ? void 0 : crdt.doc) == null ? void 0 : _c2.value) || "");
197798
- if (!CRDTInfo22.userInfo.uuid)
197799
- return;
197800
- const postUser = userListStore.getState().userList.find(({
197801
- uuid: uuid2
197802
- }) => uuid2 === CRDTInfo22.userInfo.uuid);
197803
- if (postUser && !IsMe(CRDTInfo22.userInfo)) {
197804
- const helperContainer = (_d2 = terminal == null ? void 0 : terminal._core) == null ? void 0 : _d2._helperContainer;
197805
- const childNode = helperContainer == null ? void 0 : helperContainer.firstChild;
197806
- userLabel.innerText = postUser.username;
197807
- userLabel.style.backgroundColor = postUser.color;
197808
- userLabel.style.top = childNode.style.top;
197809
- userLabel.style.left = childNode.style.left;
197810
- helperContainer == null ? void 0 : helperContainer.appendChild(userLabel);
197798
+ const helperContainer = (_d2 = terminal == null ? void 0 : terminal._core) == null ? void 0 : _d2._helperContainer;
197799
+ const childNode = helperContainer == null ? void 0 : helperContainer.firstChild;
197800
+ userLabel.style.top = childNode.style.top;
197801
+ userLabel.style.left = childNode.style.left;
197802
+ helperContainer == null ? void 0 : helperContainer.appendChild(userLabel);
197803
+ const timer = setTimeout(() => {
197804
+ helperContainer == null ? void 0 : helperContainer.removeChild(userLabel);
197811
197805
  terminal.setOption("theme", __spreadProps(__spreadValues({}, terminal.getOption("theme")), {
197812
- cursor: postUser.color
197806
+ cursor: "#ffffff"
197813
197807
  }));
197814
- const timer = setTimeout(() => {
197808
+ }, 6e3);
197809
+ return () => {
197810
+ try {
197815
197811
  helperContainer == null ? void 0 : helperContainer.removeChild(userLabel);
197816
- terminal.setOption("theme", __spreadProps(__spreadValues({}, terminal.getOption("theme")), {
197817
- cursor: "#ffffff"
197818
- }));
197819
- }, 6e3);
197820
- return () => {
197821
- try {
197822
- helperContainer == null ? void 0 : helperContainer.removeChild(userLabel);
197823
- } catch (_2) {
197824
- }
197825
- terminal.setOption("theme", __spreadProps(__spreadValues({}, terminal.getOption("theme")), {
197826
- cursor: "#ffffff"
197827
- }));
197828
- clearTimeout(timer);
197829
- };
197830
- }
197812
+ } catch (_2) {
197813
+ }
197814
+ terminal.setOption("theme", __spreadProps(__spreadValues({}, terminal.getOption("theme")), {
197815
+ cursor: "#ffffff"
197816
+ }));
197817
+ clearTimeout(timer);
197818
+ };
197831
197819
  }
197832
197820
  });
197821
+ return () => {
197822
+ socket2 == null ? void 0 : socket2.off("terminal");
197823
+ };
197833
197824
  }, [socket2]);
197834
197825
  return /* @__PURE__ */ jsx(FollowLayout, {
197835
197826
  name: "terminal",