@plone-collective/volto-image-editor 1.0.0-alpha.1

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/.changelog.draft +19 -0
  2. package/.release-it.json +34 -0
  3. package/CHANGELOG.md +27 -0
  4. package/README.md +209 -0
  5. package/babel.config.js +17 -0
  6. package/locales/de/LC_MESSAGES/volto.po +187 -0
  7. package/locales/en/LC_MESSAGES/volto.po +187 -0
  8. package/locales/es/LC_MESSAGES/volto.po +194 -0
  9. package/locales/pt_BR/LC_MESSAGES/volto.po +192 -0
  10. package/locales/volto.pot +189 -0
  11. package/news/.gitkeep +0 -0
  12. package/package.json +50 -0
  13. package/public/.gitkeep +0 -0
  14. package/src/components/.gitkeep +0 -0
  15. package/src/components/ImageEditor/ImageEditor.scss +59 -0
  16. package/src/components/ImageEditor/ImageEditor.tsx +290 -0
  17. package/src/components/ImageEditor/ImageEditorWrapper.scss +13 -0
  18. package/src/components/ImageEditor/ImageEditorWrapper.tsx +91 -0
  19. package/src/components/ImageEditor/components/AdjustableCropperBackground.tsx +60 -0
  20. package/src/components/ImageEditor/components/AdjustableImage.scss +3 -0
  21. package/src/components/ImageEditor/components/AdjustableImage.tsx +85 -0
  22. package/src/components/ImageEditor/components/AdjustablePreviewBackground.tsx +59 -0
  23. package/src/components/ImageEditor/components/Button.scss +30 -0
  24. package/src/components/ImageEditor/components/Button.tsx +27 -0
  25. package/src/components/ImageEditor/components/Navigation.scss +38 -0
  26. package/src/components/ImageEditor/components/Navigation.tsx +153 -0
  27. package/src/components/ImageEditor/components/SettingsModal.scss +369 -0
  28. package/src/components/ImageEditor/components/SettingsModal.tsx +582 -0
  29. package/src/components/ImageEditor/components/Slider.scss +231 -0
  30. package/src/components/ImageEditor/components/Slider.tsx +322 -0
  31. package/src/components/ImageEditor/types/ImageSettings.ts +23 -0
  32. package/src/components/Widgets/FileWidget.scss +14 -0
  33. package/src/components/Widgets/FileWidget.tsx +239 -0
  34. package/src/config/settings.ts +5 -0
  35. package/src/customizations/volto/components/manage/Widgets/FileWidget.jsx +3 -0
  36. package/src/icons/AspectRatioIcons.tsx +39 -0
  37. package/src/icons/BrightnessIcon.tsx +19 -0
  38. package/src/icons/ContrastIcon.tsx +19 -0
  39. package/src/icons/CropIcon.tsx +19 -0
  40. package/src/icons/DownloadIcon.tsx +20 -0
  41. package/src/icons/FlipHorizontalIcon.tsx +21 -0
  42. package/src/icons/FlipVerticalIcon.tsx +27 -0
  43. package/src/icons/HueIcon.tsx +20 -0
  44. package/src/icons/ResetIcon.tsx +19 -0
  45. package/src/icons/ResetRotationIcon.tsx +20 -0
  46. package/src/icons/RestrictionIcons.tsx +19 -0
  47. package/src/icons/RotateLeftIcon.tsx +21 -0
  48. package/src/icons/RotateRightIcon.tsx +21 -0
  49. package/src/icons/SaturationIcon.tsx +20 -0
  50. package/src/icons/SettingsIcon.tsx +21 -0
  51. package/src/icons/StencilIcons.tsx +8 -0
  52. package/src/index.ts +10 -0
  53. package/src/theme/constants.scss +13 -0
  54. package/src/theme/custom.css +82 -0
  55. package/src/theme/mixins.scss +91 -0
  56. package/towncrier.toml +33 -0
  57. package/tsconfig.json +30 -0
