scratch-paint 0.2.0 → 1.0.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 (41) hide show
  1. package/.circleci/config.yml +116 -0
  2. package/.editorconfig +1 -1
  3. package/.gitattributes +1 -0
  4. package/.husky/.gitattributes +1 -0
  5. package/.husky/commit-msg +4 -0
  6. package/CHANGELOG.md +67 -0
  7. package/commitlint.config.js +3 -0
  8. package/dist/scratch-paint.js +2650 -4086
  9. package/dist/scratch-paint.js.map +1 -1
  10. package/pack/scratch-paint-1.0.0.tgz +0 -0
  11. package/package.json +62 -42
  12. package/release.config.js +13 -0
  13. package/renovate.json5 +7 -0
  14. package/src/.eslintrc.js +3 -1
  15. package/src/components/color-picker/color-picker.jsx +11 -1
  16. package/src/components/fixed-tools/fixed-tools.jsx +1 -2
  17. package/src/components/forms/slider.jsx +21 -4
  18. package/src/components/mode-tools/mode-tools.jsx +1 -2
  19. package/src/components/paint-editor/paint-editor.jsx +1 -2
  20. package/src/containers/color-indicator.jsx +1 -2
  21. package/src/containers/fixed-tools.jsx +1 -2
  22. package/src/containers/line-mode.jsx +1 -2
  23. package/src/containers/mode-tools.jsx +1 -2
  24. package/src/containers/paint-editor.jsx +4 -5
  25. package/src/containers/paper-canvas.jsx +5 -2
  26. package/src/containers/stroke-color-indicator.jsx +1 -2
  27. package/src/containers/stroke-width-indicator.jsx +4 -4
  28. package/src/helper/bit-tools/brush-tool.js +1 -2
  29. package/src/helper/bit-tools/line-tool.js +1 -2
  30. package/src/helper/bitmap.js +7 -3
  31. package/src/helper/selection-tools/move-tool.js +6 -6
  32. package/src/helper/style-path.js +2 -4
  33. package/src/helper/tools/fill-tool.js +11 -1
  34. package/src/helper/undo.js +1 -2
  35. package/src/hocs/copy-paste-hoc.jsx +1 -2
  36. package/src/hocs/keyboard-shortcuts-hoc.jsx +1 -2
  37. package/src/hocs/undo-hoc.jsx +4 -3
  38. package/src/hocs/update-image-hoc.jsx +6 -6
  39. package/src/playground/playground.jsx +3 -0
  40. package/webpack.config.js +1 -3
  41. package/.travis.yml +0 -80
@@ -0,0 +1,116 @@
1
+ version: 2.1
2
+ orbs:
3
+ browser-tools: circleci/browser-tools@1.2.4
4
+ node: circleci/node@5.0.2
5
+ commitlint: conventional-changelog/commitlint@1.0.0
6
+ aliases:
7
+ - &defaults
8
+ docker:
9
+ - image: cimg/node:lts-browsers
10
+ auth:
11
+ username: $DOCKERHUB_USERNAME
12
+ password: $DOCKERHUB_PASSWORD
13
+ working_directory: ~/repo
14
+ environment:
15
+ NODE_ENV: production
16
+ - &setup
17
+ node/install-packages:
18
+ override-ci-command: npm --production=false ci
19
+ - &lint
20
+ run:
21
+ name: "run lint tests"
22
+ command: npm run lint -- --format junit -o ./test/results/lint-results.xml
23
+ - &unit
24
+ run:
25
+ name: "run unit tests"
26
+ command: JEST_JUNIT_OUTPUT_NAME=unit-jest-results.xml npm run unit -- --reporters=jest-junit
27
+ - &build
28
+ run:
29
+ name: "run npm build"
30
+ command: |
31
+ NODE_ENV=production npm run build
32
+ - &deploy-gh-pages
33
+ run:
34
+ name: "deploy to gh pages"
35
+ command: |
36
+ git config --global user.email $(git log --pretty=format:"%ae" -n1)
37
+ git config --global user.name $(git log --pretty=format:"%an" -n1)
38
+ npm run deploy -- -e $CIRCLE_BRANCH
39
+
40
+ jobs:
41
+ build-test:
42
+ <<: *defaults
43
+ steps:
44
+ - checkout
45
+ - *setup
46
+ - *lint
47
+ - *unit
48
+ - *build
49
+ - store_test_results:
50
+ path: test/results
51
+ build-test-deploy:
52
+ <<: *defaults
53
+ steps:
54
+ - checkout
55
+ - *setup
56
+ - *lint
57
+ - *unit
58
+ - *build
59
+ - store_test_results:
60
+ path: test/results
61
+ - *deploy-gh-pages
62
+ - run:
63
+ command: npx semantic-release
64
+ environment:
65
+ HUSKY: 0 # disable Husky hooks so commitlint doesn't block semantic-release
66
+ push-translations:
67
+ <<: *defaults
68
+ steps:
69
+ - checkout
70
+ - *setup
71
+ - run:
72
+ name: "run i18n script"
73
+ command: |
74
+ npm run i18n:src
75
+ npm run i18n:push
76
+
77
+ workflows:
78
+ commitlint:
79
+ jobs:
80
+ - commitlint/lint:
81
+ target-branch: develop
82
+ build-test-no-deploy:
83
+ jobs:
84
+ - build-test:
85
+ context:
86
+ - dockerhub-credentials
87
+ filters:
88
+ branches:
89
+ ignore:
90
+ - master
91
+ - develop
92
+ - /^hotfix\/.*/
93
+ - gh-pages
94
+ build-test-deploy:
95
+ jobs:
96
+ - build-test-deploy:
97
+ context:
98
+ - dockerhub-credentials
99
+ filters:
100
+ branches:
101
+ only:
102
+ - master
103
+ - develop
104
+ - /^hotfix\/.*/
105
+ push-translations:
106
+ triggers:
107
+ - schedule:
108
+ cron: 0 0 * * * # daily at 12 UTC, 8 ET
109
+ filters:
110
+ branches:
111
+ only:
112
+ - develop
113
+ jobs:
114
+ - push-translations:
115
+ context:
116
+ - dockerhub-credentials
package/.editorconfig CHANGED
@@ -9,5 +9,5 @@ trim_trailing_whitespace = true
9
9
  indent_style = space
