@plone-collective/volto-image-editor 1.0.0 → 1.1.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.
package/.changelog.draft CHANGED
@@ -1,18 +1,7 @@
1
- ## 1.0.0 (2025-12-08)
2
-
3
- ### Feature
4
-
5
- - CA, ES translations. @sneridagh [#16](https://github.com/collective/volto-image-editor/issue/16)
6
- - DE translations. @sneridagh [#17](https://github.com/collective/volto-image-editor/issue/17)
7
- - Allow overriding the default settings for an ImageEditor per project. @ericof [#18](https://github.com/collective/volto-image-editor/issue/18)
1
+ ## 1.1.0 (2026-10-07)
8
2
 
9
3
  ### Internal
10
4
 
11
- - Added portuguese translation & Update translation files. @humanaice [#3](https://github.com/collective/volto-image-editor/issue/3)
12
- - Fixed circle crop. @humanaice [#8](https://github.com/collective/volto-image-editor/issue/8)
13
- - Updated to use plone/components and removed react-icons + add cypress. @humanaice [#12](https://github.com/collective/volto-image-editor/issue/12)
14
- - Registering as custom widget and removing shadow. @humanaice [#14](https://github.com/collective/volto-image-editor/issue/14)
15
- - Changed the CSS to facilitate future modifications, with variables and new icons. @humanaice
16
- - Updated Slider to make it more simple and intuitive. @humanaice
5
+ - Updated according to the figma-design and improved styles for usage with the distributions @TimoBroeskamp
17
6
 
18
7
 
package/CHANGELOG.md CHANGED
@@ -8,6 +8,23 @@
8
8
 
9
9
  <!-- towncrier release notes start -->
10
10
 
11
+ ## 1.1.0 (2026-10-07)
12
+
13
+ ### Internal
14
+
15
+ - Updated according to the figma-design and improved styles for usage with the distributions @TimoBroeskamp
16
+
17
+ ## 1.0.1 (2026-03-03)
18
+
19
+ ### Feature
20
+
21
+ - Added support for lazyload the widget. @sneridagh
22
+
23
+ ### Internal
24
+
25
+ - Fixed Acceptance Tests and added them to main.yml. @humanaice [#23](https://github.com/collective/volto-image-editor/issue/23)
26
+ - Use Volto 19a27. @sneridagh
27
+
11
28
  ## 1.0.0 (2025-12-08)
12
29
 
13
30
  ### Feature
package/babel.config.js CHANGED
@@ -1,6 +1,6 @@
1
1
  module.exports = function (api) {
2
2
  api.cache(true);
3
- const presets = ['razzle'];
3
+ const presets = ['@plone/razzle'];
4
4
  const plugins = [
5
5
  [
6
6
  'react-intl', // React Intl extractor, required for the whole i18n infrastructure to work
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plone-collective/volto-image-editor",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "An image editor to be used with Plone and Volto.",
5
5
  "main": "src/index.ts",
6
6
  "license": "MIT",
@@ -33,7 +33,7 @@
33
33
  "dependencies": {
34
34
  "context-filter-polyfill": "0.3.23",
35
35
  "react-advanced-cropper": "0.20.1",
36
- "@plone/components": "4.0.0-alpha.0"
36
+ "@plone/components": "4.0.0-alpha.6"
37
37
  },
38
38
  "peerDependencies": {
39
39
  "advanced-cropper": "~0.17.1",
@@ -41,13 +41,13 @@
41
41
  "react": "18.2.0",
42
42
  "react-aria-components": "*",
43
43
  "react-dom": "18.2.0",
44
- "@plone/registry": "3.0.0-alpha.5",
45
- "@plone/types": "2.0.0-alpha.5"
44
+ "@plone/registry": "3.0.0-alpha.9",
45
+ "@plone/types": "2.0.0-alpha.14"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@types/node": "^20.2.5",
49
49
  "release-it": "^19.0.5",
50
- "@plone/scripts": "4.0.0-alpha.2"
50
+ "@plone/scripts": "4.0.0-alpha.5"
51
51
  },
52
52
  "scripts": {
53
53
  "i18n": "rm -rf build/messages && NODE_ENV=production i18n --addon",
@@ -2,9 +2,26 @@
2
2
  @import '../../../theme/variables';
3
3
  @import '../../../theme/constants';
4
4
 
5
+ .image-widget .image-widget-cropper {
6
+ button {
7
+ padding: 20px 0px;
8
+ border: none;
9
+ color: rgba(0, 0, 0, 0.9);
10
+ text-decoration: underline;
11
+ }
12
+ }
13
+
14
+ .ui.grid.image-widget-grid .file-widget-dropzone img {
15
+ margin-top: 0px;
16
+ }
17
+
5
18
  .image-editor {
19
+ display: grid;
6
20
  width: 100%;
21
+ height: 100%;
7
22
  color: $settings-header-color;
23
+ grid-template-columns: 100%;
24
+ grid-template-rows: 1fr 80px;
8
25
 
9
26
  &__preview {
10
27
  position: absolute;
@@ -19,7 +36,7 @@
19
36
 
20
37
  &__cropper {
21
38
  position: relative;
22
- height: 500px;
39
+ height: 100%;
23
40
  max-height: 100vh;
24
41
  background: $color-gray-dark;
25
42
 
@@ -1,16 +1,18 @@
1
1
  @import '../../../theme/variables';
2
2
 
3
3
  .react-aria-ModalOverlay {
4
+ z-index: 150;
4
5
  .react-aria-Modal.image-cropper-modal {
5
- width: 100%;
6
- max-width: $editor-width;
6
+ width: 70vw;
7
+ max-width: unset;
8
+ height: 70vh;
7
9
  border: 0;
8
10
  background-color: $settings-header-bg;
9
11
 
10
12
  .react-aria-Dialog {
11
- display: flex;
13
+ width: 100%;
14
+ height: 100%;
12
15
  align-items: center;
13
- justify-content: center;
14
16
  padding: 0;
15
17
  }
16
18
  }
@@ -83,7 +83,7 @@ const ImageEditorWrapper: React.FC<ImageEditorWrapperProps> = ({
83
83
  <div className={`image-widget ${className || ''}`}>
84
84
  <div className="image-widget-cropper">
85
85
  <DialogTrigger>
86
- <Button onPress={() => setOpen(true)}>
86
+ <Button download={false} onPress={() => setOpen(true)}>
87
87
  {buttonText || (
88
88
  <FormattedMessage id="Edit image" defaultMessage="Edit image" />
89
89
  )}
@@ -5,6 +5,7 @@
5
5
  display: flex;
6
6
  height: 100%;
7
7
  align-items: center;
8
+ align-self: flex-end;
8
9
  justify-content: space-between;
9
10
  padding: $image-editor-spacing-lg;
10
11
  border-top: solid 1px $image-editor-border-color;
@@ -33,14 +33,16 @@
33
33
  }
34
34
 
35
35
  &__content {
36
- display: flex;
36
+ display: grid;
37
37
  overflow: hidden;
38
38
  width: 100%;
39
+ height: 100%;
39
40
  max-height: 100%;
40
- flex-direction: column;
41
41
  animation: scaleIn $image-editor-transition-fast ease-out;
42
42
  background: $settings-body-bg;
43
- box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
43
+ box-shadow: 0 0px 60px rgba(0, 0, 0, 0.5);
44
+ grid-template-columns: 100%;
45
+ grid-template-rows: 80px 1fr;
44
46
  }
45
47
 
46
48
  &__header {
@@ -60,7 +62,9 @@
60
62
  }
61
63
 
62
64
  &__close {
63
- padding: $image-editor-spacing-xs $image-editor-spacing-sm;
65
+ display: grid;
66
+ align-self: center;
67
+ padding: $image-editor-spacing-sm;
64
68
  border: none;
65
69
  border-radius: $image-editor-border-radius-sm;
66
70
  background: transparent;
@@ -86,7 +90,6 @@
86
90
  }
87
91
 
88
92
  &__label {
89
- display: block;
90
93
  margin-bottom: $image-editor-spacing-sm;
91
94
  color: $settings-body-color;
92
95
  font-size: 14px;
@@ -7,8 +7,8 @@ import {
7
7
  NumberField,
8
8
  Checkbox,
9
9
  RadioGroup,
10
+ Radio,
10
11
  } from '@plone/components';
11
- import { Radio } from 'react-aria-components';
12
12
  import { SettingsIcon } from '@plone-collective/volto-image-editor/icons/SettingsIcon';
13
13
  import type { ImageSettings } from '../../../../types/ImageSettings';
14
14
  import {
@@ -32,6 +32,7 @@ import {
32
32
  RectangleStencilIcon,
33
33
  CircleStencilIcon,
34
34
  } from '@plone-collective/volto-image-editor/icons/StencilIcons';
35
+ import BackSVG from '@plone/volto/icons/back.svg';
35
36
  import './SettingsModal.scss';
36
37
 
37
38
  const messages = defineMessages({
@@ -205,7 +206,12 @@ export const SettingsModal: FC<Props> = ({
205
206
  className="image-editor-settings-modal__close"
206
207
  onClick={onToggle}
207
208
  >
208
- ✕
209
+ <Icon size="base">
210
+ <svg
211
+ {...BackSVG.attributes}
212
+ dangerouslySetInnerHTML={{ __html: BackSVG.content }}
213
+ />
214
+ </Icon>
209
215
  </Button>
210
216
  </div>
211
217
 
@@ -150,6 +150,8 @@ const FileWidget = (props) => {
150
150
  <Grid className="image-widget-grid">
151
151
  <Grid.Row stretched>
152
152
  <Grid.Column stretched width={mainColumnWidth}>
153
+ {isImage && <ImageEditorWrapper value={value} setData={setData} />}
154
+
153
155
  <Dropzone
154
156
  onDrop={onDrop}
155
157
  {...(props.size ? { maxSize: props.size } : {})}
@@ -225,11 +227,6 @@ const FileWidget = (props) => {
225
227
  )}
226
228
  </div>
227
229
  </Grid.Column>
228
- {isImage && (
229
- <Grid.Column stretched width="2" className={'image-editor-cta'}>
230
- <ImageEditorWrapper value={value} setData={setData} />
231
- </Grid.Column>
232
- )}
233
230
  </Grid.Row>
234
231
  </Grid>
235
232
  </FormFieldWrapper>
@@ -0,0 +1,8 @@
1
+ import loadable from '@loadable/component';
2
+
3
+ export const FileWidget = loadable(
4
+ () =>
5
+ import(
6
+ /* webpackChunkName: "Widgets" */ '@plone-collective/volto-image-editor/components/Widgets/FileWidget'
7
+ ),
8
+ );
@@ -1,5 +1,5 @@
1
1
  import type { ConfigType } from '@plone/registry';
2
- import FileWidget from '../components/Widgets/FileWidget';
2
+ import { FileWidget } from '../components/Widgets';
3
3
 
4
4
  export const registerWidgets = (config: ConfigType) => {
5
5
  config.widgets.widget.file = FileWidget;
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 36 36">
2
+ <polygon fill-rule="evenodd" points="31 17 8.414 17 18.707 6.707 17.293 5.293 4.586 18 17.293 30.707 18.707 29.293 8.414 19 31 19"/>
3
+ </svg>
@@ -15,7 +15,7 @@ $nav-button-color-hover: $color-black !default;
15
15
  $nav-button-bg-active: $color-black !default;
16
16
  $nav-button-color-active: $color-white !default;
17
17
 
18
- $nav-button-close-color: $color-red !default;
18
+ $nav-button-close-color: $color-gray-dark !default;
19
19
 
20
20
  $editor-button-bg: $color-gray-dark !default;
21
21
  $editor-button-color: $color-white !default;
Binary file