@wordpress/media-editor 0.22.0 → 0.24.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 (391) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/build/components/media-editor/index.cjs +229 -126
  3. package/build/components/media-editor/index.cjs.map +1 -1
  4. package/build/components/media-editor/use-crop-options.cjs +4 -5
  5. package/build/components/media-editor/use-crop-options.cjs.map +1 -1
  6. package/build/components/media-editor/use-save-media-editor.cjs +41 -11
  7. package/build/components/media-editor/use-save-media-editor.cjs.map +1 -1
  8. package/build/components/media-editor-canvas/index.cjs +15 -18
  9. package/build/components/media-editor-canvas/index.cjs.map +1 -1
  10. package/build/components/media-editor-crop-panel/index.cjs +26 -8
  11. package/build/components/media-editor-crop-panel/index.cjs.map +1 -1
  12. package/build/components/media-editor-fine-rotation/index.cjs +13 -12
  13. package/build/components/media-editor-fine-rotation/index.cjs.map +1 -1
  14. package/build/components/media-editor-image-controls/index.cjs +4 -6
  15. package/build/components/media-editor-image-controls/index.cjs.map +1 -1
  16. package/build/components/media-editor-keyboard-shortcuts-modal/index.cjs +33 -33
  17. package/build/components/media-editor-keyboard-shortcuts-modal/index.cjs.map +1 -1
  18. package/build/components/media-editor-modal/index.cjs +10 -7
  19. package/build/components/media-editor-modal/index.cjs.map +1 -1
  20. package/build/components/media-editor-panel/error-boundary.cjs +68 -0
  21. package/build/components/media-editor-panel/error-boundary.cjs.map +1 -0
  22. package/build/components/media-editor-panel/index.cjs +158 -0
  23. package/build/components/media-editor-panel/index.cjs.map +1 -0
  24. package/build/components/media-form/index.cjs +7 -1
  25. package/build/components/media-form/index.cjs.map +1 -1
  26. package/build/components/media-preview/index.cjs +143 -37
  27. package/build/components/media-preview/index.cjs.map +1 -1
  28. package/build/components/rotation-ruler/index.cjs +9 -7
  29. package/build/components/rotation-ruler/index.cjs.map +1 -1
  30. package/build/components/rotation-ruler/use-ruler-drag.cjs.map +1 -1
  31. package/build/hooks/use-crop-gesture-handlers.cjs.map +1 -1
  32. package/build/index.cjs +10 -8
  33. package/build/private-apis.cjs.map +1 -1
  34. package/build/state/aspect-ratio-presets.cjs +12 -6
  35. package/build/state/aspect-ratio-presets.cjs.map +1 -1
  36. package/build/state/composite-reducer.cjs +41 -74
  37. package/build/state/composite-reducer.cjs.map +1 -1
  38. package/build/state/index.cjs +0 -39
  39. package/build/state/types.cjs +1 -2
  40. package/build/state/types.cjs.map +1 -1
  41. package/build/state/use-media-editor-state.cjs +70 -106
  42. package/build/state/use-media-editor-state.cjs.map +1 -1
  43. package/build/store/index.cjs +11 -9
  44. package/build/store/index.cjs.map +1 -1
  45. package/build/utils/get-media-type.cjs +8 -0
  46. package/build/utils/get-media-type.cjs.map +1 -1
  47. package/build/utils/index.cjs +6 -0
  48. package/build-module/components/media-editor/index.mjs +217 -117
  49. package/build-module/components/media-editor/index.mjs.map +1 -1
  50. package/build-module/components/media-editor/use-crop-options.mjs +4 -5
  51. package/build-module/components/media-editor/use-crop-options.mjs.map +1 -1
  52. package/build-module/components/media-editor/use-save-media-editor.mjs +32 -4
  53. package/build-module/components/media-editor/use-save-media-editor.mjs.map +1 -1
  54. package/build-module/components/media-editor-canvas/index.mjs +8 -13
  55. package/build-module/components/media-editor-canvas/index.mjs.map +1 -1
  56. package/build-module/components/media-editor-crop-panel/index.mjs +17 -1
  57. package/build-module/components/media-editor-crop-panel/index.mjs.map +1 -1
  58. package/build-module/components/media-editor-fine-rotation/index.mjs +4 -5
  59. package/build-module/components/media-editor-fine-rotation/index.mjs.map +1 -1
  60. package/build-module/components/media-editor-image-controls/index.mjs +5 -7
  61. package/build-module/components/media-editor-image-controls/index.mjs.map +1 -1
  62. package/build-module/components/media-editor-keyboard-shortcuts-modal/index.mjs +33 -33
  63. package/build-module/components/media-editor-keyboard-shortcuts-modal/index.mjs.map +1 -1
  64. package/build-module/components/media-editor-modal/index.mjs +1 -0
  65. package/build-module/components/media-editor-modal/index.mjs.map +1 -1
  66. package/build-module/components/media-editor-panel/error-boundary.mjs +63 -0
  67. package/build-module/components/media-editor-panel/error-boundary.mjs.map +1 -0
  68. package/build-module/components/media-editor-panel/index.mjs +123 -0
  69. package/build-module/components/media-editor-panel/index.mjs.map +1 -0
  70. package/build-module/components/media-form/index.mjs +7 -1
  71. package/build-module/components/media-form/index.mjs.map +1 -1
  72. package/build-module/components/media-preview/index.mjs +123 -41
  73. package/build-module/components/media-preview/index.mjs.map +1 -1
  74. package/build-module/state/aspect-ratio-presets.mjs +12 -7
  75. package/build-module/state/aspect-ratio-presets.mjs.map +1 -1
  76. package/build-module/state/composite-reducer.mjs +32 -67
  77. package/build-module/state/composite-reducer.mjs.map +1 -1
  78. package/build-module/state/index.mjs +2 -5
  79. package/build-module/state/types.mjs +1 -2
  80. package/build-module/state/types.mjs.map +1 -1
  81. package/build-module/state/use-media-editor-state.mjs +70 -105
  82. package/build-module/state/use-media-editor-state.mjs.map +1 -1
  83. package/build-module/utils/get-media-type.mjs +8 -1
  84. package/build-module/utils/get-media-type.mjs.map +1 -1
  85. package/build-module/utils/index.mjs +1 -1
  86. package/build-style/style-rtl.css +122 -87
  87. package/build-style/style.css +121 -87
  88. package/build-types/components/media-editor/index.d.ts +25 -3
  89. package/build-types/components/media-editor/index.d.ts.map +1 -1
  90. package/build-types/components/media-editor/use-crop-options.d.ts +2 -3
  91. package/build-types/components/media-editor/use-crop-options.d.ts.map +1 -1
  92. package/build-types/components/media-editor/use-save-media-editor.d.ts.map +1 -1
  93. package/build-types/components/media-editor-canvas/index.d.ts +3 -3
  94. package/build-types/components/media-editor-canvas/index.d.ts.map +1 -1
  95. package/build-types/components/media-editor-crop-panel/index.d.ts +1 -1
  96. package/build-types/components/media-editor-crop-panel/index.d.ts.map +1 -1
  97. package/build-types/components/media-editor-fine-rotation/index.d.ts.map +1 -1
  98. package/build-types/components/media-editor-image-controls/index.d.ts +1 -1
  99. package/build-types/components/media-editor-image-controls/index.d.ts.map +1 -1
  100. package/build-types/components/media-editor-keyboard-shortcuts-modal/index.d.ts.map +1 -1
  101. package/build-types/components/media-editor-modal/index.d.ts +1 -1
  102. package/build-types/components/media-editor-modal/index.d.ts.map +1 -1
  103. package/build-types/components/media-editor-panel/error-boundary.d.ts +23 -0
  104. package/build-types/components/media-editor-panel/error-boundary.d.ts.map +1 -0
  105. package/build-types/components/media-editor-panel/index.d.ts +46 -0
  106. package/build-types/components/media-editor-panel/index.d.ts.map +1 -0
  107. package/build-types/components/media-form/index.d.ts.map +1 -1
  108. package/build-types/components/media-preview/index.d.ts.map +1 -1
  109. package/build-types/state/aspect-ratio-presets.d.ts +20 -3
  110. package/build-types/state/aspect-ratio-presets.d.ts.map +1 -1
  111. package/build-types/state/composite-reducer.d.ts +17 -19
  112. package/build-types/state/composite-reducer.d.ts.map +1 -1
  113. package/build-types/state/index.d.ts +2 -5
  114. package/build-types/state/index.d.ts.map +1 -1
  115. package/build-types/state/types.d.ts +20 -64
  116. package/build-types/state/types.d.ts.map +1 -1
  117. package/build-types/state/use-media-editor-state.d.ts +40 -54
  118. package/build-types/state/use-media-editor-state.d.ts.map +1 -1
  119. package/build-types/utils/get-media-type.d.ts +3 -1
  120. package/build-types/utils/get-media-type.d.ts.map +1 -1
  121. package/build-types/utils/index.d.ts +1 -1
  122. package/build-types/utils/index.d.ts.map +1 -1
  123. package/package.json +27 -24
  124. package/src/components/media-editor/index.tsx +372 -142
  125. package/src/components/media-editor/style.scss +21 -1
  126. package/src/components/media-editor/use-crop-options.ts +7 -11
  127. package/src/components/media-editor/use-save-media-editor.ts +48 -6
  128. package/src/components/media-editor-canvas/index.tsx +15 -26
  129. package/src/components/media-editor-canvas/style.scss +6 -6
  130. package/src/components/media-editor-crop-panel/index.tsx +38 -2
  131. package/src/components/media-editor-crop-panel/style.scss +21 -0
  132. package/src/components/media-editor-fine-rotation/index.tsx +6 -6
  133. package/src/components/media-editor-image-controls/index.tsx +11 -9
  134. package/src/components/media-editor-keyboard-shortcuts-modal/index.tsx +56 -63
  135. package/src/components/media-editor-keyboard-shortcuts-modal/style.scss +1 -1
  136. package/src/components/media-editor-modal/index.tsx +4 -1
  137. package/src/components/media-editor-panel/error-boundary.tsx +88 -0
  138. package/src/components/media-editor-panel/index.tsx +211 -0
  139. package/src/components/media-form/index.tsx +7 -1
  140. package/src/components/media-preview/index.tsx +195 -37
  141. package/src/components/media-preview/style.scss +11 -32
  142. package/src/components/rotation-ruler/style.scss +3 -3
  143. package/src/state/README.md +34 -0
  144. package/src/state/aspect-ratio-presets.ts +22 -3
  145. package/src/state/composite-reducer.ts +42 -80
  146. package/src/state/index.ts +2 -18
  147. package/src/state/types.ts +18 -68
  148. package/src/state/use-media-editor-state.ts +162 -242
  149. package/src/style.scss +2 -1
  150. package/src/utils/get-media-type.ts +9 -1
  151. package/src/utils/index.ts +1 -1
  152. package/build/components/media-editor-modal/build-modifiers.cjs +0 -110
  153. package/build/components/media-editor-modal/build-modifiers.cjs.map +0 -1
  154. package/build/image-editor/core/camera.cjs +0 -277
  155. package/build/image-editor/core/camera.cjs.map +0 -1
  156. package/build/image-editor/core/constants.cjs +0 -133
  157. package/build/image-editor/core/constants.cjs.map +0 -1
  158. package/build/image-editor/core/containment.cjs +0 -289
  159. package/build/image-editor/core/containment.cjs.map +0 -1
  160. package/build/image-editor/core/crop-rect.cjs +0 -37
  161. package/build/image-editor/core/crop-rect.cjs.map +0 -1
  162. package/build/image-editor/core/export/canvas-renderer.cjs +0 -181
  163. package/build/image-editor/core/export/canvas-renderer.cjs.map +0 -1
  164. package/build/image-editor/core/index.cjs +0 -89
  165. package/build/image-editor/core/interaction-controller.cjs +0 -591
  166. package/build/image-editor/core/interaction-controller.cjs.map +0 -1
  167. package/build/image-editor/core/math/rotation.cjs +0 -32
  168. package/build/image-editor/core/math/rotation.cjs.map +0 -1
  169. package/build/image-editor/core/math/sanitize.cjs +0 -136
  170. package/build/image-editor/core/math/sanitize.cjs.map +0 -1
  171. package/build/image-editor/core/setter-helpers.cjs +0 -61
  172. package/build/image-editor/core/setter-helpers.cjs.map +0 -1
  173. package/build/image-editor/core/source-region.cjs +0 -236
  174. package/build/image-editor/core/source-region.cjs.map +0 -1
  175. package/build/image-editor/core/state.cjs +0 -296
  176. package/build/image-editor/core/state.cjs.map +0 -1
  177. package/build/image-editor/core/stencil-math.cjs +0 -203
  178. package/build/image-editor/core/stencil-math.cjs.map +0 -1
  179. package/build/image-editor/core/transform-style.cjs +0 -43
  180. package/build/image-editor/core/transform-style.cjs.map +0 -1
  181. package/build/image-editor/core/transforms/pipeline.cjs +0 -41
  182. package/build/image-editor/core/transforms/pipeline.cjs.map +0 -1
  183. package/build/image-editor/core/types.cjs +0 -5
  184. package/build/image-editor/core/viewport-state.cjs +0 -36
  185. package/build/image-editor/core/viewport-state.cjs.map +0 -1
  186. package/build/image-editor/index.cjs +0 -68
  187. package/build/image-editor/react/components/cropper-provider.cjs +0 -49
  188. package/build/image-editor/react/components/cropper-provider.cjs.map +0 -1
  189. package/build/image-editor/react/components/cropper.cjs +0 -595
  190. package/build/image-editor/react/components/cropper.cjs.map +0 -1
  191. package/build/image-editor/react/components/index.cjs +0 -25
  192. package/build/image-editor/react/components/overlays/dimensions-overlay.cjs +0 -147
  193. package/build/image-editor/react/components/overlays/dimensions-overlay.cjs.map +0 -1
  194. package/build/image-editor/react/components/overlays/dimming-overlay.cjs +0 -31
  195. package/build/image-editor/react/components/overlays/dimming-overlay.cjs.map +0 -1
  196. package/build/image-editor/react/components/overlays/grid-overlay.cjs +0 -61
  197. package/build/image-editor/react/components/overlays/grid-overlay.cjs.map +0 -1
  198. package/build/image-editor/react/components/stencils/rectangle-stencil.cjs +0 -367
  199. package/build/image-editor/react/components/stencils/rectangle-stencil.cjs.map +0 -1
  200. package/build/image-editor/react/components/viewport-provider.cjs +0 -26
  201. package/build/image-editor/react/components/viewport-provider.cjs.map +0 -1
  202. package/build/image-editor/react/hooks/build-cropper-setters.cjs +0 -80
  203. package/build/image-editor/react/hooks/build-cropper-setters.cjs.map +0 -1
  204. package/build/image-editor/react/hooks/index.cjs +0 -19
  205. package/build/image-editor/react/hooks/use-aria-announcer.cjs +0 -104
  206. package/build/image-editor/react/hooks/use-aria-announcer.cjs.map +0 -1
  207. package/build/image-editor/react/hooks/use-cropper-controller.cjs +0 -80
  208. package/build/image-editor/react/hooks/use-cropper-controller.cjs.map +0 -1
  209. package/build/image-editor/react/hooks/use-interaction.cjs +0 -187
  210. package/build/image-editor/react/hooks/use-interaction.cjs.map +0 -1
  211. package/build/image-editor/react/hooks/use-transform-style.cjs +0 -24
  212. package/build/image-editor/react/hooks/use-transform-style.cjs.map +0 -1
  213. package/build/image-editor/react/hooks/use-viewport-state.cjs +0 -40
  214. package/build/image-editor/react/hooks/use-viewport-state.cjs.map +0 -1
  215. package/build/image-editor/react/visually-hidden-style.cjs +0 -24
  216. package/build/image-editor/react/visually-hidden-style.cjs.map +0 -1
  217. package/build-module/components/media-editor-modal/build-modifiers.mjs +0 -105
  218. package/build-module/components/media-editor-modal/build-modifiers.mjs.map +0 -1
  219. package/build-module/image-editor/core/camera.mjs +0 -265
  220. package/build-module/image-editor/core/camera.mjs.map +0 -1
  221. package/build-module/image-editor/core/constants.mjs +0 -115
  222. package/build-module/image-editor/core/constants.mjs.map +0 -1
  223. package/build-module/image-editor/core/containment.mjs +0 -281
  224. package/build-module/image-editor/core/containment.mjs.map +0 -1
  225. package/build-module/image-editor/core/crop-rect.mjs +0 -32
  226. package/build-module/image-editor/core/crop-rect.mjs.map +0 -1
  227. package/build-module/image-editor/core/export/canvas-renderer.mjs +0 -170
  228. package/build-module/image-editor/core/export/canvas-renderer.mjs.map +0 -1
  229. package/build-module/image-editor/core/index.mjs +0 -7
  230. package/build-module/image-editor/core/interaction-controller.mjs +0 -586
  231. package/build-module/image-editor/core/interaction-controller.mjs.map +0 -1
  232. package/build-module/image-editor/core/math/rotation.mjs +0 -26
  233. package/build-module/image-editor/core/math/rotation.mjs.map +0 -1
  234. package/build-module/image-editor/core/math/sanitize.mjs +0 -127
  235. package/build-module/image-editor/core/math/sanitize.mjs.map +0 -1
  236. package/build-module/image-editor/core/setter-helpers.mjs +0 -56
  237. package/build-module/image-editor/core/setter-helpers.mjs.map +0 -1
  238. package/build-module/image-editor/core/source-region.mjs +0 -228
  239. package/build-module/image-editor/core/source-region.mjs.map +0 -1
  240. package/build-module/image-editor/core/state.mjs +0 -288
  241. package/build-module/image-editor/core/state.mjs.map +0 -1
  242. package/build-module/image-editor/core/stencil-math.mjs +0 -194
  243. package/build-module/image-editor/core/stencil-math.mjs.map +0 -1
  244. package/build-module/image-editor/core/transform-style.mjs +0 -38
  245. package/build-module/image-editor/core/transform-style.mjs.map +0 -1
  246. package/build-module/image-editor/core/transforms/pipeline.mjs +0 -35
  247. package/build-module/image-editor/core/transforms/pipeline.mjs.map +0 -1
  248. package/build-module/image-editor/core/types.mjs +0 -0
  249. package/build-module/image-editor/core/viewport-state.mjs +0 -30
  250. package/build-module/image-editor/core/viewport-state.mjs.map +0 -1
  251. package/build-module/image-editor/index.mjs +0 -4
  252. package/build-module/image-editor/react/components/cropper-provider.mjs +0 -43
  253. package/build-module/image-editor/react/components/cropper-provider.mjs.map +0 -1
  254. package/build-module/image-editor/react/components/cropper.mjs +0 -568
  255. package/build-module/image-editor/react/components/cropper.mjs.map +0 -1
  256. package/build-module/image-editor/react/components/index.mjs +0 -3
  257. package/build-module/image-editor/react/components/overlays/dimensions-overlay.mjs +0 -142
  258. package/build-module/image-editor/react/components/overlays/dimensions-overlay.mjs.map +0 -1
  259. package/build-module/image-editor/react/components/overlays/dimming-overlay.mjs +0 -26
  260. package/build-module/image-editor/react/components/overlays/dimming-overlay.mjs.map +0 -1
  261. package/build-module/image-editor/react/components/overlays/grid-overlay.mjs +0 -56
  262. package/build-module/image-editor/react/components/overlays/grid-overlay.mjs.map +0 -1
  263. package/build-module/image-editor/react/components/stencils/rectangle-stencil.mjs +0 -362
  264. package/build-module/image-editor/react/components/stencils/rectangle-stencil.mjs.map +0 -1
  265. package/build-module/image-editor/react/components/viewport-provider.mjs +0 -20
  266. package/build-module/image-editor/react/components/viewport-provider.mjs.map +0 -1
  267. package/build-module/image-editor/react/hooks/build-cropper-setters.mjs +0 -75
  268. package/build-module/image-editor/react/hooks/build-cropper-setters.mjs.map +0 -1
  269. package/build-module/image-editor/react/hooks/index.mjs +0 -3
  270. package/build-module/image-editor/react/hooks/use-aria-announcer.mjs +0 -99
  271. package/build-module/image-editor/react/hooks/use-aria-announcer.mjs.map +0 -1
  272. package/build-module/image-editor/react/hooks/use-cropper-controller.mjs +0 -75
  273. package/build-module/image-editor/react/hooks/use-cropper-controller.mjs.map +0 -1
  274. package/build-module/image-editor/react/hooks/use-interaction.mjs +0 -182
  275. package/build-module/image-editor/react/hooks/use-interaction.mjs.map +0 -1
  276. package/build-module/image-editor/react/hooks/use-transform-style.mjs +0 -19
  277. package/build-module/image-editor/react/hooks/use-transform-style.mjs.map +0 -1
  278. package/build-module/image-editor/react/hooks/use-viewport-state.mjs +0 -35
  279. package/build-module/image-editor/react/hooks/use-viewport-state.mjs.map +0 -1
  280. package/build-module/image-editor/react/visually-hidden-style.mjs +0 -19
  281. package/build-module/image-editor/react/visually-hidden-style.mjs.map +0 -1
  282. package/build-types/components/media-editor-modal/build-modifiers.d.ts +0 -81
  283. package/build-types/components/media-editor-modal/build-modifiers.d.ts.map +0 -1
  284. package/build-types/image-editor/core/camera.d.ts +0 -128
  285. package/build-types/image-editor/core/camera.d.ts.map +0 -1
  286. package/build-types/image-editor/core/constants.d.ts +0 -98
  287. package/build-types/image-editor/core/constants.d.ts.map +0 -1
  288. package/build-types/image-editor/core/containment.d.ts +0 -72
  289. package/build-types/image-editor/core/containment.d.ts.map +0 -1
  290. package/build-types/image-editor/core/crop-rect.d.ts +0 -16
  291. package/build-types/image-editor/core/crop-rect.d.ts.map +0 -1
  292. package/build-types/image-editor/core/export/canvas-renderer.d.ts +0 -103
  293. package/build-types/image-editor/core/export/canvas-renderer.d.ts.map +0 -1
  294. package/build-types/image-editor/core/index.d.ts +0 -10
  295. package/build-types/image-editor/core/index.d.ts.map +0 -1
  296. package/build-types/image-editor/core/interaction-controller.d.ts +0 -191
  297. package/build-types/image-editor/core/interaction-controller.d.ts.map +0 -1
  298. package/build-types/image-editor/core/math/rotation.d.ts +0 -18
  299. package/build-types/image-editor/core/math/rotation.d.ts.map +0 -1
  300. package/build-types/image-editor/core/math/sanitize.d.ts +0 -67
  301. package/build-types/image-editor/core/math/sanitize.d.ts.map +0 -1
  302. package/build-types/image-editor/core/setter-helpers.d.ts +0 -21
  303. package/build-types/image-editor/core/setter-helpers.d.ts.map +0 -1
  304. package/build-types/image-editor/core/source-region.d.ts +0 -94
  305. package/build-types/image-editor/core/source-region.d.ts.map +0 -1
  306. package/build-types/image-editor/core/state.d.ts +0 -51
  307. package/build-types/image-editor/core/state.d.ts.map +0 -1
  308. package/build-types/image-editor/core/stencil-math.d.ts +0 -102
  309. package/build-types/image-editor/core/stencil-math.d.ts.map +0 -1
  310. package/build-types/image-editor/core/transform-style.d.ts +0 -20
  311. package/build-types/image-editor/core/transform-style.d.ts.map +0 -1
  312. package/build-types/image-editor/core/transforms/pipeline.d.ts +0 -24
  313. package/build-types/image-editor/core/transforms/pipeline.d.ts.map +0 -1
  314. package/build-types/image-editor/core/types.d.ts +0 -269
  315. package/build-types/image-editor/core/types.d.ts.map +0 -1
  316. package/build-types/image-editor/core/viewport-state.d.ts +0 -4
  317. package/build-types/image-editor/core/viewport-state.d.ts.map +0 -1
  318. package/build-types/image-editor/index.d.ts +0 -17
  319. package/build-types/image-editor/index.d.ts.map +0 -1
  320. package/build-types/image-editor/react/components/cropper-provider.d.ts +0 -38
  321. package/build-types/image-editor/react/components/cropper-provider.d.ts.map +0 -1
  322. package/build-types/image-editor/react/components/cropper.d.ts +0 -54
  323. package/build-types/image-editor/react/components/cropper.d.ts.map +0 -1
  324. package/build-types/image-editor/react/components/index.d.ts +0 -4
  325. package/build-types/image-editor/react/components/index.d.ts.map +0 -1
  326. package/build-types/image-editor/react/components/overlays/dimensions-overlay.d.ts +0 -33
  327. package/build-types/image-editor/react/components/overlays/dimensions-overlay.d.ts.map +0 -1
  328. package/build-types/image-editor/react/components/overlays/dimming-overlay.d.ts +0 -17
  329. package/build-types/image-editor/react/components/overlays/dimming-overlay.d.ts.map +0 -1
  330. package/build-types/image-editor/react/components/overlays/grid-overlay.d.ts +0 -27
  331. package/build-types/image-editor/react/components/overlays/grid-overlay.d.ts.map +0 -1
  332. package/build-types/image-editor/react/components/stencils/rectangle-stencil.d.ts +0 -33
  333. package/build-types/image-editor/react/components/stencils/rectangle-stencil.d.ts.map +0 -1
  334. package/build-types/image-editor/react/components/viewport-provider.d.ts +0 -6
  335. package/build-types/image-editor/react/components/viewport-provider.d.ts.map +0 -1
  336. package/build-types/image-editor/react/hooks/build-cropper-setters.d.ts +0 -44
  337. package/build-types/image-editor/react/hooks/build-cropper-setters.d.ts.map +0 -1
  338. package/build-types/image-editor/react/hooks/index.d.ts +0 -5
  339. package/build-types/image-editor/react/hooks/index.d.ts.map +0 -1
  340. package/build-types/image-editor/react/hooks/use-aria-announcer.d.ts +0 -14
  341. package/build-types/image-editor/react/hooks/use-aria-announcer.d.ts.map +0 -1
  342. package/build-types/image-editor/react/hooks/use-cropper-controller.d.ts +0 -55
  343. package/build-types/image-editor/react/hooks/use-cropper-controller.d.ts.map +0 -1
  344. package/build-types/image-editor/react/hooks/use-interaction.d.ts +0 -65
  345. package/build-types/image-editor/react/hooks/use-interaction.d.ts.map +0 -1
  346. package/build-types/image-editor/react/hooks/use-transform-style.d.ts +0 -13
  347. package/build-types/image-editor/react/hooks/use-transform-style.d.ts.map +0 -1
  348. package/build-types/image-editor/react/hooks/use-viewport-state.d.ts +0 -16
  349. package/build-types/image-editor/react/hooks/use-viewport-state.d.ts.map +0 -1
  350. package/build-types/image-editor/react/visually-hidden-style.d.ts +0 -6
  351. package/build-types/image-editor/react/visually-hidden-style.d.ts.map +0 -1
  352. package/src/components/media-editor-modal/build-modifiers.ts +0 -167
  353. package/src/image-editor/README.md +0 -61
  354. package/src/image-editor/core/camera.ts +0 -429
  355. package/src/image-editor/core/constants.ts +0 -137
  356. package/src/image-editor/core/containment.ts +0 -469
  357. package/src/image-editor/core/crop-rect.ts +0 -42
  358. package/src/image-editor/core/export/canvas-renderer.ts +0 -250
  359. package/src/image-editor/core/index.ts +0 -43
  360. package/src/image-editor/core/interaction-controller.ts +0 -976
  361. package/src/image-editor/core/math/rotation.ts +0 -26
  362. package/src/image-editor/core/math/sanitize.ts +0 -155
  363. package/src/image-editor/core/setter-helpers.ts +0 -63
  364. package/src/image-editor/core/source-region.ts +0 -367
  365. package/src/image-editor/core/state.ts +0 -484
  366. package/src/image-editor/core/stencil-math.ts +0 -379
  367. package/src/image-editor/core/transform-style.ts +0 -56
  368. package/src/image-editor/core/transforms/pipeline.ts +0 -40
  369. package/src/image-editor/core/types.ts +0 -230
  370. package/src/image-editor/core/viewport-state.ts +0 -30
  371. package/src/image-editor/docs/architecture.md +0 -63
  372. package/src/image-editor/docs/recipes.md +0 -184
  373. package/src/image-editor/index.ts +0 -43
  374. package/src/image-editor/react/components/cropper-provider.tsx +0 -70
  375. package/src/image-editor/react/components/cropper.scss +0 -259
  376. package/src/image-editor/react/components/cropper.tsx +0 -1108
  377. package/src/image-editor/react/components/index.ts +0 -3
  378. package/src/image-editor/react/components/overlays/dimensions-overlay.tsx +0 -262
  379. package/src/image-editor/react/components/overlays/dimming-overlay.tsx +0 -55
  380. package/src/image-editor/react/components/overlays/grid-overlay.tsx +0 -77
  381. package/src/image-editor/react/components/stencils/rectangle-stencil.tsx +0 -623
  382. package/src/image-editor/react/components/viewport-provider.tsx +0 -32
  383. package/src/image-editor/react/hooks/build-cropper-setters.ts +0 -102
  384. package/src/image-editor/react/hooks/index.ts +0 -4
  385. package/src/image-editor/react/hooks/use-aria-announcer.ts +0 -193
  386. package/src/image-editor/react/hooks/use-cropper-controller.ts +0 -197
  387. package/src/image-editor/react/hooks/use-interaction.ts +0 -294
  388. package/src/image-editor/react/hooks/use-transform-style.ts +0 -23
  389. package/src/image-editor/react/hooks/use-viewport-state.ts +0 -41
  390. package/src/image-editor/react/visually-hidden-style.ts +0 -15
  391. package/src/image-editor/style.scss +0 -1
