@wordpress/media-editor 0.18.0 → 0.18.1-next.v.202609171837.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/README.md +7 -7
- package/build/components/media-editor/index.cjs.map +2 -2
- package/build/components/media-editor/use-save-media-editor.cjs.map +2 -2
- package/build/components/media-editor-crop-panel/index.cjs.map +3 -3
- package/build/image-editor/core/interaction-controller.cjs.map +2 -2
- package/build/image-editor/core/setter-helpers.cjs.map +2 -2
- package/build/image-editor/react/components/overlays/dimensions-overlay.cjs.map +2 -2
- package/build-module/components/media-editor/index.mjs.map +2 -2
- package/build-module/components/media-editor/use-save-media-editor.mjs.map +2 -2
- package/build-module/components/media-editor-crop-panel/index.mjs +2 -2
- package/build-module/components/media-editor-crop-panel/index.mjs.map +2 -2
- package/build-module/image-editor/core/interaction-controller.mjs.map +2 -2
- package/build-module/image-editor/core/setter-helpers.mjs.map +2 -2
- package/build-module/image-editor/react/components/overlays/dimensions-overlay.mjs.map +2 -2
- package/global.d.ts +0 -1
- package/package.json +21 -21
- package/src/components/media-editor/index.tsx +2 -2
- package/src/components/media-editor/use-save-media-editor.ts +5 -5
- package/src/components/media-editor-crop-panel/index.tsx +2 -2
- package/src/components/media-editor-modal/test/index.jsdom.test.tsx +7 -7
- package/src/image-editor/core/interaction-controller.ts +2 -2
- package/src/image-editor/core/setter-helpers.ts +1 -1
- package/src/image-editor/react/components/overlays/dimensions-overlay.tsx +1 -1
- package/src/image-editor/react/components/stencils/test/{rectangle-stencil.jsdom.test.tsx → rectangle-stencil.browser.test.tsx} +80 -98
- package/src/image-editor/react/components/test/{cropper.jsdom.test.tsx → cropper.browser.test.tsx} +230 -221
- package/src/image-editor/react/hooks/test/use-aria-announcer.jsdom.test.ts +1 -1
- package/src/image-editor/stories/rectangle-crop.story.tsx +9 -9
- package/tsconfig.build.json +1 -1
- package/tsconfig.build.tsbuildinfo +1 -1
- package/tsconfig.json +1 -2
|
@@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
|
2
2
|
import { useState, useCallback, useEffect, useRef } from '@wordpress/element';
|
|
3
3
|
import {
|
|
4
4
|
Button,
|
|
5
|
-
SelectControl,
|
|
5
|
+
SelectControl as WCSelectControl,
|
|
6
6
|
RangeControl,
|
|
7
7
|
ToggleControl,
|
|
8
8
|
Flex,
|
|
@@ -198,7 +198,7 @@ const WithControlsComponent = () => {
|
|
|
198
198
|
? getSourceRegion( state, {
|
|
199
199
|
width: state.image.naturalWidth,
|
|
200
200
|
height: state.image.naturalHeight,
|
|
201
|
-
|
|
201
|
+
} )
|
|
202
202
|
: null;
|
|
203
203
|
|
|
204
204
|
// The base cardinal angle (nearest 90° step) and the fine offset.
|
|
@@ -388,7 +388,7 @@ const WithControlsComponent = () => {
|
|
|
388
388
|
/>
|
|
389
389
|
</FlexItem>
|
|
390
390
|
<FlexItem>
|
|
391
|
-
<
|
|
391
|
+
<WCSelectControl
|
|
392
392
|
label="Aspect ratio"
|
|
393
393
|
hideLabelFromVision
|
|
394
394
|
value={ aspectRatioValue }
|
|
@@ -409,7 +409,7 @@ const WithControlsComponent = () => {
|
|
|
409
409
|
/>
|
|
410
410
|
</FlexItem>
|
|
411
411
|
<FlexItem>
|
|
412
|
-
<
|
|
412
|
+
<WCSelectControl
|
|
413
413
|
label="Grid"
|
|
414
414
|
hideLabelFromVision
|
|
415
415
|
value={ gridMode }
|
|
@@ -503,7 +503,7 @@ const WithControlsComponent = () => {
|
|
|
503
503
|
naturalWidth: state.image.naturalWidth,
|
|
504
504
|
naturalHeight:
|
|
505
505
|
state.image.naturalHeight,
|
|
506
|
-
|
|
506
|
+
}
|
|
507
507
|
: null,
|
|
508
508
|
},
|
|
509
509
|
null,
|
|
@@ -615,7 +615,7 @@ const DebugComponent = () => {
|
|
|
615
615
|
: {
|
|
616
616
|
elementSize: { width: 0, height: 0 },
|
|
617
617
|
visualSize: { width: 0, height: 0 },
|
|
618
|
-
|
|
618
|
+
};
|
|
619
619
|
|
|
620
620
|
// Camera and restriction.
|
|
621
621
|
const camera = hasImage
|
|
@@ -626,7 +626,7 @@ const DebugComponent = () => {
|
|
|
626
626
|
{ ...state, pan: { x: 0, y: 0 }, zoom: 1 },
|
|
627
627
|
containerSize,
|
|
628
628
|
imageSize
|
|
629
|
-
|
|
629
|
+
)
|
|
630
630
|
: null;
|
|
631
631
|
const vb = baseCamera ? getVisibleBounds( baseCamera ) : null;
|
|
632
632
|
|
|
@@ -648,7 +648,7 @@ const DebugComponent = () => {
|
|
|
648
648
|
( state.cropRect.y + state.cropRect.height ) *
|
|
649
649
|
vb.height,
|
|
650
650
|
} ),
|
|
651
|
-
|
|
651
|
+
]
|
|
652
652
|
: null;
|
|
653
653
|
|
|
654
654
|
// Restriction result.
|
|
@@ -825,7 +825,7 @@ const DebugComponent = () => {
|
|
|
825
825
|
</Button>
|
|
826
826
|
</FlexItem>
|
|
827
827
|
<FlexItem>
|
|
828
|
-
<
|
|
828
|
+
<WCSelectControl
|
|
829
829
|
label="Format"
|
|
830
830
|
hideLabelFromVision
|
|
831
831
|
value={ exportFormat as 'image/jpeg' }
|
package/tsconfig.build.json
CHANGED