@wordpress/block-editor 14.7.0 → 14.8.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 (204) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/components/block-controls/slot.js +6 -3
  3. package/build/components/block-controls/slot.js.map +1 -1
  4. package/build/components/block-inspector/index.js +1 -2
  5. package/build/components/block-inspector/index.js.map +1 -1
  6. package/build/components/block-lock/modal.js +1 -1
  7. package/build/components/block-lock/modal.js.map +1 -1
  8. package/build/components/block-manager/category.js +79 -0
  9. package/build/components/block-manager/category.js.map +1 -0
  10. package/build/components/block-manager/checklist.js +40 -0
  11. package/build/components/block-manager/checklist.js.map +1 -0
  12. package/build/components/block-manager/index.js +108 -0
  13. package/build/components/block-manager/index.js.map +1 -0
  14. package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  15. package/build/components/block-settings-menu/index.js.map +1 -1
  16. package/build/components/block-toolbar/index.js +16 -4
  17. package/build/components/block-toolbar/index.js.map +1 -1
  18. package/build/components/block-toolbar/switch-section-style.js +105 -0
  19. package/build/components/block-toolbar/switch-section-style.js.map +1 -0
  20. package/build/components/collab/block-comment-icon-slot.js +2 -6
  21. package/build/components/collab/block-comment-icon-slot.js.map +1 -1
  22. package/build/components/collab/block-comment-icon-toolbar-slot.js +2 -6
  23. package/build/components/collab/block-comment-icon-toolbar-slot.js.map +1 -1
  24. package/build/components/color-palette/with-color-context.js +4 -2
  25. package/build/components/color-palette/with-color-context.js.map +1 -1
  26. package/build/components/font-family/index.js +14 -13
  27. package/build/components/font-family/index.js.map +1 -1
  28. package/build/components/global-styles/use-global-styles-output.js +1 -1
  29. package/build/components/global-styles/use-global-styles-output.js.map +1 -1
  30. package/build/components/iframe/index.js +13 -100
  31. package/build/components/iframe/index.js.map +1 -1
  32. package/build/components/iframe/use-scale-canvas.js +377 -0
  33. package/build/components/iframe/use-scale-canvas.js.map +1 -0
  34. package/build/components/image-editor/use-save-image.js +22 -3
  35. package/build/components/image-editor/use-save-image.js.map +1 -1
  36. package/build/components/inserter/block-patterns-tab/pattern-category-previews.js +1 -5
  37. package/build/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -1
  38. package/build/components/inserter/category-tabs/index.js +7 -8
  39. package/build/components/inserter/category-tabs/index.js.map +1 -1
  40. package/build/components/inserter-draggable-blocks/index.js +2 -1
  41. package/build/components/inserter-draggable-blocks/index.js.map +1 -1
  42. package/build/components/inspector-controls/slot.js +7 -4
  43. package/build/components/inspector-controls/slot.js.map +1 -1
  44. package/build/components/inspector-controls-tabs/position-controls-panel.js +1 -1
  45. package/build/components/inspector-controls-tabs/position-controls-panel.js.map +1 -1
  46. package/build/components/inspector-controls-tabs/use-inspector-controls-tabs.js +4 -4
  47. package/build/components/inspector-controls-tabs/use-inspector-controls-tabs.js.map +1 -1
  48. package/build/components/media-placeholder/index.js +29 -21
  49. package/build/components/media-placeholder/index.js.map +1 -1
  50. package/build/hooks/border.js +3 -3
  51. package/build/hooks/border.js.map +1 -1
  52. package/build/hooks/color.js +1 -1
  53. package/build/hooks/color.js.map +1 -1
  54. package/build/hooks/dimensions.js +2 -2
  55. package/build/hooks/dimensions.js.map +1 -1
  56. package/build/hooks/style.js +6 -6
  57. package/build/hooks/style.js.map +1 -1
  58. package/build/hooks/supports.js +1 -1
  59. package/build/hooks/supports.js.map +1 -1
  60. package/build/hooks/typography.js +1 -1
  61. package/build/hooks/typography.js.map +1 -1
  62. package/build/hooks/utils.js +1 -1
  63. package/build/hooks/utils.js.map +1 -1
  64. package/build/layouts/flex.js +11 -9
  65. package/build/layouts/flex.js.map +1 -1
  66. package/build/private-apis.js +4 -4
  67. package/build/private-apis.js.map +1 -1
  68. package/build/store/private-selectors.js +1 -1
  69. package/build/store/private-selectors.js.map +1 -1
  70. package/build/store/selectors.js +3 -0
  71. package/build/store/selectors.js.map +1 -1
  72. package/build-module/components/block-controls/slot.js +6 -3
  73. package/build-module/components/block-controls/slot.js.map +1 -1
  74. package/build-module/components/block-inspector/index.js +1 -2
  75. package/build-module/components/block-inspector/index.js.map +1 -1
  76. package/build-module/components/block-lock/modal.js +1 -1
  77. package/build-module/components/block-lock/modal.js.map +1 -1
  78. package/build-module/components/block-manager/category.js +71 -0
  79. package/build-module/components/block-manager/category.js.map +1 -0
  80. package/build-module/components/block-manager/checklist.js +32 -0
  81. package/build-module/components/block-manager/checklist.js.map +1 -0
  82. package/build-module/components/block-manager/index.js +102 -0
  83. package/build-module/components/block-manager/index.js.map +1 -0
  84. package/build-module/components/block-settings-menu/block-settings-dropdown.js +2 -2
  85. package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  86. package/build-module/components/block-settings-menu/index.js +2 -2
  87. package/build-module/components/block-settings-menu/index.js.map +1 -1
  88. package/build-module/components/block-toolbar/index.js +16 -4
  89. package/build-module/components/block-toolbar/index.js.map +1 -1
  90. package/build-module/components/block-toolbar/switch-section-style.js +97 -0
  91. package/build-module/components/block-toolbar/switch-section-style.js.map +1 -0
  92. package/build-module/components/collab/block-comment-icon-slot.js +2 -6
  93. package/build-module/components/collab/block-comment-icon-slot.js.map +1 -1
  94. package/build-module/components/collab/block-comment-icon-toolbar-slot.js +2 -6
  95. package/build-module/components/collab/block-comment-icon-toolbar-slot.js.map +1 -1
  96. package/build-module/components/color-palette/with-color-context.js +4 -2
  97. package/build-module/components/color-palette/with-color-context.js.map +1 -1
  98. package/build-module/components/font-family/index.js +15 -14
  99. package/build-module/components/font-family/index.js.map +1 -1
  100. package/build-module/components/global-styles/use-global-styles-output.js +1 -1
  101. package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
  102. package/build-module/components/iframe/index.js +15 -102
  103. package/build-module/components/iframe/index.js.map +1 -1
  104. package/build-module/components/iframe/use-scale-canvas.js +371 -0
  105. package/build-module/components/iframe/use-scale-canvas.js.map +1 -0
  106. package/build-module/components/image-editor/use-save-image.js +22 -3
  107. package/build-module/components/image-editor/use-save-image.js.map +1 -1
  108. package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js +1 -5
  109. package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -1
  110. package/build-module/components/inserter/category-tabs/index.js +8 -9
  111. package/build-module/components/inserter/category-tabs/index.js.map +1 -1
  112. package/build-module/components/inserter-draggable-blocks/index.js +2 -1
  113. package/build-module/components/inserter-draggable-blocks/index.js.map +1 -1
  114. package/build-module/components/inspector-controls/slot.js +7 -4
  115. package/build-module/components/inspector-controls/slot.js.map +1 -1
  116. package/build-module/components/inspector-controls-tabs/position-controls-panel.js +1 -1
  117. package/build-module/components/inspector-controls-tabs/position-controls-panel.js.map +1 -1
  118. package/build-module/components/inspector-controls-tabs/use-inspector-controls-tabs.js +4 -4
  119. package/build-module/components/inspector-controls-tabs/use-inspector-controls-tabs.js.map +1 -1
  120. package/build-module/components/media-placeholder/index.js +29 -21
  121. package/build-module/components/media-placeholder/index.js.map +1 -1
  122. package/build-module/hooks/border.js +3 -3
  123. package/build-module/hooks/border.js.map +1 -1
  124. package/build-module/hooks/color.js +1 -1
  125. package/build-module/hooks/color.js.map +1 -1
  126. package/build-module/hooks/dimensions.js +2 -2
  127. package/build-module/hooks/dimensions.js.map +1 -1
  128. package/build-module/hooks/style.js +6 -6
  129. package/build-module/hooks/style.js.map +1 -1
  130. package/build-module/hooks/supports.js +1 -1
  131. package/build-module/hooks/supports.js.map +1 -1
  132. package/build-module/hooks/typography.js +1 -1
  133. package/build-module/hooks/typography.js.map +1 -1
  134. package/build-module/hooks/utils.js +1 -1
  135. package/build-module/hooks/utils.js.map +1 -1
  136. package/build-module/layouts/flex.js +11 -9
  137. package/build-module/layouts/flex.js.map +1 -1
  138. package/build-module/private-apis.js +6 -6
  139. package/build-module/private-apis.js.map +1 -1
  140. package/build-module/store/private-selectors.js +1 -1
  141. package/build-module/store/private-selectors.js.map +1 -1
  142. package/build-module/store/selectors.js +3 -0
  143. package/build-module/store/selectors.js.map +1 -1
  144. package/build-style/content-rtl.css +27 -28
  145. package/build-style/content.css +27 -28
  146. package/build-style/style-rtl.css +108 -0
  147. package/build-style/style.css +108 -0
  148. package/package.json +2 -2
  149. package/src/components/block-canvas/style.scss +2 -1
  150. package/src/components/block-controls/slot.js +5 -3
  151. package/src/components/block-inspector/index.js +0 -2
  152. package/src/components/block-lock/modal.js +1 -1
  153. package/src/components/block-manager/category.js +102 -0
  154. package/src/components/block-manager/checklist.js +34 -0
  155. package/src/components/block-manager/index.js +127 -0
  156. package/src/components/block-manager/style.scss +82 -0
  157. package/src/components/block-mover/README.md +15 -8
  158. package/src/components/block-mover/stories/index.story.js +73 -71
  159. package/src/components/block-mover/style.scss +3 -0
  160. package/src/components/block-settings-menu/block-settings-dropdown.js +2 -2
  161. package/src/components/block-settings-menu/index.js +2 -2
  162. package/src/components/block-toolbar/index.js +14 -0
  163. package/src/components/block-toolbar/switch-section-style.js +115 -0
  164. package/src/components/block-tools/style.scss +39 -0
  165. package/src/components/collab/block-comment-icon-slot.js +2 -6
  166. package/src/components/collab/block-comment-icon-toolbar-slot.js +3 -5
  167. package/src/components/color-palette/test/__snapshots__/control.js.snap +2 -2
  168. package/src/components/color-palette/with-color-context.js +25 -7
  169. package/src/components/font-family/index.js +13 -13
  170. package/src/components/global-styles/test/use-global-styles-output.js +1 -1
  171. package/src/components/global-styles/use-global-styles-output.js +1 -1
  172. package/src/components/iframe/content.scss +49 -43
  173. package/src/components/iframe/index.js +14 -171
  174. package/src/components/iframe/use-scale-canvas.js +468 -0
  175. package/src/components/image-editor/use-save-image.js +27 -2
  176. package/src/components/inserter/block-patterns-tab/pattern-category-previews.js +7 -16
  177. package/src/components/inserter/category-tabs/index.js +8 -9
  178. package/src/components/inserter-draggable-blocks/index.js +10 -1
  179. package/src/components/inspector-controls/README.md +2 -0
  180. package/src/components/inspector-controls/slot.js +6 -4
  181. package/src/components/inspector-controls-tabs/position-controls-panel.js +1 -3
  182. package/src/components/inspector-controls-tabs/use-inspector-controls-tabs.js +10 -10
  183. package/src/components/media-placeholder/index.js +37 -33
  184. package/src/components/provider/test/use-block-sync.js +3 -1
  185. package/src/components/rich-text/content.scss +15 -10
  186. package/src/hooks/border.js +3 -9
  187. package/src/hooks/color.js +1 -1
  188. package/src/hooks/dimensions.js +2 -2
  189. package/src/hooks/style.js +6 -12
  190. package/src/hooks/supports.js +1 -1
  191. package/src/hooks/test/style.js +1 -2
  192. package/src/hooks/typography.js +1 -1
  193. package/src/hooks/utils.js +1 -1
  194. package/src/layouts/flex.js +26 -18
  195. package/src/private-apis.js +6 -6
  196. package/src/store/private-selectors.js +1 -1
  197. package/src/store/selectors.js +3 -0
  198. package/src/store/test/selectors.js +87 -58
  199. package/src/style.scss +1 -0
  200. package/build/components/block-info-slot-fill/index.js +0 -39
  201. package/build/components/block-info-slot-fill/index.js.map +0 -1
  202. package/build-module/components/block-info-slot-fill/index.js +0 -32
  203. package/build-module/components/block-info-slot-fill/index.js.map +0 -1
  204. package/src/components/block-info-slot-fill/index.js +0 -27
