@excalidraw/excalidraw 0.16.1-6920-d3d0bd0 → 0.16.1-7248-caa89f0

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 (44) hide show
  1. package/CHANGELOG.md +46 -2
  2. package/dist/excalidraw-assets/{vendor-1d7fa3a52ac368151052.js → vendor-0452b0f95a04b9622103.js} +2 -2
  3. package/dist/excalidraw-assets-dev/{vendor-69c110bed9124a145b63.js → vendor-0245ced0183e80375e32.js} +7 -7
  4. package/dist/excalidraw-with-preact.development.js +5883 -0
  5. package/dist/excalidraw-with-preact.production.min.js +2 -0
  6. package/dist/excalidraw-with-preact.production.min.js.LICENSE.txt +21 -0
  7. package/dist/excalidraw.development.js +164 -175
  8. package/dist/excalidraw.production.min.js +1 -1
  9. package/dist/excalidraw.production.min.js.LICENSE.txt +0 -10
  10. package/main.js +7 -1
  11. package/package.json +2 -2
  12. package/types/actions/actionCanvas.d.ts +1 -1
  13. package/types/actions/actionExport.d.ts +1 -1
  14. package/types/actions/actionGroup.d.ts +3 -3
  15. package/types/actions/actionMenu.d.ts +0 -13
  16. package/types/actions/index.d.ts +1 -1
  17. package/types/appState.d.ts +1 -1
  18. package/types/components/Actions.d.ts +3 -2
  19. package/types/components/App.d.ts +18 -10
  20. package/types/components/ImageExportDialog.d.ts +1 -1
  21. package/types/components/LayerUI.d.ts +1 -1
  22. package/types/components/MobileMenu.d.ts +4 -3
  23. package/types/constants.d.ts +6 -1
  24. package/types/data/index.d.ts +10 -2
  25. package/types/element/embeddable.d.ts +1 -1
  26. package/types/element/typeChecks.d.ts +1 -1
  27. package/types/errors.d.ts +5 -0
  28. package/types/frame.d.ts +11 -1
  29. package/types/packages/excalidraw/dist/excalidraw-with-preact.development.d.ts +2 -0
  30. package/types/packages/excalidraw/dist/excalidraw-with-preact.production.min.d.ts +1 -0
  31. package/types/packages/excalidraw/dist/excalidraw.development.d.ts +2 -2
  32. package/types/packages/excalidraw/index.d.ts +3 -3
  33. package/types/packages/excalidraw/webpack.preact.config.d.ts +171 -0
  34. package/types/packages/utils.d.ts +4 -3
  35. package/types/packages/withinBounds.d.ts +2 -2
  36. package/types/renderer/renderElement.d.ts +5 -1
  37. package/types/renderer/renderScene.d.ts +5 -5
  38. package/types/scene/Scene.d.ts +7 -2
  39. package/types/scene/export.d.ts +5 -5
  40. package/types/types.d.ts +16 -16
  41. package/types/utils.d.ts +6 -1
  42. /package/dist/excalidraw-assets/{vendor-1d7fa3a52ac368151052.js.LICENSE.txt → vendor-0452b0f95a04b9622103.js.LICENSE.txt} +0 -0
  43. /package/types/packages/excalidraw/dist/excalidraw-assets/{vendor-1d7fa3a52ac368151052.d.ts → vendor-0452b0f95a04b9622103.d.ts} +0 -0
  44. /package/types/packages/excalidraw/dist/excalidraw-assets-dev/{vendor-69c110bed9124a145b63.d.ts → vendor-0245ced0183e80375e32.d.ts} +0 -0
package/CHANGELOG.md CHANGED
@@ -15,10 +15,54 @@ Please add the latest change on the top under the correct section.
15
15
 
16
16
  ### Features
17
17
 
