@prorobotech/openapi-k8s-toolkit 0.0.1-alpha.133 → 0.0.1-alpha.134
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.
|
@@ -50481,8 +50481,10 @@ const MonacoEditor = ({
|
|
|
50481
50481
|
const [isPaused, setIsPaused] = useState(false);
|
|
50482
50482
|
const socketRef = useRef(null);
|
|
50483
50483
|
const editorRef = useRef(null);
|
|
50484
|
+
const [editorReady, setEditorReady] = useState(false);
|
|
50484
50485
|
const handleEditorDidMount = (editor) => {
|
|
50485
50486
|
editorRef.current = editor;
|
|
50487
|
+
setEditorReady(true);
|
|
50486
50488
|
};
|
|
50487
50489
|
const appendContent = (newContent) => {
|
|
50488
50490
|
if (editorRef.current) {
|
|
@@ -50496,6 +50498,9 @@ const MonacoEditor = ({
|
|
|
50496
50498
|
}
|
|
50497
50499
|
};
|
|
50498
50500
|
useEffect(() => {
|
|
50501
|
+
if (!editorReady) {
|
|
50502
|
+
return void 0;
|
|
50503
|
+
}
|
|
50499
50504
|
const socket = new WebSocket(endpoint);
|
|
50500
50505
|
socketRef.current = socket;
|
|
50501
50506
|
socket.onopen = () => {
|
|
@@ -50531,7 +50536,7 @@ const MonacoEditor = ({
|
|
|
50531
50536
|
socket.close();
|
|
50532
50537
|
}
|
|
50533
50538
|
};
|
|
50534
|
-
}, [endpoint, namespace, podName, container, previous]);
|
|
50539
|
+
}, [endpoint, namespace, podName, container, previous, editorReady]);
|
|
50535
50540
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
50536
50541
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$2.VisibilityContainer, { $isVisible: isTerminalVisible, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { justify: "start", align: "center", gap: 16, children: [
|
|
50537
50542
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -50566,7 +50571,7 @@ const MonacoEditor = ({
|
|
|
50566
50571
|
defaultLanguage: "plaintext",
|
|
50567
50572
|
language: "plaintext",
|
|
50568
50573
|
width: "100%",
|
|
50569
|
-
height: `calc(100vh - ${substractHeight}px`,
|
|
50574
|
+
height: `calc(100vh - ${substractHeight}px)`,
|
|
50570
50575
|
theme: theme === "dark" ? "vs-dark" : theme === void 0 ? "vs-dark" : "vs",
|
|
50571
50576
|
options: {
|
|
50572
50577
|
theme: theme === "dark" ? "vs-dark" : theme === void 0 ? "vs-dark" : "vs",
|