@wordpress/media-editor 0.17.0 → 0.17.2-next.v.202609031004.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/CHANGELOG.md +10 -1
  2. package/build/components/media-editor/index.cjs +152 -133
  3. package/build/components/media-editor/index.cjs.map +3 -3
  4. package/build/components/media-editor-crop-panel/index.cjs +2 -3
  5. package/build/components/media-editor-crop-panel/index.cjs.map +2 -2
  6. package/build/components/media-editor-modal/index.cjs +7 -21
  7. package/build/components/media-editor-modal/index.cjs.map +2 -2
  8. package/build-module/components/media-editor/index.mjs +154 -140
  9. package/build-module/components/media-editor/index.mjs.map +2 -2
  10. package/build-module/components/media-editor-crop-panel/index.mjs +2 -3
  11. package/build-module/components/media-editor-crop-panel/index.mjs.map +2 -2
  12. package/build-module/components/media-editor-modal/index.mjs +9 -23
  13. package/build-module/components/media-editor-modal/index.mjs.map +2 -2
  14. package/build-style/style-rtl.css +66 -106
  15. package/build-style/style.css +66 -106
  16. package/build-types/components/media-editor/index.d.ts +7 -14
  17. package/build-types/components/media-editor/index.d.ts.map +1 -1
  18. package/build-types/components/media-editor-crop-panel/index.d.ts +4 -11
  19. package/build-types/components/media-editor-crop-panel/index.d.ts.map +1 -1
  20. package/build-types/components/media-editor-modal/index.d.ts.map +1 -1
  21. package/package.json +21 -21
  22. package/src/components/media-editor/index.tsx +276 -200
  23. package/src/components/media-editor/style.scss +136 -134
  24. package/src/components/media-editor-crop-panel/index.tsx +4 -12
  25. package/src/components/media-editor-crop-panel/test/{index.tsx → index.jsdom.test.tsx} +2 -10
  26. package/src/components/media-editor-modal/index.tsx +9 -29
  27. package/src/components/media-editor-modal/style.scss +8 -49
  28. package/src/components/media-editor-modal/test/build-modifiers.test.ts +24 -14
  29. package/src/components/rotation-ruler/style.scss +1 -1
  30. package/src/image-editor/core/math/test/sanitize.ts +1 -0
  31. package/src/image-editor/core/test/camera.ts +2 -3
  32. package/src/image-editor/core/test/interaction-controller.ts +50 -40
  33. package/src/image-editor/core/test/preview-export-parity.ts +31 -23
  34. package/src/image-editor/core/test/render-camera-bridge.ts +1 -0
  35. package/src/image-editor/core/test/state.ts +1 -0
  36. package/src/image-editor/core/test/stencil-math.ts +1 -0
  37. package/src/image-editor/core/transforms/test/pipeline.ts +1 -0
  38. package/src/store/test/reducer.ts +9 -8
  39. package/tsconfig.build.json +1 -1
  40. package/tsconfig.build.tsbuildinfo +1 -1
  41. package/tsconfig.json +3 -3
  42. /package/src/components/media-editor/test/{use-crop-options.tsx → use-crop-options.jsdom.test.tsx} +0 -0
  43. /package/src/components/media-editor-image-controls/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  44. /package/src/components/media-editor-modal/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  45. /package/src/components/rotation-ruler/test/{index.tsx → index.jsdom.test.tsx} +0 -0
  46. /package/src/image-editor/core/export/test/{canvas-renderer.ts → canvas-renderer.jsdom.test.ts} +0 -0
  47. /package/src/image-editor/react/components/stencils/test/{rectangle-stencil.tsx → rectangle-stencil.jsdom.test.tsx} +0 -0
  48. /package/src/image-editor/react/components/test/{cropper.tsx → cropper.jsdom.test.tsx} +0 -0
  49. /package/src/image-editor/react/hooks/test/{use-aria-announcer.ts → use-aria-announcer.jsdom.test.ts} +0 -0
  50. /package/src/image-editor/react/hooks/test/{use-cropper-reducer.ts → use-cropper-reducer.jsdom.test.ts} +0 -0
  51. /package/src/image-editor/react/hooks/test/{use-interaction.ts → use-interaction.jsdom.test.ts} +0 -0
  52. /package/src/image-editor/react/hooks/test/{use-transform-style.ts → use-transform-style.jsdom.test.ts} +0 -0
  53. /package/src/state/test/{use-media-editor-state.ts → use-media-editor-state.jsdom.test.ts} +0 -0
