@dao42/d42paas-front 0.6.23 → 0.7.2
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.
- package/dist/DaoPaaS.es.js +53 -48
- package/dist/DaoPaaS.umd.js +310 -307
- package/package.json +20 -11
package/dist/DaoPaaS.es.js
CHANGED
|
@@ -44094,7 +44094,8 @@ const CmdKey = () => {
|
|
|
44094
44094
|
hotkey: "a",
|
|
44095
44095
|
mdIcon: "input",
|
|
44096
44096
|
handler: () => {
|
|
44097
|
-
|
|
44097
|
+
var _a2, _b2;
|
|
44098
|
+
(_b2 = (_a2 = useOT.getState()) == null ? void 0 : _a2.socket) == null ? void 0 : _b2.emit("active");
|
|
44098
44099
|
}
|
|
44099
44100
|
}, {
|
|
44100
44101
|
id: "clearCache",
|
|
@@ -44153,7 +44154,6 @@ const CmdKey = () => {
|
|
|
44153
44154
|
}];
|
|
44154
44155
|
const [drawerOpen, setDrawerOpen] = react.exports.useState(false);
|
|
44155
44156
|
const [replayList, setReplayList] = react.exports.useState(null);
|
|
44156
|
-
const io = useOT.getState().socket;
|
|
44157
44157
|
const [hotkeys2, setHotkeys] = react.exports.useState(actions);
|
|
44158
44158
|
react.exports.useEffect(() => {
|
|
44159
44159
|
console.log("leva init");
|
|
@@ -44240,7 +44240,7 @@ const GuiComponent = () => {
|
|
|
44240
44240
|
const LazyTreeComponent = lazy$2(async () => (await Promise.resolve().then(function() {
|
|
44241
44241
|
return index$5;
|
|
44242
44242
|
})).FileTree);
|
|
44243
|
-
const LazyEditorComponent = lazy$2(async () => (await Promise.resolve().then(function() {
|
|
44243
|
+
const LazyEditorComponent$1 = lazy$2(async () => (await Promise.resolve().then(function() {
|
|
44244
44244
|
return index$4;
|
|
44245
44245
|
})).Editor);
|
|
44246
44246
|
const LazyConsoleComponent = lazy$2(async () => (await Promise.resolve().then(function() {
|
|
@@ -44521,7 +44521,7 @@ class DaoPaaS {
|
|
|
44521
44521
|
this.editorDOM = container ? isHTMLElement$1(container) : this.editorDOM;
|
|
44522
44522
|
reactDom.exports.render(/* @__PURE__ */ jsx(react.exports.Suspense, {
|
|
44523
44523
|
fallback: /* @__PURE__ */ jsx(Loading, {}),
|
|
44524
|
-
children: /* @__PURE__ */ jsx(LazyEditorComponent, __spreadProps(__spreadValues({}, props2), {
|
|
44524
|
+
children: /* @__PURE__ */ jsx(LazyEditorComponent$1, __spreadProps(__spreadValues({}, props2), {
|
|
44525
44525
|
serviceWorkerOrigin: this.serviceWorkerOrigin
|
|
44526
44526
|
}))
|
|
44527
44527
|
}), this.editorDOM);
|
|
@@ -174319,6 +174319,9 @@ const EditorLayout = newStyled.div`
|
|
|
174319
174319
|
padding: 2px 10px;
|
|
174320
174320
|
transform: scale(0.8);
|
|
174321
174321
|
word-break: keep-all;
|
|
174322
|
+
font-weight: bolder;
|
|
174323
|
+
font-size: 14px;
|
|
174324
|
+
color: #666;
|
|
174322
174325
|
}
|
|
174323
174326
|
|
|
174324
174327
|
.stack-list {
|
|
@@ -189557,6 +189560,8 @@ class MonacoAdapter {
|
|
|
189557
189560
|
} catch (err) {
|
|
189558
189561
|
console.log(err);
|
|
189559
189562
|
}
|
|
189563
|
+
} else {
|
|
189564
|
+
this.trigger("cursorActivity", evt);
|
|
189560
189565
|
}
|
|
189561
189566
|
}
|
|
189562
189567
|
this.ignoreNextChange = false;
|
|
@@ -190044,48 +190049,46 @@ const Editor = ({
|
|
|
190044
190049
|
path: model.uri.path.replace(APP_DIR, "")
|
|
190045
190050
|
});
|
|
190046
190051
|
};
|
|
190047
|
-
|
|
190048
|
-
|
|
190049
|
-
|
|
190050
|
-
|
|
190051
|
-
|
|
190052
|
-
|
|
190053
|
-
|
|
190054
|
-
|
|
190055
|
-
|
|
190056
|
-
|
|
190057
|
-
|
|
190058
|
-
|
|
190059
|
-
|
|
190060
|
-
|
|
190061
|
-
|
|
190062
|
-
|
|
190063
|
-
|
|
190064
|
-
|
|
190065
|
-
|
|
190066
|
-
|
|
190052
|
+
client.sendOperation = (revision, operation) => {
|
|
190053
|
+
if (oTStore.getState().appStatus === "replay")
|
|
190054
|
+
return;
|
|
190055
|
+
const {
|
|
190056
|
+
userInfo: userInfo2
|
|
190057
|
+
} = userStore.getState();
|
|
190058
|
+
const {
|
|
190059
|
+
doc: doc22,
|
|
190060
|
+
switchDoc: switchDoc22
|
|
190061
|
+
} = oTStore.getState();
|
|
190062
|
+
let path;
|
|
190063
|
+
if (doc22 == null ? void 0 : doc22.path) {
|
|
190064
|
+
path = doc22.path;
|
|
190065
|
+
} else {
|
|
190066
|
+
path = `temp-${temps.length + 1}`;
|
|
190067
|
+
switchDoc22({
|
|
190068
|
+
path: `temp-${temps.length + 1}`
|
|
190069
|
+
});
|
|
190070
|
+
temps.push(path);
|
|
190071
|
+
}
|
|
190072
|
+
const crdt = {
|
|
190073
|
+
timestamp: Date.now(),
|
|
190074
|
+
userInfo: lodash$2.exports.pick(userInfo2, ["role", "uuid"]),
|
|
190075
|
+
cursor: __spreadProps(__spreadValues({}, clientEditor.getCursor()), {
|
|
190076
|
+
path
|
|
190077
|
+
}),
|
|
190078
|
+
editor: {
|
|
190079
|
+
operation,
|
|
190080
|
+
revision,
|
|
190081
|
+
evtType: "Editor"
|
|
190082
|
+
},
|
|
190083
|
+
file: {
|
|
190084
|
+
action: "Update",
|
|
190085
|
+
path
|
|
190067
190086
|
}
|
|
190068
|
-
const crdt = {
|
|
190069
|
-
timestamp: Date.now(),
|
|
190070
|
-
userInfo: lodash$2.exports.pick(userInfo2, ["role", "uuid"]),
|
|
190071
|
-
cursor: __spreadProps(__spreadValues({}, clientEditor.getCursor()), {
|
|
190072
|
-
path
|
|
190073
|
-
}),
|
|
190074
|
-
editor: {
|
|
190075
|
-
operation,
|
|
190076
|
-
revision,
|
|
190077
|
-
evtType: "Editor"
|
|
190078
|
-
},
|
|
190079
|
-
file: {
|
|
190080
|
-
action: "Update",
|
|
190081
|
-
path
|
|
190082
|
-
}
|
|
190083
|
-
};
|
|
190084
|
-
io.emit("editFile", JSON.stringify(crdt));
|
|
190085
|
-
};
|
|
190086
|
-
client.applyOperation = (operation) => {
|
|
190087
|
-
clientEditor.applyOperation(operation);
|
|
190088
190087
|
};
|
|
190088
|
+
io == null ? void 0 : io.emit("editFile", JSON.stringify(crdt));
|
|
190089
|
+
};
|
|
190090
|
+
client.applyOperation = (operation) => {
|
|
190091
|
+
clientEditor.applyOperation(operation);
|
|
190089
190092
|
};
|
|
190090
190093
|
const onChange = (operation) => {
|
|
190091
190094
|
client.applyClient(operation);
|
|
@@ -190114,7 +190117,7 @@ const Editor = ({
|
|
|
190114
190117
|
},
|
|
190115
190118
|
userInfo: lodash$2.exports.pick(userInfo, "uuid", "role")
|
|
190116
190119
|
};
|
|
190117
|
-
io.emit("cursor", JSON.stringify(crdt));
|
|
190120
|
+
io == null ? void 0 : io.emit("cursor", JSON.stringify(crdt));
|
|
190118
190121
|
};
|
|
190119
190122
|
const onBlur = (operation) => {
|
|
190120
190123
|
};
|
|
@@ -190205,7 +190208,7 @@ const Editor = ({
|
|
|
190205
190208
|
"editor.background": "#000000"
|
|
190206
190209
|
}
|
|
190207
190210
|
});
|
|
190208
|
-
setClientEditor(new MonacoAdapter(editor,
|
|
190211
|
+
setClientEditor(new MonacoAdapter(editor, serviceWorkerOrigin));
|
|
190209
190212
|
setOtherClients(new ClientMeta(editor, userList.filter((x2) => !IsMe(x2))));
|
|
190210
190213
|
serviceBinder();
|
|
190211
190214
|
return () => {
|
|
@@ -190220,7 +190223,6 @@ const Editor = ({
|
|
|
190220
190223
|
blur: onBlur,
|
|
190221
190224
|
focus: onFocus
|
|
190222
190225
|
});
|
|
190223
|
-
clientInit();
|
|
190224
190226
|
clientEditor == null ? void 0 : clientEditor.onCursorActivity();
|
|
190225
190227
|
}, [clientEditor]);
|
|
190226
190228
|
react.exports.useEffect(() => {
|
|
@@ -198452,6 +198454,9 @@ const useIndexState = create$3((set2) => ({
|
|
|
198452
198454
|
isFolded: arg
|
|
198453
198455
|
})
|
|
198454
198456
|
}));
|
|
198457
|
+
const LazyEditorComponent = lazy$2(async () => (await Promise.resolve().then(function() {
|
|
198458
|
+
return index$4;
|
|
198459
|
+
})).Editor);
|
|
198455
198460
|
const MainLayout = newStyled.div`
|
|
198456
198461
|
width: 100vw;
|
|
198457
198462
|
height: 100vh;
|
|
@@ -198565,7 +198570,7 @@ const Index = (props2) => {
|
|
|
198565
198570
|
fallback: /* @__PURE__ */ jsx(Skeleton, {
|
|
198566
198571
|
count: 10
|
|
198567
198572
|
}),
|
|
198568
|
-
children: /* @__PURE__ */ jsx(
|
|
198573
|
+
children: /* @__PURE__ */ jsx(LazyEditorComponent, {
|
|
198569
198574
|
useLsp: true
|
|
198570
198575
|
})
|
|
198571
198576
|
}) : null
|