@wordpress/media-editor 0.19.0 → 0.20.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 +132 -50
- package/build/components/media-editor/index.cjs.map +2 -2
- package/build/components/media-editor/use-crop-options.cjs +1 -1
- package/build/components/media-editor/use-crop-options.cjs.map +2 -2
- package/build/components/media-editor/use-save-media-editor.cjs +36 -20
- package/build/components/media-editor/use-save-media-editor.cjs.map +2 -2
- package/build/components/media-editor-canvas/index.cjs +8 -8
- package/build/components/media-editor-canvas/index.cjs.map +2 -2
- package/build/components/media-editor-fine-rotation/index.cjs +1 -1
- package/build/components/media-editor-fine-rotation/index.cjs.map +2 -2
- package/build/components/media-editor-image-controls/index.cjs +46 -29
- package/build/components/media-editor-image-controls/index.cjs.map +2 -2
- package/build/components/media-editor-modal/index.cjs +17 -9
- package/build/components/media-editor-modal/index.cjs.map +2 -2
- package/build/hooks/use-crop-gesture-handlers.cjs +1 -1
- package/build/hooks/use-crop-gesture-handlers.cjs.map +2 -2
- package/build/image-editor/core/interaction-controller.cjs +5 -0
- package/build/image-editor/core/interaction-controller.cjs.map +2 -2
- package/build/image-editor/react/components/cropper.cjs +3 -3
- package/build/image-editor/react/components/cropper.cjs.map +2 -2
- package/build/image-editor/react/components/stencils/rectangle-stencil.cjs +1 -1
- package/build/image-editor/react/components/stencils/rectangle-stencil.cjs.map +2 -2
- package/build/image-editor/react/hooks/use-aria-announcer.cjs +3 -1
- package/build/image-editor/react/hooks/use-aria-announcer.cjs.map +2 -2
- package/build/image-editor/react/hooks/use-interaction.cjs +1 -1
- package/build/image-editor/react/hooks/use-interaction.cjs.map +2 -2
- package/build/state/composite-reducer.cjs +3 -3
- package/build/state/composite-reducer.cjs.map +2 -2
- package/build/state/index.cjs.map +1 -1
- package/build/state/media-editor-state-provider.cjs +1 -6
- package/build/state/media-editor-state-provider.cjs.map +2 -2
- package/build/state/use-media-editor-state.cjs +38 -36
- package/build/state/use-media-editor-state.cjs.map +2 -2
- package/build/store/actions.cjs +2 -0
- package/build/store/actions.cjs.map +2 -2
- package/build/store/reducer.cjs +3 -1
- package/build/store/reducer.cjs.map +2 -2
- package/build/store/selectors.cjs +5 -0
- package/build/store/selectors.cjs.map +2 -2
- package/build-module/components/media-editor/index.mjs +145 -52
- package/build-module/components/media-editor/index.mjs.map +2 -2
- package/build-module/components/media-editor/use-crop-options.mjs +1 -1
- package/build-module/components/media-editor/use-crop-options.mjs.map +2 -2
- package/build-module/components/media-editor/use-save-media-editor.mjs +36 -20
- package/build-module/components/media-editor/use-save-media-editor.mjs.map +2 -2
- package/build-module/components/media-editor-canvas/index.mjs +8 -8
- package/build-module/components/media-editor-canvas/index.mjs.map +2 -2
- package/build-module/components/media-editor-fine-rotation/index.mjs +1 -1
- package/build-module/components/media-editor-fine-rotation/index.mjs.map +2 -2
- package/build-module/components/media-editor-image-controls/index.mjs +47 -36
- package/build-module/components/media-editor-image-controls/index.mjs.map +2 -2
- package/build-module/components/media-editor-modal/index.mjs +17 -9
- package/build-module/components/media-editor-modal/index.mjs.map +2 -2
- package/build-module/hooks/use-crop-gesture-handlers.mjs +1 -1
- package/build-module/hooks/use-crop-gesture-handlers.mjs.map +2 -2
- package/build-module/image-editor/core/interaction-controller.mjs +5 -0
- package/build-module/image-editor/core/interaction-controller.mjs.map +2 -2
- package/build-module/image-editor/react/components/cropper.mjs +3 -3
- package/build-module/image-editor/react/components/cropper.mjs.map +2 -2
- package/build-module/image-editor/react/components/stencils/rectangle-stencil.mjs +1 -1
- package/build-module/image-editor/react/components/stencils/rectangle-stencil.mjs.map +2 -2
- package/build-module/image-editor/react/hooks/use-aria-announcer.mjs +3 -1
- package/build-module/image-editor/react/hooks/use-aria-announcer.mjs.map +2 -2
- package/build-module/image-editor/react/hooks/use-interaction.mjs +1 -1
- package/build-module/image-editor/react/hooks/use-interaction.mjs.map +2 -2
- package/build-module/state/composite-reducer.mjs +3 -3
- package/build-module/state/composite-reducer.mjs.map +2 -2
- package/build-module/state/index.mjs.map +1 -1
- package/build-module/state/media-editor-state-provider.mjs +1 -6
- package/build-module/state/media-editor-state-provider.mjs.map +2 -2
- package/build-module/state/use-media-editor-state.mjs +38 -36
- package/build-module/state/use-media-editor-state.mjs.map +2 -2
- package/build-module/store/actions.mjs +2 -0
- package/build-module/store/actions.mjs.map +2 -2
- package/build-module/store/reducer.mjs +3 -1
- package/build-module/store/reducer.mjs.map +2 -2
- package/build-module/store/selectors.mjs +4 -0
- package/build-module/store/selectors.mjs.map +2 -2
- package/build-style/style-rtl.css +5 -5
- package/build-style/style.css +5 -5
- package/build-types/components/media-editor/index.d.ts +2 -2
- package/build-types/components/media-editor/index.d.ts.map +1 -1
- package/build-types/components/media-editor/use-save-media-editor.d.ts +15 -3
- 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.map +1 -1
- package/build-types/components/media-editor-image-controls/index.d.ts.map +1 -1
- package/build-types/components/media-editor-modal/index.d.ts.map +1 -1
- package/build-types/hooks/use-crop-gesture-handlers.d.ts.map +1 -1
- package/build-types/image-editor/core/interaction-controller.d.ts.map +1 -1
- package/build-types/image-editor/react/components/cropper.d.ts.map +1 -1
- package/build-types/image-editor/react/components/stencils/rectangle-stencil.d.ts.map +1 -1
- package/build-types/image-editor/react/hooks/use-aria-announcer.d.ts.map +1 -1
- package/build-types/image-editor/react/hooks/use-interaction.d.ts.map +1 -1
- package/build-types/state/composite-reducer.d.ts +5 -5
- package/build-types/state/composite-reducer.d.ts.map +1 -1
- package/build-types/state/index.d.ts +1 -1
- package/build-types/state/index.d.ts.map +1 -1
- package/build-types/state/media-editor-state-provider.d.ts +8 -16
- package/build-types/state/media-editor-state-provider.d.ts.map +1 -1
- package/build-types/state/use-media-editor-state.d.ts +37 -30
- package/build-types/state/use-media-editor-state.d.ts.map +1 -1
- package/build-types/store/actions.d.ts +9 -1
- package/build-types/store/actions.d.ts.map +1 -1
- package/build-types/store/reducer.d.ts +3 -0
- package/build-types/store/reducer.d.ts.map +1 -1
- package/build-types/store/selectors.d.ts +1 -0
- package/build-types/store/selectors.d.ts.map +1 -1
- package/package.json +27 -22
- package/src/components/media-editor/index.tsx +203 -59
- package/src/components/media-editor/test/restore-original.browser.test.tsx +227 -0
- package/src/components/media-editor/test/use-crop-options.jsdom.test.tsx +12 -10
- package/src/components/media-editor/use-crop-options.ts +1 -1
- package/src/components/media-editor/use-save-media-editor.ts +61 -20
- package/src/components/media-editor-canvas/index.tsx +7 -8
- package/src/components/media-editor-crop-panel/test/index.jsdom.test.tsx +2 -4
- package/src/components/media-editor-fine-rotation/index.tsx +1 -1
- package/src/components/media-editor-image-controls/index.tsx +41 -41
- package/src/components/media-editor-image-controls/test/index.jsdom.test.tsx +19 -13
- package/src/components/media-editor-modal/index.tsx +18 -10
- package/src/components/media-editor-modal/test/index.jsdom.test.tsx +18 -1
- package/src/hooks/use-crop-gesture-handlers.ts +3 -1
- package/src/image-editor/core/interaction-controller.ts +8 -0
- package/src/image-editor/core/test/interaction-controller.ts +45 -0
- package/src/image-editor/docs/architecture.md +6 -2
- package/src/image-editor/docs/recipes.md +8 -8
- package/src/image-editor/react/components/cropper.scss +5 -5
- package/src/image-editor/react/components/cropper.tsx +8 -3
- package/src/image-editor/react/components/stencils/rectangle-stencil.tsx +3 -1
- package/src/image-editor/react/components/test/cropper.browser.test.tsx +7 -5
- package/src/image-editor/react/hooks/use-aria-announcer.ts +3 -1
- package/src/image-editor/react/hooks/use-interaction.ts +3 -2
- package/src/state/composite-reducer.ts +6 -7
- package/src/state/index.ts +1 -1
- package/src/state/media-editor-state-provider.tsx +9 -22
- package/src/state/test/use-media-editor-state.browser.test.tsx +79 -0
- package/src/state/test/use-media-editor-state.jsdom.test.ts +126 -64
- package/src/state/use-media-editor-state.ts +79 -68
- package/src/store/actions.ts +9 -0
- package/src/store/reducer.ts +6 -1
- package/src/store/selectors.ts +4 -0
- package/tsconfig.build.tsbuildinfo +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rectangle-stencil.d.ts","sourceRoot":"","sources":["../../../../../src/image-editor/react/components/stencils/rectangle-stencil.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,YAAY,EAAkB,MAAM,qBAAqB,CAAC;AAmExE;;GAEG;AACH,KAAK,qBAAqB,GAAG,YAAY,CAAC;AAE1C;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,gBAAgB,CAAE,EACjC,QAAQ,EACR,aAAa,EACb,SAAS,EACT,YAAY,EACZ,aAAa,EACb,WAAW,EACX,WAAW,EACX,YAAoB,EACpB,gBAAwB,EACxB,iBAAiB,EACjB,UAAU,EACV,QAAQ,EACR,WAAW,EACX,YAAY,EACZ,kBAAkB,GAClB,EAAE,qBAAqB,
|
|
1
|
+
{"version":3,"file":"rectangle-stencil.d.ts","sourceRoot":"","sources":["../../../../../src/image-editor/react/components/stencils/rectangle-stencil.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,YAAY,EAAkB,MAAM,qBAAqB,CAAC;AAmExE;;GAEG;AACH,KAAK,qBAAqB,GAAG,YAAY,CAAC;AAE1C;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,gBAAgB,CAAE,EACjC,QAAQ,EACR,aAAa,EACb,SAAS,EACT,YAAY,EACZ,aAAa,EACb,WAAW,EACX,WAAW,EACX,YAAoB,EACpB,gBAAwB,EACxB,iBAAiB,EACjB,UAAU,EACV,QAAQ,EACR,WAAW,EACX,YAAY,EACZ,kBAAkB,GAClB,EAAE,qBAAqB,sCAqfvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-aria-announcer.d.ts","sourceRoot":"","sources":["../../../../src/image-editor/react/hooks/use-aria-announcer.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAgJrD;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAAE,KAAK,EAAE,YAAY,GAAI,IAAI,
|
|
1
|
+
{"version":3,"file":"use-aria-announcer.d.ts","sourceRoot":"","sources":["../../../../src/image-editor/react/hooks/use-aria-announcer.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAgJrD;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAAE,KAAK,EAAE,YAAY,GAAI,IAAI,CAkC5D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-interaction.d.ts","sourceRoot":"","sources":["../../../../src/image-editor/react/hooks/use-interaction.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAEN,KAAK,yBAAyB,EAC9B,MAAM,mCAAmC,CAAC;AAE3C;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACpC,8DAA8D;IAC9D,QAAQ,EAAE;QACT,aAAa,EAAE,CAAE,CAAC,EAAE,KAAK,CAAC,YAAY,KAAM,IAAI,CAAC;QACjD,YAAY,EAAE,CAAE,CAAC,EAAE,KAAK,CAAC,UAAU,KAAM,IAAI,CAAC;QAC9C,SAAS,EAAE,CAAE,CAAC,EAAE,KAAK,CAAC,aAAa,KAAM,IAAI,CAAC;KAC9C,CAAC;IACF,yEAAyE;IACzE,aAAa,EAAE,CAAE,CAAC,EAAE,UAAU,KAAM,IAAI,CAAC;IACzC,uDAAuD;IACvD,UAAU,EAAE,OAAO,CAAC;IACpB,0DAA0D;IAC1D,SAAS,EAAE,OAAO,CAAC;IACnB,wEAAwE;IACxE,iBAAiB,EAAE,OAAO,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACrC,gDAAgD;IAChD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gDAAgD;IAChD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kEAAkE;IAClE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qDAAqD;IACrD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,qEAAqE;IACrE,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,8DAA8D;IAC9D,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;AA6BD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,cAAc,CAC7B,KAAK,EAAE,YAAY,EACnB,OAAO,EAAE,yBAAyB,EAClC,aAAa,EAAE,IAAI,EACnB,SAAS,CAAC,EAAE,IAAI,EAChB,OAAO,CAAC,EAAE,qBAAqB,GAC7B,oBAAoB,
|
|
1
|
+
{"version":3,"file":"use-interaction.d.ts","sourceRoot":"","sources":["../../../../src/image-editor/react/hooks/use-interaction.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAEN,KAAK,yBAAyB,EAC9B,MAAM,mCAAmC,CAAC;AAE3C;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACpC,8DAA8D;IAC9D,QAAQ,EAAE;QACT,aAAa,EAAE,CAAE,CAAC,EAAE,KAAK,CAAC,YAAY,KAAM,IAAI,CAAC;QACjD,YAAY,EAAE,CAAE,CAAC,EAAE,KAAK,CAAC,UAAU,KAAM,IAAI,CAAC;QAC9C,SAAS,EAAE,CAAE,CAAC,EAAE,KAAK,CAAC,aAAa,KAAM,IAAI,CAAC;KAC9C,CAAC;IACF,yEAAyE;IACzE,aAAa,EAAE,CAAE,CAAC,EAAE,UAAU,KAAM,IAAI,CAAC;IACzC,uDAAuD;IACvD,UAAU,EAAE,OAAO,CAAC;IACpB,0DAA0D;IAC1D,SAAS,EAAE,OAAO,CAAC;IACnB,wEAAwE;IACxE,iBAAiB,EAAE,OAAO,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACrC,gDAAgD;IAChD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gDAAgD;IAChD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kEAAkE;IAClE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qDAAqD;IACrD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,qEAAqE;IACrE,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,8DAA8D;IAC9D,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;AA6BD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,cAAc,CAC7B,KAAK,EAAE,YAAY,EACnB,OAAO,EAAE,yBAAyB,EAClC,aAAa,EAAE,IAAI,EACnB,SAAS,CAAC,EAAE,IAAI,EAChB,OAAO,CAAC,EAAE,qBAAqB,GAC7B,oBAAoB,CA8LtB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type CropperState } from '../image-editor';
|
|
2
|
-
import { type
|
|
2
|
+
import { type MediaEditorAction, type MediaEditorState } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* Pure composite reducer for the media editor.
|
|
5
5
|
*
|
|
@@ -26,11 +26,11 @@ export declare function mediaEditorReducer(state: MediaEditorState, action: Medi
|
|
|
26
26
|
*/
|
|
27
27
|
export declare function areMediaEditorStatesEqual(a: MediaEditorState, b: MediaEditorState): boolean;
|
|
28
28
|
/**
|
|
29
|
-
* Build the
|
|
29
|
+
* Build the composite state a session starts from: the given cropper
|
|
30
|
+
* slice and default crop options.
|
|
30
31
|
*
|
|
31
|
-
* @param
|
|
32
|
-
* @param initialOptions Initial cropOptions-slice fields to merge.
|
|
32
|
+
* @param cropper The cropper slice.
|
|
33
33
|
* @return Composite initial state.
|
|
34
34
|
*/
|
|
35
|
-
export declare function buildInitialMediaEditorState(
|
|
35
|
+
export declare function buildInitialMediaEditorState(cropper: CropperState): MediaEditorState;
|
|
36
36
|
//# sourceMappingURL=composite-reducer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"composite-reducer.d.ts","sourceRoot":"","sources":["../../src/state/composite-reducer.ts"],"names":[],"mappings":"AAAA,OAAO,EAIN,KAAK,YAAY,EACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,
|
|
1
|
+
{"version":3,"file":"composite-reducer.d.ts","sourceRoot":"","sources":["../../src/state/composite-reducer.ts"],"names":[],"mappings":"AAAA,OAAO,EAIN,KAAK,YAAY,EACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAGN,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,MAAM,SAAS,CAAC;AAEjB;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,kBAAkB,CACjC,KAAK,EAAE,gBAAgB,EACvB,MAAM,EAAE,iBAAiB,GACvB,gBAAgB,CAgElB;AAED;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CACxC,CAAC,EAAE,gBAAgB,EACnB,CAAC,EAAE,gBAAgB,GACjB,OAAO,CAQT;AAED;;;;;;GAMG;AACH,wBAAgB,4BAA4B,CAC3C,OAAO,EAAE,YAAY,GACnB,gBAAgB,CAKlB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { useMediaEditorState, resolveAspectRatio, } from './use-media-editor-state';
|
|
2
|
-
export type {
|
|
2
|
+
export type { MediaEditorSession } from './use-media-editor-state';
|
|
3
3
|
export { MediaEditorStateProvider, useMediaEditor, } from './media-editor-state-provider';
|
|
4
4
|
export { mediaEditorReducer, areMediaEditorStatesEqual, buildInitialMediaEditorState, } from './composite-reducer';
|
|
5
5
|
export { DEFAULT_CROP_OPTIONS } from './types';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/state/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,mBAAmB,EACnB,kBAAkB,GAClB,MAAM,0BAA0B,CAAC;AAClC,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/state/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,mBAAmB,EACnB,kBAAkB,GAClB,MAAM,0BAA0B,CAAC;AAClC,YAAY,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EACN,wBAAwB,EACxB,cAAc,GACd,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACN,kBAAkB,EAClB,yBAAyB,EACzB,4BAA4B,GAC5B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAC/C,YAAY,EACX,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,GACjB,MAAM,SAAS,CAAC"}
|
|
@@ -1,31 +1,23 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import { type MediaEditorController } from './use-media-editor-state';
|
|
3
|
-
import type { CropOptionsSlice } from './types';
|
|
1
|
+
import { type MediaEditorSession } from './use-media-editor-state';
|
|
4
2
|
interface MediaEditorStateProviderProps {
|
|
5
|
-
/** Optional cropper-slice initial state. */
|
|
6
|
-
initialCropperState?: Partial<CropperState>;
|
|
7
|
-
/** Optional cropOptions-slice initial state. */
|
|
8
|
-
initialCropOptions?: Partial<CropOptionsSlice>;
|
|
9
3
|
/** Child components. */
|
|
10
4
|
children: React.ReactNode;
|
|
11
5
|
}
|
|
12
6
|
/**
|
|
13
|
-
* Provider that vends the
|
|
14
|
-
*
|
|
15
|
-
*
|
|
7
|
+
* Provider that vends the media editor session via context. Wrap
|
|
8
|
+
* the media editor in this so every consumer (canvas, toolbar,
|
|
9
|
+
* sidebar) reads from the same store.
|
|
16
10
|
*
|
|
17
11
|
* @param props
|
|
18
|
-
* @param props.initialCropperState
|
|
19
|
-
* @param props.initialCropOptions
|
|
20
12
|
* @param props.children
|
|
21
13
|
*/
|
|
22
|
-
export declare function MediaEditorStateProvider({
|
|
14
|
+
export declare function MediaEditorStateProvider({ children, }: MediaEditorStateProviderProps): import("react").JSX.Element;
|
|
23
15
|
/**
|
|
24
|
-
* Consume the
|
|
16
|
+
* Consume the media editor session. Throws if used
|
|
25
17
|
* outside a `<MediaEditorStateProvider>`.
|
|
26
18
|
*
|
|
27
|
-
* @return The
|
|
19
|
+
* @return The media editor session.
|
|
28
20
|
*/
|
|
29
|
-
export declare function useMediaEditor():
|
|
21
|
+
export declare function useMediaEditor(): MediaEditorSession;
|
|
30
22
|
export {};
|
|
31
23
|
//# sourceMappingURL=media-editor-state-provider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"media-editor-state-provider.d.ts","sourceRoot":"","sources":["../../src/state/media-editor-state-provider.tsx"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"media-editor-state-provider.d.ts","sourceRoot":"","sources":["../../src/state/media-editor-state-provider.tsx"],"names":[],"mappings":"AACA,OAAO,EAEN,KAAK,kBAAkB,EACvB,MAAM,0BAA0B,CAAC;AAMlC,UAAU,6BAA6B;IACtC,wBAAwB;IACxB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC1B;AAED;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAE,EACzC,QAAQ,GACR,EAAE,6BAA6B,+BAQ/B;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,IAAI,kBAAkB,CAQnD"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type CropperController, type CropperState
|
|
1
|
+
import { type CropperController, type CropperState } from '../image-editor';
|
|
2
2
|
import type { CropOptionsSlice } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* Resolve an aspect-ratio preset value (the string the dropdown
|
|
@@ -18,13 +18,23 @@ import type { CropOptionsSlice } from './types';
|
|
|
18
18
|
*/
|
|
19
19
|
export declare function resolveAspectRatio(presetKey: string, cropperImage: CropperState['image'] | null): number | undefined;
|
|
20
20
|
/**
|
|
21
|
-
* The
|
|
21
|
+
* The media editor session exposed by `useMediaEditorState`.
|
|
22
22
|
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
23
|
+
* The session owns what is being edited and how: the source image,
|
|
24
|
+
* every editing slice, the shared undo/redo history, gesture
|
|
25
|
+
* boundaries, and whether the edits change the saved image. The
|
|
26
|
+
* cropper is one participant in the session — `cropper` is a
|
|
27
|
+
* geometry-only controller that a `<Cropper>` takes via its
|
|
28
|
+
* `controller` prop — rather than the session itself.
|
|
26
29
|
*/
|
|
27
|
-
export interface
|
|
30
|
+
export interface MediaEditorSession {
|
|
31
|
+
/**
|
|
32
|
+
* Geometry controller for the cropper slice. Its setters record
|
|
33
|
+
* history in the session; its `isDirty` covers geometry only.
|
|
34
|
+
* Its `setImage` is `setSourceImage`, so the `<Cropper>` reporting
|
|
35
|
+
* a newly loaded image starts a fresh session.
|
|
36
|
+
*/
|
|
37
|
+
cropper: CropperController;
|
|
28
38
|
/** The cropOptions slice. */
|
|
29
39
|
cropOptions: CropOptionsSlice;
|
|
30
40
|
/** Set the aspect-ratio preset. Atomic with the cropRect reshape. */
|
|
@@ -32,9 +42,22 @@ export interface MediaEditorController extends CropperController {
|
|
|
32
42
|
/** Reset cropOptions to defaults. */
|
|
33
43
|
resetCropOptions: () => void;
|
|
34
44
|
/**
|
|
35
|
-
*
|
|
45
|
+
* Replace the image being edited. A different image starts a
|
|
46
|
+
* fresh session: default geometry and crop options, a clean
|
|
47
|
+
* baseline, and no history. Reporting the same image again is a
|
|
48
|
+
* no-op.
|
|
49
|
+
*/
|
|
50
|
+
setSourceImage: (image: CropperState['image']) => void;
|
|
51
|
+
/**
|
|
52
|
+
* Whether anything in the session differs from its baseline,
|
|
53
|
+
* including editor-only state such as the aspect-ratio preset.
|
|
54
|
+
*/
|
|
55
|
+
isDirty: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Whether the edits change the saved image, so saving has to
|
|
58
|
+
* produce new image output rather than only metadata.
|
|
36
59
|
*/
|
|
37
|
-
|
|
60
|
+
hasOutputEdits: boolean;
|
|
38
61
|
/** Whether there's an undoable change in history. */
|
|
39
62
|
hasUndo: boolean;
|
|
40
63
|
/** Whether there's a redoable change in history. */
|
|
@@ -51,25 +74,9 @@ export interface MediaEditorController extends CropperController {
|
|
|
51
74
|
beginGesture: () => void;
|
|
52
75
|
/** Close a gesture boundary and commit the pre-gesture snapshot. */
|
|
53
76
|
endGesture: () => void;
|
|
54
|
-
/**
|
|
55
|
-
* Report the current rendered image size to the controller. The
|
|
56
|
-
* Cropper component calls this whenever its visualSize changes;
|
|
57
|
-
* the controller needs it to compute aspect-ratio reshapes.
|
|
58
|
-
*/
|
|
59
|
-
setVisualSize: (size: Size) => void;
|
|
60
|
-
/**
|
|
61
|
-
* Reshape the cropRect in response to a viewport change. Behaves
|
|
62
|
-
* like `setCropRect` but does NOT record an undo entry — window
|
|
63
|
-
* resizes aren't editor actions.
|
|
64
|
-
*/
|
|
65
|
-
adjustCropRectForViewport: (rect: NormalizedRect) => void;
|
|
66
|
-
}
|
|
67
|
-
interface InitialMediaEditorState {
|
|
68
|
-
cropper?: Partial<CropperState>;
|
|
69
|
-
cropOptions?: Partial<CropOptionsSlice>;
|
|
70
77
|
}
|
|
71
78
|
/**
|
|
72
|
-
*
|
|
79
|
+
* The media editor session.
|
|
73
80
|
*
|
|
74
81
|
* Owns the only undo/redo history for the editor. Cropper geometry
|
|
75
82
|
* actions and sidebar cropOptions actions flow through the same
|
|
@@ -87,12 +94,12 @@ interface InitialMediaEditorState {
|
|
|
87
94
|
* undo entries.
|
|
88
95
|
*
|
|
89
96
|
* `isDirty` tracks the full editor session, including undoable UI
|
|
90
|
-
* state. Use `
|
|
97
|
+
* state. Use `hasOutputEdits` when deciding whether the image output
|
|
91
98
|
* needs saving.
|
|
92
99
|
*
|
|
93
|
-
*
|
|
94
|
-
*
|
|
100
|
+
* The session starts empty. Call `setSourceImage` to load an image.
|
|
101
|
+
*
|
|
102
|
+
* @return The media editor session.
|
|
95
103
|
*/
|
|
96
|
-
export declare function useMediaEditorState(
|
|
97
|
-
export {};
|
|
104
|
+
export declare function useMediaEditorState(): MediaEditorSession;
|
|
98
105
|
//# sourceMappingURL=use-media-editor-state.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-media-editor-state.d.ts","sourceRoot":"","sources":["../../src/state/use-media-editor-state.ts"],"names":[],"mappings":"AAOA,OAAO,EAQN,KAAK,iBAAiB,EACtB,KAAK,YAAY,
|
|
1
|
+
{"version":3,"file":"use-media-editor-state.d.ts","sourceRoot":"","sources":["../../src/state/use-media-editor-state.ts"],"names":[],"mappings":"AAOA,OAAO,EAQN,KAAK,iBAAiB,EACtB,KAAK,YAAY,EAGjB,MAAM,iBAAiB,CAAC;AAMzB,OAAO,KAAK,EACX,gBAAgB,EAGhB,MAAM,SAAS,CAAC;AAEjB;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,kBAAkB,CACjC,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,YAAY,CAAE,OAAO,CAAE,GAAG,IAAI,GAC1C,MAAM,GAAG,SAAS,CAmBpB;AAaD;;;;;;;;;GASG;AACH,MAAM,WAAW,kBAAkB;IAClC;;;;;OAKG;IACH,OAAO,EAAE,iBAAiB,CAAC;IAC3B,6BAA6B;IAC7B,WAAW,EAAE,gBAAgB,CAAC;IAC9B,qEAAqE;IACrE,mBAAmB,EAAE,CAAE,SAAS,EAAE,MAAM,KAAM,IAAI,CAAC;IACnD,qCAAqC;IACrC,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B;;;;;OAKG;IACH,cAAc,EAAE,CAAE,KAAK,EAAE,YAAY,CAAE,OAAO,CAAE,KAAM,IAAI,CAAC;IAC3D;;;OAGG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,cAAc,EAAE,OAAO,CAAC;IACxB,qDAAqD;IACrD,OAAO,EAAE,OAAO,CAAC;IACjB,oDAAoD;IACpD,OAAO,EAAE,OAAO,CAAC;IACjB,wDAAwD;IACxD,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,qDAAqD;IACrD,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB;;;;OAIG;IACH,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,oEAAoE;IACpE,UAAU,EAAE,MAAM,IAAI,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,mBAAmB,IAAI,kBAAkB,CAoTxD"}
|
|
@@ -14,12 +14,20 @@ export interface MediaEditorModalUpdate {
|
|
|
14
14
|
interface OpenMediaEditorModalArgs {
|
|
15
15
|
id: number;
|
|
16
16
|
onUpdate?: (updated: MediaEditorModalUpdate) => void;
|
|
17
|
+
/**
|
|
18
|
+
* Restore the caller's state after a saved attachment change. May run
|
|
19
|
+
* before an asynchronous `onUpdate` finishes; the caller should cancel
|
|
20
|
+
* that update. Without this callback, Undo calls `onUpdate` with the
|
|
21
|
+
* previous attachment's id and URL.
|
|
22
|
+
*/
|
|
23
|
+
onUndo?: () => void;
|
|
17
24
|
onClose?: () => void;
|
|
18
25
|
}
|
|
19
|
-
export declare function openMediaEditorModal({ id, onUpdate, onClose, }: OpenMediaEditorModalArgs): {
|
|
26
|
+
export declare function openMediaEditorModal({ id, onUpdate, onUndo, onClose, }: OpenMediaEditorModalArgs): {
|
|
20
27
|
type: 'OPEN_MEDIA_EDITOR_MODAL';
|
|
21
28
|
id: number;
|
|
22
29
|
onUpdate: ((updated: MediaEditorModalUpdate) => void) | null;
|
|
30
|
+
onUndo: (() => void) | null;
|
|
23
31
|
onClose: (() => void) | null;
|
|
24
32
|
};
|
|
25
33
|
export declare function closeMediaEditorModal(): {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/store/actions.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,WAAW,sBAAsB;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,CAAC,EAAE,MAAM,CAAC;CACb;AAED,UAAU,wBAAwB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE,CAAE,OAAO,EAAE,sBAAsB,KAAM,IAAI,CAAC;IACvD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,wBAAgB,oBAAoB,CAAE,EACrC,EAAE,EACF,QAAQ,EACR,OAAO,GACP,EAAE,wBAAwB;UAEnB,yBAAyB;;
|
|
1
|
+
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/store/actions.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,WAAW,sBAAsB;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,CAAC,EAAE,MAAM,CAAC;CACb;AAED,UAAU,wBAAwB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE,CAAE,OAAO,EAAE,sBAAsB,KAAM,IAAI,CAAC;IACvD;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,wBAAgB,oBAAoB,CAAE,EACrC,EAAE,EACF,QAAQ,EACR,MAAM,EACN,OAAO,GACP,EAAE,wBAAwB;UAEnB,yBAAyB;;yBAlBV,sBAAsB,KAAM,IAAI;mBAOvC,IAAI;oBACH,IAAI;EAgBpB;AAED,wBAAgB,qBAAqB;IAC3B,IAAI,EAAE,0BAA0B;EACzC"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import type { MediaEditorModalUpdate } from './actions';
|
|
2
2
|
type OnUpdateCallback = (updated: MediaEditorModalUpdate) => void;
|
|
3
|
+
type OnUndoCallback = () => void;
|
|
3
4
|
type OnCloseCallback = () => void;
|
|
4
5
|
export interface State {
|
|
5
6
|
isOpen: boolean;
|
|
6
7
|
id: number | null;
|
|
7
8
|
onUpdate: OnUpdateCallback | null;
|
|
9
|
+
onUndo: OnUndoCallback | null;
|
|
8
10
|
onClose: OnCloseCallback | null;
|
|
9
11
|
}
|
|
10
12
|
export declare const DEFAULT_STATE: State;
|
|
@@ -12,6 +14,7 @@ type Action = {
|
|
|
12
14
|
type: 'OPEN_MEDIA_EDITOR_MODAL';
|
|
13
15
|
id: number;
|
|
14
16
|
onUpdate: OnUpdateCallback | null;
|
|
17
|
+
onUndo: OnUndoCallback | null;
|
|
15
18
|
onClose: OnCloseCallback | null;
|
|
16
19
|
} | {
|
|
17
20
|
type: 'CLOSE_MEDIA_EDITOR_MODAL';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reducer.d.ts","sourceRoot":"","sources":["../../src/store/reducer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AAExD,KAAK,gBAAgB,GAAG,CAAE,OAAO,EAAE,sBAAsB,KAAM,IAAI,CAAC;AACpE,KAAK,eAAe,GAAG,MAAM,IAAI,CAAC;AAElC,MAAM,WAAW,KAAK;IACrB,MAAM,EAAE,OAAO,CAAC;IAChB,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAClB,QAAQ,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAClC,OAAO,EAAE,eAAe,GAAG,IAAI,CAAC;CAChC;AAED,eAAO,MAAM,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"reducer.d.ts","sourceRoot":"","sources":["../../src/store/reducer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AAExD,KAAK,gBAAgB,GAAG,CAAE,OAAO,EAAE,sBAAsB,KAAM,IAAI,CAAC;AACpE,KAAK,cAAc,GAAG,MAAM,IAAI,CAAC;AACjC,KAAK,eAAe,GAAG,MAAM,IAAI,CAAC;AAElC,MAAM,WAAW,KAAK;IACrB,MAAM,EAAE,OAAO,CAAC;IAChB,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAClB,QAAQ,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAClC,MAAM,EAAE,cAAc,GAAG,IAAI,CAAC;IAC9B,OAAO,EAAE,eAAe,GAAG,IAAI,CAAC;CAChC;AAED,eAAO,MAAM,aAAa,EAAE,KAM3B,CAAC;AAEF,KAAK,MAAM,GACR;IACA,IAAI,EAAE,yBAAyB,CAAC;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAClC,MAAM,EAAE,cAAc,GAAG,IAAI,CAAC;IAC9B,OAAO,EAAE,eAAe,GAAG,IAAI,CAAC;CAC/B,GACD;IAAE,IAAI,EAAE,0BAA0B,CAAA;CAAE,CAAC;AAExC,MAAM,CAAC,OAAO,UAAU,OAAO,CAC9B,KAAK,EAAE,KAAK,YAAgB,EAC5B,MAAM,EAAE,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAC/B,KAAK,CAmBP"}
|
|
@@ -2,5 +2,6 @@ import type { State } from './reducer';
|
|
|
2
2
|
export declare function isOpen(state: State): boolean;
|
|
3
3
|
export declare function getId(state: State): number | null;
|
|
4
4
|
export declare function getOnUpdate(state: State): ((updated: import("./actions").MediaEditorModalUpdate) => void) | null;
|
|
5
|
+
export declare function getOnUndo(state: State): (() => void) | null;
|
|
5
6
|
export declare function getOnClose(state: State): (() => void) | null;
|
|
6
7
|
//# sourceMappingURL=selectors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selectors.d.ts","sourceRoot":"","sources":["../../src/store/selectors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAEvC,wBAAgB,MAAM,CAAE,KAAK,EAAE,KAAK,GAAI,OAAO,CAE9C;AAED,wBAAgB,KAAK,CAAE,KAAK,EAAE,KAAK,GAAI,MAAM,GAAG,IAAI,CAEnD;AAED,wBAAgB,WAAW,CAAE,KAAK,EAAE,KAAK,0EAExC;AAED,wBAAgB,UAAU,CAAE,KAAK,EAAE,KAAK,uBAEvC"}
|
|
1
|
+
{"version":3,"file":"selectors.d.ts","sourceRoot":"","sources":["../../src/store/selectors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAEvC,wBAAgB,MAAM,CAAE,KAAK,EAAE,KAAK,GAAI,OAAO,CAE9C;AAED,wBAAgB,KAAK,CAAE,KAAK,EAAE,KAAK,GAAI,MAAM,GAAG,IAAI,CAEnD;AAED,wBAAgB,WAAW,CAAE,KAAK,EAAE,KAAK,0EAExC;AAED,wBAAgB,SAAS,CAAE,KAAK,EAAE,KAAK,uBAEtC;AAED,wBAAgB,UAAU,CAAE,KAAK,EAAE,KAAK,uBAEvC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/media-editor",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.20.0",
|
|
4
4
|
"description": "Media editor components for WordPress.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -42,46 +42,51 @@
|
|
|
42
42
|
"build-module/store/index.mjs"
|
|
43
43
|
],
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@wordpress/a11y": "^4.
|
|
46
|
-
"@wordpress/admin-ui": "^2.
|
|
47
|
-
"@wordpress/api-fetch": "^7.
|
|
48
|
-
"@wordpress/base-styles": "^13.
|
|
49
|
-
"@wordpress/components": "^
|
|
50
|
-
"@wordpress/compose": "^8.
|
|
51
|
-
"@wordpress/core-data": "^8.
|
|
52
|
-
"@wordpress/data": "^10.
|
|
53
|
-
"@wordpress/dataviews": "^
|
|
54
|
-
"@wordpress/element": "^
|
|
55
|
-
"@wordpress/i18n": "^6.
|
|
56
|
-
"@wordpress/icons": "^
|
|
57
|
-
"@wordpress/keyboard-shortcuts": "^5.
|
|
58
|
-
"@wordpress/keycodes": "^4.
|
|
59
|
-
"@wordpress/notices": "^5.
|
|
60
|
-
"@wordpress/private-apis": "^
|
|
61
|
-
"@wordpress/ui": "^0.
|
|
45
|
+
"@wordpress/a11y": "^4.57.0",
|
|
46
|
+
"@wordpress/admin-ui": "^2.12.0",
|
|
47
|
+
"@wordpress/api-fetch": "^7.57.0",
|
|
48
|
+
"@wordpress/base-styles": "^13.3.0",
|
|
49
|
+
"@wordpress/components": "^42.0.0",
|
|
50
|
+
"@wordpress/compose": "^8.10.0",
|
|
51
|
+
"@wordpress/core-data": "^8.2.0",
|
|
52
|
+
"@wordpress/data": "^10.57.0",
|
|
53
|
+
"@wordpress/dataviews": "^20.0.0",
|
|
54
|
+
"@wordpress/element": "^9.0.0",
|
|
55
|
+
"@wordpress/i18n": "^6.30.0",
|
|
56
|
+
"@wordpress/icons": "^18.0.0",
|
|
57
|
+
"@wordpress/keyboard-shortcuts": "^5.57.0",
|
|
58
|
+
"@wordpress/keycodes": "^4.57.0",
|
|
59
|
+
"@wordpress/notices": "^5.57.0",
|
|
60
|
+
"@wordpress/private-apis": "^2.0.0",
|
|
61
|
+
"@wordpress/ui": "^0.24.0",
|
|
62
62
|
"clsx": "^2.1.1",
|
|
63
63
|
"gl-matrix": "^3.4.3"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
|
-
"@storybook/react-vite": "^10.
|
|
66
|
+
"@storybook/react-vite": "^10.6.1",
|
|
67
67
|
"@testing-library/dom": "^10.4.2",
|
|
68
68
|
"@testing-library/jest-dom": "^7.0.1",
|
|
69
69
|
"@testing-library/react": "^16.3.3",
|
|
70
70
|
"@testing-library/user-event": "^14.6.1",
|
|
71
|
-
"vitest": "^5.0.
|
|
71
|
+
"vitest": "^5.0.3",
|
|
72
72
|
"vitest-browser-react": "^2.3.0"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
75
75
|
"@types/react": "^18 || ^19",
|
|
76
|
-
"react": "^18 || ^19"
|
|
76
|
+
"@types/react-dom": "^18 || ^19",
|
|
77
|
+
"react": "^18 || ^19",
|
|
78
|
+
"react-dom": "^18 || ^19"
|
|
77
79
|
},
|
|
78
80
|
"peerDependenciesMeta": {
|
|
79
81
|
"@types/react": {
|
|
80
82
|
"optional": true
|
|
83
|
+
},
|
|
84
|
+
"@types/react-dom": {
|
|
85
|
+
"optional": true
|
|
81
86
|
}
|
|
82
87
|
},
|
|
83
88
|
"publishConfig": {
|
|
84
89
|
"access": "public"
|
|
85
90
|
},
|
|
86
|
-
"gitHead": "
|
|
91
|
+
"gitHead": "12441e2520c78b2254a792a8cba40c34110be060"
|
|
87
92
|
}
|