@@ -0,0 +1,46 @@
1
+ import type { ReactNode } from 'react';
2
+ import { type MediaType } from '../../utils';
3
+ export interface MediaEditorPanelFillProps {
4
+ /** `true` while a save is running. */
5
+ disabled: boolean;
6
+ }
7
+ export interface MediaEditorPanelRegistration {
8
+ /** Unique, namespaced name, for example `core/crop`. */
9
+ name: string;
10
+ /** Tab label. */
11
+ title: string;
12
+ /** Omitted means every type. */
13
+ mediaTypes?: readonly MediaType['type'][];
14
+ }
15
+ export interface MediaEditorPanelProps extends MediaEditorPanelRegistration {
16
+ children: ReactNode | ((fillProps: MediaEditorPanelFillProps) => ReactNode);
17
+ }
18
+ interface MediaEditorPanelsContextValue {
19
+ register: (panel: MediaEditorPanelRegistration, instance: object) => void;
20
+ unregister: (name: string, instance: object) => void;
21
+ /** Panel name to the mounted panel that has it. */
22
+ owners: Record<string, object>;
23
+ }
24
+ export declare const MediaEditorPanelsProvider: import("react").Provider<MediaEditorPanelsContextValue | null>;
25
+ /** The `registerPlugin` scope the editor mounts. */
26
+ export declare const MEDIA_EDITOR_PLUGIN_SCOPE = "media-editor";
27
+ export declare function getPanelSlotName(name: string): string;
28
+ /**
29
+ * The mounted panels of one editor.
30
+ *
31
+ * @return The panels, in the order they mounted, and the context value to provide to them.
32
+ */
33
+ export declare function useMediaEditorPanels(): {
34
+ panels: MediaEditorPanelRegistration[];
35
+ contextValue: {
36
+ register: (panel: MediaEditorPanelRegistration, instance: object) => void;
37
+ unregister: (name: string, instance: object) => void;
38
+ owners: {
39
+ [k: string]: object;
40
+ };
41
+ };
42
+ };
43
+ /** A tab in the media editor's sidebar, filled with its children. */
44
+ export default function MediaEditorPanel({ name, title, mediaTypes, children, }: MediaEditorPanelProps): import("react").JSX.Element | null;
45
+ export {};
46
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/media-editor-panel/index.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAe,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAG1D,MAAM,WAAW,yBAAyB;IACzC,sCAAsC;IACtC,QAAQ,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,4BAA4B;IAC5C,wDAAwD;IACxD,IAAI,EAAE,MAAM,CAAC;IACb,iBAAiB;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,gCAAgC;IAChC,UAAU,CAAC,EAAE,SAAS,SAAS,CAAE,MAAM,CAAE,EAAE,CAAC;CAC5C;AAED,MAAM,WAAW,qBAAsB,SAAQ,4BAA4B;IAC1E,QAAQ,EACP,SAAS,GAAG,CAAE,CAAE,SAAS,EAAE,yBAAyB,KAAM,SAAS,CAAE,CAAC;CACvE;AAED,UAAU,6BAA6B;IACtC,QAAQ,EAAE,CAAE,KAAK,EAAE,4BAA4B,EAAE,QAAQ,EAAE,MAAM,KAAM,IAAI,CAAC;IAC5E,UAAU,EAAE,CAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAM,IAAI,CAAC;IACvD,mDAAmD;IACnD,MAAM,EAAE,MAAM,CAAE,MAAM,EAAE,MAAM,CAAE,CAAC;CACjC;AAKD,eAAO,MAAM,yBAAyB,gEAAoC,CAAC;AAE3E,oDAAoD;AACpD,eAAO,MAAM,yBAAyB,iBAAiB,CAAC;AAKxD,wBAAgB,gBAAgB,CAAE,IAAI,EAAE,MAAM,UAE7C;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB;;;0BAWzB,4BAA4B,YAAY,MAAM;2BA2BhB,MAAM,YAAY,MAAM;;;;;EAkChE;AAED,qEAAqE;AACrE,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAE,EACzC,IAAI,EACJ,KAAK,EACL,UAAU,EACV,QAAQ,GACR,EAAE,qBAAqB,sCAsDvB"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/media-form/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAOjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAiCvC;;GAEG;AACH,MAAM,WAAW,cAAc;IAC9B,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,MAAM,CAAC,EAAE,SAAS,CAAC;CACnB;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,OAAO,UAAU,SAAS,CAAE,EAClC,IAAI,EAAE,aAAa,EACnB,MAAM,GACN,EAAE,cAAc,+BAkChB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/media-form/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAOjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAuCvC;;GAEG;AACH,MAAM,WAAW,cAAc;IAC9B,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,MAAM,CAAC,EAAE,SAAS,CAAC;CACnB;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,OAAO,UAAU,SAAS,CAAE,EAClC,IAAI,EAAE,aAAa,EACnB,MAAM,GACN,EAAE,cAAc,+BAkChB"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/media-preview/index.tsx"],"names":[],"mappings":"AAMA;;GAEG;AACH,MAAM,WAAW,iBAAiB;IACjC,CAAE,GAAG,EAAE,MAAM,GAAI,GAAG,CAAC;CACrB;AA4GD;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAAE,KAAK,EAAE,iBAAiB,+BAgE7D"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/media-preview/index.tsx"],"names":[],"mappings":"AAkBA;;GAEG;AACH,MAAM,WAAW,iBAAiB;IACjC,CAAE,GAAG,EAAE,MAAM,GAAI,GAAG,CAAC;CACrB;AAsND;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAAE,KAAK,EAAE,iBAAiB,+BAwG7D"}
@@ -1,7 +1,24 @@
1
- import { type AspectRatioPreset } from '../image-editor';
2
1
  /**
3
- * The presets the editor offers by default. The labels live here rather
4
- * than in the cropper core, which has no user-facing strings.
2
+ * An aspect ratio preset with a human-readable label.
3
+ */
4
+ export interface AspectRatioPreset {
5
+ /** Display label (e.g., "Square (1:1)"). */
6
+ label: string;
7
+ /**
8
+ * The aspect ratio value (width / height). 0 = free,
9
+ * `ORIGINAL_ASPECT_RATIO` = the image's own ratio.
10
+ */
11
+ value: number;
12
+ }
13
+ /**
14
+ * Sentinel value for "Original" aspect ratio — resolved at runtime
15
+ * to the image's natural width / height.
16
+ */
17
+ export declare const ORIGINAL_ASPECT_RATIO = -1;
18
+ /**
19
+ * The presets the editor offers by default. They live here rather than
20
+ * in the image editor package, because which ratios to offer, and what
21
+ * to call them, is a product choice. The package takes a plain number.
5
22
  */