@@ -0,0 +1,82 @@
1
+ /**
2
+ * Any CSS included here will be global. The classic template
3
+ * bundles Infima by default. Infima is a CSS framework designed to
4
+ * work well for content-centric websites.
5
+ */
6
+
7
+ /* You can override the default Infima variables here. */
8
+ :root {
9
+ /*--ifm-color-primary: #25c2a0;*/
10
+ /*--ifm-color-primary-dark: rgb(33, 175, 144);*/
11
+ /*--ifm-color-primary-darker: rgb(31, 165, 136);*/
12
+ /*--ifm-color-primary-darkest: rgb(26, 136, 112);*/
13
+ /*--ifm-color-primary-light: rgb(70, 203, 174);*/
14
+ /*--ifm-color-primary-lighter: rgb(102, 212, 189);*/
15
+ /*--ifm-color-primary-lightest: rgb(146, 224, 208);*/
16
+ /*--ifm-code-font-size: 95%;*/
17
+
18
+ /*--ifm-color-primary: #61dafb;*/
19
+ /*--ifm-color-primary-dark: #3fd2fa;*/
20
+ /*--ifm-color-primary-darker: #2ecefa;*/
21
+ /*--ifm-color-primary-darkest: #06bcee;*/
22
+ /*--ifm-color-primary-light: #83e2fc;*/
23
+ /*--ifm-color-primary-lighter: #94e6fc;*/
24
+ /*--ifm-color-primary-lightest: #c7f2fe;*/
25
+ --ifm-font-size-base: 15px;
26
+
27
+ --ifm-color-primary: #1aa7f9;
28
+ --ifm-color-primary-dark: #069bf1;
29
+ --ifm-color-primary-darker: #0692e4;
30
+ --ifm-color-primary-darkest: #0578bc;
31
+ --ifm-color-primary-light: #35b1fa;
32
+ --ifm-color-primary-lighter: #42b6fa;
33
+ --ifm-color-primary-lightest: #6ac6fb;
34
+
35
+ --ifm-navbar-background-color: #20232a;
36
+ --ifm-navbar-link-color: white;
37
+ --ifm-navbar-link-hover-color: #61dafb;
38
+ /*--ifm-menu-color: #dadde1;*/
39
+ /*--ifm-menu-color-background-active: rgba(255,255,255, 0.05);*/
40
+ /*--ifm-menu-color-active: white;*/
41
+
42
+ --ifm-navbar-padding-horizontal: 24px;
43
+ --ifm-spacing-horizontal: 24px;
44
+ --ifm-code-font-size: 85%;
45
+ /* Rewrite the exclusions for sidebar */
46
+ /*--doc-sidebar-width: 200px !important;*/
47
+ --ifm-menu-link-sublist-icon-filter: invert(100%) sepia(94%) saturate(17%)
48
+ hue-rotate(223deg) brightness(104%) contrast(98%);
49
+ }
50
+
51
+ .navbar,
52
+ .navbar-sidebar {
53
+ color: white;
54
+ }
55
+
56
+ .navbar__brand:hover {
57
+ color: var(--ifm-navbar-link-hover-color);
58
+ }
59
+
60
+ .navbar-sidebar .menu__link {
61
+ color: white;
62
+ }
63
+
64
+ .navbar-sidebar .menu__link--active {
65
+ color: #61dafb;
66
+ }
67
+
68
+ .docusaurus-highlight-code-line {
69
+ display: block;
70
+ padding: 0 var(--ifm-pre-padding);
71
+ margin: 0 calc(-1 * var(--ifm-pre-padding));
72
+ background-color: rgba(0, 0, 0, 0.1);
73
+ }
74
+
75
+ html[data-theme='dark'] .docusaurus-highlight-code-line {
76
+ background-color: rgba(0, 0, 0, 0.3);
77
+ }
78
+
79
+ article {
80
+ max-width: 660px;
81
+ margin: 0 auto;
82
+ }
@@ -0,0 +1,91 @@
1
+ @import './constants';
2
+
3
+ @mixin desktop() {
4
+ @media (max-width: $maximum) {
5
+ @content;
6
+ }
7
+ }
8
+
9
+ @mixin tablet() {
10
+ @media (max-width: $desktop) {
11
+ @content;
12
+ }
13
+ }
14
+
15
+ @mixin mobile() {
16
+ @media (max-width: $tablet) {
17
+ @content;
18
+ }
19
+ }
20
+
21
+ @mixin small-mobile() {
22
+ @media (max-width: $mobile) {
23
+ @content;
24
+ }
25
+ }
26
+
27
+ @mixin large-desktop() {
28
+ @media (min-width: $maximum - 1) {
29
+ @content;
30
+ }
31
+ }
32
+
33
+ @mixin max-width($width) {
34
+ @media (max-width: $width) {
35
+ @content;
36
+ }
37
+ }
38
+
39
+ @mixin reset-browsers-button-styles {
40
+ border: none;
41
+ background: none;
42
+ color: inherit;
43
+ &:focus {
44
+ outline: none;
45
+ }
46
+ }
47
+
48
+ @mixin reset-browsers-input-styles {
49
+ border: none;
50
+ background: none;
51
+ &:focus {
52
+ outline: none;
53
+ }
54
+ &::-webkit-outer-spin-button,
55
+ &::-webkit-inner-spin-button {
56
+ margin: 0; /* <-- Apparently some margin are still there even though it's hidden */
57
+ /* display: none; <- Crashes Chrome on hover */
58
+ -webkit-appearance: none;
59
+ }
60
+
61
+ &[type='number'] {
62
+ -moz-appearance: textfield; /* Firefox */
63
+ }
64
+ }
65
+
66
+ @mixin center-content {
67
+ display: flex;
68
+ align-items: center;
69
+ justify-content: center;
70
+ }
71
+
72
+ @mixin circle {
73
+ flex-shrink: 0;
74
+ border-radius: 50%;
75
+ }
76
+
77
+ @mixin container {
78
+ max-width: $maximum;
79
+ padding-right: $container-padding;
80
+ padding-left: $container-padding;
81
+ margin: 0 auto;
82
+ @include desktop() {
83
+ max-width: $desktop;
84
+ }
85
+ @include tablet() {
86
+ max-width: $tablet;
87
+ }
88
+ @include mobile() {
89
+ max-width: 100%;
90
+ }
91
+ }
package/towncrier.toml ADDED
@@ -0,0 +1,33 @@
1
+ [tool.towncrier]
2
+ filename = "CHANGELOG.md"
3
+ directory = "news/"
4
+ title_format = "## {version} ({project_date})"
5
+ underlines = ["", "", ""]
6
+ template = "./node_modules/@plone/scripts/templates/towncrier_template.jinja"
7
+ start_string = "<!-- towncrier release notes start -->\n"
8
+ issue_format = "[#{issue}](https://github.com/collective/volto-image-editor/issue/{issue})"
9
+
10
+ [[tool.towncrier.type]]
11
+ directory = "breaking"
12
+ name = "Breaking"
13
+ showcontent = true
14
+
15
+ [[tool.towncrier.type]]
16
+ directory = "feature"
17
+ name = "Feature"
18
+ showcontent = true
19
+
20
+ [[tool.towncrier.type]]
21
+ directory = "bugfix"
22
+ name = "Bugfix"
23
+ showcontent = true
24
+
25
+ [[tool.towncrier.type]]
26
+ directory = "internal"
27
+ name = "Internal"
28
+ showcontent = true
29
+
30
+ [[tool.towncrier.type]]
31
+ directory = "documentation"
32
+ name = "Documentation"
33
+ showcontent = true
package/tsconfig.json ADDED
@@ -0,0 +1,30 @@
1
+ {
2
+ "compilerOptions": {
3
+ "esModuleInterop": true,
4
+ "skipLibCheck": true,
5
+ "target": "es2022",
6
+ "allowJs": true,
7
+ "resolveJsonModule": true,
8
+ "moduleDetection": "force",
9
+ "isolatedModules": true,
10
+ "verbatimModuleSyntax": true,
11
+ "module": "preserve",
12
+ "noEmit": true,
13
+ "lib": ["es2022", "dom", "dom.iterable"],
14
+ "jsx": "react-jsx",
15
+ "paths": {
16
+ "@plone/volto/*": ["../../core/packages/volto/src/*"],
17
+ "@plone-collective/volto-image-editor/*": ["./src/*"]
18
+ }
19
+ },
20
+ "include": ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx"],
21
+ "exclude": [
22
+ "node_modules",
23
+ "build",
24
+ "public",
25
+ "coverage",
26
+ "**/*.test.{js,jsx,ts,tsx}",
27
+ "**/*.spec.{js,jsx,ts,tsx}",
28
+ "**/*.stories.{js,jsx,ts,tsx}"
29
+ ]
30
+ }