@@ -777,34 +777,26 @@ _::-webkit-full-page-media, _:future, :root [data-has-multi-selection=true] .blo
777
777
 
778
778
  .block-editor-iframe__html {
779
779
  transform-origin: top center;
780
- transition: all 400ms cubic-bezier(0.46, 0.03, 0.52, 0.96), transform 0s, scale 0s, padding 0s;
781
- }
782
- @media (prefers-reduced-motion: reduce) {
783
- .block-editor-iframe__html {
784
- transition-duration: 0s;
785
- transition-delay: 0s;
786
- }
780
+ transition: background-color 400ms;
787
781
  }
788
782
  .block-editor-iframe__html.zoom-out-animation {
789
- transition: all 400ms cubic-bezier(0.46, 0.03, 0.52, 0.96), transform 0s;
790
- }
791
- @media (prefers-reduced-motion: reduce) {
792
- .block-editor-iframe__html.zoom-out-animation {
793
- transition-duration: 0s;
794
- transition-delay: 0s;
795
- }
783
+ position: fixed;
784
+ right: 0;
785
+ left: 0;
786
+ top: calc(-1 * var(--wp-block-editor-iframe-zoom-out-scroll-top, 0));
787
+ bottom: 0;
788
+ overflow-y: scroll;
796
789
  }
