diff --git a/src/packages/excalidraw/CHANGELOG.md b/src/packages/excalidraw/CHANGELOG.md index 5154f052..3bd8ba06 100644 --- a/src/packages/excalidraw/CHANGELOG.md +++ b/src/packages/excalidraw/CHANGELOG.md @@ -17,6 +17,8 @@ Please add the latest change on the top under the correct section. ### Features +- Export [`isLinearElement`](https://github.com/excalidraw/excalidraw/blob/master/src/packages/excalidraw/README.md#isLinearElement) and [`getNonDeletedElements`](https://github.com/excalidraw/excalidraw/blob/master/src/packages/excalidraw/README.md#getNonDeletedElements). + - Support [`renderTopRightUI`](https://github.com/excalidraw/excalidraw/blob/master/src/packages/excalidraw/README.md#renderTopRightUI) in mobile UI. - Export `THEME` constant from the package so host can use this when passing the theme. diff --git a/src/packages/excalidraw/README_NEXT.md b/src/packages/excalidraw/README_NEXT.md index 0130645a..27889f68 100644 --- a/src/packages/excalidraw/README_NEXT.md +++ b/src/packages/excalidraw/README_NEXT.md @@ -910,6 +910,38 @@ getFreeDrawSvgPath(element: +isLinearElement(elementType?: ExcalidrawElement): boolean + + +This function returns true if the element is linear type (`arrow` |`line`) else returns false. + +#### `getNonDeletedElements` + +**How to use** + +```js +import { getNonDeletedElements } from "@excalidraw/excalidraw-next"; +``` + +**Signature** + +
+getNonDeletedElements(elements: readonly ExcalidrawElement[]): as readonly NonDeletedExcalidrawElement[] ++ +This function returns an array of deleted elements. + ### Exported constants #### `FONT_FAMILY` diff --git a/src/packages/excalidraw/index.tsx b/src/packages/excalidraw/index.tsx index 449a1c38..95ec0e4c 100644 --- a/src/packages/excalidraw/index.tsx +++ b/src/packages/excalidraw/index.tsx @@ -171,6 +171,7 @@ export { getSceneVersion, getElementMap, isInvisiblySmallElement, + getNonDeletedElements, } from "../../element"; export { defaultLang, languages } from "../../i18n"; export { restore, restoreAppState, restoreElements } from "../../data/restore"; @@ -183,4 +184,6 @@ export { loadFromBlob, getFreeDrawSvgPath, } from "../../packages/utils"; +export { isLinearElement } from "../../element/typeChecks"; + export { FONT_FAMILY, THEME } from "../../constants";