18
+ - Added support for disabling `image` tool (also disabling image insertion in general, though keeps support for importing from `.excalidraw` files) [#6320](https://github.com/excalidraw/excalidraw/pull/6320).
19
+
20
+ For disabling `image` you need to set 👇
21
+
22
+ ```
23
+ UIOptions.tools = {
24
+ image: false
25
+ }
26
+ ```
27
+
28
+ - Support `excalidrawAPI` prop for accessing the Excalidraw API [#7251](https://github.com/excalidraw/excalidraw/pull/7251).
29
+
30
+ - Export [`getCommonBounds`](https://docs.excalidraw.com/docs/@excalidraw/excalidraw/api/utils#getcommonbounds) helper from the package [#7247](https://github.com/excalidraw/excalidraw/pull/7247).
31
+
18
32
  - Export `elementsOverlappingBBox`, `isElementInsideBBox`, `elementPartiallyOverlapsWithOrContainsBBox` helpers for filtering/checking if elements within bounds. [#6727](https://github.com/excalidraw/excalidraw/pull/6727)
33
+
19
34
  - Regenerate ids by default when using transform api and also update bindings by 0.5px to avoid possible overlapping [#7195](https://github.com/excalidraw/excalidraw/pull/7195)
35
+
36
+ - Add onChange, onPointerDown, onPointerUp api subscribers [#7154](https://github.com/excalidraw/excalidraw/pull/7154).
37
+
38
+ - Support props.locked for setActiveTool [#7153](https://github.com/excalidraw/excalidraw/pull/7153).
39
+
20
40
  - Add `selected` prop for `MainMenu.Item` and `MainMenu.ItemCustom` components to indicate active state. [#7078](https://github.com/excalidraw/excalidraw/pull/7078)
21
41
 
42
+ ### Fixes
43
+
44
+ - Double image dialog on image insertion [#7152](https://github.com/excalidraw/excalidraw/pull/7152).
45
+
46
+ ### Breaking Changes
47
+
48
+ - The `Ref` support has been removed in v0.17.0 so if you are using refs, please update the integration to use the [`excalidrawAPI`](http://localhost:3003/docs/@excalidraw/excalidraw/api/props/excalidraw-api) [#7251](https://github.com/excalidraw/excalidraw/pull/7251).
49
+
50
+ - Additionally `ready` and `readyPromise` from the API have been discontinued. These APIs were found to be superfluous, and as part of the effort to streamline the APIs and maintain simplicity, they were removed in version v0.17.0 [#7251](https://github.com/excalidraw/excalidraw/pull/7251).
51
+
52
+ - [`useDevice`](https://docs.excalidraw.com/docs/@excalidraw/excalidraw/api/utils#usedevice) hook's return value was changed to differentiate between `editor` and `viewport` breakpoints. [#7243](https://github.com/excalidraw/excalidraw/pull/7243)
53
+
54
+ ### Build
55
+
56
+ - Support Preact [#7255](https://github.com/excalidraw/excalidraw/pull/7255). The host needs to set `process.env.IS_PREACT` to `true`
57
+
58
+ When using vite, you will have to make sure the variable process.env.IS_PREACT is available at runtime since Vite removes it by default, so you can update the vite config to ensure its available
59
+
60
+ ```js
61
+ define: {
62
+ "process.env.IS_PREACT": process.env.IS_PREACT,
63
+ }
64
+ ```
65
+
22
66
  ## 0.16.1 (2023-09-21)
23
67
 
24
68
  ## Excalidraw Library
@@ -40,7 +84,7 @@ Please add the latest change on the top under the correct section.
40
84
  - Support creating containers, linear elements, text containers, labelled arrows and arrow bindings programatically [#6546](https://github.com/excalidraw/excalidraw/pull/6546)
41
85
  - Introducing Web-Embeds (alias iframe element)[#6691](https://github.com/excalidraw/excalidraw/pull/6691)
42
86
  - Added [`props.validateEmbeddable`](https://docs.excalidraw.com/docs/@excalidraw/excalidraw/api/props#validateEmbeddable) to customize embeddable src url validation. [#6691](https://github.com/excalidraw/excalidraw/pull/6691)
43
- - Add support for `opts.fitToViewport` and `opts.viewportZoomFactor` in the [`ExcalidrawAPI.scrollToContent`](https://docs.excalidraw.com/docs/@excalidraw/excalidraw/api/props/ref#scrolltocontent) API. [#6581](https://github.com/excalidraw/excalidraw/pull/6581).
87
+ - Add support for `opts.fitToViewport` and `opts.viewportZoomFactor` in the [`ExcalidrawAPI.scrollToContent`](https://docs.excalidraw.com/docs/@excalidraw/excalidraw/api/props/excalidraw-api#scrolltocontent) API. [#6581](https://github.com/excalidraw/excalidraw/pull/6581).
44
88
  - Properly sanitize element `link` urls. [#6728](https://github.com/excalidraw/excalidraw/pull/6728).
45
89
  - Sidebar component now supports tabs — for more detailed description of new behavior and breaking changes, see the linked PR. [#6213](https://github.com/excalidraw/excalidraw/pull/6213)
46
90
  - Exposed `DefaultSidebar` component to allow modifying the default sidebar, such as adding custom tabs to it. [#6213](https://github.com/excalidraw/excalidraw/pull/6213)
@@ -319,7 +363,7 @@ Please add the latest change on the top under the correct section.
319
363
 
320
364
  ### Features
321
365
 
322
- - [`ExcalidrawAPI.scrollToContent`](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)
366
+ - [`ExcalidrawAPI.scrollToContent`](https://docs.excalidraw.com/docs/@excalidraw/excalidraw/api/props/excalidraw-api#scrolltocontent) has new opts object allowing you to fit viewport to content, and animate the scrolling. [#6319](https://github.com/excalidraw/excalidraw/pull/6319)
323
367
 
324
368
  - 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)
325
369