@dwelle/excalidraw 0.4.0-b5b3e87 → 0.4.0-b9dc358

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (145) hide show
  1. package/CHANGELOG.md +447 -2
  2. package/README.md +16 -1368
  3. package/dist/excalidraw-assets/Assistant-Bold.woff2 +0 -0
  4. package/dist/excalidraw-assets/Assistant-Medium.woff2 +0 -0
  5. package/dist/excalidraw-assets/Assistant-Regular.woff2 +0 -0
  6. package/dist/excalidraw-assets/Assistant-SemiBold.woff2 +0 -0
  7. package/dist/excalidraw-assets/{vendor-c9192fb8837b50bd2d52.js → vendor-2002fe1b8862917b36c1.js} +2 -2
  8. package/dist/excalidraw-assets-dev/Assistant-Bold.woff2 +0 -0
  9. package/dist/excalidraw-assets-dev/Assistant-Medium.woff2 +0 -0
  10. package/dist/excalidraw-assets-dev/Assistant-Regular.woff2 +0 -0
  11. package/dist/excalidraw-assets-dev/Assistant-SemiBold.woff2 +0 -0
  12. package/dist/excalidraw-assets-dev/{vendor-9cf40f11018f8c6ff4c6.js → vendor-e6df8519da951026ff69.js} +9 -1
  13. package/dist/excalidraw.development.js +1175 -460
  14. package/dist/excalidraw.production.min.js +1 -1
  15. package/dist/excalidraw.production.min.js.LICENSE.txt +22 -0
  16. package/package.json +1 -1
  17. package/types/actions/actionAddToLibrary.d.ts +45 -33
  18. package/types/actions/actionBoundText.d.ts +38 -18
  19. package/types/actions/actionCanvas.d.ts +248 -100
  20. package/types/actions/actionClipboard.d.ts +103 -56
  21. package/types/actions/actionDeleteSelected.d.ts +56 -35
  22. package/types/actions/actionExport.d.ts +147 -110
  23. package/types/actions/actionFinalize.d.ts +30 -22
  24. package/types/actions/actionFlip.d.ts +2 -2
  25. package/types/actions/actionGroup.d.ts +2 -2
  26. package/types/actions/actionLinearEditor.d.ts +118 -0
  27. package/types/actions/actionMenu.d.ts +47 -34
  28. package/types/actions/actionNavigate.d.ts +1 -0
  29. package/types/actions/actionProperties.d.ts +197 -145
  30. package/types/actions/actionStyles.d.ts +15 -11
  31. package/types/actions/actionToggleGridMode.d.ts +17 -11
  32. package/types/actions/actionToggleLock.d.ts +15 -11
  33. package/types/actions/actionToggleStats.d.ts +16 -11
  34. package/types/actions/actionToggleViewMode.d.ts +17 -11
  35. package/types/actions/actionToggleZenMode.d.ts +17 -11
  36. package/types/actions/index.d.ts +1 -0
  37. package/types/actions/manager.d.ts +1 -0
  38. package/types/actions/shortcuts.d.ts +1 -1
  39. package/types/actions/types.d.ts +5 -2
  40. package/types/appState.d.ts +22 -20
  41. package/types/clients.d.ts +1 -1
  42. package/types/clipboard.d.ts +6 -1
  43. package/types/components/Actions.d.ts +1 -0
  44. package/types/components/ActiveConfirmDialog.d.ts +24 -0
  45. package/types/components/App.d.ts +24 -16
  46. package/types/components/Avatar.d.ts +1 -1
  47. package/types/components/Button.d.ts +15 -0
  48. package/types/components/ContextMenu.d.ts +8 -21
  49. package/types/components/DialogActionButton.d.ts +10 -0
  50. package/types/components/HandButton.d.ts +10 -0
  51. package/types/components/HelpButton.d.ts +7 -0
  52. package/types/components/HintViewer.d.ts +3 -2
  53. package/types/components/HomeButton.d.ts +5 -0
  54. package/types/components/ImageExportDialog.d.ts +3 -1
  55. package/types/components/InitializeApp.d.ts +2 -0
  56. package/types/components/JSONExportDialog.d.ts +5 -3
  57. package/types/components/LayerUI.d.ts +6 -6
  58. package/types/components/LibraryButton.d.ts +1 -0
  59. package/types/components/LibraryMenu.d.ts +14 -5
  60. package/types/components/LibraryMenuBrowseButton.d.ts +7 -0
  61. package/types/components/LibraryMenuHeaderContent.d.ts +35 -0
  62. package/types/components/LibraryMenuItems.d.ts +5 -14
  63. package/types/components/LibraryUnit.d.ts +2 -3
  64. package/types/components/LoadingMessage.d.ts +2 -0
  65. package/types/components/LockButton.d.ts +0 -1
  66. package/types/components/MobileMenu.d.ts +8 -10
  67. package/types/components/Sidebar/Sidebar.d.ts +73 -0
  68. package/types/components/Sidebar/SidebarHeader.d.ts +20 -0
  69. package/types/components/Sidebar/common.d.ts +16 -0
  70. package/types/components/ToolButton.d.ts +1 -1
  71. package/types/components/UserList.d.ts +0 -3
  72. package/types/components/context/tunnels.d.ts +16 -0
  73. package/types/components/dropdownMenu/DropdownMenu.d.ts +66 -0
  74. package/types/components/dropdownMenu/DropdownMenuContent.d.ts +15 -0
  75. package/types/components/dropdownMenu/DropdownMenuGroup.d.ts +11 -0
  76. package/types/components/dropdownMenu/DropdownMenuItem.d.ts +12 -0
  77. package/types/components/dropdownMenu/DropdownMenuItemContent.d.ts +6 -0
  78. package/types/components/dropdownMenu/DropdownMenuItemCustom.d.ts +6 -0
  79. package/types/components/dropdownMenu/DropdownMenuItemLink.d.ts +13 -0
  80. package/types/components/dropdownMenu/DropdownMenuSeparator.d.ts +5 -0
  81. package/types/components/dropdownMenu/DropdownMenuTrigger.d.ts +9 -0
  82. package/types/components/dropdownMenu/common.d.ts +6 -0
  83. package/types/components/dropdownMenu/dropdownMenuUtils.d.ts +3 -0
  84. package/types/components/footer/Footer.d.ts +12 -0
  85. package/types/components/footer/FooterCenter.d.ts +8 -0
  86. package/types/components/hoc/withInternalFallback.d.ts +4 -0
  87. package/types/components/hoc/withUpstreamOverride.d.ts +10 -0
  88. package/types/components/icons.d.ts +82 -122
  89. package/types/components/live-collaboration/LiveCollaborationTrigger.d.ts +10 -0
  90. package/types/components/main-menu/DefaultItems.d.ts +47 -0
  91. package/types/components/main-menu/MainMenu.d.ts +60 -0
  92. package/types/components/welcome-screen/WelcomeScreen.Center.d.ts +58 -0
  93. package/types/components/welcome-screen/WelcomeScreen.Hints.d.ts +19 -0
  94. package/types/components/welcome-screen/WelcomeScreen.d.ts +85 -0
  95. package/types/constants.d.ts +29 -15
  96. package/types/data/restore.d.ts +8 -2
  97. package/types/data/types.d.ts +16 -1
  98. package/types/element/Hyperlink.d.ts +16 -12
  99. package/types/element/bounds.d.ts +3 -2
  100. package/types/element/image.d.ts +1 -1
  101. package/types/element/index.d.ts +1 -1
  102. package/types/element/linearElementEditor.d.ts +49 -17
  103. package/types/element/newElement.d.ts +13 -3
  104. package/types/element/resizeElements.d.ts +0 -1
  105. package/types/element/sortElements.d.ts +2 -0
  106. package/types/element/textElement.d.ts +35 -6
  107. package/types/element/textWysiwyg.d.ts +6 -1
  108. package/types/element/transformHandles.d.ts +3 -4
  109. package/types/element/typeChecks.d.ts +11 -2
  110. package/types/element/types.d.ts +12 -6
  111. package/types/hooks/useOutsideClick.d.ts +2 -0
  112. package/types/i18n.d.ts +6 -0
  113. package/types/jotai.d.ts +5 -5
  114. package/types/keys.d.ts +15 -6
  115. package/types/math.d.ts +3 -1
  116. package/types/packages/excalidraw/dist/excalidraw.development.d.ts +2 -4
  117. package/types/packages/excalidraw/example/App.d.ts +9 -2
  118. package/types/packages/excalidraw/example/CustomFooter.d.ts +5 -0
  119. package/types/packages/excalidraw/example/MobileFooter.d.ts +5 -0
  120. package/types/packages/excalidraw/example/sidebar/{Sidebar.d.ts → ExampleSidebar.d.ts} +1 -1
  121. package/types/packages/excalidraw/index.d.ts +15 -2
  122. package/types/packages/excalidraw/webpack.dev.config.d.ts +72 -61
  123. package/types/packages/excalidraw/webpack.prod.config.d.ts +85 -70
  124. package/types/renderer/renderElement.d.ts +4 -3
  125. package/types/renderer/renderScene.d.ts +1 -1
  126. package/types/scene/Fonts.d.ts +21 -0
  127. package/types/scene/Scene.d.ts +15 -0
  128. package/types/scene/comparisons.d.ts +2 -3
  129. package/types/scene/index.d.ts +1 -1
  130. package/types/scene/types.d.ts +1 -0
  131. package/types/shapes.d.ts +27 -3
  132. package/types/types.d.ts +65 -38
  133. package/types/utils.d.ts +10 -3
  134. package/types/components/ActiveFile.d.ts +0 -7
  135. package/types/components/BackgroundPickerAndDarkModeToggle.d.ts +0 -9
  136. package/types/components/ClearCanvas.d.ts +0 -4
  137. package/types/components/CollabButton.d.ts +0 -7
  138. package/types/components/Footer.d.ts +0 -9
  139. package/types/components/HelpIcon.d.ts +0 -8
  140. package/types/components/SidebarLockButton.d.ts +0 -8
  141. package/types/packages/common.webpack.dev.config.d.ts +0 -71
  142. package/types/packages/common.webpack.prod.config.d.ts +0 -83
  143. /package/dist/excalidraw-assets/{vendor-c9192fb8837b50bd2d52.js.LICENSE.txt → vendor-2002fe1b8862917b36c1.js.LICENSE.txt} +0 -0
  144. /package/types/packages/excalidraw/dist/excalidraw-assets/{vendor-c9192fb8837b50bd2d52.d.ts → vendor-2002fe1b8862917b36c1.d.ts} +0 -0
  145. /package/types/packages/excalidraw/dist/excalidraw-assets-dev/{vendor-9cf40f11018f8c6ff4c6.d.ts → vendor-e6df8519da951026ff69.d.ts} +0 -0