6
23
  export declare const DEFAULT_ASPECT_RATIOS: AspectRatioPreset[];
7
24
  //# sourceMappingURL=aspect-ratio-presets.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"aspect-ratio-presets.d.ts","sourceRoot":"","sources":["../../src/state/aspect-ratio-presets.ts"],"names":[],"mappings":"AACA,OAAO,EAAyB,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEhF;;;GAGG;AACH,eAAO,MAAM,qBAAqB,EAAE,iBAAiB,EAUpD,CAAC"}
1
+ {"version":3,"file":"aspect-ratio-presets.d.ts","sourceRoot":"","sources":["../../src/state/aspect-ratio-presets.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,WAAW,iBAAiB;IACjC,4CAA4C;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;CACd;AAED;;;GAGG;AACH,eAAO,MAAM,qBAAqB,KAAK,CAAC;AAExC;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAAE,iBAAiB,EAUpD,CAAC"}
@@ -1,36 +1,34 @@
1
- import type { CropperState } from '../image-editor';
1
+ import { type ImageEditorState } from '@wordpress/image-editor';
2
2
  import { type MediaEditorAction, type MediaEditorState } from './types';
3
3
  /**
4
- * Pure composite reducer for the media editor.
4
+ * Pure reducer for the media editor.
5
5
  *
6
- * Delegates `CROPPER`-tagged actions to the framework-agnostic
7
- * `cropperReducer` and owns first-class transitions for the sidebar
8
- * `cropOptions` slice. `RESTORE_SNAPSHOT` replaces the whole composite
9
- * in one transaction (used by undo/redo).
6
+ * The image editor works out its own next state (through the controller from
7
+ * `@wordpress/image-editor`) and this reducer stores it. The reducer
8
+ * also owns the sidebar crop options and the named edits.
10
9
  *
11
- * Note: this reducer carries NO history of its own. Snapshots and
12
- * stacks live in the `useMediaEditorState` hook that wraps it.
10
+ * This reducer keeps no history; `useMediaEditorState` does.
13
11
  *
14
- * @param state Current composite state.
12
+ * @param state Current state.
15
13
  * @param action Action to apply.
16
- * @return Next composite state.
14
+ * @return Next state.
17
15
  */
18
16
  export declare function mediaEditorReducer(state: MediaEditorState, action: MediaEditorAction): MediaEditorState;
19
17
  /**
20
- * Value-equality check for two composite states. Used by the history
21
- * machinery to dedup snapshots when an action turned out to be a no-op.
18
+ * Value-equality check for two media editor states. The history uses it
19
+ * to skip snapshots when an action turned out to be a no-op.
22
20
  *
23
- * @param a First composite state.
24
- * @param b Second composite state.
21
+ * @param a First state.
22
+ * @param b Second state.
25
23
  * @return Whether `a` and `b` are value-equal across all slices.
26
24
  */
27
25
  export declare function areMediaEditorStatesEqual(a: MediaEditorState, b: MediaEditorState): boolean;
28
26
  /**
29
- * Build the composite state a session starts from: the given cropper
30
- * slice, default crop options, and no edits.
27
+ * Build the state a session starts from: the given image editor state,
28
+ * default crop options, and no edits.
31
29
  *
32
- * @param cropper The cropper slice.
33
- * @return Composite initial state.
30
+ * @param imageEditor The image editor state.
31
+ * @return Initial state.
34
32
  */
35
- export declare function buildInitialMediaEditorState(cropper: CropperState): MediaEditorState;
33
+ export declare function buildInitialMediaEditorState(imageEditor: ImageEditorState): MediaEditorState;
36
34
  //# sourceMappingURL=composite-reducer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"composite-reducer.d.ts","sourceRoot":"","sources":["../../src/state/composite-reducer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAMpD,OAAO,EAGN,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,MAAM,SAAS,CAAC;AAEjB;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,kBAAkB,CACjC,KAAK,EAAE,gBAAgB,EACvB,MAAM,EAAE,iBAAiB,GACvB,gBAAgB,CA0ElB;AAED;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CACxC,CAAC,EAAE,gBAAgB,EACnB,CAAC,EAAE,gBAAgB,GACjB,OAAO,CAST;AAED;;;;;;GAMG;AACH,wBAAgB,4BAA4B,CAC3C,OAAO,EAAE,YAAY,GACnB,gBAAgB,CAMlB"}
1
+ {"version":3,"file":"composite-reducer.d.ts","sourceRoot":"","sources":["../../src/state/composite-reducer.ts"],"names":[],"mappings":"AACA,OAAO,EAGN,KAAK,gBAAgB,EACrB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAEN,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,MAAM,SAAS,CAAC;AAEjB;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CACjC,KAAK,EAAE,gBAAgB,EACvB,MAAM,EAAE,iBAAiB,GACvB,gBAAgB,CAwClB;AAED;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CACxC,CAAC,EAAE,gBAAgB,EACnB,CAAC,EAAE,gBAAgB,GACjB,OAAO,CAST;AAED;;;;;;GAMG;AACH,wBAAgB,4BAA4B,CAC3C,WAAW,EAAE,gBAAgB,GAC3B,gBAAgB,CAMlB"}
@@ -1,8 +1,5 @@
1
- export { useMediaEditorState, resolveAspectRatio, } from './use-media-editor-state';
1
+ export { useMediaEditorState } from './use-media-editor-state';
2
2
  export type { MediaEditorSession } from './use-media-editor-state';
3
3
  export { MediaEditorStateProvider, useMediaEditor, } from './media-editor-state-provider';
4
- export { mediaEditorReducer, areMediaEditorStatesEqual, buildInitialMediaEditorState, } from './composite-reducer';
5
- export { DEFAULT_CROP_OPTIONS } from './types';
6
- export { DEFAULT_ASPECT_RATIOS } from './aspect-ratio-presets';
7
- export type { CropOptionsSlice, EditsSlice, EditValue, MediaEditorState, MediaEditorAction, } from './types';
4
+ export type { EditsSlice, EditValue, MediaEditorState } from './types';
8
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/state/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,mBAAmB,EACnB,kBAAkB,GAClB,MAAM,0BAA0B,CAAC;AAClC,YAAY,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EACN,wBAAwB,EACxB,cAAc,GACd,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACN,kBAAkB,EAClB,yBAAyB,EACzB,4BAA4B,GAC5B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,YAAY,EACX,gBAAgB,EAChB,UAAU,EACV,SAAS,EACT,gBAAgB,EAChB,iBAAiB,GACjB,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/state/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,YAAY,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EACN,wBAAwB,EACxB,cAAc,GACd,MAAM,+BAA+B,CAAC;AACvC,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC"}
@@ -1,20 +1,18 @@
1
- import type { CropperState, NormalizedRect, Size } from '../image-editor';
2
- import type { CropperAction } from '../image-editor/core';
1
+ import type { ImageEditorState } from '@wordpress/image-editor';
3
2
  /**
4
- * Sidebar control state for the cropper. Lives in the composite store
5
- * so it participates in the same undo history as cropper geometry.
3
+ * Sidebar control state for the image editor, kept in the same undo history
4
+ * as the crop.
6
5
  */
7
6
  export interface CropOptionsSlice {
8
7
  /**
9
8
  * Selected aspect-ratio preset as a string (round-trippable through
10
9
  * `<SelectControl>`). `'0'` = Free, `'-1'` = Original, any positive
11
- * decimal = fixed ratio.
10
+ * decimal = fixed ratio. The image editor holds the resolved ratio itself.
12
11
  */
13
12
  aspectRatioValue: string;
14
13
  }
15
14
  /**
16
- * Default values for the crop-options slice. Mirrors the initial state
17
- * used by the sidebar before the user has touched anything.
15
+ * The crop options a session starts from.
18
16
  */
19
17
  export declare const DEFAULT_CROP_OPTIONS: CropOptionsSlice;
20
18
  /**
@@ -35,64 +33,28 @@ export type EditValue = string | number | boolean | null | EditValue[] | {
35
33
  */
36
34
  export type EditsSlice = Record<string, EditValue>;
37
35
  /**
38
- * The full composite state for the media editor — cropper geometry,
39
- * the sidebar control slice, and named edits.
36
+ * The full state of the media editor: the image editor's state, the sidebar
37
+ * crop options and named edits.
40
38
  *
41
39
  * Every undo/redo snapshot is a full `MediaEditorState`. Slices stay
42
40
  * referentially equal across actions that don't touch them.
43
41
  */
44
42
  export interface MediaEditorState {
45
- cropper: CropperState;
43
+ imageEditor: ImageEditorState;
46
44
  cropOptions: CropOptionsSlice;
47
45
  edits: EditsSlice;
48
46
  }
49
- /**
50
- * Composite reducer action union.
51
- *
52
- * Cropper geometry actions are wrapped in a `CROPPER` envelope and
53
- * delegated to the pure `cropperReducer`. Sidebar and history
54
- * concerns are first-class actions on this reducer.
55
- */
47
+ /** Actions the media editor reducer handles. */
56
48
  export type MediaEditorAction =
57
- /**
58
- * Delegate to the underlying cropper reducer. Used for every
59
- * geometry transition (pan / zoom / rotation / flip / cropRect /
60
- * settle / etc.).
61
- */
49
+ /** Replace the image editor's state with the next one it reports. */
62
50
  {
63
- type: 'CROPPER';
64
- action: CropperAction;
51
+ type: 'SET_IMAGE_EDITOR';
52
+ payload: ImageEditorState;
65
53
  }
66
- /**
67
- * Set the aspect-ratio preset. Atomically updates the preset key
68
- * and the cropRect (computed from the resolved ratio and the
69
- * current visualSize). One transaction = one undo entry.
70
- */
54
+ /** Set the aspect-ratio preset the dropdown shows. */
71
55
  | {
72
56
  type: 'SET_ASPECT_RATIO_VALUE';
73
- payload: {
74
- /** Preset key as it appears in the dropdown. */
75
- presetKey: string;
76
- /**
77
- * Resolved width/height ratio. `undefined` = Free
78
- * (no lock; cropRect stays where it is).
79
- */
80
- resolved: number | undefined;
81
- /**
82
- * Rendered image size used to compute the inscribed
83
- * rect. Caller supplies it because the reducer is
84
- * framework-agnostic and has no DOM access.
85
- */
86
- visualSize: Size;
87
- };
88
- }
89
- /**
90
- * Put every slice back to its starting state, keeping the image:
91
- * default geometry, default crop options, no edits. One action,
92
- * so one undo entry.
93
- */
94
- | {
95
- type: 'RESET';
57
+ payload: string;
96
58
  }
97
59
  /** Set a named edit, or remove it when `value` is `undefined`. */
98
60
  | {
@@ -103,21 +65,15 @@ export type MediaEditorAction =
103
65
  };
104
66
  }
