Virtual whiteboard for sketching hand-drawn like diagrams
feat: export MIME_TYPES supported by excalidraw (#5135)
Aakansha Doshiaae8e2fa5d90
diff --git a/src/packages/excalidraw/CHANGELOG.md b/src/packages/excalidraw/CHANGELOG.mdindex 3a52dbf709..402cfd79ca 100644--- a/src/packages/excalidraw/CHANGELOG.md+++ b/src/packages/excalidraw/CHANGELOG.md@@ -17,6 +17,7 @@ Please add the latest change on the top under the correct section.#### Features+- Export [`MIME_TYPES`](https://github.com/excalidraw/excalidraw/blob/master/src/constants.ts#L92) supported by Excalidraw [#5135](https://github.com/excalidraw/excalidraw/pull/5135).- Support [`src`](https://github.com/excalidraw/excalidraw/blob/master/src/types.ts#L50) for collaborators. Now onwards host can pass `src` to render the customized avatar for collaborators [#5114](https://github.com/excalidraw/excalidraw/pull/5114).- Support `libraryItems` argument in `initialData.libraryItems` and `updateScene({ libraryItems })` to be a Promise resolving to `LibraryItems`, and support functional update of `libraryItems` in [`updateScene({ libraryItems })`](https://github.com/excalidraw/excalidraw/blob/master/src/packages/excalidraw/README.md#updateScene). [#5101](https://github.com/excalidraw/excalidraw/pull/5101).- Expose util [`mergeLibraryItems`](https://github.com/excalidraw/excalidraw/blob/master/src/packages/excalidraw/README.md#mergeLibraryItems) [#5101](https://github.com/excalidraw/excalidraw/pull/5101).diff --git a/src/packages/excalidraw/README_NEXT.md b/src/packages/excalidraw/README_NEXT.mdindex f82ca5c8a0..ca8262bd9e 100644--- a/src/packages/excalidraw/README_NEXT.md+++ b/src/packages/excalidraw/README_NEXT.md@@ -1123,6 +1123,16 @@ import { THEME } from "@excalidraw/excalidraw-next";Defaults to `THEME.LIGHT` unless passed in `initialData.appState.theme`+### `MIME_TYPES`++**How to use **++```js+import { MIME_TYPES } from "@excalidraw/excalidraw-next";+```++[`MIME_TYPES`](https://github.com/excalidraw/excalidraw/blob/master/src/constants.ts#L92) contains all the mime types supported by `Excalidraw`.+## Need help?Check out the existing [Q&A](https://github.com/excalidraw/excalidraw/discussions?discussions_q=label%3Apackage%3Aexcalidraw). If you have any queries or need help, ask us [here](https://github.com/excalidraw/excalidraw/discussions?discussions_q=label%3Apackage%3Aexcalidraw).diff --git a/src/packages/excalidraw/example/App.js b/src/packages/excalidraw/example/App.jsindex 34780948bc..3cab1b70cb 100644--- a/src/packages/excalidraw/example/App.js+++ b/src/packages/excalidraw/example/App.js@@ -5,7 +5,6 @@ import Sidebar from "./sidebar/Sidebar";import "./App.scss";import initialData from "./initialData";-import { MIME_TYPES } from "../../../constants";// This is so that we use the bundled excalidraw.development.js file instead// of the actual source code@@ -16,7 +15,9 @@ const {exportToBlob,exportToClipboard,Excalidraw,+ MIME_TYPES,} = window.ExcalidrawLib;+const resolvablePromise = () => {let resolve;let reject;diff --git a/src/packages/excalidraw/index.tsx b/src/packages/excalidraw/index.tsxindex ce9b56dd95..88291c1361 100644--- a/src/packages/excalidraw/index.tsx+++ b/src/packages/excalidraw/index.tsx@@ -202,7 +202,7 @@ export {} from "../../packages/utils";export { isLinearElement } from "../../element/typeChecks";-export { FONT_FAMILY, THEME } from "../../constants";+export { FONT_FAMILY, THEME, MIME_TYPES } from "../../constants";export {mutateElement,