mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
* docs: add mermaid docs * fix link * add development.mdx * add codebase * add parseEdge * add subgraph * convertors * tweaks * structure the codebase * add docs for new diagram type * decouple docs for flowchart parser * fix broken links * use diagram instead of chart * revert package.json * tweaks * point root folder of mermaid-to-excalidraw to installation * remove installation from sidebar children * fix link * update flowchart parser diagram * update parser overview diagram * update more diagrams * remove note about change in element stroke * update diagram * increase size limit for excalidraw production bundle * tweaks * add link * move codebase after introduction * dummy --------- Co-authored-by: dwelle <luzar.david@gmail.com>
31 lines
1 KiB
JavaScript
31 lines
1 KiB
JavaScript
import React from "react";
|
|
import ExecutionEnvironment from "@docusaurus/ExecutionEnvironment";
|
|
import initialData from "@site/src/initialData";
|
|
import { useColorMode } from "@docusaurus/theme-common";
|
|
|
|
let ExcalidrawComp = {};
|
|
if (ExecutionEnvironment.canUseDOM) {
|
|
ExcalidrawComp = require("@excalidraw/excalidraw");
|
|
}
|
|
const Excalidraw = React.forwardRef((props, ref) => {
|
|
const { colorMode } = useColorMode();
|
|
return <ExcalidrawComp.Excalidraw theme={colorMode} {...props} ref={ref} />;
|
|
});
|
|
// Add react-live imports you need here
|
|
const ExcalidrawScope = {
|
|
React,
|
|
...React,
|
|
Excalidraw,
|
|
Footer: ExcalidrawComp.Footer,
|
|
useDevice: ExcalidrawComp.useDevice,
|
|
MainMenu: ExcalidrawComp.MainMenu,
|
|
WelcomeScreen: ExcalidrawComp.WelcomeScreen,
|
|
LiveCollaborationTrigger: ExcalidrawComp.LiveCollaborationTrigger,
|
|
Sidebar: ExcalidrawComp.Sidebar,
|
|
exportToCanvas: ExcalidrawComp.exportToCanvas,
|
|
initialData,
|
|
useI18n: ExcalidrawComp.useI18n,
|
|
convertToExcalidrawElements: ExcalidrawComp.convertToExcalidrawElements,
|
|
};
|
|
|
|
export default ExcalidrawScope;
|