105
67
  /**
106
- * Replace the entire composite state with `payload`. Used by
107
- * undo/redo to restore a full snapshot atomically.
68
+ * Put every slice back to its starting state, keeping the image. One
69
+ * action, so one undo entry.
108
70
  */
109
71
  | {
110
- type: 'RESTORE_SNAPSHOT';
111
- payload: MediaEditorState;
72
+ type: 'RESET';
112
73
  }
113
- /**
114
- * Adjust the cropper's cropRect in response to a viewport change
115
- * (e.g., window resize). Behaviorally identical to a `CROPPER
116
- * SET_CROP_RECT` dispatch, but tagged so the hook layer can skip
117
- * history recording — viewport reshapes aren't editor actions.
118
- */
74
+ /** Replace the whole state with a snapshot (undo/redo). */
119
75
  | {
120
- type: 'VIEWPORT_ADJUST_CROP_RECT';
121
- payload: NormalizedRect;
76
+ type: 'RESTORE_SNAPSHOT';
77
+ payload: MediaEditorState;
122
78
  };
123
79
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/state/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC1E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1D;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAChC;;;;OAIG;IACH,gBAAgB,EAAE,MAAM,CAAC;CACzB;AAED;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,gBAElC,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,MAAM,SAAS,GAClB,MAAM,GACN,MAAM,GACN,OAAO,GACP,IAAI,GACJ,SAAS,EAAE,GACX;IAAE,CAAE,GAAG,EAAE,MAAM,GAAI,SAAS,CAAA;CAAE,CAAC;AAElC;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,CAAE,MAAM,EAAE,SAAS,CAAE,CAAC;AAErD;;;;;;GAMG;AACH,MAAM,WAAW,gBAAgB;IAChC,OAAO,EAAE,YAAY,CAAC;IACtB,WAAW,EAAE,gBAAgB,CAAC;IAC9B,KAAK,EAAE,UAAU,CAAC;CAClB;AAED;;;;;;GAMG;AACH,MAAM,MAAM,iBAAiB;AAC5B;;;;GAIG;AACD;IACA,IAAI,EAAE,SAAS,CAAC;IAChB,MAAM,EAAE,aAAa,CAAC;CACrB;AACH;;;;GAIG;GACD;IACA,IAAI,EAAE,wBAAwB,CAAC;IAC/B,OAAO,EAAE;QACR,gDAAgD;QAChD,SAAS,EAAE,MAAM,CAAC;QAClB;;;WAGG;QACH,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;QAC7B;;;;WAIG;QACH,UAAU,EAAE,IAAI,CAAC;KACjB,CAAC;CACD;AACH;;;;GAIG;GACD;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE;AACnB,kEAAkE;GAChE;IACA,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,SAAS,GAAG,SAAS,CAAA;KAAE,CAAC;CACvD;AACH;;;GAGG;GACD;IAAE,IAAI,EAAE,kBAAkB,CAAC;IAAC,OAAO,EAAE,gBAAgB,CAAA;CAAE;AACzD;;;;;GAKG;GACD;IACA,IAAI,EAAE,2BAA2B,CAAC;IAClC,OAAO,EAAE,cAAc,CAAC;CACvB,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/state/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEhE;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAChC;;;;OAIG;IACH,gBAAgB,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,gBAElC,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,MAAM,SAAS,GAClB,MAAM,GACN,MAAM,GACN,OAAO,GACP,IAAI,GACJ,SAAS,EAAE,GACX;IAAE,CAAE,GAAG,EAAE,MAAM,GAAI,SAAS,CAAA;CAAE,CAAC;AAElC;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,CAAE,MAAM,EAAE,SAAS,CAAE,CAAC;AAErD;;;;;;GAMG;AACH,MAAM,WAAW,gBAAgB;IAChC,WAAW,EAAE,gBAAgB,CAAC;IAC9B,WAAW,EAAE,gBAAgB,CAAC;IAC9B,KAAK,EAAE,UAAU,CAAC;CAClB;AAED,gDAAgD;AAChD,MAAM,MAAM,iBAAiB;AAC5B,qEAAqE;AACnE;IAAE,IAAI,EAAE,kBAAkB,CAAC;IAAC,OAAO,EAAE,gBAAgB,CAAA;CAAE;AACzD,sDAAsD;GACpD;IAAE,IAAI,EAAE,wBAAwB,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE;AACrD,kEAAkE;GAChE;IACA,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,SAAS,GAAG,SAAS,CAAA;KAAE,CAAC;CACvD;AACH;;;GAGG;GACD;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE;AACnB,2DAA2D;GACzD;IAAE,IAAI,EAAE,kBAAkB,CAAC;IAAC,OAAO,EAAE,gBAAgB,CAAA;CAAE,CAAC"}
@@ -1,50 +1,37 @@
1
- import { type CropperController, type CropperState } from '../image-editor';
1
+ import { type ImageEditorController, type ImageEditorState } from '@wordpress/image-editor';
2
2
  import type { CropOptionsSlice, EditsSlice, EditValue } from './types';
