@dwelle/excalidraw 0.4.0-83d46fe → 0.4.0-8a7de60

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 (65) hide show
  1. package/CHANGELOG.md +248 -1
  2. package/README.md +16 -1822
  3. package/dist/excalidraw.development.js +196 -109
  4. package/dist/excalidraw.production.min.js +1 -1
  5. package/dist/excalidraw.production.min.js.LICENSE.txt +20 -0
  6. package/package.json +2 -2
  7. package/types/actions/actionAddToLibrary.d.ts +2 -1
  8. package/types/actions/actionBoundText.d.ts +129 -9
  9. package/types/actions/actionCanvas.d.ts +115 -9
  10. package/types/actions/actionClipboard.d.ts +3 -3
  11. package/types/actions/actionDeleteSelected.d.ts +5 -5
  12. package/types/actions/actionDuplicateSelection.d.ts +1 -1
  13. package/types/actions/actionExport.d.ts +8 -8
  14. package/types/actions/actionFinalize.d.ts +2 -2
  15. package/types/actions/actionLinearEditor.d.ts +2 -1
  16. package/types/actions/actionMenu.d.ts +3 -3
  17. package/types/actions/actionProperties.d.ts +14 -14
  18. package/types/actions/actionStyles.d.ts +1 -1
  19. package/types/actions/actionToggleGridMode.d.ts +1 -1
  20. package/types/actions/actionToggleLock.d.ts +1 -1
  21. package/types/actions/actionToggleStats.d.ts +1 -1
  22. package/types/actions/actionToggleViewMode.d.ts +1 -1
  23. package/types/actions/actionToggleZenMode.d.ts +1 -1
  24. package/types/actions/shortcuts.d.ts +2 -1
  25. package/types/actions/types.d.ts +2 -1
  26. package/types/clipboard.d.ts +2 -2
  27. package/types/components/App.d.ts +12 -1
  28. package/types/components/BraveMeasureTextError.d.ts +2 -0
  29. package/types/components/ButtonIconSelect.d.ts +11 -3
  30. package/types/components/ErrorDialog.d.ts +3 -2
  31. package/types/components/HelpButton.d.ts +0 -1
  32. package/types/components/LayerUI.d.ts +1 -2
  33. package/types/components/MobileMenu.d.ts +3 -4
  34. package/types/components/context/tunnels.d.ts +16 -0
  35. package/types/components/dropdownMenu/common.d.ts +1 -1
  36. package/types/components/footer/Footer.d.ts +3 -4
  37. package/types/components/hoc/withInternalFallback.d.ts +4 -0
  38. package/types/components/icons.d.ts +1 -0
  39. package/types/components/main-menu/MainMenu.d.ts +9 -9
  40. package/types/components/welcome-screen/WelcomeScreen.d.ts +2 -2
  41. package/types/constants.d.ts +32 -7
  42. package/types/data/blob.d.ts +3 -2
  43. package/types/data/filesystem.d.ts +2 -1
  44. package/types/data/restore.d.ts +8 -2
  45. package/types/element/Hyperlink.d.ts +1 -1
  46. package/types/element/image.d.ts +11 -1
  47. package/types/element/linearElementEditor.d.ts +1 -1
  48. package/types/element/mutateElement.d.ts +1 -0
  49. package/types/element/newElement.d.ts +34 -10
  50. package/types/element/sortElements.d.ts +2 -0
  51. package/types/element/textElement.d.ts +39 -11
  52. package/types/element/typeChecks.d.ts +2 -1
  53. package/types/element/types.d.ts +9 -1
  54. package/types/i18n.d.ts +6 -0
  55. package/types/jotai.d.ts +5 -5
  56. package/types/math.d.ts +1 -0
  57. package/types/packages/excalidraw/example/App.d.ts +7 -1
  58. package/types/packages/excalidraw/index.d.ts +2 -1
  59. package/types/packages/utils.d.ts +4 -0
  60. package/types/renderer/renderElement.d.ts +3 -2
  61. package/types/scene/export.d.ts +13 -1
  62. package/types/types.d.ts +9 -22
  63. package/types/utility-types.d.ts +22 -0
  64. package/types/utils.d.ts +23 -17
  65. package/types/components/SingleLibraryItem.d.ts +0 -10
package/CHANGELOG.md CHANGED
@@ -11,12 +11,259 @@ The change should be grouped under one of the below section and must contain PR
11
11
  Please add the latest change on the top under the correct section.
12
12
  -->
13
13
 
