@wordpress/media-editor 0.17.2-next.v.202608281122.0 → 0.18.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 (103) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/build/components/media-editor/index.cjs +43 -11
  3. package/build/components/media-editor/index.cjs.map +2 -2
  4. package/build/components/media-editor-canvas/index.cjs +4 -2
  5. package/build/components/media-editor-canvas/index.cjs.map +2 -2
  6. package/build/components/media-editor-crop-panel/index.cjs +4 -2
  7. package/build/components/media-editor-crop-panel/index.cjs.map +2 -2
  8. package/build/components/media-editor-fine-rotation/index.cjs +4 -2
  9. package/build/components/media-editor-fine-rotation/index.cjs.map +2 -2
  10. package/build/components/media-editor-image-controls/index.cjs +17 -4
  11. package/build/components/media-editor-image-controls/index.cjs.map +2 -2
  12. package/build/components/rotation-ruler/index.cjs +1 -0
  13. package/build/components/rotation-ruler/index.cjs.map +2 -2
  14. package/build/components/rotation-ruler/use-ruler-drag.cjs +7 -2
  15. package/build/components/rotation-ruler/use-ruler-drag.cjs.map +2 -2
  16. package/build/image-editor/core/interaction-controller.cjs +3 -0
  17. package/build/image-editor/core/interaction-controller.cjs.map +2 -2
  18. package/build/image-editor/react/components/cropper.cjs +5 -3
  19. package/build/image-editor/react/components/cropper.cjs.map +2 -2
  20. package/build/image-editor/react/components/stencils/rectangle-stencil.cjs +12 -5
  21. package/build/image-editor/react/components/stencils/rectangle-stencil.cjs.map +2 -2
  22. package/build/image-editor/react/hooks/use-interaction.cjs +31 -0
  23. package/build/image-editor/react/hooks/use-interaction.cjs.map +2 -2
  24. package/build-module/components/media-editor/index.mjs +43 -11
  25. package/build-module/components/media-editor/index.mjs.map +2 -2
  26. package/build-module/components/media-editor-canvas/index.mjs +4 -2
  27. package/build-module/components/media-editor-canvas/index.mjs.map +2 -2
  28. package/build-module/components/media-editor-crop-panel/index.mjs +4 -2
  29. package/build-module/components/media-editor-crop-panel/index.mjs.map +2 -2
  30. package/build-module/components/media-editor-fine-rotation/index.mjs +4 -2
  31. package/build-module/components/media-editor-fine-rotation/index.mjs.map +2 -2
  32. package/build-module/components/media-editor-image-controls/index.mjs +17 -4
  33. package/build-module/components/media-editor-image-controls/index.mjs.map +2 -2
  34. package/build-module/components/rotation-ruler/index.mjs +1 -0
  35. package/build-module/components/rotation-ruler/index.mjs.map +2 -2
  36. package/build-module/components/rotation-ruler/use-ruler-drag.mjs +7 -2
  37. package/build-module/components/rotation-ruler/use-ruler-drag.mjs.map +2 -2
  38. package/build-module/image-editor/core/interaction-controller.mjs +3 -0
  39. package/build-module/image-editor/core/interaction-controller.mjs.map +2 -2
  40. package/build-module/image-editor/react/components/cropper.mjs +5 -3
  41. package/build-module/image-editor/react/components/cropper.mjs.map +2 -2
  42. package/build-module/image-editor/react/components/stencils/rectangle-stencil.mjs +12 -5
  43. package/build-module/image-editor/react/components/stencils/rectangle-stencil.mjs.map +2 -2
  44. package/build-module/image-editor/react/hooks/use-interaction.mjs +31 -0
  45. package/build-module/image-editor/react/hooks/use-interaction.mjs.map +2 -2
  46. package/build-style/style-rtl.css +5 -12
  47. package/build-style/style.css +5 -12
  48. package/build-types/components/media-editor/index.d.ts.map +1 -1
  49. package/build-types/components/media-editor-canvas/index.d.ts +7 -1
  50. package/build-types/components/media-editor-canvas/index.d.ts.map +1 -1
  51. package/build-types/components/media-editor-crop-panel/index.d.ts +4 -1
  52. package/build-types/components/media-editor-crop-panel/index.d.ts.map +1 -1
  53. package/build-types/components/media-editor-fine-rotation/index.d.ts +7 -1
  54. package/build-types/components/media-editor-fine-rotation/index.d.ts.map +1 -1
  55. package/build-types/components/media-editor-image-controls/index.d.ts +7 -1
  56. package/build-types/components/media-editor-image-controls/index.d.ts.map +1 -1
  57. package/build-types/components/rotation-ruler/index.d.ts.map +1 -1
  58. package/build-types/components/rotation-ruler/use-ruler-drag.d.ts.map +1 -1
  59. package/build-types/image-editor/core/interaction-controller.d.ts.map +1 -1
  60. package/build-types/image-editor/react/components/cropper.d.ts +7 -0
  61. package/build-types/image-editor/react/components/cropper.d.ts.map +1 -1
  62. package/build-types/image-editor/react/components/stencils/rectangle-stencil.d.ts.map +1 -1
  63. package/build-types/image-editor/react/hooks/use-interaction.d.ts +5 -0
  64. package/build-types/image-editor/react/hooks/use-interaction.d.ts.map +1 -1
  65. package/global.d.ts +1 -0
  66. package/package.json +23 -22
  67. package/src/components/media-editor/index.tsx +42 -5
  68. package/src/components/media-editor/test/{use-crop-options.tsx → use-crop-options.jsdom.test.tsx} +1 -0
  69. package/src/components/media-editor-canvas/index.tsx +8 -0
  70. package/src/components/media-editor-crop-panel/index.tsx +6 -1
  71. package/src/components/media-editor-crop-panel/test/{index.tsx → index.jsdom.test.tsx} +5 -2
  72. package/src/components/media-editor-fine-rotation/index.tsx +8 -0
  73. package/src/components/media-editor-image-controls/index.tsx +22 -3
  74. package/src/components/media-editor-image-controls/test/{index.tsx → index.jsdom.test.tsx} +37 -0
  75. package/src/components/media-editor-modal/test/build-modifiers.test.ts +24 -14
  76. package/src/components/media-editor-modal/test/{index.tsx → index.jsdom.test.tsx} +65 -35
  77. package/src/components/rotation-ruler/index.tsx +1 -0
  78. package/src/components/rotation-ruler/style.scss +1 -1
  79. package/src/components/rotation-ruler/test/{index.tsx → index.jsdom.test.tsx} +42 -4
  80. package/src/components/rotation-ruler/use-ruler-drag.ts +10 -2
  81. package/src/image-editor/core/export/test/{canvas-renderer.ts → canvas-renderer.jsdom.test.ts} +76 -63
  82. package/src/image-editor/core/interaction-controller.ts +8 -0
  83. package/src/image-editor/core/math/test/sanitize.ts +1 -0
  84. package/src/image-editor/core/test/camera.ts +2 -3
  85. package/src/image-editor/core/test/interaction-controller.ts +50 -40
  86. package/src/image-editor/core/test/preview-export-parity.ts +31 -23
  87. package/src/image-editor/core/test/render-camera-bridge.ts +1 -0
  88. package/src/image-editor/core/test/state.ts +1 -0
  89. package/src/image-editor/core/test/stencil-math.ts +1 -0
  90. package/src/image-editor/core/transforms/test/pipeline.ts +1 -0
  91. package/src/image-editor/react/components/cropper.tsx +12 -1
  92. package/src/image-editor/react/components/stencils/rectangle-stencil.tsx +22 -6
  93. package/src/image-editor/react/components/stencils/test/{rectangle-stencil.tsx → rectangle-stencil.jsdom.test.tsx} +54 -36
  94. package/src/image-editor/react/components/test/{cropper.tsx → cropper.jsdom.test.tsx} +304 -0
  95. package/src/image-editor/react/hooks/test/{use-aria-announcer.ts → use-aria-announcer.jsdom.test.ts} +57 -44
  96. package/src/image-editor/react/hooks/test/{use-cropper-reducer.ts → use-cropper-reducer.jsdom.test.ts} +1 -0
  97. package/src/image-editor/react/hooks/test/{use-interaction.ts → use-interaction.jsdom.test.ts} +17 -16
  98. package/src/image-editor/react/hooks/test/{use-transform-style.ts → use-transform-style.jsdom.test.ts} +1 -0
  99. package/src/image-editor/react/hooks/use-interaction.ts +47 -0
  100. package/src/state/test/{use-media-editor-state.ts → use-media-editor-state.jsdom.test.ts} +1 -0
  101. package/src/store/test/reducer.ts +9 -8
  102. package/tsconfig.build.tsbuildinfo +1 -1
  103. package/tsconfig.json +8 -3
package/tsconfig.json CHANGED
@@ -2,7 +2,12 @@
2
2
  "$schema": "https://json.schemastore.org/tsconfig.json",
3
3
  "extends": "../../tsconfig.dev.base.json",
4
4
  "compilerOptions": {
5
- "types": [ "jest", "gutenberg-env", "style-imports" ]
5
+ "types": [
6
+ "jest",
7
+ "gutenberg-env",
8
+ "gutenberg-vitest-test-env",
9
+ "style-imports"
10
+ ]
6
11
  },
7
12
  "files": [ "global.d.ts" ],
8
13
  "references": [
@@ -27,7 +32,7 @@
27
32
  // Listed files have pre-existing type errors; include them once fixed.
28
33
  "exclude": [
29
34
  "**/benchmark",
30
- "src/components/media-editor-modal/test/index.tsx",
31
- "src/image-editor/react/components/stencils/test/rectangle-stencil.tsx"
35
+ "src/components/media-editor-modal/test/index.jsdom.test.tsx",
36
+ "src/image-editor/react/components/stencils/test/rectangle-stencil.jsdom.test.tsx"
32
37
  ]
33
38
  }