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.
- package/.github/workflows/deploy.yml +3 -3
- package/.github/workflows/update-l10n.yml +2 -2
- package/.nvmrc +1 -1
- package/dist/scratch-paint.js +108 -122
- package/dist/scratch-paint.js.map +1 -1
- package/eslint.config.mjs +61 -0
- package/package.json +6 -8
- package/scripts/build-i18n-source.js +1 -1
- package/src/components/paint-editor/paint-editor.jsx +2 -2
- package/src/containers/mode-tools.jsx +3 -3
- package/src/helper/bit-tools/brush-tool.js +1 -1
- package/src/helper/bit-tools/fill-tool.js +1 -1
- package/src/helper/bit-tools/line-tool.js +3 -3
- package/src/helper/bit-tools/oval-tool.js +1 -1
- package/src/helper/bit-tools/rect-tool.js +1 -1
- package/src/helper/bit-tools/select-tool.js +2 -2
- package/src/helper/bitmap.js +13 -15
- package/src/helper/blob-tools/broad-brush-helper.js +1 -2
- package/src/helper/blob-tools/segment-brush-helper.js +4 -5
- package/src/helper/group.js +14 -16
- package/src/helper/hover.js +1 -1
- package/src/helper/layer.js +5 -5
- package/src/helper/math.js +1 -1
- package/src/helper/selection-tools/bounding-box-tool.js +5 -5
- package/src/helper/selection-tools/handle-tool.js +2 -2
- package/src/helper/selection-tools/move-tool.js +3 -3
- package/src/helper/selection-tools/nudge-tool.js +2 -2
- package/src/helper/selection-tools/point-tool.js +1 -1
- package/src/helper/selection-tools/reshape-tool.js +7 -7
- package/src/helper/selection-tools/rotate-tool.js +1 -1
- package/src/helper/selection-tools/scale-tool.js +3 -3
- package/src/helper/selection-tools/select-tool.js +3 -3
- package/src/helper/selection.js +19 -19
- package/src/helper/snapping.js +2 -2
- package/src/helper/style-path.js +8 -8
- package/src/helper/tools/fill-tool.js +1 -1
- package/src/helper/tools/oval-tool.js +1 -1
- package/src/helper/tools/rect-tool.js +1 -1
- package/src/helper/tools/rounded-rect-tool.js +2 -2
- package/src/helper/tools/text-tool.js +4 -4
- package/src/helper/view.js +9 -10
- package/src/playground/playground.jsx +28 -25
- package/src/playground/reducers/intl.js +1 -2
- package/src/reducers/cursor.js +1 -1
- package/src/reducers/hover.js +1 -1
- package/src/reducers/layout.js +1 -1
- package/src/reducers/selected-items.js +1 -1
- package/src/reducers/text-edit-target.js +1 -1
- package/src/reducers/undo.js +2 -2
- package/src/reducers/view-bounds.js +1 -1
- package/.eslintignore +0 -4
- package/.eslintrc.js +0 -3
- package/src/.eslintrc.js +0 -24
- package/tmp.js +0 -0
package/src/reducers/undo.js
CHANGED
|
@@ -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
|
-
* @
|
|
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
|
-
* @
|
|
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
|
-
* @
|
|
25
|
+
* @returns {object} Redux action to set the view bounds
|
|
26
26
|
*/
|
|
27
27
|
const updateViewBounds = function (matrix) {
|
|
28
28
|
return {
|
package/.eslintignore
DELETED
package/.eslintrc.js
DELETED
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
|