@yorab/react-paint 0.6.5 → 0.6.6

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 (57) hide show
  1. package/README.md +2 -0
  2. package/dist/components/App.js +224 -384
  3. package/dist/components/Canvas.js +104 -114
  4. package/dist/components/common/Button.js +41 -50
  5. package/dist/components/common/Loading.js +21 -33
  6. package/dist/components/common/Modal.js +18 -17
  7. package/dist/components/common/Panel.js +20 -24
  8. package/dist/components/common/Snackbar.js +27 -34
  9. package/dist/components/settings/ColorField.js +59 -68
  10. package/dist/components/settings/DeleteButton.js +10 -9
  11. package/dist/components/settings/FontFamilyField.js +24 -19
  12. package/dist/components/settings/LayoutButton.js +11 -9
  13. package/dist/components/settings/Layouts.js +93 -103
  14. package/dist/components/settings/LineArrowField.js +25 -22
  15. package/dist/components/settings/LineTypeField.js +23 -20
  16. package/dist/components/settings/PointsNumberField.js +14 -13
  17. package/dist/components/settings/RangeField.js +35 -47
  18. package/dist/components/settings/SelectField.js +34 -43
  19. package/dist/components/settings/SettingsBar.js +95 -118
  20. package/dist/components/settings/ToggleField.js +18 -25
  21. package/dist/components/toolbox/EditTextBox.js +53 -42
  22. package/dist/components/toolbox/LoadFileTool.js +19 -21
  23. package/dist/components/toolbox/MenuGroup.js +60 -96
  24. package/dist/components/toolbox/PictureUrlInput.js +33 -62
  25. package/dist/components/toolbox/Tool.js +13 -13
  26. package/dist/components/toolbox/Toolbar.js +74 -106
  27. package/dist/components/toolbox/ToolbarGroup.js +41 -57
  28. package/dist/constants/icons.js +43 -43
  29. package/dist/constants/shapes.js +6 -6
  30. package/dist/constants/snackbar.js +3 -3
  31. package/dist/constants/style.js +13 -13
  32. package/dist/constants/tools.js +80 -80
  33. package/dist/hooks/useComponent.js +12 -19
  34. package/dist/hooks/useDoubleClick.js +12 -12
  35. package/dist/hooks/useDrag.js +24 -32
  36. package/dist/hooks/useDrawableCanvas.js +86 -100
  37. package/dist/hooks/useKeyboard.js +26 -36
  38. package/dist/hooks/useResizeObserver.js +18 -16
  39. package/dist/hooks/useShapes.js +91 -143
  40. package/dist/hooks/useSnackbar.js +28 -58
  41. package/dist/styles.css +55 -55
  42. package/dist/types/Mode.js +1 -1
  43. package/dist/types/Shapes.js +1 -1
  44. package/dist/types/keyboard.js +2 -2
  45. package/dist/types/tools.js +1 -1
  46. package/dist/utils/data.js +91 -107
  47. package/dist/utils/draw.js +116 -146
  48. package/dist/utils/file.js +69 -119
  49. package/dist/utils/intersect.js +57 -97
  50. package/dist/utils/selection.js +12 -12
  51. package/dist/utils/shapeData.js +33 -51
  52. package/dist/utils/string.js +10 -16
  53. package/dist/utils/style.js +1 -1
  54. package/dist/utils/toolbar.js +26 -38
  55. package/dist/utils/transform.js +183 -239
  56. package/package.json +6 -5
  57. package/Changelog.md +0 -123
package/Changelog.md DELETED
@@ -1,123 +0,0 @@
1
- # V0.6.5
2
-
3
- - add babel/runtime to dep to fix build
4
-
5
- # V0.6.4
6
-
7
- - fix TextEdit copy/paste containing html
8
- - add clearCallback in opts to override clear button behavior
9
-
10
- # V0.6.3
11
-
12
- - Rename 'lib' prop in 'label'
13
- - update dash settings
14
- - update clear icon
15
- - update color settings UI
16
-
17
- # V0.6.2
18
-
19
- - Lock : can't select shape by click on it (only via layers panel)
20
- - Clear : reset state to shapes prop by default if not undefined
21
- - update icons
22
- - Add responsive to settings UI
23
-
24
- # V0.6.1
25
-
26
- - Fix shapes prop not refreshing component (introduced by 0.6.0)
27
-
28
- # V0.6.0
29
-
30
- - Fix text opacity range dancing in edit mode
31
- - Fix opacity not visually shown in edit mode
32
- - add delete button in layouts panel and update style
33
- - update shape selection priority : use layers order, unless an anchor is
34
- - stored data format updated
35
-
36
- # V0.5.1
37
-
38
- - add possibility to update default settings for a tool
39
- - fix png export not working with url pic
40
- - fix pictures missing id
41
- - fix text tool
42
- - double click for editing text is now working on mobile
43
- - add bold and italic for text
44
-
45
- # V0.5.0
46
-
47
- - Add tool presets feature
48
-
49
- # V.0.4.2
50
-
51
- - fix toolgroup not displayed
52
- - add passive prop to event listener
53
-
54
- # V.0.4.1
55
-
56
- - prevent mounting selection canvas when viewer mode
57
- - prevent drawing selection when not needed
58
- - Click on toolbar tool group always enable a tool
59
- - fix input and select options not being impacted by
60
- - new reponsive for toolbar
61
-
62
- # V.0.4.0
63
-
64
- - Add possibility to customize UI from props
65
-
66
- # V.0.3.1
67
-
68
- - Add prop to change canvas background color
69
- - Move some props to options
70
- - fix Picture shape not being saved and not triggering onDataChanged
71
- - small picture are upscaled to fit container when imported
72
- - Add prop to choose to display save/load/export
73
-
74
- # V.0.3.0 :
75
-
76
- - prevent picture from url submit to reload page
77
- - add gridVisible prop and default to false
78
- - rename withLayouts to layersManipulation and reduce possible values
79
- - move every options inside options prop
80
- - remove ajv and any kind of json validation
81
- - limit snackbar use on success and always log errors
82
- - fit size and center uploaded picture
83
- - Add new viewer mode
84
- - add borders on bars
85
- - display shape id in layer panel
86
- - Export : round values to 2 decimal points
87
- - Export and import : remove temporary values (id) from stored file
88
- - Clean unknown shape format from imported data
89
- - Use ref for onDataChanged prop to avoid rerender if callback changes
90
- - Calculate container size to resize canvas instead of CSS
91
- - use requestAnimationFrame to improve perf
92
- - fix TextEdit position and size not working with canvas resized
93
- - fix anchors area becoming too small after rezsize
94
- - add MIT license to project
95
- - other minor fixes
96
- - minor design improvements
97
-
98
- # V.0.2.2 :
99
-
100
- - Migrate to react 18
101
- - fix Picture type
102
- - change pen join and cap to round
103
- - replace loading snackbar with proper loader
104
- - support for canGrow and canShrink prop
105
- - rename project
106
- - release on npm
107
-
108
- # V.0.2.1 :
109
-
110
- - better ui for input modal
111
- - lock functionnality
112
- - toggle grid
113
- - layouts panel UI
114
-
115
- # V.0.2.0 :
116
-
117
- - fix for scaling brush
118
- - fix snackbar
119
- - refonte UI toolbar
120
- - update examples
121
- - button with icons
122
- - mini toolbar to fix
123
- - provide tool for url only