From ee703206b067383977891c63b906767d1946404b Mon Sep 17 00:00:00 2001 From: Aakansha Doshi Date: Sat, 16 Jan 2021 22:20:46 +0530 Subject: [PATCH] docs: update changelog and release 0.2.0 (#2725) * docs(changelog): update changelog and release 0.2.0 * fix * Add missing API's * update * fix * fix * Apply suggestions from code review * remove * fix * fix --- src/packages/excalidraw/CHANGELOG.md | 26 ++++++++++++- src/packages/excalidraw/README.md | 45 +++++++++++++++++++++++ src/packages/excalidraw/package-lock.json | 2 +- src/packages/excalidraw/package.json | 2 +- 4 files changed, 72 insertions(+), 3 deletions(-) diff --git a/src/packages/excalidraw/CHANGELOG.md b/src/packages/excalidraw/CHANGELOG.md index aa0ec43b..f1615238 100644 --- a/src/packages/excalidraw/CHANGELOG.md +++ b/src/packages/excalidraw/CHANGELOG.md @@ -12,15 +12,21 @@ The change should be grouped under one of the below section and must contain PR Please add the latest change on the top under the correct section. --> -## [Unreleased] +## 0.2.0 ### Features +- Add toast [#2772](https://github.com/excalidraw/excalidraw/pull/2772) - Add `cmd+o` shortcut to load scene [#2732](https://github.com/excalidraw/excalidraw/pull/2732) - Remove language picker, and add `langCode`, `renderFooter` [#2644](https://github.com/excalidraw/excalidraw/pull/2644): - BREAKING: removed the language picker from UI. It is now the host app's responsibility to implement a language picker if desirable, using the newly added [`renderFooter`](https://github.com/excalidraw/excalidraw/blob/master/src/packages/excalidraw/README.md#renderFooter) prop. The reasoning is that the i18n should be controlled by the app itself, not by the nested Excalidraw component. - Added [`langCode`](https://github.com/excalidraw/excalidraw/blob/master/src/packages/excalidraw/README.md#langCode) prop to control the UI language. - Add support for `exportToBackend` prop to allow host apps to implement shareable links [#2612](https://github.com/excalidraw/excalidraw/pull/2612/files) +- Require use of a preset dialog size; adjust dialog sizing [#2684](https://github.com/excalidraw/excalidraw/pull/2684) +- Add line chart and paste dialog selection [#2670](https://github.com/excalidraw/excalidraw/pull/2670) +- Tweak editing behavior [#2668](https://github.com/excalidraw/excalidraw/pull/2668) +- Change title to Excalidraw after a timeout +- Checkmark to toggle context-menu-items [#2645](https://github.com/excalidraw/excalidraw/pull/2645) - Add zoom to selection [#2522](https://github.com/excalidraw/excalidraw/pull/2522) - Insert Library items in the middle of the screen [#2527](https://github.com/excalidraw/excalidraw/pull/2527) - Show shortcut context menu [#2501](https://github.com/excalidraw/excalidraw/pull/2501) @@ -31,7 +37,12 @@ Please add the latest change on the top under the correct section. ### Fixes +- Fix typo for initialData and point all links to master [#2707](https://github.com/excalidraw/excalidraw/pull/2707) +- Fix compile error [#2685](https://github.com/excalidraw/excalidraw/pull/2685) +- Center zoom on iPhone and iPad [#2642](https://github.com/excalidraw/excalidraw/pull/2642) - Allow text-selecting in dialogs & reset cursor [#2783](https://github.com/excalidraw/excalidraw/pull/2783) +- Don't render due to zoom after unmount [#2779](https://github.com/excalidraw/excalidraw/pull/2779) +- Track the chart type correctly [#2773](https://github.com/excalidraw/excalidraw/pull/2773) - Fix late-render due to debounced zoom [#2779](https://github.com/excalidraw/excalidraw/pull/2779) - Fix initialization when browser tab not focused [#2677](https://github.com/excalidraw/excalidraw/pull/2677) - Consistent case for export locale strings [#2622](https://github.com/excalidraw/excalidraw/pull/2622) @@ -47,6 +58,11 @@ Please add the latest change on the top under the correct section. ### Improvements - Added Zen Mode to the context menu [#2734](https://github.com/excalidraw/excalidraw/pull/2734) +- Do not reset to selection for draw tool [#2721]((https://github.com/excalidraw/excalidraw/pull/2721) +- Make dialogs look more like dialogs [#2686](https://github.com/excalidraw/excalidraw/pull/2686) +- Browse libraries styles fixed [#2694](https://github.com/excalidraw/excalidraw/pull/2694) +- Change hint for 2-point lines on resize [#2655](https://github.com/excalidraw/excalidraw/pull/2655) +- Align items in context menu [#2640](https://github.com/excalidraw/excalidraw/pull/2640) - Do not reset to selection when using the draw tool [#2721](https://github.com/excalidraw/excalidraw/pull/2721) - Display proper tooltip for 2-point lines during resize, and normalize modifier key labels in hints [#2655](https://github.com/excalidraw/excalidraw/pull/2655) - Improve error message around importing images [#2619](https://github.com/excalidraw/excalidraw/pull/2619) @@ -56,6 +72,14 @@ Please add the latest change on the top under the correct section. - Hide shortcuts on pickers for mobile [#2508](https://github.com/excalidraw/excalidraw/pull/2508) - Hide stats and scrollToContent-button when mobile menus open [#2509](https://github.com/excalidraw/excalidraw/pull/2509) +### Refactor + +- refactor: Converting span to kbd tag [#2774](https://github.com/excalidraw/excalidraw/pull/2774) +- Media queries [#2680](https://github.com/excalidraw/excalidraw/pull/2680) +- Remove duplicate entry from en.json[#2654](https://github.com/excalidraw/excalidraw/pull/2654) +- Remove the word toggle from labels [#2648](https://github.com/excalidraw/excalidraw/pull/2648) +- + ### Chore - Bump ini from 1.3.5 to 1.3.7 in /src/packages/excalidraw [#2500](https://github.com/excalidraw/excalidraw/pull/2500) diff --git a/src/packages/excalidraw/README.md b/src/packages/excalidraw/README.md index 36c76f66..12adfb6b 100644 --- a/src/packages/excalidraw/README.md +++ b/src/packages/excalidraw/README.md @@ -142,6 +142,51 @@ export default function App() { | [`langCode`](#langCode) | string | `en` | Language code string | | [`renderFooter `](#renderFooter) | Function | | Function that renders custom UI footer | +### `Extra API's` + +#### `getSceneVersion` + +**How to use** + +
+import { getSceneVersion } from "@excalidraw/excalidraw";
+getSceneVersion(elements:  ExcalidrawElement [])
+
+ +This function returns the current scene version. + +#### `getSyncableElements` + +**_Signature_** + +
+getSyncableElements(elements:  ExcalidrawElement []):ExcalidrawElement []
+
+ +**How to use** + +```js +import { getSyncableElements } from "@excalidraw/excalidraw"; +``` + +This function returns all the deleted elements of the scene. + +### `getElementMap` + +**_Signature_** + +
+getElementsMap(elements:  ExcalidrawElement []): {[id: string]: ExcalidrawElement}
+
+ +**How to use** + +```js +import { getElementsMap } from "@excalidraw/excalidraw"; +``` + +This function returns an object where each element is mapped to its id. + #### `width` This props defines the `width` of the Excalidraw component. Defaults to `window.innerWidth` if not passed. diff --git a/src/packages/excalidraw/package-lock.json b/src/packages/excalidraw/package-lock.json index 9e2c3df7..2b5f7c75 100644 --- a/src/packages/excalidraw/package-lock.json +++ b/src/packages/excalidraw/package-lock.json @@ -1,6 +1,6 @@ { "name": "@excalidraw/excalidraw", - "version": "0.1.1", + "version": "0.2.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/src/packages/excalidraw/package.json b/src/packages/excalidraw/package.json index 62125fe9..8c0a529a 100644 --- a/src/packages/excalidraw/package.json +++ b/src/packages/excalidraw/package.json @@ -1,6 +1,6 @@ { "name": "@excalidraw/excalidraw", - "version": "0.1.1", + "version": "0.2.0", "main": "dist/excalidraw.min.js", "files": [ "dist/*"