@dwelle/excalidraw 0.3.26 → 0.3.30

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 (38) hide show
  1. package/CHANGELOG.md +8 -4
  2. package/README_NEXT.md +25 -0
  3. package/dist/excalidraw-assets/{vendor-64ea3ed78bc76a895e61.js → vendor-8698157b56eb5e0ee549.js} +2 -2
  4. package/dist/excalidraw-assets/{vendor-64ea3ed78bc76a895e61.js.LICENSE.txt → vendor-8698157b56eb5e0ee549.js.LICENSE.txt} +0 -2
  5. package/dist/excalidraw-assets-dev/{image-469d5bd946743969995a.js → image-e50a452aa26d28419e39.js} +0 -0
  6. package/dist/excalidraw-assets-dev/{vendor-a449655791956f151f51.js → vendor-1bc8ceaafd8623c96dd4.js} +0 -66
  7. package/dist/excalidraw.development.js +71 -94
  8. package/dist/excalidraw.production.min.js +1 -1
  9. package/package.json +4 -5
  10. package/types/appState.d.ts +1 -1
  11. package/types/components/App.d.ts +1 -1
  12. package/types/components/Card.d.ts +1 -1
  13. package/types/components/LayerUI.d.ts +2 -1
  14. package/types/components/LibraryButton.d.ts +1 -0
  15. package/types/components/LockButton.d.ts +1 -0
  16. package/types/constants.d.ts +1 -0
  17. package/types/element/collision.d.ts +1 -0
  18. package/types/element/dragElements.d.ts +1 -2
  19. package/types/element/linearElementEditor.d.ts +134 -9
  20. package/types/element/newElement.d.ts +6 -4
  21. package/types/element/textElement.d.ts +22 -1
  22. package/types/element/textWysiwyg.d.ts +1 -0
  23. package/types/element/typeChecks.d.ts +4 -1
  24. package/types/element/types.d.ts +10 -2
  25. package/types/packages/excalidraw/dist/excalidraw-assets/vendor-8698157b56eb5e0ee549.d.ts +0 -0
  26. package/types/packages/excalidraw/dist/excalidraw-assets-dev/image-e50a452aa26d28419e39.d.ts +0 -0
  27. package/types/packages/excalidraw/dist/excalidraw-assets-dev/vendor-1bc8ceaafd8623c96dd4.d.ts +0 -0
  28. package/types/packages/excalidraw/webpack.dev.config.d.ts +5 -7
  29. package/types/packages/excalidraw/webpack.prod.config.d.ts +5 -7
  30. package/types/scene/comparisons.d.ts +1 -1
  31. package/types/scene/selection.d.ts +1 -1
  32. package/types/shapes.d.ts +1 -1
  33. package/types/types.d.ts +5 -0
  34. package/types/utils.d.ts +0 -5
  35. package/dist/0adeb55dfbca17fad22e.woff2 +0 -1
  36. package/dist/be42d56e500bdd14ae50.woff2 +0 -1
  37. package/dist/d9454a7bea9e32f0c282.woff2 +0 -1
  38. package/dist/edf7912ad1921efb0e5c.woff2 +0 -1
package/CHANGELOG.md CHANGED
@@ -19,6 +19,8 @@ Please add the latest change on the top under the correct section.
19
19
 
20
20
  ### Features
21
21
 
22
+ - Introduced primary colors to the app. The colors can be overriden. Check [readme](https://github.com/excalidraw/excalidraw/blob/master/src/packages/excalidraw/README.md#customizing-styles) on how to do so.
23
+
22
24
  - #### BREAKING CHANGE
23
25
 
24
26
  Removed `getElementMap` util method.
@@ -52,10 +54,6 @@ Please add the latest change on the top under the correct section.
52
54
  - `.excalidraw` files may now contain top-level `files` key in format of `Record<FileId, BinaryFileData>` when exporting any (image) elements.
53
55
  - Changes were made to various export utilityies exported from the package so that they take `files`. For now, TypeScript should help you figure the changes out.
54
56
 
55
- ## Excalidraw API
56
-
57
- ### Features
58
-
59
57
  - 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).
60
58
 
61
59
  - Support [`renderTopRightUI`](https://github.com/excalidraw/excalidraw/blob/master/src/packages/excalidraw/README.md#renderTopRightUI) in mobile UI.
@@ -66,6 +64,12 @@ Please add the latest change on the top under the correct section.
66
64
 
67
65
  The `Appearance` type is now removed and renamed to `Theme` so `Theme` type needs to be used.
68
66
 
67
+ ### Build
68
+
69
+ - Remove `file-loader` so font assets are not duplicated by webpack and use webpack asset modules for font generation [#4380](https://github.com/excalidraw/excalidraw/pull/4380)
70
+
71
+ - We're now compiling to `es2017` target. Notably, `async/await` is not compiled down to generators. [#4341](https://github.com/excalidraw/excalidraw/pull/4341)
72
+
69
73
  ---
70
74
 
71
75
  ## 0.10.0 (2021-10-13)
package/README_NEXT.md CHANGED
@@ -353,6 +353,31 @@ To view the full example visit :point_down:
353
353
 
354
354
  </details>
355
355
 
356
+ ### Customizing styles
357
+
358
+ Excalidraw is using CSS variables to style certain components. To override them, you should set your own on the `.excalidraw` and `.excalidraw.theme--dark` (for dark mode variables) selectors.
359
+
360
+ Make sure the selector has higher specificity, e.g. by prefixing it with your app's selector:
361
+
362
+ ```css
363
+ .your-app .excalidraw {
364
+ --color-primary: red;
365
+ }
366
+ .your-app .excalidraw.theme--dark {
367
+ --color-primary: pink;
368
+ }
369
+ ```
370
+
371
+ Most notably, you can customize the primary colors, by overriding these variables:
372
+
373
+ - `--color-primary`
374
+ - `--color-primary-darker`
375
+ - `--color-primary-darkest`
376
+ - `--color-primary-light`
377
+ - `--color-primary-chubb` — a slightly darker (in light mode), or lighter (in dark mode) `--color-primary` color to account for [Chubb illusion](https://en.wikipedia.org/wiki/Chubb_illusion).
378
+
379
+ For a complete list of variables, check [theme.scss](https://github.com/excalidraw/excalidraw/blob/master/src/css/theme.scss), though most of them will not make sense to override.
380
+
356
381
  ### Props
357
382
 
358
383
  | Name | Type | Default | Description |