@@ -65,8 +65,7 @@
65
65
  .media-editor-preview--image img {
66
66
  max-width: 100%;
67
67
  max-height: 100%;
68
- -o-object-fit: contain;
69
- object-fit: contain;
68
+ object-fit: contain;
70
69
  width: auto;
71
70
  height: auto;
72
71
  opacity: 0;
@@ -88,8 +87,7 @@
88
87
  .media-editor-preview--video video {
89
88
  max-width: 100%;
90
89
  max-height: 100%;
91
- -o-object-fit: contain;
92
- object-fit: contain;
90
+ object-fit: contain;
93
91
  width: auto;
94
92
  height: auto;
95
93
  }
@@ -135,7 +133,6 @@
135
133
  height: 100%;
136
134
  touch-action: none;
137
135
  -webkit-user-select: none;
138
- -moz-user-select: none;
139
136
  user-select: none;
140
137
  cursor: grab;
141
138
  }
@@ -236,9 +233,7 @@
236
233
  box-shadow: 0 0 0 1px var(--wp-image-editor-focus-color, var(--wp-admin-theme-color, #007cba));
237
234
  }
238
235
  .wp-media-editor-image-editor__handle {
239
- -webkit-appearance: none;
240
- -moz-appearance: none;
241
- appearance: none;
236
+ appearance: none;
242
237
  margin: 0;
243
238
  padding: 0;
244
239
  font: inherit;
@@ -381,41 +376,47 @@
381
376
  align-items: center;
382
377
  justify-content: center;
383
378
  }
384
- .media-editor .interface-interface-skeleton {
385
- position: relative;
386
- top: auto;
387
- right: auto;
388
- bottom: auto;
389
- left: auto;
390
- height: 100%;
391
- max-height: none;
392
- flex: 1;
393
- flex-direction: column;
394
- }
395
- .media-editor-modal .media-editor .interface-interface-skeleton.interface-interface-skeleton {
396
- top: auto;
397
- }
398
- .media-editor .interface-interface-skeleton__editor {
399
- min-width: 0;
379
+ .media-editor .media-editor__body {
380
+ container-type: inline-size;
381
+ container-name: media-editor-body;
382
+ display: flex;
400
383
  flex: 1;
384
+ min-height: 0;
401
385
  }
402
386
  .media-editor .media-editor__content {
403
387
  display: flex;
404
388
  flex: 1;
405
389
  flex-direction: column;
390
+ min-width: 0;
406
391
  min-height: 0;
407
- margin: 0 24px;
408
- border-radius: 8px;
409
- overflow: hidden;
392
+ margin: 24px 24px 8px 24px;
393
+ }
394
+ @media (min-width: 600px) {
395
+ .media-editor .media-editor__content {
396
+ margin: 0 24px;
397
+ }
398
+ }
399
+ @container media-editor-body (min-width: 864px) {
400
+ .media-editor .media-editor__content {
401
+ min-width: 520px;
402
+ }
410
403
  }
411
404
  .media-editor .media-editor__canvas-toolbar {
412
405
  display: flex;
413
- flex-shrink: 0;
406
+ flex: 0 0 auto;
407
+ flex-direction: column;
408
+ align-items: center;
409
+ gap: 12px;
410
+ }
411
+ .media-editor .media-editor__canvas-toolbar .media-editor-fine-rotation {
412
+ display: flex;
414
413
  justify-content: center;
414
+ align-self: stretch;
415
415
  background: #e0e0e0;
416
+ border-radius: 0 0 8px 8px;
416
417
  padding: 8px 16px;
417
418
  }
418
- .media-editor .media-editor__canvas-toolbar .media-editor-fine-rotation {
419
+ .media-editor .media-editor__canvas-toolbar .media-editor-fine-rotation .rotation-ruler {
419
420
  flex: 0 1 360px;
420
421
  min-width: 0;
421
422
  }
@@ -424,6 +425,7 @@
424
425
  align-items: center;
425
426
  justify-content: center;
426
427
  background: #e0e0e0;
428
+ border-radius: 8px;
427
429
  overflow: auto;
428
430
  flex: 1;
429
431
  min-height: 0;
@@ -435,73 +437,52 @@
435
437
  .media-editor .media-editor__canvas-area video {
436
438
  max-width: 100%;
437
439
  max-height: 100%;
438
- -o-object-fit: contain;
439
- object-fit: contain;
440
+ object-fit: contain;
440
441
  }
441
442
  .media-editor .media-editor__sidebar {
442
- box-sizing: border-box;
443
- }
444
- .media-editor .media-editor__sidebar *,
445
- .media-editor .media-editor__sidebar *::before,
446
- .media-editor .media-editor__sidebar *::after {
447
- box-sizing: inherit;
443
+ display: flex;
444
+ flex: 1;
445
+ flex-direction: column;
446
+ min-width: 0;
447
+ min-height: 0;
448
+ overflow: hidden;
448
449
  }
449
450
  @media (min-width: 600px) {
450
451
  .media-editor .media-editor__sidebar {
451
- padding-inline: 8px;
452
+ flex: none;
453
+ width: var(--wpds-dimension-surface-width-sm, 320px);
452
454
  }
453
455
  }
454
- .media-editor .media-editor__sidebar-panel {
455
- padding-bottom: 24px;
456
+ .media-editor .media-editor__tabs {
457
+ display: flex;
458
+ flex: 1;
459
+ flex-direction: column;
460
+ min-height: 0;
456
461
  }
457
- .media-editor .interface-interface-skeleton__sidebar {
458
- border-top: 0;
459
- box-shadow: none;
460
- outline: 1px solid transparent;
462
+ .media-editor .media-editor__tablist {
463
+ flex-shrink: 0;
464
+ margin-inline: 24px;
465
+ background: #fff;
466
+ border-bottom: 1px solid #ddd;
461
467
  }
462
468
  .media-editor .media-editor__panel {
463
- padding: 16px;
464
- }
465
- @media (min-width: 600px) {
466
- .media-editor .media-editor__panel {
467
- padding: 24px 24px 0 0;
468
- }
469
- }
470
- .media-editor .components-panel__header.media-editor__sidebar-header {
471
- padding-left: 0;
472
- padding-right: 8px;
473
- margin-right: 24px;
474
- margin-right: 0;
469
+ flex: 1;
470
+ min-height: 0;
471
+ overflow-y: auto;
472
+ padding-block: 24px;
473
+ padding-inline: 24px;
475
474
  }
476
- @media (min-width: 600px) {
477
- .media-editor .components-panel__header.media-editor__sidebar-header {
478
- margin-right: 24px;
479
- }
475
+ .media-editor .media-editor__content:has(.media-editor-fine-rotation) .media-editor__canvas-area {
476
+ border-end-start-radius: 0;
477
+ border-end-end-radius: 0;
480
478
  }
481
- .media-editor .components-panel__header.media-editor__sidebar-header .components-button.has-icon {
482
- padding: 0;
479
+ .media-editor .media-editor__body.has-panel-open .media-editor__content {
480
+ display: none;
483
481
  }
484
482
  @media (min-width: 600px) {
485
- .media-editor .components-panel__header.media-editor__sidebar-header .components-button.has-icon {
483
+ .media-editor .media-editor__body.has-panel-open .media-editor__content {
486
484
  display: flex;
487
- }
488
- }
489
- @media (min-width: 600px) and (max-width: 781px) {
490
- .media-editor .interface-interface-skeleton__sidebar:has(.interface-complementary-area__fill) {
491
- position: relative !important;
492
- }
493
- .media-editor .interface-complementary-area__fill,
494
- .media-editor .interface-complementary-area {
495
- width: 280px !important;
496
- }
497
- }
498
- @media (max-width: 599px) {
499
- .media-editor .interface-interface-skeleton__sidebar:has(.interface-complementary-area__fill) {
500
- width: 100%;
501
- }
502
- .media-editor .interface-complementary-area__fill,
503
- .media-editor .interface-complementary-area {
504
- width: 100% !important;
485
+ margin: 0 0 0 24px;
505
486
  }
506
487
  }
507
488
 
@@ -542,33 +523,13 @@
542
523
  .media-editor-modal.components-modal__frame .media-editor-modal__footer {
543
524
  flex-shrink: 0;
544
525
  display: flex;
545
- gap: 16px;
546
- padding: 16px 32px 24px;
547
- background: #fff;
548
- z-index: 1000001;
549
- }
550
- .media-editor-modal.components-modal__frame .media-editor-modal__footer.is-wide {
551
526
  flex-direction: row;
552
527
  align-items: center;
553
- }
554
- .media-editor-modal.components-modal__frame .media-editor-modal__footer.is-wide .media-editor__save-actions {
555
- margin-left: auto;
556
- }
557
- .media-editor-modal.components-modal__frame .media-editor-modal__footer.is-narrow {
558
- flex-direction: column;
559
- }
560
- .media-editor-modal.components-modal__frame .media-editor-modal__footer.is-narrow > .media-editor-image-controls {
561
- align-self: center;
562
- }
563
-
564
- .media-editor-modal__footer-row {
565
- display: flex;
566
- flex-wrap: wrap;
567
- align-items: center;
568
528
  gap: 16px;
529
+ padding: 24px;
530
+ background: #fff;
569
531
  }
570
- .media-editor-modal__footer-row .media-editor-image-controls,
571
- .media-editor-modal__footer-row .media-editor__save-actions {
532
+ .media-editor-modal.components-modal__frame .media-editor-modal__footer .media-editor__save-actions {
572
533
  margin-left: auto;
573
534
  }
574
535
 
@@ -728,7 +689,6 @@
728
689
  color: #1e1e1e;
729
690
  font-family: -apple-system, system-ui, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
730
691
  -webkit-user-select: none;
731
- -moz-user-select: none;
732
692
  user-select: none;
733
693
  touch-action: none;
734
694
  cursor: ew-resize;
@@ -752,7 +712,7 @@
752
712
  margin: -1px;
753
713
  padding: 0;
754
714
  border: 0;
755
- clip: rect(0 0 0 0);
715
+ clip-path: inset(50%);
756
716
  overflow: hidden;
757
717
  white-space: nowrap;
758
718
  }
@@ -13,6 +13,13 @@ export interface MediaEditorFrameProps {
13
13
  * all.
14
14
  */
15
15
  isImage: boolean;
16
+ /**
17
+ * `narrow` below the `small` breakpoint, where the frame's header has no
18
+ * room for the history cluster beside its other controls. A frame uses
19
+ * this to place that cluster, not to decide whether it renders —
20
+ * `HistoryActions` returns nothing on its own when the canvas is off
21
+ * screen.
22
+ */
16
23
  layout: 'wide' | 'narrow';
17
24
  onRequestClose: () => void;
18
25
  onKeyDown: (event: ReactKeyboardEvent<HTMLElement>) => void;
@@ -31,18 +38,6 @@ export interface MediaEditorProps {
31
38
  noticesClassName?: string;
32
39
  noticesPortalElement?: Element | null;
33
40
  shouldCloseOnEsc?: boolean;
34
- /**
35
- * The `@wordpress/interface` scope for the details sidebar and its pinned
36
- * items. Frames should pass a distinct scope so that sidebar visibility —
37
- * which is persisted per scope to user meta — is remembered separately for
38
- * each surface. The modal is a transient surface where a collapsed sidebar
39
- * is a reasonable choice; the full-screen route is one where the sidebar is
40
- * the primary metadata surface and should open by default. Sharing a scope
41
- * would let a choice made in one decide the other's starting state.
42
- *
43
- * @default 'media-editor'
44
- */
45
- scope?: string;
46
41
  }
47
42
  export interface HeaderActionsProps {
48
43
  /**
@@ -65,13 +60,11 @@ export interface SaveActionsProps {
65
60
  size?: 'default' | 'compact';
66
61
  }
67
62
  declare function SaveActions({ size }: SaveActionsProps): import("react").JSX.Element;
68
- declare function ImageControls(): import("react").JSX.Element | null;
69
63
  export declare function MediaEditor(props: MediaEditorProps): import("react").JSX.Element;
70
64
  export declare namespace MediaEditor {
71
65
  export { HeaderActions };
72
66
  export { HistoryActions };
73
67
  export { SaveActions };
74
- export { ImageControls };
75
68
  }
76
69
  export default MediaEditor;
77
70
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/media-editor/index.tsx"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAOlD,OAAO,KAAK,EAAE,aAAa,IAAI,kBAAkB,EAAE,SAAS,EAAE,MAAM,OAA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AAC;IACpB,QAAQ,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,gBAAgB;IAChC,MAAM,CAAC,EAAE,KAAK,CAAE,KAAK,CAAE,EAAE,CAAC;IAC1B,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,WAAW,EAAE,CAAE,KAAK,EAAE,qBAAqB,KAAM,GAAG,CAAC,OAAO,CAAC;IAC7D,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,oBAAoB,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IACtC,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC3B;AA8GD,MAAM,WAAW,kBAAkB;IAClC;;;;;OAKG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,iBAAS,aAAa,CAAE,EAAE,eAAuB,EAAE,EAAE,kBAAkB,+BAoDtE;AAED,iBAAS,cAAc,uCAmFtB;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;AAoaD,wBAAgB,WAAW,CAAE,KAAK,EAAE,gBAAgB,+BAMnD;yBANe,WAAW;;;;;eAeZ,WAAW"}
@@ -10,22 +10,15 @@ export interface MediaEditorCropPanelProps {
10
10
  onAspectRatioChange: (value: string) => void;
11
11
  /** Aspect-ratio presets to display in the selector. */
12
12
  aspectRatioOptions: AspectRatioPreset[];
13
- /**
14
- * When `true`, render the rotate/flip/zoom image controls at the top of
15
- * the panel. Used on wide viewports where the footer no longer carries
16
- * them.
17
- */
18
- showTransformControls?: boolean;
19
13
  }
20
14
  /**
21
- * Sidebar panel for crop controls. Renders the aspect-ratio selector, plus the
22
- * rotate/flip and zoom controls on wide viewports (these move to the footer
23
- * toolbar when the sidebar collapses).
15
+ * Sidebar panel for crop controls: rotate, flip and zoom above the
16
+ * aspect-ratio selector. Rendered where the panel docks; below that the
17
+ * transform controls sit under the canvas instead, placed by the editor.
24
18
  * @param props
25
19
  * @param props.aspectRatioValue
26
20
  * @param props.onAspectRatioChange
27
21
  * @param props.aspectRatioOptions
28
- * @param props.showTransformControls
29
22
  */
30
- export default function MediaEditorCropPanel({ aspectRatioValue, onAspectRatioChange, aspectRatioOptions, showTransformControls, }: MediaEditorCropPanelProps): import("react").JSX.Element;
23
+ export default function MediaEditorCropPanel({ aspectRatioValue, onAspectRatioChange, aspectRatioOptions, }: MediaEditorCropPanelProps): import("react").JSX.Element;
31
24
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/media-editor-crop-panel/index.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAE3E,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;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED;;;;;;;;;GASG;AACH,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAE,EAC7C,gBAAgB,EAChB,mBAAmB,EACnB,kBAAkB,EAClB,qBAA6B,GAC7B,EAAE,yBAAyB,+BAyB3B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/media-editor-crop-panel/index.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAE3E,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;CACxC;AAED;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAE,EAC7C,gBAAgB,EAChB,mBAAmB,EACnB,kBAAkB,GAClB,EAAE,yBAAyB,+BAyB3B"}
@@ -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,MAAM,sBAAsB,CAAC;AAGlD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAGtD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAE3E,UAAU,qBAAqB;IAC9B;;;;;OAKG;IACH,MAAM,CAAC,EAAE,KAAK,CAAE,KAAK,CAAE,EAAE,CAAC;IAC1B;;;OAGG;IACH,kBAAkB,CAAC,EAAE,iBAAiB,EAAE,CAAC;CACzC;AAwCD,wBAAgB,gBAAgB,CAAE,EACjC,MAAW,EACX,kBAAkB,GAClB,EAAE,qBAAqB,sCAyGvB;eAEc,gBAAgB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/media-editor-modal/index.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAGlD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAGtD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAE3E,UAAU,qBAAqB;IAC9B;;;;;OAKG;IACH,MAAM,CAAC,EAAE,KAAK,CAAE,KAAK,CAAE,EAAE,CAAC;IAC1B;;;OAGG;IACH,kBAAkB,CAAC,EAAE,iBAAiB,EAAE,CAAC;CACzC;AAqBD,wBAAgB,gBAAgB,CAAE,EACjC,MAAW,EACX,kBAAkB,GAClB,EAAE,qBAAqB,sCAwGvB;eAEc,gBAAgB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/media-editor",
3
- "version": "0.17.0",
3
+ "version": "0.17.2-next.v.202609031004.0",
4
4
  "description": "Media editor components for WordPress.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -43,24 +43,23 @@
43
43
  "build-module/store/index.mjs"
44
44
  ],
45
45
  "dependencies": {
46
- "@wordpress/a11y": "^4.54.0",
47
- "@wordpress/api-fetch": "^7.54.0",
48
- "@wordpress/base-styles": "^13.0.0",
49
- "@wordpress/components": "^40.0.0",
50
- "@wordpress/compose": "^8.7.0",
51
- "@wordpress/core-data": "^7.54.0",
52
- "@wordpress/data": "^10.54.0",
53
- "@wordpress/dataviews": "^18.1.0",
54
- "@wordpress/date": "^5.54.0",
55
- "@wordpress/element": "^8.6.0",
56
- "@wordpress/i18n": "^6.27.0",
57
- "@wordpress/icons": "^15.5.0",
58
- "@wordpress/interface": "^10.0.0",
59
- "@wordpress/keyboard-shortcuts": "^5.54.0",
60
- "@wordpress/keycodes": "^4.54.0",
61
- "@wordpress/notices": "^5.54.0",
62
- "@wordpress/private-apis": "^1.54.0",
63
- "@wordpress/ui": "^0.21.0",
46
+ "@wordpress/a11y": "^4.54.1-next.v.202609031004.0",
47
+ "@wordpress/admin-ui": "^2.9.1-next.v.202609031004.0",
48
+ "@wordpress/api-fetch": "^7.54.1-next.v.202609031004.0",
49
+ "@wordpress/base-styles": "^13.1.1-next.v.202609031004.0",
50
+ "@wordpress/components": "^40.1.1-next.v.202609031004.0",
51
+ "@wordpress/compose": "^8.7.2-next.v.202609031004.0",
52
+ "@wordpress/core-data": "^8.0.1-next.v.202609031004.0",
53
+ "@wordpress/data": "^10.54.2-next.v.202609031004.0",
54
+ "@wordpress/dataviews": "^19.0.1-next.v.202609031004.0",
55
+ "@wordpress/element": "^8.6.2-next.v.202609031004.0",
56
+ "@wordpress/i18n": "^6.27.1-next.v.202609031004.0",
57
+ "@wordpress/icons": "^16.0.1-next.v.202609031004.0",
58
+ "@wordpress/keyboard-shortcuts": "^5.54.1-next.v.202609031004.0",
59
+ "@wordpress/keycodes": "^4.54.1-next.v.202609031004.0",
60
+ "@wordpress/notices": "^5.54.1-next.v.202609031004.0",
61
+ "@wordpress/private-apis": "^1.54.2-next.v.202609031004.0",
62
+ "@wordpress/ui": "^0.22.1-next.v.202609031004.0",
64
63
  "clsx": "^2.1.1",
65
64
  "gl-matrix": "^3.4.3"
66
65
  },
@@ -70,7 +69,8 @@
70
69
  "@testing-library/jest-dom": "^6.9.1",
71
70
  "@testing-library/react": "^16.3.2",
72
71
  "@testing-library/user-event": "^14.6.1",
73
- "@types/jest": "^30.0.0"
72
+ "@types/jest": "^30.0.0",
73
+ "vitest": "^4.1.10"
74
74
  },
75
75
  "peerDependencies": {
76
76
  "@types/react": "^18 || ^19",
@@ -84,5 +84,5 @@
84
84
  "publishConfig": {
85
85
  "access": "public"
86
86
  },
87
- "gitHead": "5ef24f60261976bb198ad035db24bf81c1fb92b4"
87
+ "gitHead": "7275d6c6d93b542fca3cd98cdb9c7344ddd11e19"
88
88
  }