14
- ## Unreleased
14
+ ## 0.15.2 (2023-04-20)
15
+
16
+ ### Docs
17
+
18
+ - Fix docs link in readme [#6486](https://github.com/excalidraw/excalidraw/pull/6486)
19
+
20
+ ## Excalidraw Library
21
+
22
+ **_This section lists the updates made to the excalidraw library and will not affect the integration._**
23
+
24
+ ### Fixes
25
+
26
+ - Rotate the text element when binding to a rotated container [#6477](https://github.com/excalidraw/excalidraw/pull/6477)
27
+
28
+ - Support breaking words containing hyphen - [#6014](https://github.com/excalidraw/excalidraw/pull/6014)
29
+
30
+ - Incorrect background fill button active state [#6491](https://github.com/excalidraw/excalidraw/pull/6491)
31
+
32
+ ---
33
+
34
+ ## 0.15.1 (2023-04-18)
35
+
36
+ ### Docs
37
+
38
+ - Add the readme back to the package which was mistakenly removed [#6484](https://github.com/excalidraw/excalidraw/pull/6484)
39
+
40
+ ## Excalidraw Library
41
+
42
+ **_This section lists the updates made to the excalidraw library and will not affect the integration._**
43
+
44
+ ---
45
+
46
+ ## 0.15.0 (2023-04-18)
47
+
48
+ ### Features
49
+
50
+ - [`ExcalidrawAPI.scrolToContent`](https://docs.excalidraw.com/docs/@excalidraw/excalidraw/api/props/ref#scrolltocontent) has new opts object allowing you to fit viewport to content, and animate the scrolling. [#6319](https://github.com/excalidraw/excalidraw/pull/6319)
51
+
52
+ - 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)
53
+
54
+ - [`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
55
+
56
+ ```js
57
+ { refreshDimensions?: boolean, repairBindings?: boolean }
58
+ ```
59
+
60
+ The same `opts` param has been added to [`restore`](https://docs.excalidraw.com/docs/@excalidraw/excalidraw/api/utils/restore#restore) API as well.
61
+
62
+ For more details refer to the [docs](https://docs.excalidraw.com)
63
+
64
+ #### BREAKING CHANGE
65
+
66
+ - 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`
67
+
68
+ ### Fixes
69
+
70
+ - Exporting labelled arrows via export utils [#6443](https://github.com/excalidraw/excalidraw/pull/6443)
71
+
72
+ ## Excalidraw Library
73
+
74
+ **_This section lists the updates made to the excalidraw library and will not affect the integration._**
75
+
76
+ ### Features
77
+
78
+ - Constrain export dialog preview size [#6475](https://github.com/excalidraw/excalidraw/pull/6475)
79
+
80
+ - Zigzag fill easter egg [#6439](https://github.com/excalidraw/excalidraw/pull/6439)
81
+
82
+ - Add container to multiple text elements [#6428](https://github.com/excalidraw/excalidraw/pull/6428)
83
+
84
+ - Starting migration from GA to Matomo for better privacy [#6398](https://github.com/excalidraw/excalidraw/pull/6398)
85
+
86
+ - Add line height attribute to text element [#6360](https://github.com/excalidraw/excalidraw/pull/6360)
87
+
88
+ - Add thai lang support [#6314](https://github.com/excalidraw/excalidraw/pull/6314)
89
+
90
+ - Create bound container from text [#6301](https://github.com/excalidraw/excalidraw/pull/6301)
91
+
92
+ - Improve text measurements in bound containers [#6187](https://github.com/excalidraw/excalidraw/pull/6187)
93
+
94
+ - Bind text to container if double clicked on filled shape or stroke [#6250](https://github.com/excalidraw/excalidraw/pull/6250)
95
+
96
+ - Make repair and refreshDimensions configurable in restoreElements [#6238](https://github.com/excalidraw/excalidraw/pull/6238)
97
+
98
+ - Show error message when not connected to internet while collabo… [#6165](https://github.com/excalidraw/excalidraw/pull/6165)
99
+
100
+ - Shortcut for clearCanvas confirmDialog [#6114](https://github.com/excalidraw/excalidraw/pull/6114)
101
+
102
+ - Disable canvas smoothing (antialiasing) for right-angled elements [#6186](https://github.com/excalidraw/excalidraw/pull/6186)Co-authored-by: Ignacio Cuadra <67276174+ignacio-cuadra@users.noreply.github.com>
103
+
104
+ ### Fixes
105
+
106
+ - Center align text when wrapped in container via context menu [#6480](https://github.com/excalidraw/excalidraw/pull/6480)
107
+
108
+ - Restore original container height when unbinding text which was binded via context menu [#6444](https://github.com/excalidraw/excalidraw/pull/6444)
109
+
110
+ - Mark more props as optional for element [#6448](https://github.com/excalidraw/excalidraw/pull/6448)
111
+
112
+ - Improperly cache-busting on canvas scale instead of zoom [#6473](https://github.com/excalidraw/excalidraw/pull/6473)
113
+
114
+ - Incorrectly duplicating items on paste/library insert [#6467](https://github.com/excalidraw/excalidraw/pull/6467)
115
+
116
+ - Library ids cross-contamination on multiple insert [#6466](https://github.com/excalidraw/excalidraw/pull/6466)
117
+
118
+ - Color picker keyboard handling not working [#6464](https://github.com/excalidraw/excalidraw/pull/6464)
119
+
120
+ - Abort freedraw line if second touch is detected [#6440](https://github.com/excalidraw/excalidraw/pull/6440)
121
+
122
+ - Utils leaking Scene state [#6461](https://github.com/excalidraw/excalidraw/pull/6461)
123
+
124
+ - Split "Edit selected shape" shortcut [#6457](https://github.com/excalidraw/excalidraw/pull/6457)
125
+
126
+ - Center align text when bind to container via context menu [#6451](https://github.com/excalidraw/excalidraw/pull/6451)
127
+
128
+ - Update coords when text unbinded from its container [#6445](https://github.com/excalidraw/excalidraw/pull/6445)
129
+
130
+ - Autoredirect to plus in prod only [#6446](https://github.com/excalidraw/excalidraw/pull/6446)
131
+
132
+ - Fixing popover overflow on small screen [#6433](https://github.com/excalidraw/excalidraw/pull/6433)
133
+
134
+ - Introduce baseline to fix the layout shift when switching to text editor [#6397](https://github.com/excalidraw/excalidraw/pull/6397)
135
+
136
+ - Don't refresh dimensions for deleted text elements [#6438](https://github.com/excalidraw/excalidraw/pull/6438)
137
+
138
+ - Element vanishes when zoomed in [#6417](https://github.com/excalidraw/excalidraw/pull/6417)
139
+
140
+ - Don't jump text to end when out of viewport in safari [#6416](https://github.com/excalidraw/excalidraw/pull/6416)
141
+
142
+ - GetDefaultLineHeight should return default font family line height for unknown font [#6399](https://github.com/excalidraw/excalidraw/pull/6399)
143
+
144
+ - Revert use `ideographic` textBaseline to improve layout shift when editing text" [#6400](https://github.com/excalidraw/excalidraw/pull/6400)
145
+
146
+ - Call stack size exceeded when paste large text [#6373](https://github.com/excalidraw/excalidraw/pull/6373) (#6396)
147
+
148
+ - Use `ideographic` textBaseline to improve layout shift when editing text [#6384](https://github.com/excalidraw/excalidraw/pull/6384)
149
+
150
+ - Chrome crashing when embedding scene on chrome arm [#6383](https://github.com/excalidraw/excalidraw/pull/6383)
151
+
152
+ - Division by zero in findFocusPointForEllipse leads to infinite loop in wrapText freezing Excalidraw [#6377](https://github.com/excalidraw/excalidraw/pull/6377)
153
+
154
+ - Containerizing text incorrectly updates arrow bindings [#6369](https://github.com/excalidraw/excalidraw/pull/6369)
155
+
156
+ - Ensure export preview is centered [#6337](https://github.com/excalidraw/excalidraw/pull/6337)
157
+
158
+ - Hide text align for labelled arrows [#6339](https://github.com/excalidraw/excalidraw/pull/6339)
159
+
160
+ - Refresh dimensions when elements loaded from shareable link and blob [#6333](https://github.com/excalidraw/excalidraw/pull/6333)
161
+
162
+ - Show error message when measureText API breaks in brave [#6336](https://github.com/excalidraw/excalidraw/pull/6336)
163
+
164
+ - Add an offset of 0.5px for text editor in containers [#6328](https://github.com/excalidraw/excalidraw/pull/6328)
165
+
166
+ - Move utility types out of `.d.ts` file to fix exported declaration files [#6315](https://github.com/excalidraw/excalidraw/pull/6315)
167
+
168
+ - More jotai scopes missing [#6313](https://github.com/excalidraw/excalidraw/pull/6313)
169
+
170
+ - Provide HelpButton title prop [#6209](https://github.com/excalidraw/excalidraw/pull/6209)
171
+
172
+ - Respect text align when wrapping in a container [#6310](https://github.com/excalidraw/excalidraw/pull/6310)
173
+
174
+ - Compute bounding box correctly for text element when multiple element resizing [#6307](https://github.com/excalidraw/excalidraw/pull/6307)
175
+
176
+ - Use jotai scope for editor-specific atoms [#6308](https://github.com/excalidraw/excalidraw/pull/6308)
177
+
178
+ - Consider arrow for bound text element [#6297](https://github.com/excalidraw/excalidraw/pull/6297)
179
+
180
+ - Text never goes beyond max width for unbound text elements [#6288](https://github.com/excalidraw/excalidraw/pull/6288)
181
+
182
+ - Svg text baseline [#6285](https://github.com/excalidraw/excalidraw/pull/6273)
183
+
184
+ - Compute container height from bound text correctly [#6273](https://github.com/excalidraw/excalidraw/pull/6273)
185
+
186
+ - Fit mobile toolbar and make scrollable [#6270](https://github.com/excalidraw/excalidraw/pull/6270)
187
+
188
+ - Indenting via `tab` clashing with IME compositor [#6258](https://github.com/excalidraw/excalidraw/pull/6258)
189
+
190
+ - Improve text wrapping inside rhombus and more fixes [#6265](https://github.com/excalidraw/excalidraw/pull/6265)
191
+
192
+ - Improve text wrapping in ellipse and alignment [#6172](https://github.com/excalidraw/excalidraw/pull/6172)
193
+
194
+ - Don't allow blank space in collab name [#6211](https://github.com/excalidraw/excalidraw/pull/6211)
195
+
196
+ - Docker build architecture:linux/amd64 error occur on linux/arm64 instance [#6197](https://github.com/excalidraw/excalidraw/pull/6197)
197
+
198
+ - Sort bound text elements to fix text duplication z-index error [#5130](https://github.com/excalidraw/excalidraw/pull/5130)
199
+
200
+ - Hide welcome screen on mobile once user interacts [#6185](https://github.com/excalidraw/excalidraw/pull/6185)
201
+
202
+ - Edit link in docs [#6182](https://github.com/excalidraw/excalidraw/pull/6182)
203
+
204
+ ### Refactor
205
+
206
+ - Inline `SingleLibraryItem` into `PublishLibrary` [#6462](https://github.com/excalidraw/excalidraw/pull/6462)
207
+
208
+ - Make the example React app reusable without duplication [#6188](https://github.com/excalidraw/excalidraw/pull/6188)
209
+
210
+ ### Performance
211
+
212
+ - Break early if the line width <= max width of the container [#6347](https://github.com/excalidraw/excalidraw/pull/6347)
213
+
214
+ ### Build
215
+
216
+ - Move TS and types to devDependencies [#6346](https://github.com/excalidraw/excalidraw/pull/6346)
217
+
218
+ ---
219
+
220
+ ## 0.14.2 (2023-02-01)
15
221
 
16
222
  ### Features
17
223
 
224
+ - 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)
18
225
  - `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)
19
226
 
227
+ ### Fixes
228
+
229
+ - declare css variable for font in excalidraw so its available in host [#6160](https://github.com/excalidraw/excalidraw/pull/6160)
230
+
231
+ ## Excalidraw Library
232
+
233
+ **_This section lists the updates made to the excalidraw library and will not affect the integration._**
234
+
235
+ ### Features
236
+
237
+ - Add hand/panning tool [#6141](https://github.com/excalidraw/excalidraw/pull/6141)
238
+
239
+ - Show copy-as-png export button on firefox and show steps how to enable it [#6125](https://github.com/excalidraw/excalidraw/pull/6125)
240
+
241
+ ### Fixes
242
+
243
+ - Horizontal padding when aligning bound text containers [#6180](https://github.com/excalidraw/excalidraw/pull/6180)
244
+
245
+ - Make tunnels work in multi-instance scenarios [#6178](https://github.com/excalidraw/excalidraw/pull/6178)
246
+
247
+ - Add 1px width to the container to calculate more accurately [#6174](https://github.com/excalidraw/excalidraw/pull/6174)
248
+
249
+ - Quick typo fix [#6167](https://github.com/excalidraw/excalidraw/pull/6167)
250
+
251
+ - Set the width correctly using measureText in editor [#6162](https://github.com/excalidraw/excalidraw/pull/6162)
252
+
253
+ - :bug: broken emojis when wrap text [#6153](https://github.com/excalidraw/excalidraw/pull/6153)
254
+
255
+ - Button background and svg sizes [#6155](https://github.com/excalidraw/excalidraw/pull/6155)
256
+
257
+ ### Styles
258
+
259
+ - Change in ExportButton style [#6147](https://github.com/excalidraw/excalidraw/pull/6147) (#6148)
260
+
261
+ ### Build
262
+
263
+ - Temporarily disable pre-commit [#6132](https://github.com/excalidraw/excalidraw/pull/6132)
264
+
265
+ ---
266
+
20
267
  ## 0.14.1 (2023-01-16)
21
268
 
22
269
  ### Fixes