797
-
798
790
  .block-editor-iframe__html.is-zoomed-out {
799
- transform: translateX(calc(-1*((var(--wp-block-editor-iframe-zoom-out-scale-container-width) - var(--wp-block-editor-iframe-zoom-out-container-width, 100vw)) / 2 / var(--wp-block-editor-iframe-zoom-out-scale))));
800
- scale: var(--wp-block-editor-iframe-zoom-out-scale);
791
+ transform: translateX(calc(-1*((var(--wp-block-editor-iframe-zoom-out-scale-container-width) - var(--wp-block-editor-iframe-zoom-out-container-width, 100vw)) / 2 / var(--wp-block-editor-iframe-zoom-out-scale, 1))));
792
+ scale: var(--wp-block-editor-iframe-zoom-out-scale, 1);
801
793
  background-color: #ddd;
802
- margin-bottom: calc(-1 * calc(calc(var(--wp-block-editor-iframe-zoom-out-content-height) * (1 - var(--wp-block-editor-iframe-zoom-out-scale))) + calc(2 * var(--wp-block-editor-iframe-zoom-out-frame-size) / var(--wp-block-editor-iframe-zoom-out-scale)) + 2px));
803
- padding-top: calc(var(--wp-block-editor-iframe-zoom-out-frame-size) / var(--wp-block-editor-iframe-zoom-out-scale));
804
- padding-bottom: calc(var(--wp-block-editor-iframe-zoom-out-frame-size) / var(--wp-block-editor-iframe-zoom-out-scale));
794
+ margin-bottom: calc(-1 * calc(calc(var(--wp-block-editor-iframe-zoom-out-content-height) * (1 - var(--wp-block-editor-iframe-zoom-out-scale, 1))) + calc(2 * var(--wp-block-editor-iframe-zoom-out-frame-size, 0) / var(--wp-block-editor-iframe-zoom-out-scale, 1)) + 2px));
795
+ padding-top: calc(var(--wp-block-editor-iframe-zoom-out-frame-size, 0) / var(--wp-block-editor-iframe-zoom-out-scale, 1));
796
+ padding-bottom: calc(var(--wp-block-editor-iframe-zoom-out-frame-size, 0) / var(--wp-block-editor-iframe-zoom-out-scale, 1));
805
797
  }