3
- /**
4
- * Resolve an aspect-ratio preset value (the string the dropdown
5
- * round-trips) into a numeric width/height ratio for the cropper.
6
- *
7
- * - `'0'` → `undefined` (Free; no lock)
8
- * - `'-1'` (Original) → image's natural width / height, or `undefined`
9
- * if no image is loaded.
10
- * - Any positive decimal → the parsed number.
11
- *
12
- * Centralizing here means the dropdown, the action dispatcher, and
13
- * the test harness all resolve the same way.
14
- *
15
- * @param presetKey Preset value from the dropdown.
16
- * @param cropperImage The cropper's loaded image, or `null`.
17
- * @return The resolved ratio, or `undefined` for Free / unresolvable.
18
- */
19
- export declare function resolveAspectRatio(presetKey: string, cropperImage: CropperState['image'] | null): number | undefined;
20
3
  /**
21
4
  * The media editor session exposed by `useMediaEditorState`.
22
5
  *
23
6
  * The session owns what is being edited and how: the source image,
24
7
  * every editing slice, the shared undo/redo history, gesture
25
8
  * boundaries, and whether the edits change the saved image. The
26
- * cropper is one participant in the session — `cropper` is a
27
- * geometry-only controller that a `<Cropper>` takes via its
28
- * `controller` prop — rather than the session itself.
9
+ * image editor is one participant in the session — `imageEditor` is the
10
+ * controller an `<ImageEditorCanvas>` takes via its `controller` prop — rather
11
+ * than the session itself.
29
12
  */
