@dwelle/excalidraw 0.3.27 → 0.3.31

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 (32) hide show
  1. package/CHANGELOG.md +2 -0
  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 +69 -92
  8. package/dist/excalidraw.production.min.js +1 -1
  9. package/package.json +4 -4
  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/scene/comparisons.d.ts +1 -1
  29. package/types/scene/selection.d.ts +1 -1
  30. package/types/shapes.d.ts +1 -1
  31. package/types/types.d.ts +4 -0
  32. package/types/utils.d.ts +0 -5
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.
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 |