scratch-paint 4.0.21 → 4.0.23

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 (54) hide show
  1. package/.github/workflows/deploy.yml +3 -3
  2. package/.github/workflows/update-l10n.yml +2 -2
  3. package/.nvmrc +1 -1
  4. package/dist/scratch-paint.js +108 -122
  5. package/dist/scratch-paint.js.map +1 -1
  6. package/eslint.config.mjs +61 -0
  7. package/package.json +6 -8
  8. package/scripts/build-i18n-source.js +1 -1
  9. package/src/components/paint-editor/paint-editor.jsx +2 -2
  10. package/src/containers/mode-tools.jsx +3 -3
  11. package/src/helper/bit-tools/brush-tool.js +1 -1
  12. package/src/helper/bit-tools/fill-tool.js +1 -1
  13. package/src/helper/bit-tools/line-tool.js +3 -3
  14. package/src/helper/bit-tools/oval-tool.js +1 -1
  15. package/src/helper/bit-tools/rect-tool.js +1 -1
  16. package/src/helper/bit-tools/select-tool.js +2 -2
  17. package/src/helper/bitmap.js +13 -15
  18. package/src/helper/blob-tools/broad-brush-helper.js +1 -2
  19. package/src/helper/blob-tools/segment-brush-helper.js +4 -5
  20. package/src/helper/group.js +14 -16
  21. package/src/helper/hover.js +1 -1
  22. package/src/helper/layer.js +5 -5
  23. package/src/helper/math.js +1 -1
  24. package/src/helper/selection-tools/bounding-box-tool.js +5 -5
  25. package/src/helper/selection-tools/handle-tool.js +2 -2
  26. package/src/helper/selection-tools/move-tool.js +3 -3
  27. package/src/helper/selection-tools/nudge-tool.js +2 -2
  28. package/src/helper/selection-tools/point-tool.js +1 -1
  29. package/src/helper/selection-tools/reshape-tool.js +7 -7
  30. package/src/helper/selection-tools/rotate-tool.js +1 -1
  31. package/src/helper/selection-tools/scale-tool.js +3 -3
  32. package/src/helper/selection-tools/select-tool.js +3 -3
  33. package/src/helper/selection.js +19 -19
  34. package/src/helper/snapping.js +2 -2
  35. package/src/helper/style-path.js +8 -8
  36. package/src/helper/tools/fill-tool.js +1 -1
  37. package/src/helper/tools/oval-tool.js +1 -1
  38. package/src/helper/tools/rect-tool.js +1 -1
  39. package/src/helper/tools/rounded-rect-tool.js +2 -2
  40. package/src/helper/tools/text-tool.js +4 -4
  41. package/src/helper/view.js +9 -10
  42. package/src/playground/playground.jsx +28 -25
  43. package/src/playground/reducers/intl.js +1 -2
  44. package/src/reducers/cursor.js +1 -1
  45. package/src/reducers/hover.js +1 -1
  46. package/src/reducers/layout.js +1 -1
  47. package/src/reducers/selected-items.js +1 -1
  48. package/src/reducers/text-edit-target.js +1 -1
  49. package/src/reducers/undo.js +2 -2
  50. package/src/reducers/view-bounds.js +1 -1
  51. package/.eslintignore +0 -4
  52. package/.eslintrc.js +0 -3
  53. package/src/.eslintrc.js +0 -24
  54. package/tmp.js +0 -0
@@ -65,7 +65,7 @@ const undoSnapshot = function (snapshot) {
65
65
  };
66
66
  /**
67
67
  * @param {Format} format Either VECTOR_SKIP_CONVERT or BITMAP_SKIP_CONVERT
68
- * @return {Action} undo action
68
+ * @returns {Action} undo action
69
69
  */
70
70
  const undo = function (format) {
71
71
  return {
@@ -75,7 +75,7 @@ const undo = function (format) {
75
75
  };
76
76
  /**
77
77
  * @param {Format} format Either VECTOR_SKIP_CONVERT or BITMAP_SKIP_CONVERT
78
- * @return {Action} undo action
78
+ * @returns {Action} undo action
79
79
  */
80
80
  const redo = function (format) {
81
81
  return {
@@ -22,7 +22,7 @@ const reducer = function (state, action) {
22
22
  /**
23
23
  * Set the view bounds, which defines the zoom and scroll of the paper canvas.
24
24
  * @param {paper.Matrix} matrix The matrix applied to the view
25
- * @return {object} Redux action to set the view bounds
25
+ * @returns {object} Redux action to set the view bounds
26
26
  */
27
27
  const updateViewBounds = function (matrix) {
28
28
  return {
package/.eslintignore DELETED
@@ -1,4 +0,0 @@
1
- node_modules/*
2
- dist/*
3
- playground/
4
- scripts/*
package/.eslintrc.js DELETED
@@ -1,3 +0,0 @@
1
- module.exports = {
2
- extends: ['scratch', 'scratch/es6', 'scratch/node']
3
- };
package/src/.eslintrc.js DELETED
@@ -1,24 +0,0 @@
1
- /* eslint-disable import/no-commonjs */
2
- module.exports = {
3
- /* eslint-enable import/no-commonjs */
4
- root: true,
5
- extends: ['scratch', 'scratch/es6', 'scratch/react', 'plugin:import/recommended'],
6
- env: {
7
- browser: true
8
- },
9
- rules: {
10
- // BEGIN: these caused trouble after upgrading eslint-plugin-react from 7.20.3 to 7.33.2
11
- 'react/forbid-prop-types': 'off',
12
- 'react/no-unknown-property': 'off',
13
- // END: these caused trouble after upgrading eslint-plugin-react from 7.20.3 to 7.33.2
14
- 'import/no-mutable-exports': 'error',
15
- 'import/no-commonjs': 'error',
16
- 'import/no-amd': 'error',
17
- 'import/no-nodejs-modules': 'error'
18
- },
19
- settings: {
20
- react: {
21
- version: '16.2' // Prevent 16.3 lifecycle method errors
22
- }
23
- }
24
- };
package/tmp.js DELETED
File without changes