30
13
  export interface MediaEditorSession {
31
14
  /**
32
- * Geometry controller for the cropper slice. Its setters record
33
- * history in the session; its `isDirty` covers geometry only.
34
- * Its `setImage` is `setSourceImage`, so the `<Cropper>` reporting
35
- * a newly loaded image starts a fresh session.
15
+ * Controller for the image editor. Its setters record history in the
16
+ * session; its `isDirty` covers the crop only. Its `setImage` is
17
+ * `setSourceImage`, so the `<ImageEditorCanvas>` reporting a newly loaded
18
+ * image starts a fresh session.
36
19
  */
37
- cropper: CropperController;
20
+ imageEditor: ImageEditorController;
38
21
  /** The cropOptions slice. */
39
22
  cropOptions: CropOptionsSlice;
40
- /** Set the aspect-ratio preset. Atomic with the cropRect reshape. */
23
+ /** Set the aspect-ratio preset and reshape the crop in one undo entry. */
41
24
  setAspectRatioValue: (presetKey: string) => void;
42
25
  /**
43
26
  * Put every slice back to its starting state in one undo entry:
44
- * default geometry and crop options, no edits. Keeps the image.
27
+ * default crop and crop options, no edits. Keeps the image.
45
28
  */
46
29
  reset: () => void;
47
- /** The named edits other than crop, keyed by edit name. */
30
+ /**
31
+ * The named edits other than crop, keyed by edit name. Not an
32
+ * extension API: undoable and cleared by `reset`, but not counted by
33
+ * `hasOutputEdits` and not saved.
34
+ */
48
35
  edits: EditsSlice;
49
36
  /**
50
37
  * Set a named edit, or remove it by passing `undefined`. Recorded
@@ -54,11 +41,10 @@ export interface MediaEditorSession {
54
41
  setEdit: (name: string, value: EditValue | undefined) => void;
55
42
  /**
56
43
  * Replace the image being edited. A different image starts a
57
- * fresh session: default geometry and crop options, a clean
58
- * baseline, and no history. Reporting the same image again is a
59
- * no-op.
44
+ * fresh session: default crop and crop options, a clean baseline,
45
+ * and no history. Reporting the same image again is a no-op.
60
46
  */
61
- setSourceImage: (image: CropperState['image']) => void;
47
+ setSourceImage: (image: ImageEditorState['image']) => void;
62
48
  /**
63
49
  * Whether anything in the session differs from its baseline,
64
50
  * including editor-only state such as the aspect-ratio preset.
@@ -66,21 +52,22 @@ export interface MediaEditorSession {
66
52
  isDirty: boolean;
67
53
  /**
68
54
  * Whether the edits change the saved image, so saving has to
69
- * produce new image output rather than only metadata.
55
+ * produce new image output rather than only metadata. Geometry
56
+ * counts; named edits do not.
70
57
  */
71
58
  hasOutputEdits: boolean;
72
59
  /** Whether there's an undoable change in history. */
73
60
  hasUndo: boolean;
74
61
  /** Whether there's a redoable change in history. */
75
62
  hasRedo: boolean;
76
- /** Undo the last committed action across all slices. */
63
+ /** Undo the last committed change across all slices. */
77
64
  undo: () => void;
78
- /** Redo the last undone action across all slices. */
65
+ /** Redo the last undone change across all slices. */
79
66
  redo: () => void;
80
67
  /**
81
- * Open a gesture boundary. During a gesture all state-changing
82
- * actions coalesce into one undo entry — the snapshot taken at
83
- * `beginGesture`. Pair with `endGesture` on pointer-up / key-up.
68
+ * Open a gesture boundary. During a gesture all changes coalesce
69
+ * into one undo entry — the snapshot taken at `beginGesture`. Pair
70
+ * with `endGesture` on pointer-up / key-up.
84
71
  */
85
72
  beginGesture: () => void;
86
73
  /** Close a gesture boundary and commit the pre-gesture snapshot. */
@@ -89,24 +76,23 @@ export interface MediaEditorSession {
89
76
  /**
90
77
  * The media editor session.
91
78
  *
92
- * Owns the only undo/redo history for the editor. Cropper geometry
93
- * actions, sidebar cropOptions actions and named edits flow through
94
- * the same reducer and the same history stack.
79
+ * Owns the only undo/redo history for the editor. The image editor's state,
80
+ * the sidebar crop options and named edits are slices of one state, so
81
+ * one history stack covers them all. The image editor works out its own
82
+ * changes and reports each next state through `onChange`.
95
83
  *
96
84
  * History semantics:
97
- * - Each action's pre-state is pushed to the undo stack before the
98
- * action commits, unless a gesture is open or the action is a
99
- * no-op (post-state value-equal to pre-state).
100
- * - During a gesture (`beginGesture` → `endGesture`) all mutations
101
- * coalesce: only the pre-gesture snapshot is pushed, at gesture
102
- * end. Any pending gesture is flushed on undo/redo.
103
- * - Viewport-driven cropRect reshapes (window resize) use a
104
- * dedicated non-recording dispatch path so they never produce
105
- * undo entries.
85
+ * - Each change pushes its pre-state to the undo stack, unless a
86
+ * gesture is open or the change is a no-op (post-state value-equal
87
+ * to pre-state).
88
+ * - During a gesture (`beginGesture` → `endGesture`) changes coalesce:
89
+ * only the pre-gesture snapshot is pushed, at gesture end. Undo and
90
+ * redo close an open gesture first.
91
+ * - Changes the image editor marks as not edits (an image loading, a refit
92
+ * after a window resize) are never recorded.
106
93
  *
107
- * `isDirty` tracks the full editor session, including undoable UI
108
- * state. Use `hasOutputEdits` when deciding whether the image output
109
- * needs saving.
94
+ * `isDirty` tracks the full session, including undoable UI state. Use
95
+ * `hasOutputEdits` when deciding whether the image output needs saving.
110
96
  *
111
97
  * The session starts empty. Call `setSourceImage` to load an image.
112
98
  *
@@ -1 +1 @@
1
- {"version":3,"file":"use-media-editor-state.d.ts","sourceRoot":"","sources":["../../src/state/use-media-editor-state.ts"],"names":[],"mappings":"AAOA,OAAO,EAGN,KAAK,iBAAiB,EACtB,KAAK,YAAY,EAGjB,MAAM,iBAAiB,CAAC;AAazB,OAAO,KAAK,EACX,gBAAgB,EAChB,UAAU,EACV,SAAS,EAGT,MAAM,SAAS,CAAC;AAEjB;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,kBAAkB,CACjC,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,YAAY,CAAE,OAAO,CAAE,GAAG,IAAI,GAC1C,MAAM,GAAG,SAAS,CAmBpB;AAaD;;;;;;;;;GASG;AACH,MAAM,WAAW,kBAAkB;IAClC;;;;;OAKG;IACH,OAAO,EAAE,iBAAiB,CAAC;IAC3B,6BAA6B;IAC7B,WAAW,EAAE,gBAAgB,CAAC;IAC9B,qEAAqE;IACrE,mBAAmB,EAAE,CAAE,SAAS,EAAE,MAAM,KAAM,IAAI,CAAC;IACnD;;;OAGG;IACH,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,2DAA2D;IAC3D,KAAK,EAAE,UAAU,CAAC;IAClB;;;;OAIG;IACH,OAAO,EAAE,CAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,GAAG,SAAS,KAAM,IAAI,CAAC;IAChE;;;;;OAKG;IACH,cAAc,EAAE,CAAE,KAAK,EAAE,YAAY,CAAE,OAAO,CAAE,KAAM,IAAI,CAAC;IAC3D;;;OAGG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,cAAc,EAAE,OAAO,CAAC;IACxB,qDAAqD;IACrD,OAAO,EAAE,OAAO,CAAC;IACjB,oDAAoD;IACpD,OAAO,EAAE,OAAO,CAAC;IACjB,wDAAwD;IACxD,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,qDAAqD;IACrD,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB;;;;OAIG;IACH,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,oEAAoE;IACpE,UAAU,EAAE,MAAM,IAAI,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,mBAAmB,IAAI,kBAAkB,CA0UxD"}
1
+ {"version":3,"file":"use-media-editor-state.d.ts","sourceRoot":"","sources":["../../src/state/use-media-editor-state.ts"],"names":[],"mappings":"AAOA,OAAO,EAGN,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,EACrB,MAAM,yBAAyB,CAAC;AAOjC,OAAO,KAAK,EACX,gBAAgB,EAChB,UAAU,EACV,SAAS,EAGT,MAAM,SAAS,CAAC;AA8CjB;;;;;;;;;GASG;AACH,MAAM,WAAW,kBAAkB;IAClC;;;;;OAKG;IACH,WAAW,EAAE,qBAAqB,CAAC;IACnC,6BAA6B;IAC7B,WAAW,EAAE,gBAAgB,CAAC;IAC9B,0EAA0E;IAC1E,mBAAmB,EAAE,CAAE,SAAS,EAAE,MAAM,KAAM,IAAI,CAAC;IACnD;;;OAGG;IACH,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB;;;;OAIG;IACH,KAAK,EAAE,UAAU,CAAC;IAClB;;;;OAIG;IACH,OAAO,EAAE,CAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,GAAG,SAAS,KAAM,IAAI,CAAC;IAChE;;;;OAIG;IACH,cAAc,EAAE,CAAE,KAAK,EAAE,gBAAgB,CAAE,OAAO,CAAE,KAAM,IAAI,CAAC;IAC/D;;;OAGG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;;;OAIG;IACH,cAAc,EAAE,OAAO,CAAC;IACxB,qDAAqD;IACrD,OAAO,EAAE,OAAO,CAAC;IACjB,oDAAoD;IACpD,OAAO,EAAE,OAAO,CAAC;IACjB,wDAAwD;IACxD,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,qDAAqD;IACrD,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB;;;;OAIG;IACH,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,oEAAoE;IACpE,UAAU,EAAE,MAAM,IAAI,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,mBAAmB,IAAI,kBAAkB,CAsQxD"}
@@ -1,8 +1,10 @@
1
+ /** The media types the editor tells apart, by MIME type prefix. */
2
+ export declare const MEDIA_TYPES: readonly ['image', 'video', 'audio', 'application'];
1
3
  /**
2
4
  * Media type result.
3
5
  */
4
6
  export interface MediaType {
5
- type: 'image' | 'video' | 'audio' | 'application';
7
+ type: (typeof MEDIA_TYPES)[number];
6
8
  }
7
9
  /**
8
10
  * Determines the media type from a MIME type string.
@@ -1 +1 @@
1
- {"version":3,"file":"get-media-type.d.ts","sourceRoot":"","sources":["../../src/utils/get-media-type.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,SAAS;IACzB,IAAI,EAAE,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,aAAa,CAAC;CAClD;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAE,QAAQ,CAAC,EAAE,MAAM,GAAI,SAAS,CAevE"}
1
+ {"version":3,"file":"get-media-type.d.ts","sourceRoot":"","sources":["../../src/utils/get-media-type.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,eAAO,MAAM,WAAW,YACvB,OAAO,EACP,OAAO,EACP,OAAO,EACP,aAAa,CACJ,CAAC;AAEX;;GAEG;AACH,MAAM,WAAW,SAAS;IACzB,IAAI,EAAE,CAAE,OAAO,WAAW,CAAE,CAAE,MAAM,CAAE,CAAC;CACvC;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAE,QAAQ,CAAC,EAAE,MAAM,GAAI,SAAS,CAevE"}
@@ -1,3 +1,3 @@
1
- export { getMediaTypeFromMimeType } from './get-media-type';
1
+ export { getMediaTypeFromMimeType, MEDIA_TYPES } from './get-media-type';
2
2
  export type { MediaType } from './get-media-type';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,YAAY,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACzE,YAAY,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/media-editor",
3
- "version": "0.22.0",
3
+ "version": "0.24.0",
4
4
  "description": "Media editor components for WordPress.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -52,34 +52,37 @@
52
52
  "build-module/store/index.mjs"
53
53
  ],
54
54
  "dependencies": {
55
- "@wordpress/a11y": "^5.1.0",
56
- "@wordpress/admin-ui": "^3.1.0",
57
- "@wordpress/api-fetch": "^8.1.0",
58
- "@wordpress/base-styles": "^15.0.0",
59
- "@wordpress/components": "^44.0.0",
60
- "@wordpress/compose": "^9.1.0",
61
- "@wordpress/core-data": "^9.1.0",
62
- "@wordpress/data": "^11.1.0",
63
- "@wordpress/dataviews": "^22.0.0",
64
- "@wordpress/element": "^10.1.0",
65
- "@wordpress/i18n": "^7.1.0",
66
- "@wordpress/icons": "^20.0.0",
67
- "@wordpress/keyboard-shortcuts": "^6.1.0",
68
- "@wordpress/keycodes": "^5.1.0",
69
- "@wordpress/notices": "^6.1.0",
70
- "@wordpress/private-apis": "^3.1.0",
71
- "@wordpress/ui": "^0.26.0",
55
+ "@wordpress/a11y": "^5.3.0",
56
+ "@wordpress/admin-ui": "^3.3.0",
57
+ "@wordpress/api-fetch": "^8.3.0",
58
+ "@wordpress/base-styles": "^15.2.0",
59
+ "@wordpress/components": "^45.1.0",
60
+ "@wordpress/compose": "^9.3.0",
61
+ "@wordpress/core-data": "^9.3.0",
62
+ "@wordpress/data": "^11.3.0",
63
+ "@wordpress/dataviews": "^22.2.0",
64
+ "@wordpress/element": "^10.3.0",
65
+ "@wordpress/i18n": "^7.3.0",
66
+ "@wordpress/icons": "^21.1.0",
67
+ "@wordpress/image-editor": "^0.2.0",
68
+ "@wordpress/keyboard-shortcuts": "^6.3.0",
69
+ "@wordpress/keycodes": "^5.3.0",
70
+ "@wordpress/notices": "^6.3.0",
71
+ "@wordpress/plugins": "^8.3.0",
72
+ "@wordpress/private-apis": "^3.3.0",
73
+ "@wordpress/react-inert-value": "^2.3.0",
74
+ "@wordpress/ui": "^0.28.0",
75
+ "@wordpress/warning": "^4.3.0",
72
76
  "clsx": "^2.1.1",
73
- "fast-deep-equal": "^3.1.3",
74
- "gl-matrix": "^3.4.3"
77
+ "fast-deep-equal": "^3.1.3"
75
78
  },
76
79
  "devDependencies": {
77
- "@storybook/react-vite": "^10.6.5",
80
+ "@storybook/react-vite": "^10.6.8",
78
81
  "@testing-library/dom": "^10.4.2",
79
82
  "@testing-library/jest-dom": "^7.0.1",
80
83
  "@testing-library/react": "^16.3.3",
81
- "@testing-library/user-event": "^14.6.8",
82
- "vitest": "^5.0.5",
84
+ "@testing-library/user-event": "^14.6.13",
85
+ "vitest": "^5.1.1",
83
86
  "vitest-browser-react": "^2.3.0"
84
87
  },
85
88
  "peerDependencies": {
@@ -99,5 +102,5 @@
99
102
  "publishConfig": {
100
103
  "access": "public"
101
104
  },
102
- "gitHead": "9b70363b9f93cff0583a1f3153738d383cf5a49e"
105
+ "gitHead": "7f19202f61aeba8f4bdce892a1a0df485ad76e2b"
103
106
  }