package/CHANGELOG.md CHANGED
@@ -13,17 +13,462 @@ Please add the latest change on the top under the correct section.
13
13
 
14
14
  ## Unreleased
15
15
 
16
+ ### Features
17
+
18
+ - Expose `useI18n()` hook return an object containing `t()` i18n helper and current `langCode`. You can use this in components you render as `<Excalidraw>` children to render any of our i18n locale strings. [#6224](https://github.com/excalidraw/excalidraw/pull/6224)
19
+
20
+ - [`restoreElements`](https://docs.excalidraw.com/docs/@excalidraw/excalidraw/api/utils/restore#restoreelements) API now takes an optional parameter `opts` which currently supports the below attributes
21
+
22
+ ```js
23
+ { refreshDimensions?: boolean, repairBindings?: boolean }
24
+ ```
25
+
26
+ The same `opts` param has been added to [`restore`](https://docs.excalidraw.com/docs/@excalidraw/excalidraw/api/utils/restore#restore) API as well.
27
+
28
+ For more details refer to the [docs](https://docs.excalidraw.com)
29
+
30
+ #### BREAKING CHANGE
31
+
32
+ - The optional parameter `refreshDimensions` in [`restoreElements`](https://docs.excalidraw.com/docs/@excalidraw/excalidraw/api/utils/restore#restoreelements) has been removed and can be enabled via `opts`
33
+
34
+ ## 0.14.2 (2023-02-01)
35
+
36
+ ### Features
37
+
38
+ - Welcome screen no longer renders by default, and you need to render it yourself. `UIOptions.welcomeScreen` option is now deprecated. [#6117](https://github.com/excalidraw/excalidraw/pull/6117)
39
+ - `MainMenu`, `MainMenu.Item`, and `MainMenu.ItemLink` components now all support `onSelect(event: Event): void` callback. If you call `event.preventDefault()`, it will prevent the menu from closing when an item is selected (clicked on). [#6152](https://github.com/excalidraw/excalidraw/pull/6152)
40
+
41
+ ### Fixes
42
+
43
+ - declare css variable for font in excalidraw so its available in host [#6160](https://github.com/excalidraw/excalidraw/pull/6160)
44
+
45
+ ## Excalidraw Library
46
+
47
+ **_This section lists the updates made to the excalidraw library and will not affect the integration._**
48
+
49
+ ### Features
50
+
51
+ - Add hand/panning tool [#6141](https://github.com/excalidraw/excalidraw/pull/6141)
52
+
53
+ - Show copy-as-png export button on firefox and show steps how to enable it [#6125](https://github.com/excalidraw/excalidraw/pull/6125)
54
+
55
+ ### Fixes
56
+
57
+ - Horizontal padding when aligning bound text containers [#6180](https://github.com/excalidraw/excalidraw/pull/6180)
58
+
59
+ - Make tunnels work in multi-instance scenarios [#6178](https://github.com/excalidraw/excalidraw/pull/6178)
60
+
61
+ - Add 1px width to the container to calculate more accurately [#6174](https://github.com/excalidraw/excalidraw/pull/6174)
62
+
63
+ - Quick typo fix [#6167](https://github.com/excalidraw/excalidraw/pull/6167)
64
+
65
+ - Set the width correctly using measureText in editor [#6162](https://github.com/excalidraw/excalidraw/pull/6162)
66
+
67
+ - :bug: broken emojis when wrap text [#6153](https://github.com/excalidraw/excalidraw/pull/6153)
68
+
69
+ - Button background and svg sizes [#6155](https://github.com/excalidraw/excalidraw/pull/6155)
70
+
71
+ ### Styles
72
+
73
+ - Change in ExportButton style [#6147](https://github.com/excalidraw/excalidraw/pull/6147) (#6148)
74
+
75
+ ### Build
76
+
77
+ - Temporarily disable pre-commit [#6132](https://github.com/excalidraw/excalidraw/pull/6132)
78
+
79
+ ---
80
+
81
+ ## 0.14.1 (2023-01-16)
82
+
83
+ ### Fixes
84
+
85
+ - remove overflow hidden from button [#6110](https://github.com/excalidraw/excalidraw/pull/6110). This fixes the collaborator count css in the [LiveCollaborationTrigger](https://github.com/excalidraw/excalidraw/blob/master/src/packages/excalidraw/README.md#LiveCollaborationTrigger) component.
86
+
87
+ ## 0.14.0 (2023-01-13)
88
+
89
+ ### Features
90
+
91
+ - Support customization for the editor [welcome screen](https://github.com/excalidraw/excalidraw/blob/master/src/packages/excalidraw/README.md#WelcomeScreen) [#6048](https://github.com/excalidraw/excalidraw/pull/6048).
92
+
93
+ - Expose component API for the Excalidraw main menu [#6034](https://github.com/excalidraw/excalidraw/pull/6034), You can read more about its usage [here](https://github.com/excalidraw/excalidraw/blob/master/src/packages/excalidraw/README.md#MainMenu)
94
+
95
+ - Support customization for the Excalidraw [main menu](https://github.com/excalidraw/excalidraw/blob/master/src/packages/excalidraw/README.md#MainMenu) [#6034](https://github.com/excalidraw/excalidraw/pull/6034).
96
+
97
+ - [Footer](https://github.com/excalidraw/excalidraw/blob/master/src/packages/excalidraw/README.md#Footer) is now rendered as child component instead of passed as a render prop [#5970](https://github.com/excalidraw/excalidraw/pull/5970).
98
+
99
+ - Any top-level children passed to the `<Excalidraw/>` component that do not belong to one of the officially supported Excalidraw children components are now rendered directly inside the Excalidraw container (previously, they weren't rendered at all) [#6096](https://github.com/excalidraw/excalidraw/pull/6096).
100
+
101
+ - Expose [LiveCollaborationTrigger](https://github.com/excalidraw/excalidraw/blob/master/src/packages/excalidraw/README.md#LiveCollaborationTrigger) component. Replaces `props.onCollabButtonClick` [#6104](https://github.com/excalidraw/excalidraw/pull/6104).
102
+
103
+ #### BREAKING CHANGES
104
+
105
+ - `props.onCollabButtonClick` is now removed. You need to render the main menu item yourself, and optionally also render the `<LiveCollaborationTrigger>` component using [renderTopRightUI](https://github.com/excalidraw/excalidraw/blob/master/src/packages/excalidraw/README.md#renderTopRightUI) prop if you want to retain the canvas button at top-right.
106
+ - The prop `renderFooter` is now removed in favor of rendering as a child component.
107
+
108
+ ### Excalidraw schema
109
+
110
+ - Merged `appState.currentItemStrokeSharpness` and `appState.currentItemLinearStrokeSharpness` into `appState.currentItemRoundness`. Renamed `changeSharpness` action to `changeRoundness`. Excalidraw element's `strokeSharpness` was changed to `roundness`. Check the PR for types and more details [#5553](https://github.com/excalidraw/excalidraw/pull/5553).
111
+
112
+ ## Excalidraw Library
113
+
114
+ **_This section lists the updates made to the excalidraw library and will not affect the integration._**
115
+
116
+ ### Features
117
+
118
+ - Generic button export [#6092](https://github.com/excalidraw/excalidraw/pull/6092)
119
+
120
+ - Scroll using PageUp and PageDown [#6038](https://github.com/excalidraw/excalidraw/pull/6038)
121
+
122
+ - Support shrinking text containers to original height when text removed [#6025](https://github.com/excalidraw/excalidraw/pull/6025)
123
+
124
+ - Move contextMenu into the component tree and control via appState [#6021](https://github.com/excalidraw/excalidraw/pull/6021)
125
+
126
+ - Allow readonly actions to be used in viewMode [#5982](https://github.com/excalidraw/excalidraw/pull/5982)
127
+
128
+ - Support labels for arrow 🔥 [#5723](https://github.com/excalidraw/excalidraw/pull/5723)
129
+
130
+ - Don't add midpoint until dragged beyond a threshold [#5927](https://github.com/excalidraw/excalidraw/pull/5927)
131
+
132
+ - Changed text copy/paste behaviour [#5786](https://github.com/excalidraw/excalidraw/pull/5786)
133
+
134
+ - Reintroduce `x` shortcut for `freedraw` [#5840](https://github.com/excalidraw/excalidraw/pull/5840)
135
+
136
+ - Tweak toolbar shortcuts & remove library shortcut [#5832](https://github.com/excalidraw/excalidraw/pull/5832)
137
+
138
+ - Clean unused images only after 24hrs (local-only) [#5839](https://github.com/excalidraw/excalidraw/pull/5839)
139
+
140
+ - Refetch errored/pending images on collab room init load [#5833](https://github.com/excalidraw/excalidraw/pull/5833)
141
+
142
+ - Stop deleting whole line when no point select in line editor [#5676](https://github.com/excalidraw/excalidraw/pull/5676)
143
+
144
+ - Editor redesign 🔥 [#5780](https://github.com/excalidraw/excalidraw/pull/5780)
145
+
146
+ ### Fixes
147
+
148
+ - Mobile tools positioning [#6107](https://github.com/excalidraw/excalidraw/pull/6107)
149
+
150
+ - Renamed folder MainMenu->main-menu and support rest props [#6103](https://github.com/excalidraw/excalidraw/pull/6103)
151
+
152
+ - Use position absolute for mobile misc tools [#6099](https://github.com/excalidraw/excalidraw/pull/6099)
153
+
154
+ - React.memo resolvers not accounting for all props [#6042](https://github.com/excalidraw/excalidraw/pull/6042)
155
+
156
+ - Image horizontal flip fix + improved tests [#5799](https://github.com/excalidraw/excalidraw/pull/5799)
157
+
158
+ - Png-exporting does not preserve angles correctly for flipped images [#6085](https://github.com/excalidraw/excalidraw/pull/6085)
159
+
160
+ - Stale appState of MainMenu defaultItems rendered from Actions [#6074](https://github.com/excalidraw/excalidraw/pull/6074)
161
+
162
+ - HelpDialog [#6072](https://github.com/excalidraw/excalidraw/pull/6072)
163
+
164
+ - Show error message on collab save failure [#6063](https://github.com/excalidraw/excalidraw/pull/6063)
165
+
166
+ - Remove ga from docker build [#6059](https://github.com/excalidraw/excalidraw/pull/6059)
167
+
168
+ - Use displayName since name gets stripped off when uglifying/minifiyng in production [#6036](https://github.com/excalidraw/excalidraw/pull/6036)
169
+
170
+ - Remove background from wysiwyg when editing arrow label [#6033](https://github.com/excalidraw/excalidraw/pull/6033)
171
+
172
+ - Use canvas measureText to calculate width in measureText [#6030](https://github.com/excalidraw/excalidraw/pull/6030)
173
+
174
+ - Restoring deleted bindings [#6029](https://github.com/excalidraw/excalidraw/pull/6029)
175
+
176
+ - ColorPicker getColor [#5949](https://github.com/excalidraw/excalidraw/pull/5949)
177
+
178
+ - Don't push whitespace to next line when exceeding max width during wrapping and make sure to use same width of text editor on DOM when measuring dimensions [#5996](https://github.com/excalidraw/excalidraw/pull/5996)
179
+
180
+ - Showing `grabbing` cursor when holding `spacebar` [#6015](https://github.com/excalidraw/excalidraw/pull/6015)
181
+
182
+ - Resize sometimes throwing on missing null-checks [#6013](https://github.com/excalidraw/excalidraw/pull/6013)
183
+
184
+ - PWA not working after CRA@5 update [#6012](https://github.com/excalidraw/excalidraw/pull/6012)
185
+
186
+ - Not properly restoring element stroke and bg colors [#6002](https://github.com/excalidraw/excalidraw/pull/6002)
187
+
188
+ - Avatar outline on safari & center [#5997](https://github.com/excalidraw/excalidraw/pull/5997)
189
+
190
+ - Chart pasting not working due to removing tab characters [#5987](https://github.com/excalidraw/excalidraw/pull/5987)
191
+
192
+ - Apply the right type of roundness when pasting styles [#5979](https://github.com/excalidraw/excalidraw/pull/5979)
193
+
194
+ - Remove editor onpaste handler [#5971](https://github.com/excalidraw/excalidraw/pull/5971)
195
+
196
+ - Remove blank space [#5950](https://github.com/excalidraw/excalidraw/pull/5950)
197
+
198
+ - Galego and Kurdî missing in languages plus two locale typos [#5954](https://github.com/excalidraw/excalidraw/pull/5954)
199
+
200
+ - `ExcalidrawArrowElement` rather than `ExcalidrawArrowEleement` [#5955](https://github.com/excalidraw/excalidraw/pull/5955)
201
+
202
+ - RenderFooter styling [#5962](https://github.com/excalidraw/excalidraw/pull/5962)
203
+
204
+ - Repair element bindings on restore [#5956](https://github.com/excalidraw/excalidraw/pull/5956)
205
+
206
+ - Don't allow whitespaces for bound text [#5939](https://github.com/excalidraw/excalidraw/pull/5939)
207
+
208
+ - Bindings do not survive history serialization [#5942](https://github.com/excalidraw/excalidraw/pull/5942)
209
+
210
+ - Dedupe boundElement ids when container duplicated with alt+drag [#5938](https://github.com/excalidraw/excalidraw/pull/5938)
211
+
212
+ - Scale font correctly when using shift [#5935](https://github.com/excalidraw/excalidraw/pull/5935)
213
+
214
+ - Always bind to container selected by user [#5880](https://github.com/excalidraw/excalidraw/pull/5880)
215
+
216
+ - Fonts not rendered on init if `loadingdone` not fired [#5923](https://github.com/excalidraw/excalidraw/pull/5923)
217
+
218
+ - Stop replacing `del` word with `Delete` [#5897](https://github.com/excalidraw/excalidraw/pull/5897)
219
+
220
+ - Remove legacy React.render() from the editor [#5893](https://github.com/excalidraw/excalidraw/pull/5893)
221
+
222
+ - Allow adding text via enter only for text containers [#5891](https://github.com/excalidraw/excalidraw/pull/5891)
223
+
224
+ - Stop font `loadingdone` loop when rendering element SVGs [#5883](https://github.com/excalidraw/excalidraw/pull/5883)
225
+
226
+ - Refresh text dimensions only after font load done [#5878](https://github.com/excalidraw/excalidraw/pull/5878)
227
+
228
+ - Correctly paste contents parsed by `JSON.parse()` as text. [#5868](https://github.com/excalidraw/excalidraw/pull/5868)
229
+
230
+ - SVG element attributes in icons.tsx [#5871](https://github.com/excalidraw/excalidraw/pull/5871)
231
+
232
+ - Merge existing text with new when pasted [#5856](https://github.com/excalidraw/excalidraw/pull/5856)
233
+
234
+ - Disable FAST_REFRESH to fix live reload [#5852](https://github.com/excalidraw/excalidraw/pull/5852)
235
+
236
+ - Paste clipboard contents into unbound text elements [#5849](https://github.com/excalidraw/excalidraw/pull/5849)
237
+
238
+ - Compute dimensions of container correctly when text pasted on container [#5845](https://github.com/excalidraw/excalidraw/pull/5845)
239
+
240
+ - Line editor points rendering below elements [#5781](https://github.com/excalidraw/excalidraw/pull/5781)
241
+
242
+ - Syncing 1-point lines to remote clients [#5677](https://github.com/excalidraw/excalidraw/pull/5677)
243
+
244
+ - Incorrectly selecting linear elements on creation while tool-locked [#5785](https://github.com/excalidraw/excalidraw/pull/5785)
245
+
246
+ - Corrected typo in toggle theme shortcut [#5813](https://github.com/excalidraw/excalidraw/pull/5813)
247
+
248
+ - Hide canvas-modifying UI in view mode [#5815](https://github.com/excalidraw/excalidraw/pull/5815)
249
+
250
+ - Fix vertical/horizntal centering icons [#5812](https://github.com/excalidraw/excalidraw/pull/5812)
251
+
252
+ - Consistent use of ZOOM_STEP [#5801](https://github.com/excalidraw/excalidraw/pull/5801)
253
+
254
+ - Multiple elements resizing regressions [#5586](https://github.com/excalidraw/excalidraw/pull/5586)
255
+
256
+ - Changelog typo [#5795](https://github.com/excalidraw/excalidraw/pull/5795)
257
+
258
+ ### Refactor
259
+
260
+ - Remove unnecessary code [#5933](https://github.com/excalidraw/excalidraw/pull/5933)
261
+
262
+ ### Build
263
+
264
+ - Move release scripts to use release branch [#5958](https://github.com/excalidraw/excalidraw/pull/5958)
265
+
266
+ - Stops ignoring .env files from docker context so env variables get set during react app build. [#5809](https://github.com/excalidraw/excalidraw/pull/5809)
267
+
268
+ ---
269
+
270
+ ## 0.13.0 (2022-10-27)
271
+
16
272
  ### Excalidraw API
17
273
 
18
274
  #### Features
19
275
 
20
- - Added support for storing [`customData`](https://github.com/excalidraw/excalidraw/blob/master/src/packages/excalidraw/README.md#storing-custom-data-to-excalidraw-elements) on Excalidraw elements [#5592].
21
- - Added `exportPadding?: number;` to [exportToCanvas](https://github.com/excalidraw/excalidraw/blob/master/src/packages/excalidraw/README.md#exporttocanvas) and [exportToBlob](https://github.com/excalidraw/excalidraw/blob/master/src/packages/excalidraw/README.md#exporttoblob). The default value of the padding is 10.
276
+ - `restoreElements()` now takes an optional parameter to indicate whether we should also recalculate text element dimensions. Defaults to `true`, but since this is a potentially costly operation, you may want to disable it if you restore elements in tight loops, such as during collaboration [#5432](https://github.com/excalidraw/excalidraw/pull/5432).
277
+ - Support rendering custom sidebar using [`renderSidebar`](https://github.com/excalidraw/excalidraw/blob/master/src/packages/excalidraw/README.md#renderSidebar) prop ([#5663](https://github.com/excalidraw/excalidraw/pull/5663)).
278
+ - Add [`toggleMenu`](https://github.com/excalidraw/excalidraw/blob/master/src/packages/excalidraw/README.md#toggleMenu) prop to toggle specific menu open/close state ([#5663](https://github.com/excalidraw/excalidraw/pull/5663)).
279
+ - Support [theme](https://github.com/excalidraw/excalidraw/blob/master/src/packages/excalidraw/README.md#theme) to be semi-controlled [#5660](https://github.com/excalidraw/excalidraw/pull/5660).
280
+ - Added support for storing [`customData`](https://github.com/excalidraw/excalidraw/blob/master/src/packages/excalidraw/README.md#storing-custom-data-on-excalidraw-elements) on Excalidraw elements [#5592].
281
+ - Added `exportPadding?: number;` to [exportToCanvas](https://github.com/excalidraw/excalidraw/blob/master/src/packages/excalidraw/README.md#exporttocanvas) and [exportToBlob](https://github.com/excalidraw/excalidraw/blob/master/src/packages/excalidraw/README.md#exporttoblob). The default value of the padding is `10`.
22
282
 
23
283
  #### Breaking Changes
24
284
 
285
+ - `props.UIOptions.canvasActions.theme` is now renamed to `props.UIOptions.canvasActions.toggleTheme` [#5660](https://github.com/excalidraw/excalidraw/pull/5660).
25
286
  - `setToastMessage` API is now renamed to `setToast` API and the function signature is also updated [#5427](https://github.com/excalidraw/excalidraw/pull/5427). You can also pass `duration` and `closable` attributes along with `message`.
26
287
 
288
+ ## Excalidraw Library
289
+
290
+ **_This section lists the updates made to the excalidraw library and will not affect the integration._**
291
+
292
+ ### Features
293
+
294
+ - Render library into `Sidebar` on mobile [#5774](https://github.com/excalidraw/excalidraw/pull/5774)
295
+
296
+ - Additional drag and drop image format support (webp, bmp, ico) [#5749](https://github.com/excalidraw/excalidraw/pull/5749)
297
+
298
+ - Enter and Exit line editor via context menu [#5719](https://github.com/excalidraw/excalidraw/pull/5719)
299
+
300
+ - Further reduce darkmode init flash [#5701](https://github.com/excalidraw/excalidraw/pull/5701)
301
+
302
+ - Support segment midpoints in line editor [#5641](https://github.com/excalidraw/excalidraw/pull/5641)
303
+
304
+ - Added exportPadding to PNG (blob) export in @excalidraw/utils [#5626](https://github.com/excalidraw/excalidraw/pull/5626)
305
+
306
+ - Introduce ExcalidrawElements and ExcalidrawAppState provider [#5463](https://github.com/excalidraw/excalidraw/pull/5463)
307
+
308
+ - Enable midpoint inside linear element editor [#5564](https://github.com/excalidraw/excalidraw/pull/5564)
309
+
310
+ - Show a mid point for linear elements [#5534](https://github.com/excalidraw/excalidraw/pull/5534)
311
+
312
+ - Lock angle when editing linear elements with shift pressed [#5527](https://github.com/excalidraw/excalidraw/pull/5527)
313
+
314
+ - Redesign linear elements 🎉 [#5501](https://github.com/excalidraw/excalidraw/pull/5501)
315
+
316
+ - Cursor alignment when creating linear elements with shift pressed [#5518](https://github.com/excalidraw/excalidraw/pull/5518)
317
+
318
+ - Shift-clamp when creating multi-point lines/arrows [#5500](https://github.com/excalidraw/excalidraw/pull/5500)
319
+
320
+ - Cursor alignment when creating generic elements [#5516](https://github.com/excalidraw/excalidraw/pull/5516)
321
+
322
+ - Make context menu scrollable [#4030](https://github.com/excalidraw/excalidraw/pull/4030)
323
+
324
+ ### Fixes
325
+
326
+ - Ungroup short cut key [#5779](https://github.com/excalidraw/excalidraw/pull/5779)
327
+
328
+ - Replaced KeyboardEvent.code with KeyboardEvent.key for all letters [#5523](https://github.com/excalidraw/excalidraw/pull/5523)
329
+
330
+ - Free draw flip not scaling correctly [#5752](https://github.com/excalidraw/excalidraw/pull/5752)
331
+
332
+ - Wait for window focus until prompting for library install [#5751](https://github.com/excalidraw/excalidraw/pull/5751)
333
+
334
+ - Update perfect freehand library to fix extra dot [#5727](https://github.com/excalidraw/excalidraw/pull/5727)
335
+
336
+ - RestoreElementWithProperties drops "parent" property [#5742](https://github.com/excalidraw/excalidraw/pull/5742)
337
+
338
+ - Horizontal text alignment for bound text when resizing [#5721](https://github.com/excalidraw/excalidraw/pull/5721)
339
+
340
+ - Set the dimensions of bound text correctly [#5710](https://github.com/excalidraw/excalidraw/pull/5710)
341
+
342
+ - Image-mirroring in export preview and in exported svg [#5700](https://github.com/excalidraw/excalidraw/pull/5700)
343
+
344
+ - Double state update incorrectly resetting state [#5704](https://github.com/excalidraw/excalidraw/pull/5704)
345
+
346
+ - Remove no longer used code related to collab room loading [#5699](https://github.com/excalidraw/excalidraw/pull/5699)
347
+
348
+ - Revert webpack deduping to fix `@next` runtime [#5695](https://github.com/excalidraw/excalidraw/pull/5695)
349
+
350
+ - Move to release notes for v0.9.0 and after [#5686](https://github.com/excalidraw/excalidraw/pull/5686)
351
+
352
+ - Zen-mode exit button not working [#5682](https://github.com/excalidraw/excalidraw/pull/5682)
353
+
354
+ - Buttons jump around on the mobile menu [#5658](https://github.com/excalidraw/excalidraw/pull/5658)
355
+
356
+ - #5622 - prevent session theme reset during collaboration [#5640](https://github.com/excalidraw/excalidraw/pull/5640)
357
+
358
+ - Library actions inside the sidebar [#5638](https://github.com/excalidraw/excalidraw/pull/5638)
359
+
360
+ - Don't render library menu twice for mobile [#5636](https://github.com/excalidraw/excalidraw/pull/5636)
361
+
362
+ - Reintroduce help dialog button [#5631](https://github.com/excalidraw/excalidraw/pull/5631)
363
+
364
+ - Add display name to components so it doesn't show as anonymous [#5616](https://github.com/excalidraw/excalidraw/pull/5616)
365
+
366
+ - Improve solveQuadratic when a = 0 [#5618](https://github.com/excalidraw/excalidraw/pull/5618)
367
+
368
+ - Add random tiny offsets to avoid linear elements from being clipped [#5615](https://github.com/excalidraw/excalidraw/pull/5615)
369
+
370
+ - Crash when adding a new point in the line editor #5602 [#5606](https://github.com/excalidraw/excalidraw/pull/5606)
371
+
372
+ - Allow box selection of points when inside editor [#5594](https://github.com/excalidraw/excalidraw/pull/5594)
373
+
374
+ - Remove unnecessary conditions in pointerup for linear elements [#5575](https://github.com/excalidraw/excalidraw/pull/5575)
375
+
376
+ - Check if hitting link in handleSelectionOnPointerDown [#5589](https://github.com/excalidraw/excalidraw/pull/5589)
377
+
378
+ - Points not being normalized on single-elem resize [#5581](https://github.com/excalidraw/excalidraw/pull/5581)
379
+
380
+ - Deselect linear element when clicked inside bounding box outside editor [#5579](https://github.com/excalidraw/excalidraw/pull/5579)
381
+
382
+ - Resize multiple elements from center [#5560](https://github.com/excalidraw/excalidraw/pull/5560)
383
+
384
+ - Call static methods via class instead of instance in linearElementEditor [#5561](https://github.com/excalidraw/excalidraw/pull/5561)
385
+
386
+ - Show bounding box for 3 or more linear point elements [#5554](https://github.com/excalidraw/excalidraw/pull/5554)
387
+
388
+ - Cleanup the condition for dragging elements [#5555](https://github.com/excalidraw/excalidraw/pull/5555)
389
+
390
+ - Shareable links being merged with current scene data [#5547](https://github.com/excalidraw/excalidraw/pull/5547)
391
+
392
+ - Scene lookup failing when looking up by id [#5542](https://github.com/excalidraw/excalidraw/pull/5542)
393
+
394
+ - Remove rounding to fix jitter when shift-editing [#5543](https://github.com/excalidraw/excalidraw/pull/5543)
395
+
396
+ - Line deselected when shift-dragging point outside editor [#5540](https://github.com/excalidraw/excalidraw/pull/5540)
397
+
398
+ - Flip linear elements after redesign [#5538](https://github.com/excalidraw/excalidraw/pull/5538)
399
+
400
+ - Disable locking aspect ratio for box-selection [#5525](https://github.com/excalidraw/excalidraw/pull/5525)
401
+
402
+ - Add `title` attribute to the modal close button [#5521](https://github.com/excalidraw/excalidraw/pull/5521)
403
+
404
+ - Context menu positioning when component has offsets [#5520](https://github.com/excalidraw/excalidraw/pull/5520)
405
+
406
+ - Resolve paths in prebuild.js script [#5498](https://github.com/excalidraw/excalidraw/pull/5498)
407
+
408
+ - Use flushSync when moving line editor since we need to read previous value after setting state [#5508](https://github.com/excalidraw/excalidraw/pull/5508)
409
+
410
+ - UseLayout effect cleanup in dev mode for charts [#5505](https://github.com/excalidraw/excalidraw/pull/5505)
411
+
412
+ - Revert browser toast for high/low zoom [#5495](https://github.com/excalidraw/excalidraw/pull/5495)
413
+
414
+ - Fixing push to DockerHub [#5468](https://github.com/excalidraw/excalidraw/pull/5468)
415
+
416
+ - Incorrectly rendering freedraw elements [#5481](https://github.com/excalidraw/excalidraw/pull/5481)
417
+
418
+ - Generate types when building example [#5480](https://github.com/excalidraw/excalidraw/pull/5480)
419
+
420
+ - Use React.FC as react-dom is not able to infer types of Modal [#5479](https://github.com/excalidraw/excalidraw/pull/5479)
421
+
422
+ - Missing translation for "Scale" to Export Dialog [#5456](https://github.com/excalidraw/excalidraw/pull/5456)
423
+
424
+ - Add display name for Excalidraw component so it doesn't show as anonymous [#5464](https://github.com/excalidraw/excalidraw/pull/5464)
425
+
426
+ - Account for safe area for floating buttons on mobile [#5420](https://github.com/excalidraw/excalidraw/pull/5420)
427
+
428
+ - Attribute warnings in comment svg example [#5465](https://github.com/excalidraw/excalidraw/pull/5465)
429
+
430
+ - Check for ctrl key when wheel event triggered to only disable zooming [#5459](https://github.com/excalidraw/excalidraw/pull/5459)
431
+
432
+ - Disable render throttling by default & during resize [#5451](https://github.com/excalidraw/excalidraw/pull/5451)
433
+
434
+ - Attach wheel event to exscalidraw container only [#5443](https://github.com/excalidraw/excalidraw/pull/5443)
435
+
436
+ - Show toast when browser zoom is not 100% [#5304](https://github.com/excalidraw/excalidraw/pull/5304)
437
+
438
+ - Prevent browser zoom inside Excalidraw [#5426](https://github.com/excalidraw/excalidraw/pull/5426)
439
+
440
+ - Typo in changelog [#5425](https://github.com/excalidraw/excalidraw/pull/5425)
441
+
442
+ ### Refactor
443
+
444
+ - Create a util to compute container dimensions for bound text container [#5708](https://github.com/excalidraw/excalidraw/pull/5708)
445
+
446
+ - Reuse common ui dialogs and message for mobile and LayerUI [#5611](https://github.com/excalidraw/excalidraw/pull/5611)
447
+
448
+ - Stats component [#5610](https://github.com/excalidraw/excalidraw/pull/5610)
449
+
450
+ - Move footer to its own component [#5609](https://github.com/excalidraw/excalidraw/pull/5609)
451
+
452
+ - Remove unused attribute hasHitElementInside from pointerDownState [#5591](https://github.com/excalidraw/excalidraw/pull/5591)
453
+
454
+ - Cleanup renderScene [#5573](https://github.com/excalidraw/excalidraw/pull/5573)
455
+
456
+ - Rename docs to dev-docs [#5487](https://github.com/excalidraw/excalidraw/pull/5487)
457
+
458
+ - Remove unnecessary if condition for linear element onKeyDown [#5486](https://github.com/excalidraw/excalidraw/pull/5486)
459
+
460
+ - Improve typing & check [#5415](https://github.com/excalidraw/excalidraw/pull/5415)
461
+
462
+ - Don't pass zenModeEnable, viewModeEnabled and toggleZenMode props to LayerUI [#5444](https://github.com/excalidraw/excalidraw/pull/5444)
463
+
464
+ ### Build
465
+
466
+ - Add missing dependencies: pica, lodash [#5656](https://github.com/excalidraw/excalidraw/pull/5656)
467
+
468
+ - Move dotenv to dev deps [#5472](https://github.com/excalidraw/excalidraw/pull/5472)
469
+
470
+ ---
471
+
27
472
  ## 0.12.0 (2022-07-07)
28
473
 
29
474
  Check out the [release notes](https://github.com/excalidraw/excalidraw/releases/tag/v0.12.0) )