@yorab/react-paint 0.4.2 → 0.5.0

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 (37) hide show
  1. package/README.md +1 -0
  2. package/dist/components/App.js +58 -71
  3. package/dist/components/Canvas.js +9 -9
  4. package/dist/components/common/Button.js +4 -4
  5. package/dist/components/common/Loading.js +3 -3
  6. package/dist/components/common/Modal.js +3 -3
  7. package/dist/components/common/Panel.js +2 -2
  8. package/dist/components/common/Snackbar.js +2 -2
  9. package/dist/components/settings/ColorField.js +9 -9
  10. package/dist/components/settings/FontFamilyField.js +7 -5
  11. package/dist/components/settings/LayoutButton.js +1 -1
  12. package/dist/components/settings/Layouts.js +9 -9
  13. package/dist/components/settings/LineArrowField.js +8 -6
  14. package/dist/components/settings/LineTypeField.js +7 -5
  15. package/dist/components/settings/PointsNumberField.js +19 -29
  16. package/dist/components/settings/RangeField.js +2 -1
  17. package/dist/components/settings/SelectField.js +2 -1
  18. package/dist/components/settings/SettingsBar.js +107 -80
  19. package/dist/components/toolbox/EditTextBox.js +6 -6
  20. package/dist/components/toolbox/LoadFileTool.js +5 -3
  21. package/dist/components/toolbox/MenuGroup.js +31 -40
  22. package/dist/components/toolbox/PictureUrlInput.js +1 -1
  23. package/dist/components/toolbox/Tool.js +4 -4
  24. package/dist/components/toolbox/Toolbar.js +77 -73
  25. package/dist/components/toolbox/ToolbarGroup.js +22 -26
  26. package/dist/constants/style.js +3 -1
  27. package/dist/constants/tools.js +420 -0
  28. package/dist/hooks/useDrawableCanvas.js +22 -17
  29. package/dist/styles.css +51 -52
  30. package/dist/types/Shapes.js +2 -16
  31. package/dist/types/tools.js +22 -0
  32. package/dist/utils/data.js +81 -25
  33. package/dist/utils/style.js +4 -2
  34. package/dist/utils/toolbar.js +66 -11
  35. package/dist/utils/transform.js +3 -3
  36. package/package.json +1 -1
  37. package/Changelog.md +0 -75
package/Changelog.md DELETED
@@ -1,75 +0,0 @@
1
- # V.0.4.2
2
-
3
- - fix toolgroup not displayed
4
- - add passive prop to event listener
5
-
6
- # V.0.4.1
7
-
8
- - prevent mounting selection canvas when viewer mode
9
- - prevent drawing selection when not needed
10
- - Click on toolbar tool group always enable a tool
11
- - fix input and select options not being impacted by
12
- - new reponsive for toolbar
13
-
14
- # V.0.4.0
15
-
16
- - Add possibility to customize UI from props
17
-
18
- # V.0.3.1
19
-
20
- - Add prop to change canvas background color
21
- - Move some props to options
22
- - fix Picture shape not being saved and not triggering onDataChanged
23
- - small picture are upscaled to fit container when imported
24
- - Add prop to choose to display save/load/export
25
-
26
- # V.0.3.0 :
27
-
28
- - prevent picture from url submit to reload page
29
- - add gridVisible prop and default to false
30
- - rename withLayouts to layersManipulation and reduce possible values
31
- - move every options inside options prop
32
- - remove ajv and any kind of json validation
33
- - limit snackbar use on success and always log errors
34
- - fit size and center uploaded picture
35
- - Add new viewer mode
36
- - add borders on bars
37
- - display shape id in layer panel
38
- - Export : round values to 2 decimal points
39
- - Export and import : remove temporary values (id) from stored file
40
- - Clean unknown shape format from imported data
41
- - Use ref for onDataChanged prop to avoid rerender if callback changes
42
- - Calculate container size to resize canvas instead of CSS
43
- - use requestAnimationFrame to improve perf
44
- - fix TextEdit position and size not working with canvas resized
45
- - fix anchors area becoming too small after rezsize
46
- - add MIT license to project
47
- - other minor fixes
48
- - minor design improvements
49
-
50
- # V.0.2.2 :
51
-
52
- - Migrate to react 18
53
- - fix Picture type
54
- - change pen join and cap to round
55
- - replace loading snackbar with proper loader
56
- - support for canGrow and canShrink prop
57
- - rename project
58
- - release on npm
59
-
60
- # V.0.2.1 :
61
-
62
- - better ui for input modal
63
- - lock functionnality
64
- - toggle grid
65
- - layouts panel UI
66
-
67
- # V.0.2.0 :
68
-
69
- - fix for scaling brush
70
- - fix snackbar
71
- - refonte UI toolbar
72
- - update examples
73
- - button with icons
74
- - mini toolbar to fix
75
- - provide tool for url only