@wordpress/media-editor 0.21.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 +30 -0
- package/build/components/media-editor/index.cjs +586 -686
- package/build/components/media-editor/index.cjs.map +1 -7
- package/build/components/media-editor/use-crop-options.cjs +42 -57
- package/build/components/media-editor/use-crop-options.cjs.map +1 -7
- package/build/components/media-editor/use-save-media-editor.cjs +131 -185
- package/build/components/media-editor/use-save-media-editor.cjs.map +1 -7
- package/build/components/media-editor-canvas/index.cjs +117 -124
- package/build/components/media-editor-canvas/index.cjs.map +1 -7
- package/build/components/media-editor-crop-panel/index.cjs +81 -72
- package/build/components/media-editor-crop-panel/index.cjs.map +1 -7
- package/build/components/media-editor-fine-rotation/index.cjs +61 -72
- package/build/components/media-editor-fine-rotation/index.cjs.map +1 -7
- package/build/components/media-editor-image-controls/index.cjs +181 -257
- package/build/components/media-editor-image-controls/index.cjs.map +1 -7
- package/build/components/media-editor-keyboard-shortcuts-modal/index.cjs +120 -157
- package/build/components/media-editor-keyboard-shortcuts-modal/index.cjs.map +1 -7
- package/build/components/media-editor-modal/index.cjs +112 -155
- package/build/components/media-editor-modal/index.cjs.map +1 -7
- package/build/components/media-editor-provider/index.cjs +32 -55
- package/build/components/media-editor-provider/index.cjs.map +1 -7
- package/build/components/media-form/index.cjs +82 -77
- package/build/components/media-form/index.cjs.map +1 -7
- package/build/components/media-preview/index.cjs +113 -114
- package/build/components/media-preview/index.cjs.map +1 -7
- package/build/components/rotation-ruler/index.cjs +181 -188
- package/build/components/rotation-ruler/index.cjs.map +1 -7
- package/build/components/rotation-ruler/use-ruler-drag.cjs +132 -149
- package/build/components/rotation-ruler/use-ruler-drag.cjs.map +1 -7
- package/build/hooks/use-crop-gesture-handlers.cjs +82 -76
- package/build/hooks/use-crop-gesture-handlers.cjs.map +1 -7
- package/build/index.cjs +45 -39
- package/build/lock-unlock.cjs +9 -35
- package/build/lock-unlock.cjs.map +1 -7
- package/build/private-apis.cjs +16 -37
- package/build/private-apis.cjs.map +1 -7
- package/build/state/aspect-ratio-presets.cjs +59 -0
- package/build/state/aspect-ratio-presets.cjs.map +1 -0
- package/build/state/composite-reducer.cjs +100 -113
- package/build/state/composite-reducer.cjs.map +1 -7
- package/build/state/index.cjs +22 -45
- package/build/state/media-editor-state-provider.cjs +35 -48
- package/build/state/media-editor-state-provider.cjs.map +1 -7
- package/build/state/types.cjs +11 -31
- package/build/state/types.cjs.map +1 -7
- package/build/state/use-media-editor-state.cjs +227 -296
- package/build/state/use-media-editor-state.cjs.map +1 -7
- package/build/store/actions.cjs +17 -44
- package/build/store/actions.cjs.map +1 -7
- package/build/store/constants.cjs +8 -29
- package/build/store/constants.cjs.map +1 -7
- package/build/store/index.cjs +33 -40
- package/build/store/index.cjs.map +1 -7
- package/build/store/reducer.cjs +28 -50
- package/build/store/reducer.cjs.map +1 -7
- package/build/store/selectors.cjs +16 -41
- package/build/store/selectors.cjs.map +1 -7
- package/build/utils/get-media-type.cjs +18 -41
- package/build/utils/get-media-type.cjs.map +1 -7
- package/build/utils/index.cjs +9 -28
- package/build-module/components/media-editor/index.mjs +545 -675
- package/build-module/components/media-editor/index.mjs.map +1 -7
- package/build-module/components/media-editor/use-crop-options.mjs +37 -32
- package/build-module/components/media-editor/use-crop-options.mjs.map +1 -7
- package/build-module/components/media-editor/use-save-media-editor.mjs +109 -157
- package/build-module/components/media-editor/use-save-media-editor.mjs.map +1 -7
- package/build-module/components/media-editor-canvas/index.mjs +95 -98
- package/build-module/components/media-editor-canvas/index.mjs.map +1 -7
- package/build-module/components/media-editor-crop-panel/index.mjs +59 -46
- package/build-module/components/media-editor-crop-panel/index.mjs.map +1 -7
- package/build-module/components/media-editor-fine-rotation/index.mjs +39 -46
- package/build-module/components/media-editor-fine-rotation/index.mjs.map +1 -7
- package/build-module/components/media-editor-image-controls/index.mjs +171 -238
- package/build-module/components/media-editor-image-controls/index.mjs.map +1 -7
- package/build-module/components/media-editor-keyboard-shortcuts-modal/index.mjs +113 -137
- package/build-module/components/media-editor-keyboard-shortcuts-modal/index.mjs.map +1 -7
- package/build-module/components/media-editor-modal/index.mjs +88 -124
- package/build-module/components/media-editor-modal/index.mjs.map +1 -7
- package/build-module/components/media-editor-provider/index.mjs +26 -29
- package/build-module/components/media-editor-provider/index.mjs.map +1 -7
- package/build-module/components/media-form/index.mjs +74 -56
- package/build-module/components/media-form/index.mjs.map +1 -7
- package/build-module/components/media-preview/index.mjs +105 -90
- package/build-module/components/media-preview/index.mjs.map +1 -7
- package/build-module/components/rotation-ruler/index.mjs +161 -164
- package/build-module/components/rotation-ruler/index.mjs.map +1 -7
- package/build-module/components/rotation-ruler/use-ruler-drag.mjs +125 -122
- package/build-module/components/rotation-ruler/use-ruler-drag.mjs.map +1 -7
- package/build-module/hooks/use-crop-gesture-handlers.mjs +76 -50
- package/build-module/hooks/use-crop-gesture-handlers.mjs.map +1 -7
- package/build-module/index.mjs +3 -10
- package/build-module/lock-unlock.mjs +5 -10
- package/build-module/lock-unlock.mjs.map +1 -7
- package/build-module/private-apis.mjs +8 -9
- package/build-module/private-apis.mjs.map +1 -7
- package/build-module/state/aspect-ratio-presets.mjs +53 -0
- package/build-module/state/aspect-ratio-presets.mjs.map +1 -0
- package/build-module/state/composite-reducer.mjs +80 -91
- package/build-module/state/composite-reducer.mjs.map +1 -7
- package/build-module/state/index.mjs +3 -26
- package/build-module/state/media-editor-state-provider.mjs +29 -24
- package/build-module/state/media-editor-state-provider.mjs.map +1 -7
- package/build-module/state/types.mjs +7 -7
- package/build-module/state/types.mjs.map +1 -7
- package/build-module/state/use-media-editor-state.mjs +223 -288
- package/build-module/state/use-media-editor-state.mjs.map +1 -7
- package/build-module/store/actions.mjs +12 -19
- package/build-module/store/actions.mjs.map +1 -7
- package/build-module/store/constants.mjs +4 -5
- package/build-module/store/constants.mjs.map +1 -7
- package/build-module/store/index.mjs +8 -9
- package/build-module/store/index.mjs.map +1 -7
- package/build-module/store/reducer.mjs +23 -26
- package/build-module/store/reducer.mjs.map +1 -7
- package/build-module/store/selectors.mjs +8 -13
- package/build-module/store/selectors.mjs.map +1 -7
- package/build-module/utils/get-media-type.mjs +14 -17
- package/build-module/utils/get-media-type.mjs.map +1 -7
- package/build-module/utils/index.mjs +1 -6
- package/build-style/style-rtl.css +145 -61
- package/build-style/style.css +144 -61
- package/build-types/components/media-editor/index.d.ts +20 -2
- 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/components/rotation-ruler/use-ruler-drag.d.ts.map +1 -1
- package/build-types/state/aspect-ratio-presets.d.ts +24 -0
- package/build-types/state/aspect-ratio-presets.d.ts.map +1 -0
- 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 -4
- package/build-types/state/index.d.ts.map +1 -1
- package/build-types/state/types.d.ts +20 -63
- 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 +355 -167
- package/src/components/media-editor/style.scss +19 -0
- package/src/components/media-editor/use-crop-options.ts +9 -10
- package/src/components/media-editor/use-save-media-editor.ts +48 -10
- package/src/components/media-editor-canvas/index.tsx +30 -51
- 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 +15 -11
- 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-editor-modal/style.scss +1 -1
- package/src/components/media-form/index.tsx +7 -1
- package/src/components/media-preview/index.tsx +65 -23
- package/src/components/media-preview/style.scss +16 -2
- package/src/components/rotation-ruler/style.scss +9 -5
- package/src/components/rotation-ruler/use-ruler-drag.ts +6 -11
- package/src/state/README.md +32 -0
- package/src/state/aspect-ratio-presets.ts +37 -0
- package/src/state/composite-reducer.ts +42 -80
- package/src/state/index.ts +2 -17
- package/src/state/types.ts +18 -72
- package/src/state/use-media-editor-state.ts +155 -238
- package/src/style.scss +2 -1
- package/build/components/media-editor-modal/build-modifiers.cjs +0 -91
- package/build/components/media-editor-modal/build-modifiers.cjs.map +0 -7
- package/build/image-editor/core/camera.cjs +0 -225
- package/build/image-editor/core/camera.cjs.map +0 -7
- package/build/image-editor/core/constants.cjs +0 -108
- package/build/image-editor/core/constants.cjs.map +0 -7
- package/build/image-editor/core/containment.cjs +0 -276
- package/build/image-editor/core/containment.cjs.map +0 -7
- package/build/image-editor/core/crop-rect.cjs +0 -48
- package/build/image-editor/core/crop-rect.cjs.map +0 -7
- package/build/image-editor/core/export/canvas-renderer.cjs +0 -151
- package/build/image-editor/core/export/canvas-renderer.cjs.map +0 -7
- package/build/image-editor/core/index.cjs +0 -62
- package/build/image-editor/core/index.cjs.map +0 -7
- package/build/image-editor/core/interaction-controller.cjs +0 -654
- package/build/image-editor/core/interaction-controller.cjs.map +0 -7
- package/build/image-editor/core/math/rotation.cjs +0 -41
- package/build/image-editor/core/math/rotation.cjs.map +0 -7
- package/build/image-editor/core/math/sanitize.cjs +0 -92
- package/build/image-editor/core/math/sanitize.cjs.map +0 -7
- package/build/image-editor/core/setter-helpers.cjs +0 -64
- package/build/image-editor/core/setter-helpers.cjs.map +0 -7
- package/build/image-editor/core/source-region.cjs +0 -206
- package/build/image-editor/core/source-region.cjs.map +0 -7
- package/build/image-editor/core/state.cjs +0 -283
- package/build/image-editor/core/state.cjs.map +0 -7
- package/build/image-editor/core/stencil-math.cjs +0 -216
- package/build/image-editor/core/stencil-math.cjs.map +0 -7
- package/build/image-editor/core/transform-style.cjs +0 -52
- package/build/image-editor/core/transform-style.cjs.map +0 -7
- package/build/image-editor/core/transforms/pipeline.cjs +0 -43
- package/build/image-editor/core/transforms/pipeline.cjs.map +0 -7
- package/build/image-editor/core/types.cjs +0 -19
- package/build/image-editor/core/types.cjs.map +0 -7
- package/build/image-editor/core/viewport-state.cjs +0 -50
- package/build/image-editor/core/viewport-state.cjs.map +0 -7
- package/build/image-editor/index.cjs +0 -67
- package/build/image-editor/index.cjs.map +0 -7
- package/build/image-editor/react/components/cropper-provider.cjs +0 -50
- package/build/image-editor/react/components/cropper-provider.cjs.map +0 -7
- package/build/image-editor/react/components/cropper.cjs +0 -722
- package/build/image-editor/react/components/cropper.cjs.map +0 -7
- package/build/image-editor/react/components/index.cjs +0 -36
- package/build/image-editor/react/components/index.cjs.map +0 -7
- package/build/image-editor/react/components/overlays/dimensions-overlay.cjs +0 -172
- package/build/image-editor/react/components/overlays/dimensions-overlay.cjs.map +0 -7
- package/build/image-editor/react/components/overlays/dimming-overlay.cjs +0 -62
- package/build/image-editor/react/components/overlays/dimming-overlay.cjs.map +0 -7
- package/build/image-editor/react/components/overlays/grid-overlay.cjs +0 -91
- package/build/image-editor/react/components/overlays/grid-overlay.cjs.map +0 -7
- package/build/image-editor/react/components/stencils/rectangle-stencil.cjs +0 -426
- package/build/image-editor/react/components/stencils/rectangle-stencil.cjs.map +0 -7
- package/build/image-editor/react/components/viewport-provider.cjs +0 -51
- package/build/image-editor/react/components/viewport-provider.cjs.map +0 -7
- package/build/image-editor/react/hooks/build-cropper-setters.cjs +0 -71
- package/build/image-editor/react/hooks/build-cropper-setters.cjs.map +0 -7
- package/build/image-editor/react/hooks/index.cjs +0 -34
- package/build/image-editor/react/hooks/index.cjs.map +0 -7
- package/build/image-editor/react/hooks/use-aria-announcer.cjs +0 -160
- package/build/image-editor/react/hooks/use-aria-announcer.cjs.map +0 -7
- package/build/image-editor/react/hooks/use-cropper-reducer.cjs +0 -113
- package/build/image-editor/react/hooks/use-cropper-reducer.cjs.map +0 -7
- package/build/image-editor/react/hooks/use-interaction.cjs +0 -213
- package/build/image-editor/react/hooks/use-interaction.cjs.map +0 -7
- package/build/image-editor/react/hooks/use-transform-style.cjs +0 -38
- package/build/image-editor/react/hooks/use-transform-style.cjs.map +0 -7
- package/build/image-editor/react/hooks/use-viewport-state.cjs +0 -51
- package/build/image-editor/react/hooks/use-viewport-state.cjs.map +0 -7
- package/build/image-editor/react/visually-hidden-style.cjs +0 -41
- package/build/image-editor/react/visually-hidden-style.cjs.map +0 -7
- package/build/index.cjs.map +0 -7
- package/build/state/index.cjs.map +0 -7
- package/build/utils/index.cjs.map +0 -7
- package/build-module/components/media-editor-modal/build-modifiers.mjs +0 -66
- package/build-module/components/media-editor-modal/build-modifiers.mjs.map +0 -7
- package/build-module/image-editor/core/camera.mjs +0 -198
- package/build-module/image-editor/core/camera.mjs.map +0 -7
- package/build-module/image-editor/core/constants.mjs +0 -69
- package/build-module/image-editor/core/constants.mjs.map +0 -7
- package/build-module/image-editor/core/containment.mjs +0 -253
- package/build-module/image-editor/core/containment.mjs.map +0 -7
- package/build-module/image-editor/core/crop-rect.mjs +0 -23
- package/build-module/image-editor/core/crop-rect.mjs.map +0 -7
- package/build-module/image-editor/core/export/canvas-renderer.mjs +0 -120
- package/build-module/image-editor/core/export/canvas-renderer.mjs.map +0 -7
- package/build-module/image-editor/core/index.mjs +0 -36
- package/build-module/image-editor/core/index.mjs.map +0 -7
- package/build-module/image-editor/core/interaction-controller.mjs +0 -635
- package/build-module/image-editor/core/interaction-controller.mjs.map +0 -7
- package/build-module/image-editor/core/math/rotation.mjs +0 -15
- package/build-module/image-editor/core/math/rotation.mjs.map +0 -7
- package/build-module/image-editor/core/math/sanitize.mjs +0 -63
- package/build-module/image-editor/core/math/sanitize.mjs.map +0 -7
- package/build-module/image-editor/core/setter-helpers.mjs +0 -39
- package/build-module/image-editor/core/setter-helpers.mjs.map +0 -7
- package/build-module/image-editor/core/source-region.mjs +0 -178
- package/build-module/image-editor/core/source-region.mjs.map +0 -7
- package/build-module/image-editor/core/state.mjs +0 -260
- package/build-module/image-editor/core/state.mjs.map +0 -7
- package/build-module/image-editor/core/stencil-math.mjs +0 -187
- package/build-module/image-editor/core/stencil-math.mjs.map +0 -7
- package/build-module/image-editor/core/transform-style.mjs +0 -27
- package/build-module/image-editor/core/transform-style.mjs.map +0 -7
- package/build-module/image-editor/core/transforms/pipeline.mjs +0 -17
- package/build-module/image-editor/core/transforms/pipeline.mjs.map +0 -7
- package/build-module/image-editor/core/types.mjs +0 -1
- package/build-module/image-editor/core/types.mjs.map +0 -7
- package/build-module/image-editor/core/viewport-state.mjs +0 -24
- package/build-module/image-editor/core/viewport-state.mjs.map +0 -7
- package/build-module/image-editor/index.mjs +0 -39
- package/build-module/image-editor/index.mjs.map +0 -7
- package/build-module/image-editor/react/components/cropper-provider.mjs +0 -26
- package/build-module/image-editor/react/components/cropper-provider.mjs.map +0 -7
- package/build-module/image-editor/react/components/cropper.mjs +0 -704
- package/build-module/image-editor/react/components/cropper.mjs.map +0 -7
- package/build-module/image-editor/react/components/index.mjs +0 -9
- package/build-module/image-editor/react/components/index.mjs.map +0 -7
- package/build-module/image-editor/react/components/overlays/dimensions-overlay.mjs +0 -147
- package/build-module/image-editor/react/components/overlays/dimensions-overlay.mjs.map +0 -7
- package/build-module/image-editor/react/components/overlays/dimming-overlay.mjs +0 -37
- package/build-module/image-editor/react/components/overlays/dimming-overlay.mjs.map +0 -7
- package/build-module/image-editor/react/components/overlays/grid-overlay.mjs +0 -66
- package/build-module/image-editor/react/components/overlays/grid-overlay.mjs.map +0 -7
- package/build-module/image-editor/react/components/stencils/rectangle-stencil.mjs +0 -414
- package/build-module/image-editor/react/components/stencils/rectangle-stencil.mjs.map +0 -7
- package/build-module/image-editor/react/components/viewport-provider.mjs +0 -27
- package/build-module/image-editor/react/components/viewport-provider.mjs.map +0 -7
- package/build-module/image-editor/react/hooks/build-cropper-setters.mjs +0 -46
- package/build-module/image-editor/react/hooks/build-cropper-setters.mjs.map +0 -7
- package/build-module/image-editor/react/hooks/index.mjs +0 -8
- package/build-module/image-editor/react/hooks/index.mjs.map +0 -7
- package/build-module/image-editor/react/hooks/use-aria-announcer.mjs +0 -135
- package/build-module/image-editor/react/hooks/use-aria-announcer.mjs.map +0 -7
- package/build-module/image-editor/react/hooks/use-cropper-reducer.mjs +0 -100
- package/build-module/image-editor/react/hooks/use-cropper-reducer.mjs.map +0 -7
- package/build-module/image-editor/react/hooks/use-interaction.mjs +0 -190
- package/build-module/image-editor/react/hooks/use-interaction.mjs.map +0 -7
- package/build-module/image-editor/react/hooks/use-transform-style.mjs +0 -13
- package/build-module/image-editor/react/hooks/use-transform-style.mjs.map +0 -7
- package/build-module/image-editor/react/hooks/use-viewport-state.mjs +0 -29
- package/build-module/image-editor/react/hooks/use-viewport-state.mjs.map +0 -7
- package/build-module/image-editor/react/visually-hidden-style.mjs +0 -16
- package/build-module/image-editor/react/visually-hidden-style.mjs.map +0 -7
- package/build-module/index.mjs.map +0 -7
- package/build-module/state/index.mjs.map +0 -7
- package/build-module/utils/index.mjs.map +0 -7
- package/build-types/components/media-editor-modal/build-modifiers.d.ts +0 -80
- 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 -99
- 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 -16
- 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 -63
- 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-reducer.d.ts +0 -55
- package/build-types/image-editor/react/hooks/use-cropper-reducer.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 -161
- 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 -150
- 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 -47
- 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 -52
- 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 -1116
- 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-reducer.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
package/build-style/style.css
CHANGED
|
@@ -94,10 +94,23 @@
|
|
|
94
94
|
.media-editor-preview--audio audio {
|
|
95
95
|
max-width: 100%;
|
|
96
96
|
}
|
|
97
|
-
.media-editor-preview--
|
|
98
|
-
|
|
97
|
+
.media-editor-preview--pdf {
|
|
98
|
+
align-items: stretch;
|
|
99
|
+
width: 100%;
|
|
100
|
+
max-width: 1100px;
|
|
101
|
+
margin-inline: auto;
|
|
102
|
+
}
|
|
103
|
+
.media-editor-preview__pdf {
|
|
104
|
+
display: flex;
|
|
105
|
+
flex: 1;
|
|
106
|
+
align-items: center;
|
|
107
|
+
justify-content: center;
|
|
108
|
+
min-width: 0;
|
|
109
|
+
border: 0;
|
|
110
|
+
border-radius: 2px;
|
|
99
111
|
}
|
|
100
112
|
.media-editor-preview__file-info {
|
|
113
|
+
text-align: center;
|
|
101
114
|
background: #f0f0f0;
|
|
102
115
|
padding: 24px;
|
|
103
116
|
border-radius: 2px;
|
|
@@ -126,94 +139,110 @@
|
|
|
126
139
|
margin-top: 8px;
|
|
127
140
|
}
|
|
128
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 */
|
|
129
144
|
/*!rtl:begin:ignore*/
|
|
130
|
-
.wp-
|
|
145
|
+
.wp-image-editor {
|
|
131
146
|
position: relative;
|
|
132
147
|
overflow: hidden;
|
|
133
148
|
width: 100%;
|
|
134
149
|
height: 100%;
|
|
135
150
|
touch-action: none;
|
|
136
151
|
-webkit-user-select: none;
|
|
137
|
-
|
|
152
|
+
user-select: none;
|
|
138
153
|
cursor: grab;
|
|
139
154
|
}
|
|
140
|
-
|
|
155
|
+
|
|
156
|
+
.wp-image-editor__canvas {
|
|
141
157
|
position: absolute;
|
|
142
|
-
inset: 24px;
|
|
158
|
+
inset: max(22px, var(--wp-image-editor-canvas-inset, var(--wpds-dimension-padding-2xl, 24px)));
|
|
143
159
|
min-height: 100px;
|
|
144
160
|
min-width: 100px;
|
|
145
161
|
}
|
|
146
|
-
|
|
162
|
+
|
|
163
|
+
.wp-image-editor__canvas:focus {
|
|
147
164
|
outline: none;
|
|
148
165
|
}
|
|
149
|
-
|
|
166
|
+
|
|
167
|
+
.wp-image-editor__stage {
|
|
150
168
|
position: absolute;
|
|
151
169
|
inset: 0;
|
|
152
170
|
}
|
|
153
|
-
|
|
171
|
+
|
|
172
|
+
.wp-image-editor--dragging {
|
|
154
173
|
cursor: grabbing;
|
|
155
174
|
}
|
|
156
|
-
|
|
175
|
+
|
|
176
|
+
.wp-image-editor__image {
|
|
157
177
|
position: absolute;
|
|
158
178
|
top: 0;
|
|
159
179
|
left: 0;
|
|
160
180
|
will-change: transform;
|
|
161
181
|
transform-origin: center center;
|
|
162
182
|
}
|
|
163
|
-
|
|
183
|
+
|
|
184
|
+
.wp-image-editor__stencil {
|
|
164
185
|
position: absolute;
|
|
165
186
|
pointer-events: none;
|
|
166
187
|
}
|
|
167
|
-
|
|
188
|
+
|
|
189
|
+
.wp-image-editor__dimming {
|
|
168
190
|
position: absolute;
|
|
169
191
|
pointer-events: none;
|
|
170
|
-
/* Large shadow spread washes everything outside the crop area
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
where they're panning. */
|
|
174
|
-
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));
|
|
175
195
|
transition: box-shadow 0.15s ease;
|
|
176
196
|
}
|
|
177
|
-
|
|
178
|
-
|
|
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);
|
|
179
200
|
}
|
|
180
|
-
|
|
201
|
+
|
|
202
|
+
.wp-image-editor__grid {
|
|
181
203
|
position: absolute;
|
|
182
204
|
pointer-events: none;
|
|
183
205
|
overflow: hidden;
|
|
184
206
|
transition: opacity 0.15s ease;
|
|
185
207
|
}
|
|
186
|
-
|
|
208
|
+
|
|
209
|
+
.wp-image-editor__canvas--grid-interactive .wp-image-editor__grid {
|
|
187
210
|
opacity: 0;
|
|
188
211
|
transition-delay: 0.1s;
|
|
189
212
|
}
|
|
190
|
-
|
|
213
|
+
|
|
214
|
+
.wp-image-editor__canvas--show-grid .wp-image-editor__grid {
|
|
191
215
|
opacity: 1;
|
|
192
216
|
transition-delay: 0s;
|
|
193
217
|
}
|
|
194
|
-
|
|
218
|
+
|
|
219
|
+
.wp-image-editor__canvas--settling .wp-image-editor__grid {
|
|
195
220
|
opacity: 0;
|
|
196
221
|
transition: none;
|
|
197
222
|
}
|
|
198
|
-
|
|
223
|
+
|
|
224
|
+
.wp-image-editor__grid-line {
|
|
199
225
|
position: absolute;
|
|
200
|
-
background: rgba(255, 255, 255, 0.4);
|
|
226
|
+
background: var(--wp-image-editor-grid-color, rgba(255, 255, 255, 0.4));
|
|
201
227
|
}
|
|
202
|
-
|
|
228
|
+
|
|
229
|
+
.wp-image-editor__grid-line--horizontal {
|
|
203
230
|
left: 0;
|
|
204
231
|
width: 100%;
|
|
205
232
|
height: 1px;
|
|
206
233
|
}
|
|
207
|
-
|
|
234
|
+
|
|
235
|
+
.wp-image-editor__grid-line--vertical {
|
|
208
236
|
top: 0;
|
|
209
237
|
height: 100%;
|
|
210
238
|
width: 1px;
|
|
211
239
|
}
|
|
212
|
-
|
|
240
|
+
|
|
241
|
+
.wp-image-editor__dimensions-tooltip {
|
|
213
242
|
position: absolute;
|
|
214
243
|
padding: 2px 6px;
|
|
215
|
-
background: #fff;
|
|
216
|
-
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));
|
|
217
246
|
font-size: 11px;
|
|
218
247
|
line-height: 1.4;
|
|
219
248
|
font-variant-numeric: tabular-nums;
|
|
@@ -222,18 +251,21 @@
|
|
|
222
251
|
white-space: nowrap;
|
|
223
252
|
z-index: 2;
|
|
224
253
|
}
|
|
225
|
-
|
|
254
|
+
|
|
255
|
+
.wp-image-editor__stencil-rect {
|
|
226
256
|
position: absolute;
|
|
227
|
-
border: 1px solid #1e1e1e;
|
|
257
|
+
border: 1px solid var(--wp-image-editor-foreground-color, var(--wpds-color-foreground-content-neutral, #1e1e1e));
|
|
228
258
|
box-sizing: border-box;
|
|
229
259
|
pointer-events: none;
|
|
230
260
|
transition: border-color 0.15s ease, box-shadow 0.15s ease;
|
|
231
261
|
}
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
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)));
|
|
235
266
|
}
|
|
236
|
-
|
|
267
|
+
|
|
268
|
+
.wp-image-editor__handle {
|
|
237
269
|
appearance: none;
|
|
238
270
|
margin: 0;
|
|
239
271
|
padding: 0;
|
|
@@ -242,22 +274,25 @@
|
|
|
242
274
|
position: absolute;
|
|
243
275
|
width: 12px;
|
|
244
276
|
height: 12px;
|
|
245
|
-
background: #fff;
|
|
246
|
-
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)));
|
|
247
279
|
border-radius: 50%;
|
|
248
280
|
box-sizing: border-box;
|
|
249
281
|
pointer-events: auto;
|
|
250
282
|
transition: background-color 0.15s ease, box-shadow 0.15s ease;
|
|
251
283
|
}
|
|
252
|
-
|
|
284
|
+
|
|
285
|
+
.wp-image-editor__handle:focus {
|
|
253
286
|
outline: none;
|
|
254
287
|
}
|
|
255
|
-
|
|
256
|
-
|
|
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)));
|
|
257
291
|
border-color: transparent;
|
|
258
|
-
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)));
|
|
259
293
|
}
|
|
260
|
-
|
|
294
|
+
|
|
295
|
+
.wp-image-editor__handle::before {
|
|
261
296
|
content: "";
|
|
262
297
|
position: absolute;
|
|
263
298
|
top: 50%;
|
|
@@ -266,49 +301,58 @@
|
|
|
266
301
|
height: 44px;
|
|
267
302
|
transform: translate(-50%, -50%);
|
|
268
303
|
}
|
|
269
|
-
|
|
304
|
+
|
|
305
|
+
.wp-image-editor__handle {
|
|
270
306
|
/* Offset by half the handle width (12px / 2 = 6px) to center on crop edge */
|
|
271
307
|
}
|
|
272
|
-
|
|
308
|
+
|
|
309
|
+
.wp-image-editor__handle--n {
|
|
273
310
|
top: -6px;
|
|
274
311
|
left: 50%;
|
|
275
312
|
margin-left: -6px;
|
|
276
313
|
cursor: ns-resize;
|
|
277
314
|
}
|
|
278
|
-
|
|
315
|
+
|
|
316
|
+
.wp-image-editor__handle--s {
|
|
279
317
|
bottom: -6px;
|
|
280
318
|
left: 50%;
|
|
281
319
|
margin-left: -6px;
|
|
282
320
|
cursor: ns-resize;
|
|
283
321
|
}
|
|
284
|
-
|
|
322
|
+
|
|
323
|
+
.wp-image-editor__handle--e {
|
|
285
324
|
top: 50%;
|
|
286
325
|
right: -6px;
|
|
287
326
|
margin-top: -6px;
|
|
288
327
|
cursor: ew-resize;
|
|
289
328
|
}
|
|
290
|
-
|
|
329
|
+
|
|
330
|
+
.wp-image-editor__handle--w {
|
|
291
331
|
top: 50%;
|
|
292
332
|
left: -6px;
|
|
293
333
|
margin-top: -6px;
|
|
294
334
|
cursor: ew-resize;
|
|
295
335
|
}
|
|
296
|
-
|
|
336
|
+
|
|
337
|
+
.wp-image-editor__handle--nw {
|
|
297
338
|
top: -6px;
|
|
298
339
|
left: -6px;
|
|
299
340
|
cursor: nwse-resize;
|
|
300
341
|
}
|
|
301
|
-
|
|
342
|
+
|
|
343
|
+
.wp-image-editor__handle--ne {
|
|
302
344
|
top: -6px;
|
|
303
345
|
right: -6px;
|
|
304
346
|
cursor: nesw-resize;
|
|
305
347
|
}
|
|
306
|
-
|
|
348
|
+
|
|
349
|
+
.wp-image-editor__handle--sw {
|
|
307
350
|
bottom: -6px;
|
|
308
351
|
left: -6px;
|
|
309
352
|
cursor: nesw-resize;
|
|
310
353
|
}
|
|
311
|
-
|
|
354
|
+
|
|
355
|
+
.wp-image-editor__handle--se {
|
|
312
356
|
bottom: -6px;
|
|
313
357
|
right: -6px;
|
|
314
358
|
cursor: nwse-resize;
|
|
@@ -396,6 +440,13 @@
|
|
|
396
440
|
@media (min-width: 600px) {
|
|
397
441
|
.media-editor .media-editor__content {
|
|
398
442
|
margin: 0 24px;
|
|
443
|
+
transition: margin-right 0.3s cubic-bezier(0.6, 0, 0.4, 1);
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
@media (min-width: 600px) and (prefers-reduced-motion: reduce) {
|
|
447
|
+
.media-editor .media-editor__content {
|
|
448
|
+
transition-duration: 0s;
|
|
449
|
+
transition-delay: 0s;
|
|
399
450
|
}
|
|
400
451
|
}
|
|
401
452
|
@container media-editor-body (min-width: 864px) {
|
|
@@ -441,6 +492,18 @@
|
|
|
441
492
|
max-height: 100%;
|
|
442
493
|
object-fit: contain;
|
|
443
494
|
}
|
|
495
|
+
.media-editor .media-editor__sidebar-container {
|
|
496
|
+
display: flex;
|
|
497
|
+
flex: 1;
|
|
498
|
+
min-width: 0;
|
|
499
|
+
min-height: 0;
|
|
500
|
+
overflow: hidden;
|
|
501
|
+
}
|
|
502
|
+
@media (min-width: 600px) {
|
|
503
|
+
.media-editor .media-editor__sidebar-container {
|
|
504
|
+
flex: none;
|
|
505
|
+
}
|
|
506
|
+
}
|
|
444
507
|
.media-editor .media-editor__sidebar {
|
|
445
508
|
display: flex;
|
|
446
509
|
flex: 1;
|
|
@@ -567,13 +630,13 @@
|
|
|
567
630
|
width: 100%;
|
|
568
631
|
height: 100%;
|
|
569
632
|
}
|
|
570
|
-
.media-editor-
|
|
633
|
+
.media-editor-canvas__image-editor {
|
|
571
634
|
width: 100%;
|
|
572
635
|
height: 100%;
|
|
573
636
|
opacity: 0;
|
|
574
637
|
pointer-events: none;
|
|
575
638
|
}
|
|
576
|
-
.media-editor-
|
|
639
|
+
.media-editor-canvas__image-editor.is-loaded {
|
|
577
640
|
opacity: 1;
|
|
578
641
|
pointer-events: auto;
|
|
579
642
|
}
|
|
@@ -586,7 +649,7 @@
|
|
|
586
649
|
}
|
|
587
650
|
}
|
|
588
651
|
@media not (prefers-reduced-motion) {
|
|
589
|
-
.media-editor-
|
|
652
|
+
.media-editor-canvas__image-editor.is-loaded {
|
|
590
653
|
animation: __wp-base-styles-fade-in 0.2s linear 0s;
|
|
591
654
|
animation-fill-mode: forwards;
|
|
592
655
|
}
|
|
@@ -639,6 +702,22 @@
|
|
|
639
702
|
padding-inline: 2px 0;
|
|
640
703
|
}
|
|
641
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
|
+
|
|
642
721
|
.media-editor-keyboard-shortcuts-modal {
|
|
643
722
|
min-width: 280px;
|
|
644
723
|
}
|
|
@@ -679,7 +758,7 @@
|
|
|
679
758
|
margin: 0 0.2rem 0 0.2rem;
|
|
680
759
|
}
|
|
681
760
|
.media-editor-keyboard-shortcuts-modal .media-editor-keyboard-shortcuts-modal__shortcut-key:last-child {
|
|
682
|
-
margin: 0
|
|
761
|
+
margin-inline-end: 0;
|
|
683
762
|
}
|
|
684
763
|
|
|
685
764
|
.rotation-ruler {
|
|
@@ -688,8 +767,7 @@
|
|
|
688
767
|
height: 32px;
|
|
689
768
|
padding: 0 8px;
|
|
690
769
|
box-sizing: border-box;
|
|
691
|
-
|
|
692
|
-
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);
|
|
693
771
|
-webkit-user-select: none;
|
|
694
772
|
user-select: none;
|
|
695
773
|
touch-action: none;
|
|
@@ -704,8 +782,8 @@
|
|
|
704
782
|
cursor: default;
|
|
705
783
|
}
|
|
706
784
|
.rotation-ruler:has(.rotation-ruler__input:focus-visible) {
|
|
707
|
-
outline: 2px solid var(--wp-admin-theme-color, #3858e9);
|
|
708
|
-
outline-offset: 2px;
|
|
785
|
+
outline: var(--wpds-border-width-focus, var(--wp-admin-border-width-focus, 2px)) solid var(--focus-color, var(--wpds-color-stroke-focus, var(--wp-admin-theme-color, #3858e9)));
|
|
786
|
+
outline-offset: var(--wpds-border-width-focus, var(--wp-admin-border-width-focus, 2px));
|
|
709
787
|
border-radius: 4px;
|
|
710
788
|
}
|
|
711
789
|
|
|
@@ -732,6 +810,11 @@
|
|
|
732
810
|
transform: translateX(-50%);
|
|
733
811
|
pointer-events: none;
|
|
734
812
|
}
|
|
813
|
+
@media (forced-colors: active) {
|
|
814
|
+
.rotation-ruler__pointer {
|
|
815
|
+
background: CanvasText;
|
|
816
|
+
}
|
|
817
|
+
}
|
|
735
818
|
|
|
736
819
|
.rotation-ruler__strip {
|
|
737
820
|
position: absolute;
|
|
@@ -743,6 +826,7 @@
|
|
|
743
826
|
|
|
744
827
|
.rotation-ruler__ticks {
|
|
745
828
|
position: absolute;
|
|
829
|
+
color: CanvasText;
|
|
746
830
|
/*rtl:ignore*/
|
|
747
831
|
left: 50%;
|
|
748
832
|
top: 0;
|
|
@@ -780,7 +864,6 @@
|
|
|
780
864
|
font-size: 12px;
|
|
781
865
|
font-weight: var(--wpds-typography-font-weight-emphasis, 600);
|
|
782
866
|
line-height: 14px;
|
|
783
|
-
color: #1e1e1e;
|
|
784
867
|
pointer-events: none;
|
|
785
868
|
}
|
|
786
869
|
.rotation-ruler__active-label::before {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { Field, Form } from '@wordpress/dataviews';
|
|
1
|
+
import type { Action, Field, Form } from '@wordpress/dataviews';
|
|
2
2
|
import type { KeyboardEvent as ReactKeyboardEvent, ReactElement, ReactNode } from 'react';
|
|
3
|
+
import type { AspectRatioPreset } from '../../state/aspect-ratio-presets';
|
|
3
4
|
import type { Media } from '../media-editor-provider';
|
|
4
|
-
import type { AspectRatioPreset } from '../../image-editor/core/constants';
|
|
5
5
|
import { type MediaEditorSaveResult } from './use-save-media-editor';
|
|
6
6
|
export type { MediaEditorSaveResult } from './use-save-media-editor';
|
|
7
7
|
export interface MediaEditorFrameProps {
|
|
@@ -35,6 +35,8 @@ export interface MediaEditorProps {
|
|
|
35
35
|
aspectRatioPresets?: AspectRatioPreset[];
|
|
36
36
|
onClose?: () => void;
|
|
37
37
|
onSaved?: (result: MediaEditorSaveResult) => void;
|
|
38
|
+
/** Called with the original's id when the user chooses "Edit original". */
|
|
39
|
+
onEditOriginal?: (originalId: number) => void;
|
|
38
40
|
renderFrame: (props: MediaEditorFrameProps) => ReactElement;
|
|
39
41
|
noticesClassName?: string;
|
|
40
42
|
noticesPortalElement?: Element | null;
|
|
@@ -49,6 +51,20 @@ export interface HeaderActionsProps {
|
|
|
49
51
|
*/
|
|
50
52
|
showCloseButton?: boolean;
|
|
51
53
|
}
|
|
54
|
+
declare function PanelToggle(): import("react").JSX.Element;
|
|
55
|
+
export interface MoreMenuProps {
|
|
56
|
+
/**
|
|
57
|
+
* Actions for the attachment, such as those from the entity actions API.
|
|
58
|
+
* Only the ones whose `isEligible` passes for `item` are shown.
|
|
59
|
+
*/
|
|
60
|
+
actions?: Action<Media>[];
|
|
61
|
+
/**
|
|
62
|
+
* The attachment the actions apply to, with anything their `isEligible`
|
|
63
|
+
* checks need, such as `permissions`. Without it no actions are shown.
|
|
64
|
+
*/
|
|
65
|
+
item?: Media;
|
|
66
|
+
}
|
|
67
|
+
declare function MoreMenu({ actions, item }: MoreMenuProps): import("react").JSX.Element | null;
|
|
52
68
|
declare function HeaderActions({ showCloseButton }: HeaderActionsProps): import("react").JSX.Element;
|
|
53
69
|
declare function HistoryActions(): import("react").JSX.Element | null;
|
|
54
70
|
export interface SaveActionsProps {
|
|
@@ -64,6 +80,8 @@ declare function SaveActions({ size }: SaveActionsProps): import("react").JSX.El
|
|
|
64
80
|
export declare function MediaEditor(props: MediaEditorProps): import("react").JSX.Element;
|
|
65
81
|
export declare namespace MediaEditor {
|
|
66
82
|
export { HeaderActions };
|
|
83
|
+
export { PanelToggle };
|
|
84
|
+
export { MoreMenu };
|
|
67
85
|
export { HistoryActions };
|
|
68
86
|
export { SaveActions };
|
|
69
87
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/media-editor/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/media-editor/index.tsx"],"names":[],"mappings":"AA2CA,OAAO,KAAK,EAAE,MAAM,EAAe,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC7E,OAAO,KAAK,EACX,aAAa,IAAI,kBAAkB,EACnC,YAAY,EACZ,SAAS,EACT,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAE1E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAWtD,OAAO,EAGN,KAAK,qBAAqB,EAC1B,MAAM,yBAAyB,CAAC;AAGjC,YAAY,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AA8CrE,MAAM,WAAW,qBAAqB;IACrC,QAAQ,EAAE,SAAS,CAAC;IACpB;;;;;OAKG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;;;;;OAMG;IACH,MAAM,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC1B,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,SAAS,EAAE,CAAE,KAAK,EAAE,kBAAkB,CAAE,WAAW,CAAE,KAAM,IAAI,CAAC;IAChE,yBAAyB,EAAE,OAAO,CAAC;IACnC,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,gBAAgB;IAChC,MAAM,CAAC,EAAE,KAAK,CAAE,KAAK,CAAE,EAAE,CAAC;IAC1B,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,EAAE,EAAE,MAAM,CAAC;IACX,kBAAkB,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACzC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,CAAE,MAAM,EAAE,qBAAqB,KAAM,IAAI,CAAC;IACpD,2EAA2E;IAC3E,cAAc,CAAC,EAAE,CAAE,UAAU,EAAE,MAAM,KAAM,IAAI,CAAC;IAChD,WAAW,EAAE,CAAE,KAAK,EAAE,qBAAqB,KAAM,YAAY,CAAC;IAC9D,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,oBAAoB,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IACtC,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC3B;AAsID,MAAM,WAAW,kBAAkB;IAClC;;;;;OAKG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,iBAAS,WAAW,gCAmBnB;AAsCD,MAAM,WAAW,aAAa;IAC7B;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAE,KAAK,CAAE,EAAE,CAAC;IAC5B;;;OAGG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC;CACb;AAED,iBAAS,QAAQ,CAAE,EAAE,OAAY,EAAE,IAAI,EAAE,EAAE,aAAa,sCAuGvD;AAED,iBAAS,aAAa,CAAE,EAAE,eAAuB,EAAE,EAAE,kBAAkB,+BAuBtE;AAED,iBAAS,cAAc,uCA6HtB;AAED,MAAM,WAAW,gBAAgB;IAChC;;;;;OAKG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CAC7B;AAED,iBAAS,WAAW,CAAE,EAAE,IAAgB,EAAE,EAAE,gBAAgB,+BAkC3D;AA2gBD,wBAAgB,WAAW,CAAE,KAAK,EAAE,gBAAgB,+BAMnD;yBANe,WAAW;;;;;;;eAiBZ,WAAW"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type AspectRatioPreset } from '../../state/aspect-ratio-presets';
|
|
2
2
|
interface UseCropOptionsArgs {
|
|
3
3
|
aspectRatioPresets?: AspectRatioPreset[];
|
|
4
4
|
}
|
|
@@ -20,8 +20,7 @@ export declare function getAspectRatioOptions(aspectRatioPresets?: AspectRatioPr
|
|
|
20
20
|
/**
|
|
21
21
|
* Thin selector over the composite media-editor store for the Crop
|
|
22
22
|
* sidebar tab. Reads the cropOptions slice (preset key) and exposes
|
|
23
|
-
* the corresponding setters plus
|
|
24
|
-
* derivation.
|
|
23
|
+
* the corresponding setters plus the ratio the image editor has locked.
|
|
25
24
|
*
|
|
26
25
|
* No local React state, no refs, no synchronization effects — the
|
|
27
26
|
* composite store is the single source of truth.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-crop-options.d.ts","sourceRoot":"","sources":["../../../src/components/media-editor/use-crop-options.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-crop-options.d.ts","sourceRoot":"","sources":["../../../src/components/media-editor/use-crop-options.ts"],"names":[],"mappings":"AACA,OAAO,EAEN,KAAK,iBAAiB,EACtB,MAAM,kCAAkC,CAAC;AAG1C,UAAU,kBAAkB;IAC3B,kBAAkB,CAAC,EAAE,iBAAiB,EAAE,CAAC;CACzC;AAED,UAAU,oBAAoB;IAC7B,gBAAgB,EAAE,MAAM,CAAC;IACzB,mBAAmB,EAAE,CAAE,KAAK,EAAE,MAAM,KAAM,IAAI,CAAC;IAC/C,kBAAkB,EAAE,iBAAiB,EAAE,CAAC;IACxC,mBAAmB,EAAE,MAAM,GAAG,SAAS,CAAC;CACxC;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACpC,kBAAkB,CAAC,EAAE,iBAAiB,EAAE,GACtC,iBAAiB,EAAE,CAMrB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAE,EAC/B,kBAAkB,GAClB,GAAE,kBAAuB,GAAI,oBAAoB,CAmBjD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-save-media-editor.d.ts","sourceRoot":"","sources":["../../../src/components/media-editor/use-save-media-editor.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-save-media-editor.d.ts","sourceRoot":"","sources":["../../../src/components/media-editor/use-save-media-editor.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAwCtD,eAAO,MAAM,4BAA4B,iBAAiB,CAAC;AAI3D,MAAM,WAAW,qBAAqB;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,KAAK,CAAC;IACb,QAAQ,CAAC,EAAE;QACV,EAAE,EAAE,MAAM,CAAC;QACX,GAAG,CAAC,EAAE,MAAM,CAAC;KACb,CAAC;CACF;AAED,UAAU,sBAAsB;IAC/B,OAAO,EAAE,kBAAkB,CAAC;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,CAAE,MAAM,EAAE,qBAAqB,KAAM,IAAI,CAAC;IACpD;;;;;;OAMG;IACH,iBAAiB,CAAC,EAAE;QACnB,EAAE,EAAE,MAAM,CAAC;QACX,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,KAAK,CAAC;KACb,CAAC;CACF;AAED,UAAU,wBAAwB;IACjC,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,MAAM,OAAO,CAAE,IAAI,CAAE,CAAC;CAC5B;AA+CD,wBAAgB,kBAAkB,CAAE,EACnC,OAAO,EACP,EAAE,EACF,OAAO,EACP,KAAK,EACL,OAAO,EACP,iBAAiB,GACjB,EAAE,sBAAsB,GAAI,wBAAwB,CAkJpD"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export interface MediaEditorCanvasProps {
|
|
2
2
|
/** Whether external placement activity should reveal the grid. */
|
|
3
3
|
isPlacementActive?: boolean;
|
|
4
|
-
/** Fires when a canvas
|
|
4
|
+
/** Fires when a canvas gesture begins. */
|
|
5
5
|
onGestureStart?: () => void;
|
|
6
|
-
/** Fires when a canvas
|
|
6
|
+
/** Fires when a canvas gesture ends. */
|
|
7
7
|
onGestureEnd?: () => void;
|
|
8
8
|
/**
|
|
9
9
|
* Disable crop interaction on the canvas. Set while the edit is saving,
|
|
@@ -13,7 +13,7 @@ export interface MediaEditorCanvasProps {
|
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
15
|
* Editing surface for image media in the media editor modal. Pulls
|
|
16
|
-
* its
|
|
16
|
+
* its image editor controller from the surrounding `<MediaEditorStateProvider>`
|
|
17
17
|
* so the bottom bar and Crop sidebar tab share the same state.
|
|
18
18
|
*
|
|
19
19
|
* Returns `null` for missing or non-image media so the modal's outer
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/media-editor-canvas/index.tsx"],"names":[],"mappings":"AASA,MAAM,WAAW,sBAAsB;IACtC,kEAAkE;IAClE,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/media-editor-canvas/index.tsx"],"names":[],"mappings":"AASA,MAAM,WAAW,sBAAsB;IACtC,kEAAkE;IAClE,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,0CAA0C;IAC1C,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,wCAAwC;IACxC,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAE,EAC1C,iBAAyB,EACzB,cAAc,EACd,YAAY,EACZ,QAAgB,GAChB,EAAE,sBAAsB,sCA6GxB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AspectRatioPreset } from '../../
|
|
1
|
+
import type { AspectRatioPreset } from '../../state/aspect-ratio-presets';
|
|
2
2
|
export interface MediaEditorCropPanelProps {
|
|
3
3
|
/**
|
|
4
4
|
* Selected aspect-ratio preset value as a string (so it round-trips
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/media-editor-crop-panel/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/media-editor-crop-panel/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAI1E,MAAM,WAAW,yBAAyB;IACzC;;;;OAIG;IACH,gBAAgB,EAAE,MAAM,CAAC;IACzB,gDAAgD;IAChD,mBAAmB,EAAE,CAAE,KAAK,EAAE,MAAM,KAAM,IAAI,CAAC;IAC/C,uDAAuD;IACvD,kBAAkB,EAAE,iBAAiB,EAAE,CAAC;IACxC,mEAAmE;IACnE,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;;;;GASG;AACH,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAE,EAC7C,gBAAgB,EAChB,mBAAmB,EACnB,kBAAkB,EAClB,QAAgB,GAChB,EAAE,yBAAyB,+BAsE3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/media-editor-fine-rotation/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/media-editor-fine-rotation/index.tsx"],"names":[],"mappings":"AAKA,MAAM,WAAW,4BAA4B;IAC5C,kEAAkE;IAClE,6BAA6B,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3C;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;;;;GASG;AACH,MAAM,CAAC,OAAO,UAAU,uBAAuB,CAAE,EAChD,6BAA6B,EAC7B,QAAgB,GAChB,EAAE,4BAA4B,+BA+C9B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { AspectRatioPreset } from '../../state/aspect-ratio-presets';
|
|
2
2
|
/**
|
|
3
3
|
* Default zoom factor per +/- click. Zooming is geometric, so a fixed
|
|
4
4
|
* multiplier — rather than an additive step — makes each click feel like the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/media-editor-image-controls/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/media-editor-image-controls/index.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAG1E;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,MAAM,CAAC;AAEvC,MAAM,WAAW,6BAA6B;IAC7C;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,qDAAqD;IACrD,kBAAkB,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACzC;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,OAAO,UAAU,wBAAwB,CAAE,EACjD,UAAkB,EAClB,sBAA8B,EAC9B,kBAAkB,EAClB,UAAgC,EAChC,QAAgB,GAChB,EAAE,6BAA6B,+BAwM/B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/media-editor-keyboard-shortcuts-modal/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/media-editor-keyboard-shortcuts-modal/index.tsx"],"names":[],"mappings":"AAkIA,UAAU,sCAAsC;IAC/C,OAAO,EAAE,MAAM,IAAI,CAAC;CACpB;AAED,MAAM,CAAC,OAAO,UAAU,iCAAiC,CAAE,EAC1D,OAAO,GACP,EAAE,sCAAsC,+BAsCxC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Field, Form } from '@wordpress/dataviews';
|
|
2
|
+
import type { AspectRatioPreset } from '../../state/aspect-ratio-presets';
|
|
2
3
|
import type { Media } from '../media-editor-provider';
|
|
3
|
-
import type { AspectRatioPreset } from '../../image-editor/core/constants';
|
|
4
4
|
interface MediaEditorModalProps {
|
|
5
5
|
/**
|
|
6
6
|
* Attachment fields to render in the Details tab.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/media-editor-modal/index.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/media-editor-modal/index.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAExD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAE1E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAItD,UAAU,qBAAqB;IAC9B;;;;;OAKG;IACH,MAAM,CAAC,EAAE,KAAK,CAAE,KAAK,CAAE,EAAE,CAAC;IAC1B;;;OAGG;IACH,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ;;;OAGG;IACH,kBAAkB,CAAC,EAAE,iBAAiB,EAAE,CAAC;CACzC;AAqBD,wBAAgB,gBAAgB,CAAE,EACjC,MAAW,EACX,IAAI,EACJ,kBAAkB,GAClB,EAAE,qBAAqB,sCAiHvB;eAEc,gBAAgB"}
|
|
@@ -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;
|
|
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;
|
|
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;AA2GD;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAAE,KAAK,EAAE,iBAAiB,+BAgE7D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-ruler-drag.d.ts","sourceRoot":"","sources":["../../../src/components/rotation-ruler/use-ruler-drag.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAC7B,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,MAAM,EACrB,IAAI,EAAE,MAAM,GACV,MAAM,CAER;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAI,MAAM,CAQ5E;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAI,MAAM,CAE9D;AAED,MAAM,WAAW,mBAAmB;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAE,IAAI,EAAE,MAAM,KAAM,IAAI,CAAC;IACnC,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,OAAO,CAAC;IAClB,oEAAoE;IACpE,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;CAChC;AAED,MAAM,WAAW,iBAAiB;IACjC,aAAa,EAAE,CAAE,KAAK,EAAE,KAAK,CAAC,YAAY,CAAE,WAAW,CAAE,KAAM,IAAI,CAAC;IACpE,aAAa,EAAE,CAAE,KAAK,EAAE,KAAK,CAAC,YAAY,CAAE,WAAW,CAAE,KAAM,IAAI,CAAC;IACpE,WAAW,EAAE,CAAE,KAAK,EAAE,KAAK,CAAC,YAAY,CAAE,WAAW,CAAE,KAAM,IAAI,CAAC;IAClE,eAAe,EAAE,CAAE,KAAK,EAAE,KAAK,CAAC,YAAY,CAAE,WAAW,CAAE,KAAM,IAAI,CAAC;CACtE;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,YAAY,CAC3B,OAAO,EAAE,mBAAmB,GAC1B,iBAAiB,
|
|
1
|
+
{"version":3,"file":"use-ruler-drag.d.ts","sourceRoot":"","sources":["../../../src/components/rotation-ruler/use-ruler-drag.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAC7B,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,MAAM,EACrB,IAAI,EAAE,MAAM,GACV,MAAM,CAER;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAI,MAAM,CAQ5E;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAI,MAAM,CAE9D;AAED,MAAM,WAAW,mBAAmB;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAE,IAAI,EAAE,MAAM,KAAM,IAAI,CAAC;IACnC,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,OAAO,CAAC;IAClB,oEAAoE;IACpE,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;CAChC;AAED,MAAM,WAAW,iBAAiB;IACjC,aAAa,EAAE,CAAE,KAAK,EAAE,KAAK,CAAC,YAAY,CAAE,WAAW,CAAE,KAAM,IAAI,CAAC;IACpE,aAAa,EAAE,CAAE,KAAK,EAAE,KAAK,CAAC,YAAY,CAAE,WAAW,CAAE,KAAM,IAAI,CAAC;IACpE,WAAW,EAAE,CAAE,KAAK,EAAE,KAAK,CAAC,YAAY,CAAE,WAAW,CAAE,KAAM,IAAI,CAAC;IAClE,eAAe,EAAE,CAAE,KAAK,EAAE,KAAK,CAAC,YAAY,CAAE,WAAW,CAAE,KAAM,IAAI,CAAC;CACtE;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,YAAY,CAC3B,OAAO,EAAE,mBAAmB,GAC1B,iBAAiB,CAiJnB"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
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.
|
|
22
|
+
*/
|
|
23
|
+
export declare const DEFAULT_ASPECT_RATIOS: AspectRatioPreset[];
|
|
24
|
+
//# sourceMappingURL=aspect-ratio-presets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|