fix: Excalidraw named export type (#5078)
This commit is contained in:
parent
a66cfe2627
commit
9423ac3263
@ -19,7 +19,8 @@ import {
|
|||||||
} from "../element/types";
|
} from "../element/types";
|
||||||
import { useCallbackRefState } from "../hooks/useCallbackRefState";
|
import { useCallbackRefState } from "../hooks/useCallbackRefState";
|
||||||
import { Language, t } from "../i18n";
|
import { Language, t } from "../i18n";
|
||||||
import Excalidraw, {
|
import {
|
||||||
|
Excalidraw,
|
||||||
defaultLang,
|
defaultLang,
|
||||||
languages,
|
languages,
|
||||||
} from "../packages/excalidraw/index";
|
} from "../packages/excalidraw/index";
|
||||||
|
@ -1,6 +1,3 @@
|
|||||||
import Excalidraw from "./index";
|
|
||||||
|
|
||||||
import "../../../public/fonts.css";
|
import "../../../public/fonts.css";
|
||||||
|
|
||||||
export { Excalidraw };
|
|
||||||
export * from "./index";
|
export * from "./index";
|
||||||
|
@ -13,7 +13,7 @@ import { DEFAULT_UI_OPTIONS } from "../../constants";
|
|||||||
import { Provider } from "jotai";
|
import { Provider } from "jotai";
|
||||||
import { jotaiScope, jotaiStore } from "../../jotai";
|
import { jotaiScope, jotaiStore } from "../../jotai";
|
||||||
|
|
||||||
const Excalidraw = (props: ExcalidrawProps) => {
|
const ExcalidrawBase = (props: ExcalidrawProps) => {
|
||||||
const {
|
const {
|
||||||
onChange,
|
onChange,
|
||||||
initialData,
|
initialData,
|
||||||
@ -173,8 +173,10 @@ const areEqual = (
|
|||||||
const forwardedRefComp = forwardRef<
|
const forwardedRefComp = forwardRef<
|
||||||
ExcalidrawAPIRefValue,
|
ExcalidrawAPIRefValue,
|
||||||
PublicExcalidrawProps
|
PublicExcalidrawProps
|
||||||
>((props, ref) => <Excalidraw {...props} excalidrawRef={ref} />);
|
>((props, ref) => <ExcalidrawBase {...props} excalidrawRef={ref} />);
|
||||||
export default React.memo(forwardedRefComp, areEqual);
|
|
||||||
|
export const Excalidraw = React.memo(forwardedRefComp, areEqual);
|
||||||
|
|
||||||
export {
|
export {
|
||||||
getSceneVersion,
|
getSceneVersion,
|
||||||
isInvisiblySmallElement,
|
isInvisiblySmallElement,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { fireEvent, GlobalTestState, render } from "../test-utils";
|
import { fireEvent, GlobalTestState, render } from "../test-utils";
|
||||||
import Excalidraw from "../../packages/excalidraw/index";
|
import { Excalidraw } from "../../packages/excalidraw/index";
|
||||||
import { queryByText, queryByTestId } from "@testing-library/react";
|
import { queryByText, queryByTestId } from "@testing-library/react";
|
||||||
import { GRID_SIZE, THEME } from "../../constants";
|
import { GRID_SIZE, THEME } from "../../constants";
|
||||||
import { t } from "../../i18n";
|
import { t } from "../../i18n";
|
||||||
|
@ -4,7 +4,7 @@ import {
|
|||||||
restoreOriginalGetBoundingClientRect,
|
restoreOriginalGetBoundingClientRect,
|
||||||
waitFor,
|
waitFor,
|
||||||
} from "./test-utils";
|
} from "./test-utils";
|
||||||
import Excalidraw from "../packages/excalidraw/index";
|
import { Excalidraw } from "../packages/excalidraw/index";
|
||||||
import { API } from "./helpers/api";
|
import { API } from "./helpers/api";
|
||||||
|
|
||||||
const { h } = window;
|
const { h } = window;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user