Upgrade MermaidJS (#5043

* Upgrade MermaidJS

* fix: Flashing of diagrams while editing another

* Upgrade vite

* type imports
This commit is contained in:
Tom Moor
2023-04-08 09:20:42 -04:00
committed by GitHub
parent db73879918
commit c97110e72b
6 changed files with 170 additions and 331 deletions

View File

@@ -11,7 +11,7 @@ import RegisterKeyDown from "~/components/RegisterKeyDown";
import Sidebar from "~/components/Sidebar";
import SidebarRight from "~/components/Sidebar/Right";
import SettingsSidebar from "~/components/Sidebar/Settings";
import type { Editor as TEditor } from "~/editor";
import type { Editor as SharedEditor } from "~/editor";
import usePolicy from "~/hooks/usePolicy";
import useStores from "~/hooks/useStores";
import history from "~/utils/history";
@@ -43,7 +43,7 @@ const AuthenticatedLayout: React.FC = ({ children }) => {
const { user, team } = auth;
const documentContext = useLocalStore<DocumentContextValue>(() => ({
editor: null,
setEditor: (editor: TEditor) => {
setEditor: (editor: SharedEditor) => {
documentContext.editor = editor;
},
}));

View File

@@ -1,5 +1,5 @@
import * as React from "react";
import { Editor } from "~/editor";
import type { Editor } from "~/editor";
export type DocumentContextValue = {
/** The current editor instance for this document. */