@wordpress/media-editor 0.22.0 → 0.23.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.md +18 -0
- package/build/components/media-editor/index.cjs +74 -21
- package/build/components/media-editor/index.cjs.map +1 -1
- package/build/components/media-editor/use-crop-options.cjs +4 -5
- package/build/components/media-editor/use-crop-options.cjs.map +1 -1
- package/build/components/media-editor/use-save-media-editor.cjs +23 -3
- package/build/components/media-editor/use-save-media-editor.cjs.map +1 -1
- package/build/components/media-editor-canvas/index.cjs +6 -11
- package/build/components/media-editor-canvas/index.cjs.map +1 -1
- package/build/components/media-editor-crop-panel/index.cjs +17 -1
- package/build/components/media-editor-crop-panel/index.cjs.map +1 -1
- package/build/components/media-editor-fine-rotation/index.cjs +4 -5
- package/build/components/media-editor-fine-rotation/index.cjs.map +1 -1
- package/build/components/media-editor-image-controls/index.cjs +4 -6
- package/build/components/media-editor-image-controls/index.cjs.map +1 -1
- package/build/components/media-editor-keyboard-shortcuts-modal/index.cjs +1 -0
- package/build/components/media-editor-keyboard-shortcuts-modal/index.cjs.map +1 -1
- package/build/components/media-editor-modal/index.cjs.map +1 -1
- package/build/components/media-form/index.cjs +7 -1
- package/build/components/media-form/index.cjs.map +1 -1
- package/build/components/media-preview/index.cjs +0 -1
- package/build/components/media-preview/index.cjs.map +1 -1
- package/build/state/aspect-ratio-presets.cjs +10 -4
- package/build/state/aspect-ratio-presets.cjs.map +1 -1
- package/build/state/composite-reducer.cjs +32 -67
- package/build/state/composite-reducer.cjs.map +1 -1
- package/build/state/index.cjs +0 -39
- package/build/state/types.cjs +1 -2
- package/build/state/types.cjs.map +1 -1
- package/build/state/use-media-editor-state.cjs +70 -106
- package/build/state/use-media-editor-state.cjs.map +1 -1
- package/build-module/components/media-editor/index.mjs +78 -25
- package/build-module/components/media-editor/index.mjs.map +1 -1
- package/build-module/components/media-editor/use-crop-options.mjs +4 -5
- package/build-module/components/media-editor/use-crop-options.mjs.map +1 -1
- package/build-module/components/media-editor/use-save-media-editor.mjs +23 -3
- package/build-module/components/media-editor/use-save-media-editor.mjs.map +1 -1
- package/build-module/components/media-editor-canvas/index.mjs +8 -13
- package/build-module/components/media-editor-canvas/index.mjs.map +1 -1
- package/build-module/components/media-editor-crop-panel/index.mjs +17 -1
- package/build-module/components/media-editor-crop-panel/index.mjs.map +1 -1
- package/build-module/components/media-editor-fine-rotation/index.mjs +4 -5
- package/build-module/components/media-editor-fine-rotation/index.mjs.map +1 -1
- package/build-module/components/media-editor-image-controls/index.mjs +5 -7
- package/build-module/components/media-editor-image-controls/index.mjs.map +1 -1
- package/build-module/components/media-editor-keyboard-shortcuts-modal/index.mjs +1 -0
- package/build-module/components/media-editor-keyboard-shortcuts-modal/index.mjs.map +1 -1
- package/build-module/components/media-editor-modal/index.mjs.map +1 -1
- package/build-module/components/media-form/index.mjs +7 -1
- package/build-module/components/media-form/index.mjs.map +1 -1
- package/build-module/components/media-preview/index.mjs +0 -1
- package/build-module/components/media-preview/index.mjs.map +1 -1
- package/build-module/state/aspect-ratio-presets.mjs +10 -5
- package/build-module/state/aspect-ratio-presets.mjs.map +1 -1
- package/build-module/state/composite-reducer.mjs +32 -67
- package/build-module/state/composite-reducer.mjs.map +1 -1
- package/build-module/state/index.mjs +2 -5
- package/build-module/state/types.mjs +1 -2
- package/build-module/state/types.mjs.map +1 -1
- package/build-module/state/use-media-editor-state.mjs +70 -105
- package/build-module/state/use-media-editor-state.mjs.map +1 -1
- package/build-style/style-rtl.css +104 -57
- package/build-style/style.css +103 -57
- package/build-types/components/media-editor/index.d.ts +17 -3
- package/build-types/components/media-editor/index.d.ts.map +1 -1
- package/build-types/components/media-editor/use-crop-options.d.ts +2 -3
- package/build-types/components/media-editor/use-crop-options.d.ts.map +1 -1
- package/build-types/components/media-editor/use-save-media-editor.d.ts.map +1 -1
- package/build-types/components/media-editor-canvas/index.d.ts +3 -3
- package/build-types/components/media-editor-canvas/index.d.ts.map +1 -1
- package/build-types/components/media-editor-crop-panel/index.d.ts +1 -1
- package/build-types/components/media-editor-crop-panel/index.d.ts.map +1 -1
- package/build-types/components/media-editor-fine-rotation/index.d.ts.map +1 -1
- package/build-types/components/media-editor-image-controls/index.d.ts +1 -1
- package/build-types/components/media-editor-image-controls/index.d.ts.map +1 -1
- package/build-types/components/media-editor-keyboard-shortcuts-modal/index.d.ts.map +1 -1
- package/build-types/components/media-editor-modal/index.d.ts +1 -1
- package/build-types/components/media-editor-modal/index.d.ts.map +1 -1
- package/build-types/components/media-form/index.d.ts.map +1 -1
- package/build-types/components/media-preview/index.d.ts.map +1 -1
- package/build-types/state/aspect-ratio-presets.d.ts +20 -3
- package/build-types/state/aspect-ratio-presets.d.ts.map +1 -1
- package/build-types/state/composite-reducer.d.ts +17 -19
- package/build-types/state/composite-reducer.d.ts.map +1 -1
- package/build-types/state/index.d.ts +2 -5
- package/build-types/state/index.d.ts.map +1 -1
- package/build-types/state/types.d.ts +20 -64
- package/build-types/state/types.d.ts.map +1 -1
- package/build-types/state/use-media-editor-state.d.ts +33 -52
- package/build-types/state/use-media-editor-state.d.ts.map +1 -1
- package/package.json +22 -23
- package/src/components/media-editor/index.tsx +163 -28
- package/src/components/media-editor/use-crop-options.ts +7 -11
- package/src/components/media-editor/use-save-media-editor.ts +48 -6
- package/src/components/media-editor-canvas/index.tsx +15 -26
- package/src/components/media-editor-canvas/style.scss +6 -6
- package/src/components/media-editor-crop-panel/index.tsx +38 -2
- package/src/components/media-editor-crop-panel/style.scss +21 -0
- package/src/components/media-editor-fine-rotation/index.tsx +6 -6
- package/src/components/media-editor-image-controls/index.tsx +11 -9
- package/src/components/media-editor-keyboard-shortcuts-modal/index.tsx +1 -0
- package/src/components/media-editor-keyboard-shortcuts-modal/style.scss +1 -1
- package/src/components/media-editor-modal/index.tsx +1 -1
- package/src/components/media-form/index.tsx +7 -1
- package/src/components/media-preview/index.tsx +0 -1
- package/src/components/rotation-ruler/style.scss +3 -3
- package/src/state/README.md +32 -0
- package/src/state/aspect-ratio-presets.ts +22 -3
- package/src/state/composite-reducer.ts +42 -80
- package/src/state/index.ts +2 -18
- package/src/state/types.ts +18 -68
- package/src/state/use-media-editor-state.ts +155 -240
- package/src/style.scss +2 -1
- package/build/components/media-editor-modal/build-modifiers.cjs +0 -110
- package/build/components/media-editor-modal/build-modifiers.cjs.map +0 -1
- package/build/image-editor/core/camera.cjs +0 -277
- package/build/image-editor/core/camera.cjs.map +0 -1
- package/build/image-editor/core/constants.cjs +0 -133
- package/build/image-editor/core/constants.cjs.map +0 -1
- package/build/image-editor/core/containment.cjs +0 -289
- package/build/image-editor/core/containment.cjs.map +0 -1
- package/build/image-editor/core/crop-rect.cjs +0 -37
- package/build/image-editor/core/crop-rect.cjs.map +0 -1
- package/build/image-editor/core/export/canvas-renderer.cjs +0 -181
- package/build/image-editor/core/export/canvas-renderer.cjs.map +0 -1
- package/build/image-editor/core/index.cjs +0 -89
- package/build/image-editor/core/interaction-controller.cjs +0 -591
- package/build/image-editor/core/interaction-controller.cjs.map +0 -1
- package/build/image-editor/core/math/rotation.cjs +0 -32
- package/build/image-editor/core/math/rotation.cjs.map +0 -1
- package/build/image-editor/core/math/sanitize.cjs +0 -136
- package/build/image-editor/core/math/sanitize.cjs.map +0 -1
- package/build/image-editor/core/setter-helpers.cjs +0 -61
- package/build/image-editor/core/setter-helpers.cjs.map +0 -1
- package/build/image-editor/core/source-region.cjs +0 -236
- package/build/image-editor/core/source-region.cjs.map +0 -1
- package/build/image-editor/core/state.cjs +0 -296
- package/build/image-editor/core/state.cjs.map +0 -1
- package/build/image-editor/core/stencil-math.cjs +0 -203
- package/build/image-editor/core/stencil-math.cjs.map +0 -1
- package/build/image-editor/core/transform-style.cjs +0 -43
- package/build/image-editor/core/transform-style.cjs.map +0 -1
- package/build/image-editor/core/transforms/pipeline.cjs +0 -41
- package/build/image-editor/core/transforms/pipeline.cjs.map +0 -1
- package/build/image-editor/core/types.cjs +0 -5
- package/build/image-editor/core/viewport-state.cjs +0 -36
- package/build/image-editor/core/viewport-state.cjs.map +0 -1
- package/build/image-editor/index.cjs +0 -68
- package/build/image-editor/react/components/cropper-provider.cjs +0 -49
- package/build/image-editor/react/components/cropper-provider.cjs.map +0 -1
- package/build/image-editor/react/components/cropper.cjs +0 -595
- package/build/image-editor/react/components/cropper.cjs.map +0 -1
- package/build/image-editor/react/components/index.cjs +0 -25
- package/build/image-editor/react/components/overlays/dimensions-overlay.cjs +0 -147
- package/build/image-editor/react/components/overlays/dimensions-overlay.cjs.map +0 -1
- package/build/image-editor/react/components/overlays/dimming-overlay.cjs +0 -31
- package/build/image-editor/react/components/overlays/dimming-overlay.cjs.map +0 -1
- package/build/image-editor/react/components/overlays/grid-overlay.cjs +0 -61
- package/build/image-editor/react/components/overlays/grid-overlay.cjs.map +0 -1
- package/build/image-editor/react/components/stencils/rectangle-stencil.cjs +0 -367
- package/build/image-editor/react/components/stencils/rectangle-stencil.cjs.map +0 -1
- package/build/image-editor/react/components/viewport-provider.cjs +0 -26
- package/build/image-editor/react/components/viewport-provider.cjs.map +0 -1
- package/build/image-editor/react/hooks/build-cropper-setters.cjs +0 -80
- package/build/image-editor/react/hooks/build-cropper-setters.cjs.map +0 -1
- package/build/image-editor/react/hooks/index.cjs +0 -19
- package/build/image-editor/react/hooks/use-aria-announcer.cjs +0 -104
- package/build/image-editor/react/hooks/use-aria-announcer.cjs.map +0 -1
- package/build/image-editor/react/hooks/use-cropper-controller.cjs +0 -80
- package/build/image-editor/react/hooks/use-cropper-controller.cjs.map +0 -1
- package/build/image-editor/react/hooks/use-interaction.cjs +0 -187
- package/build/image-editor/react/hooks/use-interaction.cjs.map +0 -1
- package/build/image-editor/react/hooks/use-transform-style.cjs +0 -24
- package/build/image-editor/react/hooks/use-transform-style.cjs.map +0 -1
- package/build/image-editor/react/hooks/use-viewport-state.cjs +0 -40
- package/build/image-editor/react/hooks/use-viewport-state.cjs.map +0 -1
- package/build/image-editor/react/visually-hidden-style.cjs +0 -24
- package/build/image-editor/react/visually-hidden-style.cjs.map +0 -1
- package/build-module/components/media-editor-modal/build-modifiers.mjs +0 -105
- package/build-module/components/media-editor-modal/build-modifiers.mjs.map +0 -1
- package/build-module/image-editor/core/camera.mjs +0 -265
- package/build-module/image-editor/core/camera.mjs.map +0 -1
- package/build-module/image-editor/core/constants.mjs +0 -115
- package/build-module/image-editor/core/constants.mjs.map +0 -1
- package/build-module/image-editor/core/containment.mjs +0 -281
- package/build-module/image-editor/core/containment.mjs.map +0 -1
- package/build-module/image-editor/core/crop-rect.mjs +0 -32
- package/build-module/image-editor/core/crop-rect.mjs.map +0 -1
- package/build-module/image-editor/core/export/canvas-renderer.mjs +0 -170
- package/build-module/image-editor/core/export/canvas-renderer.mjs.map +0 -1
- package/build-module/image-editor/core/index.mjs +0 -7
- package/build-module/image-editor/core/interaction-controller.mjs +0 -586
- package/build-module/image-editor/core/interaction-controller.mjs.map +0 -1
- package/build-module/image-editor/core/math/rotation.mjs +0 -26
- package/build-module/image-editor/core/math/rotation.mjs.map +0 -1
- package/build-module/image-editor/core/math/sanitize.mjs +0 -127
- package/build-module/image-editor/core/math/sanitize.mjs.map +0 -1
- package/build-module/image-editor/core/setter-helpers.mjs +0 -56
- package/build-module/image-editor/core/setter-helpers.mjs.map +0 -1
- package/build-module/image-editor/core/source-region.mjs +0 -228
- package/build-module/image-editor/core/source-region.mjs.map +0 -1
- package/build-module/image-editor/core/state.mjs +0 -288
- package/build-module/image-editor/core/state.mjs.map +0 -1
- package/build-module/image-editor/core/stencil-math.mjs +0 -194
- package/build-module/image-editor/core/stencil-math.mjs.map +0 -1
- package/build-module/image-editor/core/transform-style.mjs +0 -38
- package/build-module/image-editor/core/transform-style.mjs.map +0 -1
- package/build-module/image-editor/core/transforms/pipeline.mjs +0 -35
- package/build-module/image-editor/core/transforms/pipeline.mjs.map +0 -1
- package/build-module/image-editor/core/types.mjs +0 -0
- package/build-module/image-editor/core/viewport-state.mjs +0 -30
- package/build-module/image-editor/core/viewport-state.mjs.map +0 -1
- package/build-module/image-editor/index.mjs +0 -4
- package/build-module/image-editor/react/components/cropper-provider.mjs +0 -43
- package/build-module/image-editor/react/components/cropper-provider.mjs.map +0 -1
- package/build-module/image-editor/react/components/cropper.mjs +0 -568
- package/build-module/image-editor/react/components/cropper.mjs.map +0 -1
- package/build-module/image-editor/react/components/index.mjs +0 -3
- package/build-module/image-editor/react/components/overlays/dimensions-overlay.mjs +0 -142
- package/build-module/image-editor/react/components/overlays/dimensions-overlay.mjs.map +0 -1
- package/build-module/image-editor/react/components/overlays/dimming-overlay.mjs +0 -26
- package/build-module/image-editor/react/components/overlays/dimming-overlay.mjs.map +0 -1
- package/build-module/image-editor/react/components/overlays/grid-overlay.mjs +0 -56
- package/build-module/image-editor/react/components/overlays/grid-overlay.mjs.map +0 -1
- package/build-module/image-editor/react/components/stencils/rectangle-stencil.mjs +0 -362
- package/build-module/image-editor/react/components/stencils/rectangle-stencil.mjs.map +0 -1
- package/build-module/image-editor/react/components/viewport-provider.mjs +0 -20
- package/build-module/image-editor/react/components/viewport-provider.mjs.map +0 -1
- package/build-module/image-editor/react/hooks/build-cropper-setters.mjs +0 -75
- package/build-module/image-editor/react/hooks/build-cropper-setters.mjs.map +0 -1
- package/build-module/image-editor/react/hooks/index.mjs +0 -3
- package/build-module/image-editor/react/hooks/use-aria-announcer.mjs +0 -99
- package/build-module/image-editor/react/hooks/use-aria-announcer.mjs.map +0 -1
- package/build-module/image-editor/react/hooks/use-cropper-controller.mjs +0 -75
- package/build-module/image-editor/react/hooks/use-cropper-controller.mjs.map +0 -1
- package/build-module/image-editor/react/hooks/use-interaction.mjs +0 -182
- package/build-module/image-editor/react/hooks/use-interaction.mjs.map +0 -1
- package/build-module/image-editor/react/hooks/use-transform-style.mjs +0 -19
- package/build-module/image-editor/react/hooks/use-transform-style.mjs.map +0 -1
- package/build-module/image-editor/react/hooks/use-viewport-state.mjs +0 -35
- package/build-module/image-editor/react/hooks/use-viewport-state.mjs.map +0 -1
- package/build-module/image-editor/react/visually-hidden-style.mjs +0 -19
- package/build-module/image-editor/react/visually-hidden-style.mjs.map +0 -1
- package/build-types/components/media-editor-modal/build-modifiers.d.ts +0 -81
- package/build-types/components/media-editor-modal/build-modifiers.d.ts.map +0 -1
- package/build-types/image-editor/core/camera.d.ts +0 -128
- package/build-types/image-editor/core/camera.d.ts.map +0 -1
- package/build-types/image-editor/core/constants.d.ts +0 -98
- package/build-types/image-editor/core/constants.d.ts.map +0 -1
- package/build-types/image-editor/core/containment.d.ts +0 -72
- package/build-types/image-editor/core/containment.d.ts.map +0 -1
- package/build-types/image-editor/core/crop-rect.d.ts +0 -16
- package/build-types/image-editor/core/crop-rect.d.ts.map +0 -1
- package/build-types/image-editor/core/export/canvas-renderer.d.ts +0 -103
- package/build-types/image-editor/core/export/canvas-renderer.d.ts.map +0 -1
- package/build-types/image-editor/core/index.d.ts +0 -10
- package/build-types/image-editor/core/index.d.ts.map +0 -1
- package/build-types/image-editor/core/interaction-controller.d.ts +0 -191
- package/build-types/image-editor/core/interaction-controller.d.ts.map +0 -1
- package/build-types/image-editor/core/math/rotation.d.ts +0 -18
- package/build-types/image-editor/core/math/rotation.d.ts.map +0 -1
- package/build-types/image-editor/core/math/sanitize.d.ts +0 -67
- package/build-types/image-editor/core/math/sanitize.d.ts.map +0 -1
- package/build-types/image-editor/core/setter-helpers.d.ts +0 -21
- package/build-types/image-editor/core/setter-helpers.d.ts.map +0 -1
- package/build-types/image-editor/core/source-region.d.ts +0 -94
- package/build-types/image-editor/core/source-region.d.ts.map +0 -1
- package/build-types/image-editor/core/state.d.ts +0 -51
- package/build-types/image-editor/core/state.d.ts.map +0 -1
- package/build-types/image-editor/core/stencil-math.d.ts +0 -102
- package/build-types/image-editor/core/stencil-math.d.ts.map +0 -1
- package/build-types/image-editor/core/transform-style.d.ts +0 -20
- package/build-types/image-editor/core/transform-style.d.ts.map +0 -1
- package/build-types/image-editor/core/transforms/pipeline.d.ts +0 -24
- package/build-types/image-editor/core/transforms/pipeline.d.ts.map +0 -1
- package/build-types/image-editor/core/types.d.ts +0 -269
- package/build-types/image-editor/core/types.d.ts.map +0 -1
- package/build-types/image-editor/core/viewport-state.d.ts +0 -4
- package/build-types/image-editor/core/viewport-state.d.ts.map +0 -1
- package/build-types/image-editor/index.d.ts +0 -17
- package/build-types/image-editor/index.d.ts.map +0 -1
- package/build-types/image-editor/react/components/cropper-provider.d.ts +0 -38
- package/build-types/image-editor/react/components/cropper-provider.d.ts.map +0 -1
- package/build-types/image-editor/react/components/cropper.d.ts +0 -54
- package/build-types/image-editor/react/components/cropper.d.ts.map +0 -1
- package/build-types/image-editor/react/components/index.d.ts +0 -4
- package/build-types/image-editor/react/components/index.d.ts.map +0 -1
- package/build-types/image-editor/react/components/overlays/dimensions-overlay.d.ts +0 -33
- package/build-types/image-editor/react/components/overlays/dimensions-overlay.d.ts.map +0 -1
- package/build-types/image-editor/react/components/overlays/dimming-overlay.d.ts +0 -17
- package/build-types/image-editor/react/components/overlays/dimming-overlay.d.ts.map +0 -1
- package/build-types/image-editor/react/components/overlays/grid-overlay.d.ts +0 -27
- package/build-types/image-editor/react/components/overlays/grid-overlay.d.ts.map +0 -1
- package/build-types/image-editor/react/components/stencils/rectangle-stencil.d.ts +0 -33
- package/build-types/image-editor/react/components/stencils/rectangle-stencil.d.ts.map +0 -1
- package/build-types/image-editor/react/components/viewport-provider.d.ts +0 -6
- package/build-types/image-editor/react/components/viewport-provider.d.ts.map +0 -1
- package/build-types/image-editor/react/hooks/build-cropper-setters.d.ts +0 -44
- package/build-types/image-editor/react/hooks/build-cropper-setters.d.ts.map +0 -1
- package/build-types/image-editor/react/hooks/index.d.ts +0 -5
- package/build-types/image-editor/react/hooks/index.d.ts.map +0 -1
- package/build-types/image-editor/react/hooks/use-aria-announcer.d.ts +0 -14
- package/build-types/image-editor/react/hooks/use-aria-announcer.d.ts.map +0 -1
- package/build-types/image-editor/react/hooks/use-cropper-controller.d.ts +0 -55
- package/build-types/image-editor/react/hooks/use-cropper-controller.d.ts.map +0 -1
- package/build-types/image-editor/react/hooks/use-interaction.d.ts +0 -65
- package/build-types/image-editor/react/hooks/use-interaction.d.ts.map +0 -1
- package/build-types/image-editor/react/hooks/use-transform-style.d.ts +0 -13
- package/build-types/image-editor/react/hooks/use-transform-style.d.ts.map +0 -1
- package/build-types/image-editor/react/hooks/use-viewport-state.d.ts +0 -16
- package/build-types/image-editor/react/hooks/use-viewport-state.d.ts.map +0 -1
- package/build-types/image-editor/react/visually-hidden-style.d.ts +0 -6
- package/build-types/image-editor/react/visually-hidden-style.d.ts.map +0 -1
- package/src/components/media-editor-modal/build-modifiers.ts +0 -167
- package/src/image-editor/README.md +0 -61
- package/src/image-editor/core/camera.ts +0 -429
- package/src/image-editor/core/constants.ts +0 -137
- package/src/image-editor/core/containment.ts +0 -469
- package/src/image-editor/core/crop-rect.ts +0 -42
- package/src/image-editor/core/export/canvas-renderer.ts +0 -250
- package/src/image-editor/core/index.ts +0 -43
- package/src/image-editor/core/interaction-controller.ts +0 -976
- package/src/image-editor/core/math/rotation.ts +0 -26
- package/src/image-editor/core/math/sanitize.ts +0 -155
- package/src/image-editor/core/setter-helpers.ts +0 -63
- package/src/image-editor/core/source-region.ts +0 -367
- package/src/image-editor/core/state.ts +0 -484
- package/src/image-editor/core/stencil-math.ts +0 -379
- package/src/image-editor/core/transform-style.ts +0 -56
- package/src/image-editor/core/transforms/pipeline.ts +0 -40
- package/src/image-editor/core/types.ts +0 -230
- package/src/image-editor/core/viewport-state.ts +0 -30
- package/src/image-editor/docs/architecture.md +0 -63
- package/src/image-editor/docs/recipes.md +0 -184
- package/src/image-editor/index.ts +0 -43
- package/src/image-editor/react/components/cropper-provider.tsx +0 -70
- package/src/image-editor/react/components/cropper.scss +0 -259
- package/src/image-editor/react/components/cropper.tsx +0 -1108
- package/src/image-editor/react/components/index.ts +0 -3
- package/src/image-editor/react/components/overlays/dimensions-overlay.tsx +0 -262
- package/src/image-editor/react/components/overlays/dimming-overlay.tsx +0 -55
- package/src/image-editor/react/components/overlays/grid-overlay.tsx +0 -77
- package/src/image-editor/react/components/stencils/rectangle-stencil.tsx +0 -623
- package/src/image-editor/react/components/viewport-provider.tsx +0 -32
- package/src/image-editor/react/hooks/build-cropper-setters.ts +0 -102
- package/src/image-editor/react/hooks/index.ts +0 -4
- package/src/image-editor/react/hooks/use-aria-announcer.ts +0 -193
- package/src/image-editor/react/hooks/use-cropper-controller.ts +0 -197
- package/src/image-editor/react/hooks/use-interaction.ts +0 -294
- package/src/image-editor/react/hooks/use-transform-style.ts +0 -23
- package/src/image-editor/react/hooks/use-viewport-state.ts +0 -41
- package/src/image-editor/react/visually-hidden-style.ts +0 -15
- package/src/image-editor/style.scss +0 -1
|
@@ -138,93 +138,110 @@
|
|
|
138
138
|
word-break: break-all;
|
|
139
139
|
margin-top: 8px;
|
|
140
140
|
}
|
|
141
|
-
|
|
141
|
+
|
|
142
|
+
/* stylelint-disable plugin-wpds/no-token-fallback-values -- This SCSS also works when the design tokens are not loaded. */
|
|
143
|
+
/* stylelint-enable plugin-wpds/no-token-fallback-values */
|
|
144
|
+
.wp-image-editor {
|
|
142
145
|
position: relative;
|
|
143
146
|
overflow: hidden;
|
|
144
147
|
width: 100%;
|
|
145
148
|
height: 100%;
|
|
146
149
|
touch-action: none;
|
|
147
150
|
-webkit-user-select: none;
|
|
148
|
-
|
|
151
|
+
user-select: none;
|
|
149
152
|
cursor: grab;
|
|
150
153
|
}
|
|
151
|
-
|
|
154
|
+
|
|
155
|
+
.wp-image-editor__canvas {
|
|
152
156
|
position: absolute;
|
|
153
|
-
inset: 24px;
|
|
157
|
+
inset: max(22px, var(--wp-image-editor-canvas-inset, var(--wpds-dimension-padding-2xl, 24px)));
|
|
154
158
|
min-height: 100px;
|
|
155
159
|
min-width: 100px;
|
|
156
160
|
}
|
|
157
|
-
|
|
161
|
+
|
|
162
|
+
.wp-image-editor__canvas:focus {
|
|
158
163
|
outline: none;
|
|
159
164
|
}
|
|
160
|
-
|
|
165
|
+
|
|
166
|
+
.wp-image-editor__stage {
|
|
161
167
|
position: absolute;
|
|
162
168
|
inset: 0;
|
|
163
169
|
}
|
|
164
|
-
|
|
170
|
+
|
|
171
|
+
.wp-image-editor--dragging {
|
|
165
172
|
cursor: grabbing;
|
|
166
173
|
}
|
|
167
|
-
|
|
174
|
+
|
|
175
|
+
.wp-image-editor__image {
|
|
168
176
|
position: absolute;
|
|
169
177
|
top: 0;
|
|
170
178
|
left: 0;
|
|
171
179
|
will-change: transform;
|
|
172
180
|
transform-origin: center center;
|
|
173
181
|
}
|
|
174
|
-
|
|
182
|
+
|
|
183
|
+
.wp-image-editor__stencil {
|
|
175
184
|
position: absolute;
|
|
176
185
|
pointer-events: none;
|
|
177
186
|
}
|
|
178
|
-
|
|
187
|
+
|
|
188
|
+
.wp-image-editor__dimming {
|
|
179
189
|
position: absolute;
|
|
180
190
|
pointer-events: none;
|
|
181
|
-
/* Large shadow spread washes everything outside the crop area
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
where they're panning. */
|
|
185
|
-
box-shadow: 0 0 0 9999px rgba(224, 224, 224, 0.6);
|
|
191
|
+
/* Large shadow spread washes everything outside the crop area.
|
|
192
|
+
It is lighter during drag so the image stays visible. */
|
|
193
|
+
box-shadow: 0 0 0 9999px var(--wp-image-editor-dimming-color, color-mix(in srgb, color-mix(in srgb, var(--wpds-color-background-surface-neutral-weak, #f4f4f4) 90.65%, var(--wpds-color-foreground-content-neutral, #1e1e1e)) 60%, transparent));
|
|
186
194
|
transition: box-shadow 0.15s ease;
|
|
187
195
|
}
|
|
188
|
-
|
|
189
|
-
|
|
196
|
+
|
|
197
|
+
.wp-image-editor--dragging .wp-image-editor__dimming {
|
|
198
|
+
box-shadow: 0 0 0 9999px color-mix(in srgb, var(--wp-image-editor-dimming-color, color-mix(in srgb, color-mix(in srgb, var(--wpds-color-background-surface-neutral-weak, #f4f4f4) 90.65%, var(--wpds-color-foreground-content-neutral, #1e1e1e)) 60%, transparent)) 66.667%, transparent);
|
|
190
199
|
}
|
|
191
|
-
|
|
200
|
+
|
|
201
|
+
.wp-image-editor__grid {
|
|
192
202
|
position: absolute;
|
|
193
203
|
pointer-events: none;
|
|
194
204
|
overflow: hidden;
|
|
195
205
|
transition: opacity 0.15s ease;
|
|
196
206
|
}
|
|
197
|
-
|
|
207
|
+
|
|
208
|
+
.wp-image-editor__canvas--grid-interactive .wp-image-editor__grid {
|
|
198
209
|
opacity: 0;
|
|
199
210
|
transition-delay: 0.1s;
|
|
200
211
|
}
|
|
201
|
-
|
|
212
|
+
|
|
213
|
+
.wp-image-editor__canvas--show-grid .wp-image-editor__grid {
|
|
202
214
|
opacity: 1;
|
|
203
215
|
transition-delay: 0s;
|
|
204
216
|
}
|
|
205
|
-
|
|
217
|
+
|
|
218
|
+
.wp-image-editor__canvas--settling .wp-image-editor__grid {
|
|
206
219
|
opacity: 0;
|
|
207
220
|
transition: none;
|
|
208
221
|
}
|
|
209
|
-
|
|
222
|
+
|
|
223
|
+
.wp-image-editor__grid-line {
|
|
210
224
|
position: absolute;
|
|
211
|
-
background: rgba(255, 255, 255, 0.4);
|
|
225
|
+
background: var(--wp-image-editor-grid-color, rgba(255, 255, 255, 0.4));
|
|
212
226
|
}
|
|
213
|
-
|
|
227
|
+
|
|
228
|
+
.wp-image-editor__grid-line--horizontal {
|
|
214
229
|
left: 0;
|
|
215
230
|
width: 100%;
|
|
216
231
|
height: 1px;
|
|
217
232
|
}
|
|
218
|
-
|
|
233
|
+
|
|
234
|
+
.wp-image-editor__grid-line--vertical {
|
|
219
235
|
top: 0;
|
|
220
236
|
height: 100%;
|
|
221
237
|
width: 1px;
|
|
222
238
|
}
|
|
223
|
-
|
|
239
|
+
|
|
240
|
+
.wp-image-editor__dimensions-tooltip {
|
|
224
241
|
position: absolute;
|
|
225
242
|
padding: 2px 6px;
|
|
226
|
-
background: #fff;
|
|
227
|
-
color: #1e1e1e;
|
|
243
|
+
background: var(--wp-image-editor-surface-color, var(--wpds-color-background-surface-neutral-strong, #fff));
|
|
244
|
+
color: var(--wp-image-editor-foreground-color, var(--wpds-color-foreground-content-neutral, #1e1e1e));
|
|
228
245
|
font-size: 11px;
|
|
229
246
|
line-height: 1.4;
|
|
230
247
|
font-variant-numeric: tabular-nums;
|
|
@@ -233,18 +250,21 @@
|
|
|
233
250
|
white-space: nowrap;
|
|
234
251
|
z-index: 2;
|
|
235
252
|
}
|
|
236
|
-
|
|
253
|
+
|
|
254
|
+
.wp-image-editor__stencil-rect {
|
|
237
255
|
position: absolute;
|
|
238
|
-
border: 1px solid #1e1e1e;
|
|
256
|
+
border: 1px solid var(--wp-image-editor-foreground-color, var(--wpds-color-foreground-content-neutral, #1e1e1e));
|
|
239
257
|
box-sizing: border-box;
|
|
240
258
|
pointer-events: none;
|
|
241
259
|
transition: border-color 0.15s ease, box-shadow 0.15s ease;
|
|
242
260
|
}
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
261
|
+
|
|
262
|
+
.wp-image-editor__canvas--focus-visible:focus .wp-image-editor__stencil-rect {
|
|
263
|
+
border-color: var(--wp-image-editor-accent-color, var(--wpds-color-stroke-focus, var(--wp-admin-theme-color, #3858e9)));
|
|
264
|
+
box-shadow: 0 0 0 1px var(--wp-image-editor-accent-color, var(--wpds-color-stroke-focus, var(--wp-admin-theme-color, #3858e9)));
|
|
246
265
|
}
|
|
247
|
-
|
|
266
|
+
|
|
267
|
+
.wp-image-editor__handle {
|
|
248
268
|
appearance: none;
|
|
249
269
|
margin: 0;
|
|
250
270
|
padding: 0;
|
|
@@ -253,22 +273,25 @@
|
|
|
253
273
|
position: absolute;
|
|
254
274
|
width: 12px;
|
|
255
275
|
height: 12px;
|
|
256
|
-
background: #fff;
|
|
257
|
-
border: 1px solid var(--wp-admin-theme-color, #3858e9);
|
|
276
|
+
background: var(--wp-image-editor-surface-color, var(--wpds-color-background-surface-neutral-strong, #fff));
|
|
277
|
+
border: 1px solid var(--wp-image-editor-accent-color, var(--wpds-color-stroke-focus, var(--wp-admin-theme-color, #3858e9)));
|
|
258
278
|
border-radius: 50%;
|
|
259
279
|
box-sizing: border-box;
|
|
260
280
|
pointer-events: auto;
|
|
261
281
|
transition: background-color 0.15s ease, box-shadow 0.15s ease;
|
|
262
282
|
}
|
|
263
|
-
|
|
283
|
+
|
|
284
|
+
.wp-image-editor__handle:focus {
|
|
264
285
|
outline: none;
|
|
265
286
|
}
|
|
266
|
-
|
|
267
|
-
|
|
287
|
+
|
|
288
|
+
.wp-image-editor__canvas--focus-visible .wp-image-editor__handle:focus {
|
|
289
|
+
background: var(--wp-image-editor-accent-color, var(--wpds-color-stroke-focus, var(--wp-admin-theme-color, #3858e9)));
|
|
268
290
|
border-color: transparent;
|
|
269
|
-
box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--wp-image-editor-
|
|
291
|
+
box-shadow: 0 0 0 2px var(--wp-image-editor-surface-color, var(--wpds-color-background-surface-neutral-strong, #fff)), 0 0 0 4px var(--wp-image-editor-accent-color, var(--wpds-color-stroke-focus, var(--wp-admin-theme-color, #3858e9)));
|
|
270
292
|
}
|
|
271
|
-
|
|
293
|
+
|
|
294
|
+
.wp-image-editor__handle::before {
|
|
272
295
|
content: "";
|
|
273
296
|
position: absolute;
|
|
274
297
|
top: 50%;
|
|
@@ -277,49 +300,58 @@
|
|
|
277
300
|
height: 44px;
|
|
278
301
|
transform: translate(-50%, -50%);
|
|
279
302
|
}
|
|
280
|
-
|
|
303
|
+
|
|
304
|
+
.wp-image-editor__handle {
|
|
281
305
|
/* Offset by half the handle width (12px / 2 = 6px) to center on crop edge */
|
|
282
306
|
}
|
|
283
|
-
|
|
307
|
+
|
|
308
|
+
.wp-image-editor__handle--n {
|
|
284
309
|
top: -6px;
|
|
285
310
|
left: 50%;
|
|
286
311
|
margin-left: -6px;
|
|
287
312
|
cursor: ns-resize;
|
|
288
313
|
}
|
|
289
|
-
|
|
314
|
+
|
|
315
|
+
.wp-image-editor__handle--s {
|
|
290
316
|
bottom: -6px;
|
|
291
317
|
left: 50%;
|
|
292
318
|
margin-left: -6px;
|
|
293
319
|
cursor: ns-resize;
|
|
294
320
|
}
|
|
295
|
-
|
|
321
|
+
|
|
322
|
+
.wp-image-editor__handle--e {
|
|
296
323
|
top: 50%;
|
|
297
324
|
right: -6px;
|
|
298
325
|
margin-top: -6px;
|
|
299
326
|
cursor: ew-resize;
|
|
300
327
|
}
|
|
301
|
-
|
|
328
|
+
|
|
329
|
+
.wp-image-editor__handle--w {
|
|
302
330
|
top: 50%;
|
|
303
331
|
left: -6px;
|
|
304
332
|
margin-top: -6px;
|
|
305
333
|
cursor: ew-resize;
|
|
306
334
|
}
|
|
307
|
-
|
|
335
|
+
|
|
336
|
+
.wp-image-editor__handle--nw {
|
|
308
337
|
top: -6px;
|
|
309
338
|
left: -6px;
|
|
310
339
|
cursor: nwse-resize;
|
|
311
340
|
}
|
|
312
|
-
|
|
341
|
+
|
|
342
|
+
.wp-image-editor__handle--ne {
|
|
313
343
|
top: -6px;
|
|
314
344
|
right: -6px;
|
|
315
345
|
cursor: nesw-resize;
|
|
316
346
|
}
|
|
317
|
-
|
|
347
|
+
|
|
348
|
+
.wp-image-editor__handle--sw {
|
|
318
349
|
bottom: -6px;
|
|
319
350
|
left: -6px;
|
|
320
351
|
cursor: nesw-resize;
|
|
321
352
|
}
|
|
322
|
-
|
|
353
|
+
|
|
354
|
+
.wp-image-editor__handle--se {
|
|
323
355
|
bottom: -6px;
|
|
324
356
|
right: -6px;
|
|
325
357
|
cursor: nwse-resize;
|
|
@@ -595,13 +627,13 @@
|
|
|
595
627
|
width: 100%;
|
|
596
628
|
height: 100%;
|
|
597
629
|
}
|
|
598
|
-
.media-editor-
|
|
630
|
+
.media-editor-canvas__image-editor {
|
|
599
631
|
width: 100%;
|
|
600
632
|
height: 100%;
|
|
601
633
|
opacity: 0;
|
|
602
634
|
pointer-events: none;
|
|
603
635
|
}
|
|
604
|
-
.media-editor-
|
|
636
|
+
.media-editor-canvas__image-editor.is-loaded {
|
|
605
637
|
opacity: 1;
|
|
606
638
|
pointer-events: auto;
|
|
607
639
|
}
|
|
@@ -614,7 +646,7 @@
|
|
|
614
646
|
}
|
|
615
647
|
}
|
|
616
648
|
@media not (prefers-reduced-motion) {
|
|
617
|
-
.media-editor-
|
|
649
|
+
.media-editor-canvas__image-editor.is-loaded {
|
|
618
650
|
animation: __wp-base-styles-fade-in 0.2s linear 0s;
|
|
619
651
|
animation-fill-mode: forwards;
|
|
620
652
|
}
|
|
@@ -667,6 +699,22 @@
|
|
|
667
699
|
padding-inline: 2px 0;
|
|
668
700
|
}
|
|
669
701
|
|
|
702
|
+
.media-editor-crop-panel__aspect-ratio-option {
|
|
703
|
+
display: flex;
|
|
704
|
+
align-items: center;
|
|
705
|
+
gap: 8px;
|
|
706
|
+
min-width: 0;
|
|
707
|
+
}
|
|
708
|
+
.media-editor-crop-panel__aspect-ratio-option svg {
|
|
709
|
+
flex-shrink: 0;
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
.media-editor-crop-panel__aspect-ratio-label {
|
|
713
|
+
overflow: hidden;
|
|
714
|
+
text-overflow: ellipsis;
|
|
715
|
+
white-space: nowrap;
|
|
716
|
+
}
|
|
717
|
+
|
|
670
718
|
.media-editor-keyboard-shortcuts-modal {
|
|
671
719
|
min-width: 280px;
|
|
672
720
|
}
|
|
@@ -707,7 +755,7 @@
|
|
|
707
755
|
margin: 0 0.2rem 0 0.2rem;
|
|
708
756
|
}
|
|
709
757
|
.media-editor-keyboard-shortcuts-modal .media-editor-keyboard-shortcuts-modal__shortcut-key:last-child {
|
|
710
|
-
margin: 0
|
|
758
|
+
margin-inline-end: 0;
|
|
711
759
|
}
|
|
712
760
|
|
|
713
761
|
.rotation-ruler {
|
|
@@ -716,8 +764,7 @@
|
|
|
716
764
|
height: 32px;
|
|
717
765
|
padding: 0 8px;
|
|
718
766
|
box-sizing: border-box;
|
|
719
|
-
|
|
720
|
-
font-family: -apple-system, system-ui, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
|
767
|
+
font-family: var(--wpds-typography-font-family-body, -apple-system, system-ui, "Segoe UI", "Roboto", "Oxygen-Sans", "Ubuntu", "Cantarell", "Helvetica Neue", sans-serif);
|
|
721
768
|
-webkit-user-select: none;
|
|
722
769
|
user-select: none;
|
|
723
770
|
touch-action: none;
|
|
@@ -775,6 +822,7 @@
|
|
|
775
822
|
|
|
776
823
|
.rotation-ruler__ticks {
|
|
777
824
|
position: absolute;
|
|
825
|
+
color: CanvasText;
|
|
778
826
|
left: 50%;
|
|
779
827
|
top: 0;
|
|
780
828
|
display: block;
|
|
@@ -811,7 +859,6 @@
|
|
|
811
859
|
font-size: 12px;
|
|
812
860
|
font-weight: var(--wpds-typography-font-weight-emphasis, 600);
|
|
813
861
|
line-height: 14px;
|
|
814
|
-
color: #1e1e1e;
|
|
815
862
|
pointer-events: none;
|
|
816
863
|
}
|
|
817
864
|
.rotation-ruler__active-label::before {
|
package/build-style/style.css
CHANGED
|
@@ -139,94 +139,110 @@
|
|
|
139
139
|
margin-top: 8px;
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
+
/* stylelint-disable plugin-wpds/no-token-fallback-values -- This SCSS also works when the design tokens are not loaded. */
|
|
143
|
+
/* stylelint-enable plugin-wpds/no-token-fallback-values */
|
|
142
144
|
/*!rtl:begin:ignore*/
|
|
143
|
-
.wp-
|
|
145
|
+
.wp-image-editor {
|
|
144
146
|
position: relative;
|
|
145
147
|
overflow: hidden;
|
|
146
148
|
width: 100%;
|
|
147
149
|
height: 100%;
|
|
148
150
|
touch-action: none;
|
|
149
151
|
-webkit-user-select: none;
|
|
150
|
-
|
|
152
|
+
user-select: none;
|
|
151
153
|
cursor: grab;
|
|
152
154
|
}
|
|
153
|
-
|
|
155
|
+
|
|
156
|
+
.wp-image-editor__canvas {
|
|
154
157
|
position: absolute;
|
|
155
|
-
inset: 24px;
|
|
158
|
+
inset: max(22px, var(--wp-image-editor-canvas-inset, var(--wpds-dimension-padding-2xl, 24px)));
|
|
156
159
|
min-height: 100px;
|
|
157
160
|
min-width: 100px;
|
|
158
161
|
}
|
|
159
|
-
|
|
162
|
+
|
|
163
|
+
.wp-image-editor__canvas:focus {
|
|
160
164
|
outline: none;
|
|
161
165
|
}
|
|
162
|
-
|
|
166
|
+
|
|
167
|
+
.wp-image-editor__stage {
|
|
163
168
|
position: absolute;
|
|
164
169
|
inset: 0;
|
|
165
170
|
}
|
|
166
|
-
|
|
171
|
+
|
|
172
|
+
.wp-image-editor--dragging {
|
|
167
173
|
cursor: grabbing;
|
|
168
174
|
}
|
|
169
|
-
|
|
175
|
+
|
|
176
|
+
.wp-image-editor__image {
|
|
170
177
|
position: absolute;
|
|
171
178
|
top: 0;
|
|
172
179
|
left: 0;
|
|
173
180
|
will-change: transform;
|
|
174
181
|
transform-origin: center center;
|
|
175
182
|
}
|
|
176
|
-
|
|
183
|
+
|
|
184
|
+
.wp-image-editor__stencil {
|
|
177
185
|
position: absolute;
|
|
178
186
|
pointer-events: none;
|
|
179
187
|
}
|
|
180
|
-
|
|
188
|
+
|
|
189
|
+
.wp-image-editor__dimming {
|
|
181
190
|
position: absolute;
|
|
182
191
|
pointer-events: none;
|
|
183
|
-
/* Large shadow spread washes everything outside the crop area
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
where they're panning. */
|
|
187
|
-
box-shadow: 0 0 0 9999px rgba(224, 224, 224, 0.6);
|
|
192
|
+
/* Large shadow spread washes everything outside the crop area.
|
|
193
|
+
It is lighter during drag so the image stays visible. */
|
|
194
|
+
box-shadow: 0 0 0 9999px var(--wp-image-editor-dimming-color, color-mix(in srgb, color-mix(in srgb, var(--wpds-color-background-surface-neutral-weak, #f4f4f4) 90.65%, var(--wpds-color-foreground-content-neutral, #1e1e1e)) 60%, transparent));
|
|
188
195
|
transition: box-shadow 0.15s ease;
|
|
189
196
|
}
|
|
190
|
-
|
|
191
|
-
|
|
197
|
+
|
|
198
|
+
.wp-image-editor--dragging .wp-image-editor__dimming {
|
|
199
|
+
box-shadow: 0 0 0 9999px color-mix(in srgb, var(--wp-image-editor-dimming-color, color-mix(in srgb, color-mix(in srgb, var(--wpds-color-background-surface-neutral-weak, #f4f4f4) 90.65%, var(--wpds-color-foreground-content-neutral, #1e1e1e)) 60%, transparent)) 66.667%, transparent);
|
|
192
200
|
}
|
|
193
|
-
|
|
201
|
+
|
|
202
|
+
.wp-image-editor__grid {
|
|
194
203
|
position: absolute;
|
|
195
204
|
pointer-events: none;
|
|
196
205
|
overflow: hidden;
|
|
197
206
|
transition: opacity 0.15s ease;
|
|
198
207
|
}
|
|
199
|
-
|
|
208
|
+
|
|
209
|
+
.wp-image-editor__canvas--grid-interactive .wp-image-editor__grid {
|
|
200
210
|
opacity: 0;
|
|
201
211
|
transition-delay: 0.1s;
|
|
202
212
|
}
|
|
203
|
-
|
|
213
|
+
|
|
214
|
+
.wp-image-editor__canvas--show-grid .wp-image-editor__grid {
|
|
204
215
|
opacity: 1;
|
|
205
216
|
transition-delay: 0s;
|
|
206
217
|
}
|
|
207
|
-
|
|
218
|
+
|
|
219
|
+
.wp-image-editor__canvas--settling .wp-image-editor__grid {
|
|
208
220
|
opacity: 0;
|
|
209
221
|
transition: none;
|
|
210
222
|
}
|
|
211
|
-
|
|
223
|
+
|
|
224
|
+
.wp-image-editor__grid-line {
|
|
212
225
|
position: absolute;
|
|
213
|
-
background: rgba(255, 255, 255, 0.4);
|
|
226
|
+
background: var(--wp-image-editor-grid-color, rgba(255, 255, 255, 0.4));
|
|
214
227
|
}
|
|
215
|
-
|
|
228
|
+
|
|
229
|
+
.wp-image-editor__grid-line--horizontal {
|
|
216
230
|
left: 0;
|
|
217
231
|
width: 100%;
|
|
218
232
|
height: 1px;
|
|
219
233
|
}
|
|
220
|
-
|
|
234
|
+
|
|
235
|
+
.wp-image-editor__grid-line--vertical {
|
|
221
236
|
top: 0;
|
|
222
237
|
height: 100%;
|
|
223
238
|
width: 1px;
|
|
224
239
|
}
|
|
225
|
-
|
|
240
|
+
|
|
241
|
+
.wp-image-editor__dimensions-tooltip {
|
|
226
242
|
position: absolute;
|
|
227
243
|
padding: 2px 6px;
|
|
228
|
-
background: #fff;
|
|
229
|
-
color: #1e1e1e;
|
|
244
|
+
background: var(--wp-image-editor-surface-color, var(--wpds-color-background-surface-neutral-strong, #fff));
|
|
245
|
+
color: var(--wp-image-editor-foreground-color, var(--wpds-color-foreground-content-neutral, #1e1e1e));
|
|
230
246
|
font-size: 11px;
|
|
231
247
|
line-height: 1.4;
|
|
232
248
|
font-variant-numeric: tabular-nums;
|
|
@@ -235,18 +251,21 @@
|
|
|
235
251
|
white-space: nowrap;
|
|
236
252
|
z-index: 2;
|
|
237
253
|
}
|
|
238
|
-
|
|
254
|
+
|
|
255
|
+
.wp-image-editor__stencil-rect {
|
|
239
256
|
position: absolute;
|
|
240
|
-
border: 1px solid #1e1e1e;
|
|
257
|
+
border: 1px solid var(--wp-image-editor-foreground-color, var(--wpds-color-foreground-content-neutral, #1e1e1e));
|
|
241
258
|
box-sizing: border-box;
|
|
242
259
|
pointer-events: none;
|
|
243
260
|
transition: border-color 0.15s ease, box-shadow 0.15s ease;
|
|
244
261
|
}
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
262
|
+
|
|
263
|
+
.wp-image-editor__canvas--focus-visible:focus .wp-image-editor__stencil-rect {
|
|
264
|
+
border-color: var(--wp-image-editor-accent-color, var(--wpds-color-stroke-focus, var(--wp-admin-theme-color, #3858e9)));
|
|
265
|
+
box-shadow: 0 0 0 1px var(--wp-image-editor-accent-color, var(--wpds-color-stroke-focus, var(--wp-admin-theme-color, #3858e9)));
|
|
248
266
|
}
|
|
249
|
-
|
|
267
|
+
|
|
268
|
+
.wp-image-editor__handle {
|
|
250
269
|
appearance: none;
|
|
251
270
|
margin: 0;
|
|
252
271
|
padding: 0;
|
|
@@ -255,22 +274,25 @@
|
|
|
255
274
|
position: absolute;
|
|
256
275
|
width: 12px;
|
|
257
276
|
height: 12px;
|
|
258
|
-
background: #fff;
|
|
259
|
-
border: 1px solid var(--wp-admin-theme-color, #3858e9);
|
|
277
|
+
background: var(--wp-image-editor-surface-color, var(--wpds-color-background-surface-neutral-strong, #fff));
|
|
278
|
+
border: 1px solid var(--wp-image-editor-accent-color, var(--wpds-color-stroke-focus, var(--wp-admin-theme-color, #3858e9)));
|
|
260
279
|
border-radius: 50%;
|
|
261
280
|
box-sizing: border-box;
|
|
262
281
|
pointer-events: auto;
|
|
263
282
|
transition: background-color 0.15s ease, box-shadow 0.15s ease;
|
|
264
283
|
}
|
|
265
|
-
|
|
284
|
+
|
|
285
|
+
.wp-image-editor__handle:focus {
|
|
266
286
|
outline: none;
|
|
267
287
|
}
|
|
268
|
-
|
|
269
|
-
|
|
288
|
+
|
|
289
|
+
.wp-image-editor__canvas--focus-visible .wp-image-editor__handle:focus {
|
|
290
|
+
background: var(--wp-image-editor-accent-color, var(--wpds-color-stroke-focus, var(--wp-admin-theme-color, #3858e9)));
|
|
270
291
|
border-color: transparent;
|
|
271
|
-
box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--wp-image-editor-
|
|
292
|
+
box-shadow: 0 0 0 2px var(--wp-image-editor-surface-color, var(--wpds-color-background-surface-neutral-strong, #fff)), 0 0 0 4px var(--wp-image-editor-accent-color, var(--wpds-color-stroke-focus, var(--wp-admin-theme-color, #3858e9)));
|
|
272
293
|
}
|
|
273
|
-
|
|
294
|
+
|
|
295
|
+
.wp-image-editor__handle::before {
|
|
274
296
|
content: "";
|
|
275
297
|
position: absolute;
|
|
276
298
|
top: 50%;
|
|
@@ -279,49 +301,58 @@
|
|
|
279
301
|
height: 44px;
|
|
280
302
|
transform: translate(-50%, -50%);
|
|
281
303
|
}
|
|
282
|
-
|
|
304
|
+
|
|
305
|
+
.wp-image-editor__handle {
|
|
283
306
|
/* Offset by half the handle width (12px / 2 = 6px) to center on crop edge */
|
|
284
307
|
}
|
|
285
|
-
|
|
308
|
+
|
|
309
|
+
.wp-image-editor__handle--n {
|
|
286
310
|
top: -6px;
|
|
287
311
|
left: 50%;
|
|
288
312
|
margin-left: -6px;
|
|
289
313
|
cursor: ns-resize;
|
|
290
314
|
}
|
|
291
|
-
|
|
315
|
+
|
|
316
|
+
.wp-image-editor__handle--s {
|
|
292
317
|
bottom: -6px;
|
|
293
318
|
left: 50%;
|
|
294
319
|
margin-left: -6px;
|
|
295
320
|
cursor: ns-resize;
|
|
296
321
|
}
|
|
297
|
-
|
|
322
|
+
|
|
323
|
+
.wp-image-editor__handle--e {
|
|
298
324
|
top: 50%;
|
|
299
325
|
right: -6px;
|
|
300
326
|
margin-top: -6px;
|
|
301
327
|
cursor: ew-resize;
|
|
302
328
|
}
|
|
303
|
-
|
|
329
|
+
|
|
330
|
+
.wp-image-editor__handle--w {
|
|
304
331
|
top: 50%;
|
|
305
332
|
left: -6px;
|
|
306
333
|
margin-top: -6px;
|
|
307
334
|
cursor: ew-resize;
|
|
308
335
|
}
|
|
309
|
-
|
|
336
|
+
|
|
337
|
+
.wp-image-editor__handle--nw {
|
|
310
338
|
top: -6px;
|
|
311
339
|
left: -6px;
|
|
312
340
|
cursor: nwse-resize;
|
|
313
341
|
}
|
|
314
|
-
|
|
342
|
+
|
|
343
|
+
.wp-image-editor__handle--ne {
|
|
315
344
|
top: -6px;
|
|
316
345
|
right: -6px;
|
|
317
346
|
cursor: nesw-resize;
|
|
318
347
|
}
|
|
319
|
-
|
|
348
|
+
|
|
349
|
+
.wp-image-editor__handle--sw {
|
|
320
350
|
bottom: -6px;
|
|
321
351
|
left: -6px;
|
|
322
352
|
cursor: nesw-resize;
|
|
323
353
|
}
|
|
324
|
-
|
|
354
|
+
|
|
355
|
+
.wp-image-editor__handle--se {
|
|
325
356
|
bottom: -6px;
|
|
326
357
|
right: -6px;
|
|
327
358
|
cursor: nwse-resize;
|
|
@@ -599,13 +630,13 @@
|
|
|
599
630
|
width: 100%;
|
|
600
631
|
height: 100%;
|
|
601
632
|
}
|
|
602
|
-
.media-editor-
|
|
633
|
+
.media-editor-canvas__image-editor {
|
|
603
634
|
width: 100%;
|
|
604
635
|
height: 100%;
|
|
605
636
|
opacity: 0;
|
|
606
637
|
pointer-events: none;
|
|
607
638
|
}
|
|
608
|
-
.media-editor-
|
|
639
|
+
.media-editor-canvas__image-editor.is-loaded {
|
|
609
640
|
opacity: 1;
|
|
610
641
|
pointer-events: auto;
|
|
611
642
|
}
|
|
@@ -618,7 +649,7 @@
|
|
|
618
649
|
}
|
|
619
650
|
}
|
|
620
651
|
@media not (prefers-reduced-motion) {
|
|
621
|
-
.media-editor-
|
|
652
|
+
.media-editor-canvas__image-editor.is-loaded {
|
|
622
653
|
animation: __wp-base-styles-fade-in 0.2s linear 0s;
|
|
623
654
|
animation-fill-mode: forwards;
|
|
624
655
|
}
|
|
@@ -671,6 +702,22 @@
|
|
|
671
702
|
padding-inline: 2px 0;
|
|
672
703
|
}
|
|
673
704
|
|
|
705
|
+
.media-editor-crop-panel__aspect-ratio-option {
|
|
706
|
+
display: flex;
|
|
707
|
+
align-items: center;
|
|
708
|
+
gap: 8px;
|
|
709
|
+
min-width: 0;
|
|
710
|
+
}
|
|
711
|
+
.media-editor-crop-panel__aspect-ratio-option svg {
|
|
712
|
+
flex-shrink: 0;
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
.media-editor-crop-panel__aspect-ratio-label {
|
|
716
|
+
overflow: hidden;
|
|
717
|
+
text-overflow: ellipsis;
|
|
718
|
+
white-space: nowrap;
|
|
719
|
+
}
|
|
720
|
+
|
|
674
721
|
.media-editor-keyboard-shortcuts-modal {
|
|
675
722
|
min-width: 280px;
|
|
676
723
|
}
|
|
@@ -711,7 +758,7 @@
|
|
|
711
758
|
margin: 0 0.2rem 0 0.2rem;
|
|
712
759
|
}
|
|
713
760
|
.media-editor-keyboard-shortcuts-modal .media-editor-keyboard-shortcuts-modal__shortcut-key:last-child {
|
|
714
|
-
margin: 0
|
|
761
|
+
margin-inline-end: 0;
|
|
715
762
|
}
|
|
716
763
|
|
|
717
764
|
.rotation-ruler {
|
|
@@ -720,8 +767,7 @@
|
|
|
720
767
|
height: 32px;
|
|
721
768
|
padding: 0 8px;
|
|
722
769
|
box-sizing: border-box;
|
|
723
|
-
|
|
724
|
-
font-family: -apple-system, system-ui, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
|
770
|
+
font-family: var(--wpds-typography-font-family-body, -apple-system, system-ui, "Segoe UI", "Roboto", "Oxygen-Sans", "Ubuntu", "Cantarell", "Helvetica Neue", sans-serif);
|
|
725
771
|
-webkit-user-select: none;
|
|
726
772
|
user-select: none;
|
|
727
773
|
touch-action: none;
|
|
@@ -780,6 +826,7 @@
|
|
|
780
826
|
|
|
781
827
|
.rotation-ruler__ticks {
|
|
782
828
|
position: absolute;
|
|
829
|
+
color: CanvasText;
|
|
783
830
|
/*rtl:ignore*/
|
|
784
831
|
left: 50%;
|
|
785
832
|
top: 0;
|
|
@@ -817,7 +864,6 @@
|
|
|
817
864
|
font-size: 12px;
|
|
818
865
|
font-weight: var(--wpds-typography-font-weight-emphasis, 600);
|
|
819
866
|
line-height: 14px;
|
|
820
|
-
color: #1e1e1e;
|
|
821
867
|
pointer-events: none;
|
|
822
868
|
}
|
|
823
869
|
.rotation-ruler__active-label::before {
|