806
798
  .block-editor-iframe__html.is-zoomed-out body {
807
- min-height: calc((var(--wp-block-editor-iframe-zoom-out-inner-height) - calc(2 * var(--wp-block-editor-iframe-zoom-out-frame-size) / var(--wp-block-editor-iframe-zoom-out-scale))) / var(--wp-block-editor-iframe-zoom-out-scale));
799
+ min-height: calc((var(--wp-block-editor-iframe-zoom-out-inner-height) - calc(2 * var(--wp-block-editor-iframe-zoom-out-frame-size, 0) / var(--wp-block-editor-iframe-zoom-out-scale, 1))) / var(--wp-block-editor-iframe-zoom-out-scale, 1));
808
800
  }
809
801
  .block-editor-iframe__html.is-zoomed-out body > .is-root-container:not(.wp-block-post-content) {
810
802
  flex: 1;
@@ -860,13 +852,6 @@ _::-webkit-full-page-media, _:future, :root [data-has-multi-selection=true] .blo
860
852
  .rich-text:focus {
861
853
  outline: none;
862
854
  }
863
- .rich-text:focus [data-rich-text-format-boundary] {
864
- border-radius: 2px;
865
- }
866
-
867
- .block-editor-rich-text__editable > p:first-child {
868
- margin-top: 0;
869
- }
870
855
 
871
856
  figcaption.block-editor-rich-text__editable [data-rich-text-placeholder]::before {
872
857
  opacity: 0.8;
@@ -880,6 +865,20 @@ figcaption.block-editor-rich-text__editable [data-rich-text-placeholder]::before
880
865
  background: yellow;
881
866
  }
882
867
 
868
+ [data-rich-text-comment],
869
+ [data-rich-text-format-boundary] {
870
+ border-radius: 2px;
871
+ }
872
+
873
+ [data-rich-text-comment] {
874
+ background-color: currentColor;
875
+ }
876
+ [data-rich-text-comment] span {
877
+ filter: invert(100%);
878
+ color: currentColor;
879
+ padding: 0 2px;
880
+ }
881
+
883
882
  .block-editor-warning {
884
883
  align-items: center;
885
884
  display: flex;
@@ -777,34 +777,26 @@ _::-webkit-full-page-media, _:future, :root [data-has-multi-selection=true] .blo
777
777
 
778
778
  .block-editor-iframe__html {
779
779
  transform-origin: top center;
780
- transition: all 400ms cubic-bezier(0.46, 0.03, 0.52, 0.96), transform 0s, scale 0s, padding 0s;
781
- }
782
- @media (prefers-reduced-motion: reduce) {
783
- .block-editor-iframe__html {
784
- transition-duration: 0s;
785
- transition-delay: 0s;
786
- }
780
+ transition: background-color 400ms;
787
781
  }
788
782
  .block-editor-iframe__html.zoom-out-animation {
789
- transition: all 400ms cubic-bezier(0.46, 0.03, 0.52, 0.96), transform 0s;
790
- }
791
- @media (prefers-reduced-motion: reduce) {
792
- .block-editor-iframe__html.zoom-out-animation {
793
- transition-duration: 0s;
794
- transition-delay: 0s;
795
- }
783
+ position: fixed;
784
+ left: 0;
785
+ right: 0;
786
+ top: calc(-1 * var(--wp-block-editor-iframe-zoom-out-scroll-top, 0));
787
+ bottom: 0;
788
+ overflow-y: scroll;
796
789
  }
797
-
798
790
  .block-editor-iframe__html.is-zoomed-out {
799
- transform: translateX(calc((var(--wp-block-editor-iframe-zoom-out-scale-container-width) - var(--wp-block-editor-iframe-zoom-out-container-width, 100vw)) / 2 / var(--wp-block-editor-iframe-zoom-out-scale)));
800
- scale: var(--wp-block-editor-iframe-zoom-out-scale);
791
+ transform: translateX(calc((var(--wp-block-editor-iframe-zoom-out-scale-container-width) - var(--wp-block-editor-iframe-zoom-out-container-width, 100vw)) / 2 / var(--wp-block-editor-iframe-zoom-out-scale, 1)));
792
+ scale: var(--wp-block-editor-iframe-zoom-out-scale, 1);
801
793
  background-color: #ddd;
802
- margin-bottom: calc(-1 * calc(calc(var(--wp-block-editor-iframe-zoom-out-content-height) * (1 - var(--wp-block-editor-iframe-zoom-out-scale))) + calc(2 * var(--wp-block-editor-iframe-zoom-out-frame-size) / var(--wp-block-editor-iframe-zoom-out-scale)) + 2px));
803
- padding-top: calc(var(--wp-block-editor-iframe-zoom-out-frame-size) / var(--wp-block-editor-iframe-zoom-out-scale));
804
- padding-bottom: calc(var(--wp-block-editor-iframe-zoom-out-frame-size) / var(--wp-block-editor-iframe-zoom-out-scale));
794
+ margin-bottom: calc(-1 * calc(calc(var(--wp-block-editor-iframe-zoom-out-content-height) * (1 - var(--wp-block-editor-iframe-zoom-out-scale, 1))) + calc(2 * var(--wp-block-editor-iframe-zoom-out-frame-size, 0) / var(--wp-block-editor-iframe-zoom-out-scale, 1)) + 2px));
795
+ padding-top: calc(var(--wp-block-editor-iframe-zoom-out-frame-size, 0) / var(--wp-block-editor-iframe-zoom-out-scale, 1));
796
+ padding-bottom: calc(var(--wp-block-editor-iframe-zoom-out-frame-size, 0) / var(--wp-block-editor-iframe-zoom-out-scale, 1));
805
797
  }
806
798
  .block-editor-iframe__html.is-zoomed-out body {
807
- min-height: calc((var(--wp-block-editor-iframe-zoom-out-inner-height) - calc(2 * var(--wp-block-editor-iframe-zoom-out-frame-size) / var(--wp-block-editor-iframe-zoom-out-scale))) / var(--wp-block-editor-iframe-zoom-out-scale));
799
+ min-height: calc((var(--wp-block-editor-iframe-zoom-out-inner-height) - calc(2 * var(--wp-block-editor-iframe-zoom-out-frame-size, 0) / var(--wp-block-editor-iframe-zoom-out-scale, 1))) / var(--wp-block-editor-iframe-zoom-out-scale, 1));
808
800
  }
809
801
  .block-editor-iframe__html.is-zoomed-out body > .is-root-container:not(.wp-block-post-content) {
810
802
  flex: 1;
@@ -860,13 +852,6 @@ _::-webkit-full-page-media, _:future, :root [data-has-multi-selection=true] .blo
860
852
  .rich-text:focus {
861
853
  outline: none;
862
854
  }
863
- .rich-text:focus [data-rich-text-format-boundary] {
864
- border-radius: 2px;
865
- }
866
-
867
- .block-editor-rich-text__editable > p:first-child {
868
- margin-top: 0;
869
- }
870
855
 
871
856
  figcaption.block-editor-rich-text__editable [data-rich-text-placeholder]::before {
872
857
  opacity: 0.8;
@@ -880,6 +865,20 @@ figcaption.block-editor-rich-text__editable [data-rich-text-placeholder]::before
880
865
  background: yellow;
881
866
  }
882
867
 
868
+ [data-rich-text-comment],
869
+ [data-rich-text-format-boundary] {
870
+ border-radius: 2px;
871
+ }
872
+
873
+ [data-rich-text-comment] {
874
+ background-color: currentColor;
875
+ }
876
+ [data-rich-text-comment] span {
877
+ filter: invert(100%);
878
+ color: currentColor;
879
+ padding: 0 2px;
880
+ }
881
+
883
882
  .block-editor-warning {
884
883
  align-items: center;
885
884
  display: flex;
@@ -459,6 +459,36 @@ iframe[name=editor-canvas] {
459
459
  .components-popover.block-editor-block-list__block-popover .block-editor-block-toolbar .components-toolbar {
460
460
  border-left-color: #1e1e1e;
461
461
  }
462
+ .components-popover.block-editor-block-list__block-popover .is-inverted-toolbar {
463
+ background-color: #1e1e1e;
464
+ color: #f0f0f0;
465
+ }
466
+ .components-popover.block-editor-block-list__block-popover .is-inverted-toolbar.block-editor-block-contextual-toolbar {
467
+ border-color: #2f2f2f;
468
+ }
469
+ .components-popover.block-editor-block-list__block-popover .is-inverted-toolbar button {
470
+ color: #ddd;
471
+ }
472
+ .components-popover.block-editor-block-list__block-popover .is-inverted-toolbar button:hover {
473
+ color: #fff;
474
+ }
475
+ .components-popover.block-editor-block-list__block-popover .is-inverted-toolbar button:focus::before {
476
+ box-shadow: inset 0 0 0 1px #1e1e1e, 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
477
+ }
478
+ .components-popover.block-editor-block-list__block-popover .is-inverted-toolbar .block-editor-block-parent-selector .block-editor-block-parent-selector__button {
479
+ border-color: #2f2f2f;
480
+ background-color: #1e1e1e;
481
+ }
482
+ .components-popover.block-editor-block-list__block-popover .is-inverted-toolbar .block-editor-block-switcher__toggle {
483
+ color: #f0f0f0;
484
+ }
485
+ .components-popover.block-editor-block-list__block-popover .is-inverted-toolbar .components-toolbar-group,
486
+ .components-popover.block-editor-block-list__block-popover .is-inverted-toolbar .components-toolbar {
487
+ border-left-color: #2f2f2f !important;
488
+ }
489
+ .components-popover.block-editor-block-list__block-popover .is-inverted-toolbar .is-pressed {
490
+ color: var(--wp-admin-theme-color);
491
+ }
462
492
  .components-popover.block-editor-block-list__block-popover.is-insertion-point-visible {
463
493
  visibility: hidden;
464
494
  }
@@ -766,6 +796,81 @@ iframe[name=editor-canvas] {
766
796
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 2px 3px rgba(0, 0, 0, 0.04), 0 6px 6px rgba(0, 0, 0, 0.03), 0 8px 8px rgba(0, 0, 0, 0.02);
767
797
  }
768
798
 
799
+ .block-editor-block-manager__no-results {
800
+ font-style: italic;
801
+ padding: 24px 0;
802
+ text-align: center;
803
+ }
804
+
805
+ .block-editor-block-manager__search {
806
+ margin: 16px 0;
807
+ }
808
+
809
+ .block-editor-block-manager__disabled-blocks-count {
810
+ border: 1px solid #ddd;
811
+ border-width: 1px 0;
812
+ box-shadow: 32px 0 0 0 #fff, -32px 0 0 0 #fff;
813
+ padding: 8px;
814
+ background-color: #fff;
815
+ text-align: center;
816
+ position: sticky;
817
+ top: -5px;
818
+ z-index: 2;
819
+ }
820
+ .block-editor-block-manager__disabled-blocks-count ~ .block-editor-block-manager__results .block-editor-block-manager__category-title {
821
+ top: 31px;
822
+ }
823
+ .block-editor-block-manager__disabled-blocks-count .is-link {
824
+ margin-right: 12px;
825
+ }
826
+
827
+ .block-editor-block-manager__category {
828
+ margin: 0 0 24px 0;
829
+ }
830
+
831
+ .block-editor-block-manager__category-title {
832
+ position: sticky;
833
+ top: -4px;
834
+ padding: 16px 0;
835
+ background-color: #fff;
836
+ z-index: 1;
837
+ }
838
+ .block-editor-block-manager__category-title .components-checkbox-control__label {
839
+ font-weight: 600;
840
+ }
841
+
842
+ .block-editor-block-manager__checklist {
843
+ margin-top: 0;
844
+ }
845
+
846
+ .block-editor-block-manager__category-title,
847
+ .block-editor-block-manager__checklist-item {
848
+ border-bottom: 1px solid #ddd;
849
+ }
850
+
851
+ .block-editor-block-manager__checklist-item {
852
+ display: flex;
853
+ justify-content: space-between;
854
+ align-items: center;
855
+ margin-bottom: 0;
856
+ padding: 8px 16px 8px 0;
857
+ }
858
+ .components-modal__content .block-editor-block-manager__checklist-item.components-checkbox-control__input-container {
859
+ margin: 0 8px;
860
+ }
861
+ .block-editor-block-manager__checklist-item .block-editor-block-icon {
862
+ margin-left: 10px;
863
+ fill: #1e1e1e;
864
+ }
865
+
866
+ .block-editor-block-manager__results {
867
+ border-top: 1px solid #ddd;
868
+ }
869
+
870
+ .block-editor-block-manager__disabled-blocks-count + .block-editor-block-manager__results {
871
+ border-top-width: 0;
872
+ }
873
+
769
874
  .block-editor-block-mover__move-button-container {
770
875
  display: flex;
771
876
  padding: 0;
@@ -827,6 +932,9 @@ iframe[name=editor-canvas] {
827
932
  }
828
933
  }
829
934
 
935
+ .components-button.block-editor-block-mover-button {
936
+ overflow: hidden;
937
+ }
830
938
  .components-button.block-editor-block-mover-button::before {
831
939
  content: "";
832
940
  position: absolute;
@@ -459,6 +459,36 @@ iframe[name=editor-canvas] {
459
459
  .components-popover.block-editor-block-list__block-popover .block-editor-block-toolbar .components-toolbar {
460
460
  border-right-color: #1e1e1e;
461
461
  }
462
+ .components-popover.block-editor-block-list__block-popover .is-inverted-toolbar {
463
+ background-color: #1e1e1e;
464
+ color: #f0f0f0;
465
+ }
466
+ .components-popover.block-editor-block-list__block-popover .is-inverted-toolbar.block-editor-block-contextual-toolbar {
467
+ border-color: #2f2f2f;
468
+ }
469
+ .components-popover.block-editor-block-list__block-popover .is-inverted-toolbar button {
470
+ color: #ddd;
471
+ }
472
+ .components-popover.block-editor-block-list__block-popover .is-inverted-toolbar button:hover {
473
+ color: #fff;
474
+ }
475
+ .components-popover.block-editor-block-list__block-popover .is-inverted-toolbar button:focus::before {
476
+ box-shadow: inset 0 0 0 1px #1e1e1e, 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
477
+ }
478
+ .components-popover.block-editor-block-list__block-popover .is-inverted-toolbar .block-editor-block-parent-selector .block-editor-block-parent-selector__button {
479
+ border-color: #2f2f2f;
480
+ background-color: #1e1e1e;
481
+ }
482
+ .components-popover.block-editor-block-list__block-popover .is-inverted-toolbar .block-editor-block-switcher__toggle {
483
+ color: #f0f0f0;
484
+ }
485
+ .components-popover.block-editor-block-list__block-popover .is-inverted-toolbar .components-toolbar-group,
486
+ .components-popover.block-editor-block-list__block-popover .is-inverted-toolbar .components-toolbar {
487
+ border-right-color: #2f2f2f !important;
488
+ }
489
+ .components-popover.block-editor-block-list__block-popover .is-inverted-toolbar .is-pressed {
490
+ color: var(--wp-admin-theme-color);
491
+ }
462
492
  .components-popover.block-editor-block-list__block-popover.is-insertion-point-visible {
463
493
  visibility: hidden;
464
494
  }
@@ -766,6 +796,81 @@ iframe[name=editor-canvas] {
766
796
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 2px 3px rgba(0, 0, 0, 0.04), 0 6px 6px rgba(0, 0, 0, 0.03), 0 8px 8px rgba(0, 0, 0, 0.02);
767
797
  }
768
798
 
799
+ .block-editor-block-manager__no-results {
800
+ font-style: italic;
801
+ padding: 24px 0;
802
+ text-align: center;
803
+ }
804
+
805
+ .block-editor-block-manager__search {
806
+ margin: 16px 0;
807
+ }
808
+
809
+ .block-editor-block-manager__disabled-blocks-count {
810
+ border: 1px solid #ddd;
811
+ border-width: 1px 0;
812
+ box-shadow: -32px 0 0 0 #fff, 32px 0 0 0 #fff;
813
+ padding: 8px;
814
+ background-color: #fff;
815
+ text-align: center;
816
+ position: sticky;
817
+ top: -5px;
818
+ z-index: 2;
819
+ }
820
+ .block-editor-block-manager__disabled-blocks-count ~ .block-editor-block-manager__results .block-editor-block-manager__category-title {
821
+ top: 31px;
822
+ }
823
+ .block-editor-block-manager__disabled-blocks-count .is-link {
824
+ margin-left: 12px;
825
+ }
826
+
827
+ .block-editor-block-manager__category {
828
+ margin: 0 0 24px 0;
829
+ }
830
+
831
+ .block-editor-block-manager__category-title {
832
+ position: sticky;
833
+ top: -4px;
834
+ padding: 16px 0;
835
+ background-color: #fff;
836
+ z-index: 1;
837
+ }
838
+ .block-editor-block-manager__category-title .components-checkbox-control__label {
839
+ font-weight: 600;
840
+ }
841
+
842
+ .block-editor-block-manager__checklist {
843
+ margin-top: 0;
844
+ }
845
+
846
+ .block-editor-block-manager__category-title,
847
+ .block-editor-block-manager__checklist-item {
848
+ border-bottom: 1px solid #ddd;
849
+ }
850
+
851
+ .block-editor-block-manager__checklist-item {
852
+ display: flex;
853
+ justify-content: space-between;
854
+ align-items: center;
855
+ margin-bottom: 0;
856
+ padding: 8px 0 8px 16px;
857
+ }
858
+ .components-modal__content .block-editor-block-manager__checklist-item.components-checkbox-control__input-container {
859
+ margin: 0 8px;
860
+ }
861
+ .block-editor-block-manager__checklist-item .block-editor-block-icon {
862
+ margin-right: 10px;
863
+ fill: #1e1e1e;
864
+ }
865
+
866
+ .block-editor-block-manager__results {
867
+ border-top: 1px solid #ddd;
868
+ }
869
+
870
+ .block-editor-block-manager__disabled-blocks-count + .block-editor-block-manager__results {
871
+ border-top-width: 0;
872
+ }
873
+
769
874
  .block-editor-block-mover__move-button-container {
770
875
  display: flex;
771
876
  padding: 0;
@@ -827,6 +932,9 @@ iframe[name=editor-canvas] {
827
932
  }
828
933
  }
829
934
 
935
+ .components-button.block-editor-block-mover-button {
936
+ overflow: hidden;
937
+ }
830
938
  .components-button.block-editor-block-mover-button::before {
831
939
  content: "";
832
940
  position: absolute;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/block-editor",
3
- "version": "14.7.0",
3
+ "version": "14.8.0",
4
4
  "description": "Generic block editor.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -90,5 +90,5 @@
90
90
  "publishConfig": {
91
91
  "access": "public"
92
92
  },
93
- "gitHead": "510540d99f3d222a96f08d3d7b66c9e7a726f705"
93
+ "gitHead": "cce81c13739c2a8b53d91df90c4f037cb68c2665"
94
94
  }
@@ -4,6 +4,7 @@ iframe[name="editor-canvas"] {
4
4
  height: 100%;
5
5
  display: block;
6
6
  // Handles transitions between device previews
7
- @include editor-canvas-resize-animation;
7
+ transition: all 400ms cubic-bezier(0.46, 0.03, 0.52, 0.96);
8
+ @include reduce-motion("transition");
8
9
  background-color: $gray-300;
9
10
  }
@@ -31,9 +31,10 @@ export default function BlockControlsSlot( { group = 'default', ...props } ) {
31
31
  [ toolbarState, contextState ]
32
32
  );
33
33
 
34
- const Slot = groups[ group ]?.Slot;
35
- const fills = useSlotFills( Slot?.__unstableName );
36
- if ( ! Slot ) {
34
+ const slotFill = groups[ group ];
35
+ const fills = useSlotFills( slotFill.name );
36
+
37
+ if ( ! slotFill ) {
37
38
  warning( `Unknown BlockControls group "${ group }" provided.` );
38
39
  return null;
39
40
  }
@@ -42,6 +43,7 @@ export default function BlockControlsSlot( { group = 'default', ...props } ) {
42
43
  return null;
43
44
  }
44
45
 
46
+ const { Slot } = slotFill;
45
47
  const slot = <Slot { ...props } bubblesVirtually fillProps={ fillProps } />;
46
48
 
47
49
  if ( group === 'default' ) {
@@ -26,7 +26,6 @@ import useInspectorControlsTabs from '../inspector-controls-tabs/use-inspector-c
26
26
  import AdvancedControls from '../inspector-controls-tabs/advanced-controls-panel';
27
27
  import PositionControls from '../inspector-controls-tabs/position-controls-panel';
28
28
  import useBlockInspectorAnimationSettings from './useBlockInspectorAnimationSettings';
29
- import BlockInfo from '../block-info-slot-fill';
30
29
  import BlockQuickNavigation from '../block-quick-navigation';
31
30
  import { useBorderPanelLabel } from '../../hooks/border';
32
31
 
@@ -253,7 +252,6 @@ const BlockInspectorSingleBlock = ( {
253
252
  className={ blockInformation.isSynced && 'is-synced' }
254
253
  />
255
254
  <BlockVariationTransforms blockClientId={ clientId } />
256
- <BlockInfo.Slot />
257
255
  { showTabs && (
258
256
  <InspectorControlsTabs
259
257
  hasBlockStyles={ hasBlockStyles }
@@ -24,7 +24,7 @@ import useBlockDisplayInformation from '../use-block-display-information';
24
24
  import { store as blockEditorStore } from '../../store';
25
25
 
26
26
  // Entity based blocks which allow edit locking
27
- const ALLOWS_EDIT_LOCKING = [ 'core/block', 'core/navigation' ];
27
+ const ALLOWS_EDIT_LOCKING = [ 'core/navigation' ];
28
28
 
29
29
  function getTemplateLockValue( lock ) {
30
30
  // Prevents all operations.
@@ -0,0 +1,102 @@
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ import { useCallback } from '@wordpress/element';
5
+ import { useInstanceId } from '@wordpress/compose';
6
+ import { CheckboxControl } from '@wordpress/components';
7
+
8
+ /**
9
+ * Internal dependencies
10
+ */
11
+ import BlockTypesChecklist from './checklist';
12
+
13
+ function BlockManagerCategory( {
14
+ title,
15
+ blockTypes,
16
+ selectedBlockTypes,
17
+ onChange,
18
+ } ) {
19
+ const instanceId = useInstanceId( BlockManagerCategory );
20
+
21
+ const toggleVisible = useCallback(
22
+ ( blockType, nextIsChecked ) => {
23
+ if ( nextIsChecked ) {
24
+ onChange( [ ...selectedBlockTypes, blockType ] );
25
+ } else {
26
+ onChange(
27
+ selectedBlockTypes.filter(
28
+ ( { name } ) => name !== blockType.name
29
+ )
30
+ );
31
+ }
32
+ },
33
+ [ selectedBlockTypes, onChange ]
34
+ );
35
+
36
+ const toggleAllVisible = useCallback(
37
+ ( nextIsChecked ) => {
38
+ if ( nextIsChecked ) {
39
+ onChange( [
40
+ ...selectedBlockTypes,
41
+ ...blockTypes.filter(
42
+ ( blockType ) =>
43
+ ! selectedBlockTypes.find(
44
+ ( { name } ) => name === blockType.name
45
+ )
46
+ ),
47
+ ] );
48
+ } else {
49
+ onChange(
50
+ selectedBlockTypes.filter(
51
+ ( selectedBlockType ) =>
52
+ ! blockTypes.find(
53
+ ( { name } ) => name === selectedBlockType.name
54
+ )
55
+ )
56
+ );
57
+ }
58
+ },
59
+ [ blockTypes, selectedBlockTypes, onChange ]
60
+ );
61
+
62
+ if ( ! blockTypes.length ) {
63
+ return null;
64
+ }
65
+
66
+ const checkedBlockNames = blockTypes
67
+ .map( ( { name } ) => name )
68
+ .filter( ( type ) =>
69
+ ( selectedBlockTypes ?? [] ).some(
70
+ ( selectedBlockType ) => selectedBlockType.name === type
71
+ )
72
+ );
73
+
74
+ const titleId = 'block-editor-block-manager__category-title-' + instanceId;
75
+
76
+ const isAllChecked = checkedBlockNames.length === blockTypes.length;
77
+ const isIndeterminate = ! isAllChecked && checkedBlockNames.length > 0;
78
+
79
+ return (
80
+ <div
81
+ role="group"
82
+ aria-labelledby={ titleId }
83
+ className="block-editor-block-manager__category"
84
+ >
85
+ <CheckboxControl
86
+ __nextHasNoMarginBottom
87
+ checked={ isAllChecked }
88
+ onChange={ toggleAllVisible }
89
+ className="block-editor-block-manager__category-title"
90
+ indeterminate={ isIndeterminate }
91
+ label={ <span id={ titleId }>{ title }</span> }
92
+ />
93
+ <BlockTypesChecklist
94
+ blockTypes={ blockTypes }
95
+ value={ checkedBlockNames }
96
+ onItemChange={ toggleVisible }
97
+ />
98
+ </div>
99
+ );
100
+ }
101
+
102
+ export default BlockManagerCategory;
@@ -0,0 +1,34 @@
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ import { CheckboxControl } from '@wordpress/components';
5
+
6
+ /**
7
+ * Internal dependencies
8
+ */
9
+ import BlockIcon from '../block-icon';
10
+
11
+ function BlockTypesChecklist( { blockTypes, value, onItemChange } ) {
12
+ return (
13
+ <ul className="block-editor-block-manager__checklist">
14
+ { blockTypes.map( ( blockType ) => (
15
+ <li
16
+ key={ blockType.name }
17
+ className="block-editor-block-manager__checklist-item"
18
+ >
19
+ <CheckboxControl
20
+ __nextHasNoMarginBottom
21
+ label={ blockType.title }
22
+ checked={ value.includes( blockType.name ) }
23
+ onChange={ ( ...args ) =>
24
+ onItemChange( blockType, ...args )
25
+ }
26
+ />
27
+ <BlockIcon icon={ blockType.icon } />
28
+ </li>
29
+ ) ) }
30
+ </ul>
31
+ );
32
+ }
33
+
34
+ export default BlockTypesChecklist;