@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.
Files changed (30) hide show
  1. package/README.md +7 -7
  2. package/build/components/media-editor/index.cjs.map +2 -2
  3. package/build/components/media-editor/use-save-media-editor.cjs.map +2 -2
  4. package/build/components/media-editor-crop-panel/index.cjs.map +3 -3
  5. package/build/image-editor/core/interaction-controller.cjs.map +2 -2
  6. package/build/image-editor/core/setter-helpers.cjs.map +2 -2
  7. package/build/image-editor/react/components/overlays/dimensions-overlay.cjs.map +2 -2
  8. package/build-module/components/media-editor/index.mjs.map +2 -2
  9. package/build-module/components/media-editor/use-save-media-editor.mjs.map +2 -2
  10. package/build-module/components/media-editor-crop-panel/index.mjs +2 -2
  11. package/build-module/components/media-editor-crop-panel/index.mjs.map +2 -2
  12. package/build-module/image-editor/core/interaction-controller.mjs.map +2 -2
  13. package/build-module/image-editor/core/setter-helpers.mjs.map +2 -2
  14. package/build-module/image-editor/react/components/overlays/dimensions-overlay.mjs.map +2 -2
  15. package/global.d.ts +0 -1
  16. package/package.json +21 -21
  17. package/src/components/media-editor/index.tsx +2 -2
  18. package/src/components/media-editor/use-save-media-editor.ts +5 -5
  19. package/src/components/media-editor-crop-panel/index.tsx +2 -2
  20. package/src/components/media-editor-modal/test/index.jsdom.test.tsx +7 -7
  21. package/src/image-editor/core/interaction-controller.ts +2 -2
  22. package/src/image-editor/core/setter-helpers.ts +1 -1
  23. package/src/image-editor/react/components/overlays/dimensions-overlay.tsx +1 -1
  24. package/src/image-editor/react/components/stencils/test/{rectangle-stencil.jsdom.test.tsx → rectangle-stencil.browser.test.tsx} +80 -98
  25. package/src/image-editor/react/components/test/{cropper.jsdom.test.tsx → cropper.browser.test.tsx} +230 -221
  26. package/src/image-editor/react/hooks/test/use-aria-announcer.jsdom.test.ts +1 -1
  27. package/src/image-editor/stories/rectangle-crop.story.tsx +9 -9
  28. package/tsconfig.build.json +1 -1
  29. package/tsconfig.build.tsbuildinfo +1 -1
  30. package/tsconfig.json +1 -2
@@ -18,7 +18,7 @@ vi.mock(
18
18
  () =>
19
19
  ( {
20
20
  speak: vi.fn(),
21
- } ) as unknown as typeof import('@wordpress/a11y')
21
+ } ) as unknown as typeof import( '@wordpress/a11y' )
22
22
  );
23
23
 
24
24
  function makeState( overrides: Partial< CropperState > = {} ): CropperState {
@@ -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
- <SelectControl
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
- <SelectControl
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
- <SelectControl
828
+ <WCSelectControl
829
829
  label="Format"
830
830
  hideLabelFromVision
831
831
  value={ exportFormat as 'image/jpeg' }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/tsconfig.json",
3
- "extends": "../../tsconfig.base.json",
3
+ "extends": "@wordpress/monorepo-tools/tsconfig/base.json",
4
4
  "compilerOptions": {
5
5
  "types": [ "gutenberg-env", "style-imports" ],
6
6
  "checkJs": false