10
10
  indent_size = 4
11
11
 
12
- [*.{yml,json}]
12
+ [*.{yml,json,json5}]
13
13
  indent_size = 2
package/.gitattributes CHANGED
@@ -16,6 +16,7 @@
16
16
  *.js text eol=lf
17
17
  *.js.map text eol=lf
18
18
  *.json text eol=lf
19
+ *.json5 text eol=lf
19
20
  *.md text eol=lf
20
21
  *.vert text eol=lf
21
22
  *.xml text eol=lf
@@ -0,0 +1 @@
1
+ * text eol=lf
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env sh
2
+ . "$(dirname -- "$0")/_/husky.sh"
3
+
4
+ npx --no-install commitlint --edit "$1"
package/CHANGELOG.md ADDED
@@ -0,0 +1,67 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file. See
4
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
+
6
+ # 1.0.0 (2022-08-26)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **deps:** update dependency scratch-l10n to v3.14.20220803031540 ([#2036](https://github.com/LLK/scratch-paint/issues/2036)) ([4cc5fd2](https://github.com/LLK/scratch-paint/commit/4cc5fd2a2b37e74abd9abd76962438c582ff24b1))
12
+ * **deps:** update dependency scratch-l10n to v3.14.20220804031609 ([#2037](https://github.com/LLK/scratch-paint/issues/2037)) ([3d69b7b](https://github.com/LLK/scratch-paint/commit/3d69b7bc917cdffc034ce10f7676094e9fc68526))
13
+ * **deps:** update dependency scratch-l10n to v3.14.20220805031557 ([#2038](https://github.com/LLK/scratch-paint/issues/2038)) ([b67acbb](https://github.com/LLK/scratch-paint/commit/b67acbbdd0e8e0683fa391e9196b648ebe4edc09))
14
+ * **deps:** update dependency scratch-l10n to v3.14.20220806031552 ([#2039](https://github.com/LLK/scratch-paint/issues/2039)) ([326ea51](https://github.com/LLK/scratch-paint/commit/326ea517e593a5f876716c7ab65eef6de69f81b3))
15
+ * **deps:** update dependency scratch-l10n to v3.14.20220811031607 ([#2040](https://github.com/LLK/scratch-paint/issues/2040)) ([4e4d3e4](https://github.com/LLK/scratch-paint/commit/4e4d3e4d4edea83ce4f96277cca0edd98d44eab6))
16
+ * **deps:** update dependency scratch-l10n to v3.14.20220812031537 ([#2041](https://github.com/LLK/scratch-paint/issues/2041)) ([c150389](https://github.com/LLK/scratch-paint/commit/c1503892911ae3e1e76fa2f6c06f437e1cbcf875))
17
+ * **deps:** update dependency scratch-l10n to v3.14.20220814031555 ([#2042](https://github.com/LLK/scratch-paint/issues/2042)) ([93a4ce9](https://github.com/LLK/scratch-paint/commit/93a4ce916fb6f2b21901355a529d42a64708e06a))
18
+ * **deps:** update dependency scratch-l10n to v3.14.20220815031546 ([#2043](https://github.com/LLK/scratch-paint/issues/2043)) ([b7d41a9](https://github.com/LLK/scratch-paint/commit/b7d41a9762cf7a629f690b144660fdfa00f737e3))
19
+ * **deps:** update dependency scratch-l10n to v3.14.20220816031545 ([#2044](https://github.com/LLK/scratch-paint/issues/2044)) ([93388f0](https://github.com/LLK/scratch-paint/commit/93388f02d8539fe29d1a33951dcd092e8b812642))
20
+ * **deps:** update dependency scratch-l10n to v3.14.20220817031614 ([#2045](https://github.com/LLK/scratch-paint/issues/2045)) ([970b72c](https://github.com/LLK/scratch-paint/commit/970b72c3e75d0ad44ab54e403a44786ca5f45512))
21
+ * **deps:** update dependency scratch-l10n to v3.14.20220820031550 ([#2046](https://github.com/LLK/scratch-paint/issues/2046)) ([61a99ef](https://github.com/LLK/scratch-paint/commit/61a99ef995177e6598c02fca3ac0914155310cfd))
22
+ * **deps:** update dependency scratch-l10n to v3.14.20220821031607 ([#2047](https://github.com/LLK/scratch-paint/issues/2047)) ([aba7c55](https://github.com/LLK/scratch-paint/commit/aba7c55f1f1ef4386fe45532bb6f0d9ce45020aa))
23
+ * **deps:** update dependency scratch-l10n to v3.14.20220824031545 ([#2049](https://github.com/LLK/scratch-paint/issues/2049)) ([81152d1](https://github.com/LLK/scratch-paint/commit/81152d1d865330f98fe8be33212231e008caff0b))
24
+ * **deps:** update dependency scratch-l10n to v3.14.20220825031548 ([#2050](https://github.com/LLK/scratch-paint/issues/2050)) ([c3aa24d](https://github.com/LLK/scratch-paint/commit/c3aa24d094820402bb19740bc55d3ff12a1f88a1))
25
+ * **deps:** update dependency scratch-l10n to v3.14.20220826031556 ([#2053](https://github.com/LLK/scratch-paint/issues/2053)) ([1237592](https://github.com/LLK/scratch-paint/commit/123759233ca04679ea71c129f86abbdff9136db3))
26
+ * **package:** update @scratch/paper to version 0.11.20180614155555 ([#514](https://github.com/LLK/scratch-paint/issues/514)) ([672437b](https://github.com/LLK/scratch-paint/commit/672437be282acfb9610e4a37d20cbb26f20aa97e))
27
+ * **package:** update @scratch/paper to version 0.11.20180627210112 ([e806a37](https://github.com/LLK/scratch-paint/commit/e806a376712909bfcb5b24e79c2cdcb9a9a94cdd))
28
+ * **package:** update @scratch/paper to version 0.11.20180717155250 ([cd99e72](https://github.com/LLK/scratch-paint/commit/cd99e72e15d29d4ff3962e603a88eacd9eed9e09))
29
+ * **package:** update @scratch/paper to version 0.11.20180802201231 ([#581](https://github.com/LLK/scratch-paint/issues/581)) ([500908a](https://github.com/LLK/scratch-paint/commit/500908acad6d0aada2bcc187eb4c978407e8cddb))
30
+ * **package:** update @scratch/paper to version 0.11.20181024192123 ([#734](https://github.com/LLK/scratch-paint/issues/734)) ([c771a54](https://github.com/LLK/scratch-paint/commit/c771a54adace13926e154b138ba6e2e5969582b4)), closes [#730](https://github.com/LLK/scratch-paint/issues/730)
31
+ * **package:** update @scratch/paper to version 0.11.20181029143421 ([#750](https://github.com/LLK/scratch-paint/issues/750)) ([edb70f9](https://github.com/LLK/scratch-paint/commit/edb70f9ca271958dc534dde89810a46ec7fbf8f5)), closes [#749](https://github.com/LLK/scratch-paint/issues/749)
32
+ * **package:** update @scratch/paper to version 0.11.20190729152410 ([#872](https://github.com/LLK/scratch-paint/issues/872)) ([12b6f88](https://github.com/LLK/scratch-paint/commit/12b6f889405969eb3093cdc1168c9bedc3d0558e))
33
+ * **package:** update @scratch/paper to version 0.11.20200424212514 ([9f70f48](https://github.com/LLK/scratch-paint/commit/9f70f48faeb9a86e688b03efe6241cb283f39c7e)), closes [#1013](https://github.com/LLK/scratch-paint/issues/1013)
34
+ * **package:** update scratch-svg-renderer to version 0.2.0-prerelease.20180607141644 ([#500](https://github.com/LLK/scratch-paint/issues/500)) ([760ddab](https://github.com/LLK/scratch-paint/commit/760ddabfce4deeecc3729af717a00417ad43cabc)), closes [#491](https://github.com/LLK/scratch-paint/issues/491)
35
+ * **package:** update scratch-svg-renderer to version 0.2.0-prerelease.20180613184320 ([e542d9a](https://github.com/LLK/scratch-paint/commit/e542d9aaa5b7f862c62502804465a13f8c408ab0))
36
+ * **package:** update scratch-svg-renderer to version 0.2.0-prerelease.20180618172917 ([#517](https://github.com/LLK/scratch-paint/issues/517)) ([46dc383](https://github.com/LLK/scratch-paint/commit/46dc3839afbbde1a969b5d267b8127067e39bc18))
37
+ * **package:** update scratch-svg-renderer to version 0.2.0-prerelease.20180711180400 ([#552](https://github.com/LLK/scratch-paint/issues/552)) ([0e51ec9](https://github.com/LLK/scratch-paint/commit/0e51ec99f28be1988cc4d4b085308841f72ab5de))
38
+ * **package:** update scratch-svg-renderer to version 0.2.0-prerelease.20180712223402 ([#555](https://github.com/LLK/scratch-paint/issues/555)) ([df3192b](https://github.com/LLK/scratch-paint/commit/df3192b27315c25dca4a528fc6154f4b52a7d582)), closes [#552](https://github.com/LLK/scratch-paint/issues/552)
39
+ * **package:** update scratch-svg-renderer to version 0.2.0-prerelease.20180817005452 ([#606](https://github.com/LLK/scratch-paint/issues/606)) ([e93fc99](https://github.com/LLK/scratch-paint/commit/e93fc99e0fd367cdabb8648cad20c2214df84f2e))
40
+ * **package:** update scratch-svg-renderer to version 0.2.0-prerelease.20180907141232 ([#659](https://github.com/LLK/scratch-paint/issues/659)) ([2b462eb](https://github.com/LLK/scratch-paint/commit/2b462eb676b0bd254ed922f5b8963aaa25500190))
41
+ * **package:** update scratch-svg-renderer to version 0.2.0-prerelease.20181017193458 ([#727](https://github.com/LLK/scratch-paint/issues/727)) ([2e2c755](https://github.com/LLK/scratch-paint/commit/2e2c7553163c769e6298490bda41c693e1dc1a80))
42
+ * **package:** update scratch-svg-renderer to version 0.2.0-prerelease.20181024192149 ([#732](https://github.com/LLK/scratch-paint/issues/732)) ([20059d4](https://github.com/LLK/scratch-paint/commit/20059d4a8dc25dd9bd7466f25ce9cb5962469e9a))
43
+ * **package:** update scratch-svg-renderer to version 0.2.0-prerelease.20181126212715 ([#776](https://github.com/LLK/scratch-paint/issues/776)) ([ada81cb](https://github.com/LLK/scratch-paint/commit/ada81cbd8817d377892aeccdbc27aa88ffb4b5d0))
44
+ * **package:** update scratch-svg-renderer to version 0.2.0-prerelease.20181213192400 ([#795](https://github.com/LLK/scratch-paint/issues/795)) ([38ca8b9](https://github.com/LLK/scratch-paint/commit/38ca8b9d3b93d6cff139ce8a273c815f93fab29b)), closes [#794](https://github.com/LLK/scratch-paint/issues/794)
45
+ * **package:** update scratch-svg-renderer to version 0.2.0-prerelease.20181218153528 ([#802](https://github.com/LLK/scratch-paint/issues/802)) ([b8b89c6](https://github.com/LLK/scratch-paint/commit/b8b89c6f9f37e236a1a74419b2f9ebff1b35e708))
46
+ * **package:** update scratch-svg-renderer to version 0.2.0-prerelease.20190419183947 ([4f5af59](https://github.com/LLK/scratch-paint/commit/4f5af59ba9a6980927bf1a951402b6ca1ecb3135)), closes [#815](https://github.com/LLK/scratch-paint/issues/815)
47
+ * **package:** update scratch-svg-renderer to version 0.2.0-prerelease.20190521170426 ([62cc3d9](https://github.com/LLK/scratch-paint/commit/62cc3d95cb8e861b05ab1b549e4e0d311ce73b0c))
48
+ * **package:** update scratch-svg-renderer to version 0.2.0-prerelease.20190523193400 ([1986093](https://github.com/LLK/scratch-paint/commit/1986093ac1c8c568983f7168194f49d10b8729b7))
49
+ * **package:** update scratch-svg-renderer to version 0.2.0-prerelease.20190820171249 ([8ec1e4f](https://github.com/LLK/scratch-paint/commit/8ec1e4fd94a4e2e878e860977b0099f7f7dee39f))
50
+ * **package:** update scratch-svg-renderer to version 0.2.0-prerelease.20191031221353 ([bd0fadc](https://github.com/LLK/scratch-paint/commit/bd0fadccd9235f122ee18d75f856e401d6d6c90b))
51
+ * **package:** update scratch-svg-renderer to version 0.2.0-prerelease.20191104164753 ([4c9bc9e](https://github.com/LLK/scratch-paint/commit/4c9bc9ec9e8661d0a97849ca898b832f4cf35600))
52
+ * **package:** update scratch-svg-renderer to version 0.2.0-prerelease.20191217211338 ([616b0fb](https://github.com/LLK/scratch-paint/commit/616b0fb70f215eefec70501cc60d8494bb776b91))
53
+ * **package:** update scratch-svg-renderer to version 0.2.0-prerelease.20200103191258 ([57863aa](https://github.com/LLK/scratch-paint/commit/57863aa6ff9e025d846c153167bf58d1089e6269))
54
+ * **package:** update scratch-svg-renderer to version 0.2.0-prerelease.20200205003400 ([3266038](https://github.com/LLK/scratch-paint/commit/3266038ae6a32efe2ea0196283266f581ee7115e)), closes [#969](https://github.com/LLK/scratch-paint/issues/969)
55
+ * **package:** update scratch-svg-renderer to version 0.2.0-prerelease.20200507183648 ([625ee03](https://github.com/LLK/scratch-paint/commit/625ee0317e2a59f4a6d321c54537a77521801cd8))
56
+
57
+
58
+ ### Reverts
59
+
60
+ * Revert "Wait for other callbacks before load SVG code (#755)" ([dd35871](https://github.com/LLK/scratch-paint/commit/dd35871076dfe4444de37cc19a09c3479b22192c)), closes [#755](https://github.com/LLK/scratch-paint/issues/755)
61
+ * Revert "fix(package): update scratch-svg-renderer to version 0.2.0-prerelease.20181101210634 (#757)" ([e4e316f](https://github.com/LLK/scratch-paint/commit/e4e316fdbb84b0d18bdc20dd21722adbd8bc95cc)), closes [#757](https://github.com/LLK/scratch-paint/issues/757)
62
+ * Revert "Fix issues handling rasters in reshape (#756)" ([003a09a](https://github.com/LLK/scratch-paint/commit/003a09ad87d4ba3391a7af7760c72a14dfab01ae)), closes [#756](https://github.com/LLK/scratch-paint/issues/756)
63
+ * Revert "chore(package): update tap to version 12.0.1 (#586)" (#600) ([363fefd](https://github.com/LLK/scratch-paint/commit/363fefd0a7c3b28a0bf80fd555dfc75346e6695c)), closes [#586](https://github.com/LLK/scratch-paint/issues/586) [#600](https://github.com/LLK/scratch-paint/issues/600)
64
+ * Revert "Don't enable if there is nothing in the editor" ([c9165b0](https://github.com/LLK/scratch-paint/commit/c9165b0b4c5e634218c823ce9bd6e7eb60fa0f77))
65
+ * Revert "Revert "Add before deploy script that appends version"" ([7c84e5b](https://github.com/LLK/scratch-paint/commit/7c84e5b418b92df7fe0f06b66178dec79924a268))
66
+ * Revert "remove the default imported costume" ([49b197e](https://github.com/LLK/scratch-paint/commit/49b197eba22e3b5ef6c4cc2503ac688a3447be38))
67
+ * Revert "Make unimplemented buttons grey" ([1d0ffef](https://github.com/LLK/scratch-paint/commit/1d0ffef40f22f0d7d0a3ec4e9d67c06c48df6303))
@@ -0,0 +1,3 @@
1
+ module.exports = {
2
+ extends: ['@commitlint/config-conventional']
3
+ };