feat: export MIME_TYPES supported by excalidraw (#5135)
* feat: export MIME_TYPES supported by excalidraw * Update src/packages/excalidraw/CHANGELOG.md
This commit is contained in:
parent
9e6d5fdbcb
commit
aae8e2fa5d
@ -17,6 +17,7 @@ Please add the latest change on the top under the correct section.
|
|||||||
|
|
||||||
#### Features
|
#### 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 [`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).
|
- 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).
|
- Expose util [`mergeLibraryItems`](https://github.com/excalidraw/excalidraw/blob/master/src/packages/excalidraw/README.md#mergeLibraryItems) [#5101](https://github.com/excalidraw/excalidraw/pull/5101).
|
||||||
|
@ -1123,6 +1123,16 @@ import { THEME } from "@excalidraw/excalidraw-next";
|
|||||||
|
|
||||||
Defaults to `THEME.LIGHT` unless passed in `initialData.appState.theme`
|
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?
|
## 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).
|
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).
|
||||||
|
@ -5,7 +5,6 @@ import Sidebar from "./sidebar/Sidebar";
|
|||||||
|
|
||||||
import "./App.scss";
|
import "./App.scss";
|
||||||
import initialData from "./initialData";
|
import initialData from "./initialData";
|
||||||
import { MIME_TYPES } from "../../../constants";
|
|
||||||
|
|
||||||
// This is so that we use the bundled excalidraw.development.js file instead
|
// This is so that we use the bundled excalidraw.development.js file instead
|
||||||
// of the actual source code
|
// of the actual source code
|
||||||
@ -16,7 +15,9 @@ const {
|
|||||||
exportToBlob,
|
exportToBlob,
|
||||||
exportToClipboard,
|
exportToClipboard,
|
||||||
Excalidraw,
|
Excalidraw,
|
||||||
|
MIME_TYPES,
|
||||||
} = window.ExcalidrawLib;
|
} = window.ExcalidrawLib;
|
||||||
|
|
||||||
const resolvablePromise = () => {
|
const resolvablePromise = () => {
|
||||||
let resolve;
|
let resolve;
|
||||||
let reject;
|
let reject;
|
||||||
|
@ -202,7 +202,7 @@ export {
|
|||||||
} from "../../packages/utils";
|
} from "../../packages/utils";
|
||||||
export { isLinearElement } from "../../element/typeChecks";
|
export { isLinearElement } from "../../element/typeChecks";
|
||||||
|
|
||||||
export { FONT_FAMILY, THEME } from "../../constants";
|
export { FONT_FAMILY, THEME, MIME_TYPES } from "../../constants";
|
||||||
|
|
||||||
export {
|
export {
|
||||||
mutateElement,
|
mutateElement,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user