@wordpress/editor 11.0.1 → 12.0.2

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 (241) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +1 -1
  3. package/build/components/autosave-monitor/index.js +5 -0
  4. package/build/components/autosave-monitor/index.js.map +1 -1
  5. package/build/components/character-count/index.js +1 -1
  6. package/build/components/character-count/index.js.map +1 -1
  7. package/build/components/editor-help/add-blocks.native.js +6 -5
  8. package/build/components/editor-help/add-blocks.native.js.map +1 -1
  9. package/build/components/editor-help/customize-blocks.native.js +7 -6
  10. package/build/components/editor-help/customize-blocks.native.js.map +1 -1
  11. package/build/components/editor-help/help-detail-navigation-screen.native.js +29 -15
  12. package/build/components/editor-help/help-detail-navigation-screen.native.js.map +1 -1
  13. package/build/components/editor-help/help-get-support-button.native.js +46 -0
  14. package/build/components/editor-help/help-get-support-button.native.js.map +1 -0
  15. package/build/components/editor-help/help-topic-row.native.js +3 -2
  16. package/build/components/editor-help/help-topic-row.native.js.map +1 -1
  17. package/build/components/editor-help/index.native.js +87 -26
  18. package/build/components/editor-help/index.native.js.map +1 -1
  19. package/build/components/editor-help/intro-to-blocks.native.js +19 -9
  20. package/build/components/editor-help/intro-to-blocks.native.js.map +1 -1
  21. package/build/components/editor-help/move-blocks.native.js +6 -5
  22. package/build/components/editor-help/move-blocks.native.js.map +1 -1
  23. package/build/components/editor-help/remove-blocks.native.js +6 -5
  24. package/build/components/editor-help/remove-blocks.native.js.map +1 -1
  25. package/build/components/editor-help/view-sections.native.js +23 -5
  26. package/build/components/editor-help/view-sections.native.js.map +1 -1
  27. package/build/components/entities-saved-states/entity-type-list.js +22 -13
  28. package/build/components/entities-saved-states/entity-type-list.js.map +1 -1
  29. package/build/components/entities-saved-states/index.js +23 -4
  30. package/build/components/entities-saved-states/index.js.map +1 -1
  31. package/build/components/global-keyboard-shortcuts/save-shortcut.js +12 -14
  32. package/build/components/global-keyboard-shortcuts/save-shortcut.js.map +1 -1
  33. package/build/components/global-keyboard-shortcuts/visual-editor-shortcuts.js +0 -4
  34. package/build/components/global-keyboard-shortcuts/visual-editor-shortcuts.js.map +1 -1
  35. package/build/components/index.js +9 -0
  36. package/build/components/index.js.map +1 -1
  37. package/build/components/local-autosave-monitor/index.js +1 -2
  38. package/build/components/local-autosave-monitor/index.js.map +1 -1
  39. package/build/components/post-format/index.js +3 -1
  40. package/build/components/post-format/index.js.map +1 -1
  41. package/build/components/post-locked-modal/index.js +1 -1
  42. package/build/components/post-locked-modal/index.js.map +1 -1
  43. package/build/components/post-saved-state/index.js +37 -46
  44. package/build/components/post-saved-state/index.js.map +1 -1
  45. package/build/components/post-taxonomies/flat-term-selector.js +154 -211
  46. package/build/components/post-taxonomies/flat-term-selector.js.map +1 -1
  47. package/build/components/post-title/index.js +53 -25
  48. package/build/components/post-title/index.js.map +1 -1
  49. package/build/components/provider/index.native.js +18 -7
  50. package/build/components/provider/index.native.js.map +1 -1
  51. package/build/components/provider/use-block-editor-settings.js +32 -5
  52. package/build/components/provider/use-block-editor-settings.js.map +1 -1
  53. package/build/components/word-count/index.js +1 -1
  54. package/build/components/word-count/index.js.map +1 -1
  55. package/build/store/actions.js +13 -38
  56. package/build/store/actions.js.map +1 -1
  57. package/build/store/defaults.js +7 -2
  58. package/build/store/defaults.js.map +1 -1
  59. package/build/store/selectors.js +4 -93
  60. package/build/store/selectors.js.map +1 -1
  61. package/build/store/utils/notice-builder.js +15 -18
  62. package/build/store/utils/notice-builder.js.map +1 -1
  63. package/build/{store/utils → utils}/get-template-part-icon.js +1 -1
  64. package/build/utils/get-template-part-icon.js.map +1 -0
  65. package/build/utils/index.js +8 -0
  66. package/build/utils/index.js.map +1 -1
  67. package/build-module/components/autosave-monitor/index.js +5 -0
  68. package/build-module/components/autosave-monitor/index.js.map +1 -1
  69. package/build-module/components/character-count/index.js +1 -1
  70. package/build-module/components/character-count/index.js.map +1 -1
  71. package/build-module/components/editor-help/add-blocks.native.js +7 -6
  72. package/build-module/components/editor-help/add-blocks.native.js.map +1 -1
  73. package/build-module/components/editor-help/customize-blocks.native.js +8 -7
  74. package/build-module/components/editor-help/customize-blocks.native.js.map +1 -1
  75. package/build-module/components/editor-help/help-detail-navigation-screen.native.js +31 -18
  76. package/build-module/components/editor-help/help-detail-navigation-screen.native.js.map +1 -1
  77. package/build-module/components/editor-help/help-get-support-button.native.js +34 -0
  78. package/build-module/components/editor-help/help-get-support-button.native.js.map +1 -0
  79. package/build-module/components/editor-help/help-topic-row.native.js +3 -2
  80. package/build-module/components/editor-help/help-topic-row.native.js.map +1 -1
  81. package/build-module/components/editor-help/index.native.js +81 -28
  82. package/build-module/components/editor-help/index.native.js.map +1 -1
  83. package/build-module/components/editor-help/intro-to-blocks.native.js +19 -10
  84. package/build-module/components/editor-help/intro-to-blocks.native.js.map +1 -1
  85. package/build-module/components/editor-help/move-blocks.native.js +7 -6
  86. package/build-module/components/editor-help/move-blocks.native.js.map +1 -1
  87. package/build-module/components/editor-help/remove-blocks.native.js +7 -6
  88. package/build-module/components/editor-help/remove-blocks.native.js.map +1 -1
  89. package/build-module/components/editor-help/view-sections.native.js +22 -5
  90. package/build-module/components/editor-help/view-sections.native.js.map +1 -1
  91. package/build-module/components/entities-saved-states/entity-type-list.js +24 -13
  92. package/build-module/components/entities-saved-states/entity-type-list.js.map +1 -1
  93. package/build-module/components/entities-saved-states/index.js +23 -4
  94. package/build-module/components/entities-saved-states/index.js.map +1 -1
  95. package/build-module/components/global-keyboard-shortcuts/save-shortcut.js +12 -14
  96. package/build-module/components/global-keyboard-shortcuts/save-shortcut.js.map +1 -1
  97. package/build-module/components/global-keyboard-shortcuts/visual-editor-shortcuts.js +0 -4
  98. package/build-module/components/global-keyboard-shortcuts/visual-editor-shortcuts.js.map +1 -1
  99. package/build-module/components/index.js +1 -0
  100. package/build-module/components/index.js.map +1 -1
  101. package/build-module/components/local-autosave-monitor/index.js +1 -2
  102. package/build-module/components/local-autosave-monitor/index.js.map +1 -1
  103. package/build-module/components/post-format/index.js +4 -2
  104. package/build-module/components/post-format/index.js.map +1 -1
  105. package/build-module/components/post-locked-modal/index.js +1 -1
  106. package/build-module/components/post-locked-modal/index.js.map +1 -1
  107. package/build-module/components/post-saved-state/index.js +38 -46
  108. package/build-module/components/post-saved-state/index.js.map +1 -1
  109. package/build-module/components/post-taxonomies/flat-term-selector.js +156 -214
  110. package/build-module/components/post-taxonomies/flat-term-selector.js.map +1 -1
  111. package/build-module/components/post-title/index.js +53 -22
  112. package/build-module/components/post-title/index.js.map +1 -1
  113. package/build-module/components/provider/index.native.js +18 -7
  114. package/build-module/components/provider/index.native.js.map +1 -1
  115. package/build-module/components/provider/use-block-editor-settings.js +31 -5
  116. package/build-module/components/provider/use-block-editor-settings.js.map +1 -1
  117. package/build-module/components/word-count/index.js +1 -1
  118. package/build-module/components/word-count/index.js.map +1 -1
  119. package/build-module/store/actions.js +13 -36
  120. package/build-module/store/actions.js.map +1 -1
  121. package/build-module/store/defaults.js +7 -2
  122. package/build-module/store/defaults.js.map +1 -1
  123. package/build-module/store/selectors.js +3 -85
  124. package/build-module/store/selectors.js.map +1 -1
  125. package/build-module/store/utils/notice-builder.js +15 -18
  126. package/build-module/store/utils/notice-builder.js.map +1 -1
  127. package/build-module/{store/utils → utils}/get-template-part-icon.js +2 -2
  128. package/build-module/utils/get-template-part-icon.js.map +1 -0
  129. package/build-module/utils/index.js +1 -0
  130. package/build-module/utils/index.js.map +1 -1
  131. package/build-style/style-rtl.css +9 -60
  132. package/build-style/style.css +9 -60
  133. package/package.json +28 -28
  134. package/src/components/autosave-monitor/index.js +5 -0
  135. package/src/components/autosave-monitor/test/index.js +10 -4
  136. package/src/components/character-count/index.js +3 -2
  137. package/src/components/editor-help/add-blocks.native.js +17 -12
  138. package/src/components/editor-help/customize-blocks.native.js +16 -13
  139. package/src/components/editor-help/help-detail-navigation-screen.native.js +45 -15
  140. package/src/components/editor-help/help-get-support-button.native.js +38 -0
  141. package/src/components/editor-help/help-topic-row.native.js +2 -2
  142. package/src/components/editor-help/images/add-dark.png +0 -0
  143. package/src/components/editor-help/images/add-dark@2x.png +0 -0
  144. package/src/components/editor-help/images/add-dark@3x.png +0 -0
  145. package/src/components/editor-help/images/add-light.png +0 -0
  146. package/src/components/editor-help/images/add-light@2x.png +0 -0
  147. package/src/components/editor-help/images/add-light@3x.png +0 -0
  148. package/src/components/editor-help/images/block-layout-collage.png +0 -0
  149. package/src/components/editor-help/images/block-layout-collage@2x.png +0 -0
  150. package/src/components/editor-help/images/block-layout-collage@3x.png +0 -0
  151. package/src/components/editor-help/images/build-layouts-dark.png +0 -0
  152. package/src/components/editor-help/images/build-layouts-dark@2x.png +0 -0
  153. package/src/components/editor-help/images/build-layouts-dark@3x.png +0 -0
  154. package/src/components/editor-help/images/build-layouts-light.png +0 -0
  155. package/src/components/editor-help/images/build-layouts-light@2x.png +0 -0
  156. package/src/components/editor-help/images/build-layouts-light@3x.png +0 -0
  157. package/src/components/editor-help/images/edit-media-dark.png +0 -0
  158. package/src/components/editor-help/images/edit-media-dark@2x.png +0 -0
  159. package/src/components/editor-help/images/edit-media-dark@3x.png +0 -0
  160. package/src/components/editor-help/images/edit-media-light.png +0 -0
  161. package/src/components/editor-help/images/edit-media-light@2x.png +0 -0
  162. package/src/components/editor-help/images/edit-media-light@3x.png +0 -0
  163. package/src/components/editor-help/images/embed-media-dark.png +0 -0
  164. package/src/components/editor-help/images/embed-media-dark@2x.png +0 -0
  165. package/src/components/editor-help/images/embed-media-dark@3x.png +0 -0
  166. package/src/components/editor-help/images/embed-media-light.png +0 -0
  167. package/src/components/editor-help/images/embed-media-light@2x.png +0 -0
  168. package/src/components/editor-help/images/embed-media-light@3x.png +0 -0
  169. package/src/components/editor-help/images/move-dark.png +0 -0
  170. package/src/components/editor-help/images/move-dark@2x.png +0 -0
  171. package/src/components/editor-help/images/move-dark@3x.png +0 -0
  172. package/src/components/editor-help/images/move-light.png +0 -0
  173. package/src/components/editor-help/images/move-light@2x.png +0 -0
  174. package/src/components/editor-help/images/move-light@3x.png +0 -0
  175. package/src/components/editor-help/images/options-dark.png +0 -0
  176. package/src/components/editor-help/images/options-dark@2x.png +0 -0
  177. package/src/components/editor-help/images/options-dark@3x.png +0 -0
  178. package/src/components/editor-help/images/options-light.png +0 -0
  179. package/src/components/editor-help/images/options-light@2x.png +0 -0
  180. package/src/components/editor-help/images/options-light@3x.png +0 -0
  181. package/src/components/editor-help/images/rich-text-dark.png +0 -0
  182. package/src/components/editor-help/images/rich-text-dark@2x.png +0 -0
  183. package/src/components/editor-help/images/rich-text-dark@3x.png +0 -0
  184. package/src/components/editor-help/images/rich-text-light.png +0 -0
  185. package/src/components/editor-help/images/rich-text-light@2x.png +0 -0
  186. package/src/components/editor-help/images/rich-text-light@3x.png +0 -0
  187. package/src/components/editor-help/images/settings-dark.png +0 -0
  188. package/src/components/editor-help/images/settings-dark@2x.png +0 -0
  189. package/src/components/editor-help/images/settings-dark@3x.png +0 -0
  190. package/src/components/editor-help/images/settings-light.png +0 -0
  191. package/src/components/editor-help/images/settings-light@2x.png +0 -0
  192. package/src/components/editor-help/images/settings-light@3x.png +0 -0
  193. package/src/components/editor-help/index.native.js +147 -43
  194. package/src/components/editor-help/intro-to-blocks.native.js +63 -43
  195. package/src/components/editor-help/move-blocks.native.js +12 -7
  196. package/src/components/editor-help/remove-blocks.native.js +11 -8
  197. package/src/components/editor-help/style.android.scss +6 -0
  198. package/src/components/editor-help/style.ios.scss +6 -0
  199. package/src/components/editor-help/style.scss +49 -32
  200. package/src/components/editor-help/test/index.native.js +80 -0
  201. package/src/components/editor-help/view-sections.native.js +47 -4
  202. package/src/components/entities-saved-states/entity-type-list.js +29 -10
  203. package/src/components/entities-saved-states/index.js +38 -8
  204. package/src/components/global-keyboard-shortcuts/save-shortcut.js +34 -42
  205. package/src/components/global-keyboard-shortcuts/visual-editor-shortcuts.js +8 -16
  206. package/src/components/index.js +1 -0
  207. package/src/components/local-autosave-monitor/index.js +1 -3
  208. package/src/components/post-format/index.js +6 -2
  209. package/src/components/post-format/style.scss +1 -0
  210. package/src/components/post-locked-modal/index.js +1 -1
  211. package/src/components/post-saved-state/index.js +41 -55
  212. package/src/components/post-saved-state/style.scss +10 -1
  213. package/src/components/post-saved-state/test/__snapshots__/index.js.snap +20 -0
  214. package/src/components/post-saved-state/test/index.js +2 -2
  215. package/src/components/post-taxonomies/flat-term-selector.js +220 -254
  216. package/src/components/post-title/index.js +47 -30
  217. package/src/components/post-title/style.scss +1 -70
  218. package/src/components/provider/index.native.js +17 -5
  219. package/src/components/provider/use-block-editor-settings.js +25 -2
  220. package/src/components/word-count/index.js +3 -2
  221. package/src/store/actions.js +13 -41
  222. package/src/store/defaults.js +7 -2
  223. package/src/store/selectors.js +2 -112
  224. package/src/store/test/actions.js +4 -2
  225. package/src/store/utils/notice-builder.js +17 -19
  226. package/src/store/utils/test/notice-builder.js +1 -1
  227. package/src/{store/utils → utils}/get-template-part-icon.js +2 -2
  228. package/src/utils/index.js +1 -0
  229. package/build/store/utils/get-template-part-icon.js.map +0 -1
  230. package/build-module/store/utils/get-template-part-icon.js.map +0 -1
  231. package/src/components/editor-help/images/add-blocks.png +0 -0
  232. package/src/components/editor-help/images/customize-blocks.png +0 -0
  233. package/src/components/editor-help/images/cut-copy-duplicate-blocks.png +0 -0
  234. package/src/components/editor-help/images/edit-or-replace-media.png +0 -0
  235. package/src/components/editor-help/images/intro-blocks-1.png +0 -0
  236. package/src/components/editor-help/images/intro-blocks-2.png +0 -0
  237. package/src/components/editor-help/images/intro-blocks-3.png +0 -0
  238. package/src/components/editor-help/images/intro-blocks-4.png +0 -0
  239. package/src/components/editor-help/images/move-blocks.png +0 -0
  240. package/src/components/editor-help/images/remove-blocks.png +0 -0
  241. package/src/components/editor-help/images/what-is-a-block.png +0 -0
@@ -381,6 +381,7 @@
381
381
  }
382
382
 
383
383
  .editor-post-format__suggestion {
384
+ padding: 6px;
384
385
  text-align: left;
385
386
  font-size: 13px;
386
387
  }
@@ -634,6 +635,10 @@
634
635
  overflow: hidden;
635
636
  white-space: nowrap;
636
637
  }
638
+ .editor-post-saved-state.is-saving[aria-disabled=true], .editor-post-saved-state.is-saving[aria-disabled=true]:hover, .editor-post-saved-state.is-saved[aria-disabled=true], .editor-post-saved-state.is-saved[aria-disabled=true]:hover {
639
+ background: transparent;
640
+ color: #757575;
641
+ }
637
642
  .editor-post-saved-state svg {
638
643
  display: inline-block;
639
644
  flex: 0 0 auto;
@@ -647,7 +652,7 @@
647
652
  text-indent: inherit;
648
653
  }
649
654
  .editor-post-saved-state svg {
650
- margin-left: 4px;
655
+ margin-left: 0;
651
656
  }
652
657
  }
653
658
 
@@ -912,73 +917,17 @@
912
917
  .editor-post-title {
913
918
  position: relative;
914
919
  }
915
- .editor-post-title .editor-post-title__input {
916
- display: block;
917
- width: 100%;
918
- margin: 0;
919
- box-shadow: none;
920
- background: transparent;
921
- transition: border 0.1s ease-out, box-shadow 0.1s linear;
922
- padding: 19px 0;
923
- word-break: keep-all;
924
- font-family: inherit;
925
- color: inherit;
926
- border: 1px solid transparent;
927
- border-right-width: 0;
928
- border-left-width: 0;
929
- border-radius: 0;
930
- outline: 1px solid transparent;
931
- font-size: 2.44em;
932
- font-weight: 800;
933
- line-height: 1.4;
934
- }
935
- @media (prefers-reduced-motion: reduce) {
936
- .editor-post-title .editor-post-title__input {
937
- transition-duration: 0s;
938
- transition-delay: 0s;
939
- }
940
- }
941
- @media (min-width: 600px) {
942
- .editor-post-title .editor-post-title__input {
943
- border-width: 1px;
944
- }
945
- }
946
- .editor-post-title .editor-post-title__input::-webkit-input-placeholder {
947
- color: rgba(30, 30, 30, 0.62);
948
- }
949
- .editor-post-title .editor-post-title__input::-moz-placeholder {
950
- color: rgba(30, 30, 30, 0.62);
951
- opacity: 1;
952
- }
953
- .editor-post-title .editor-post-title__input:-ms-input-placeholder {
954
- color: rgba(30, 30, 30, 0.62);
955
- }
956
- .is-dark-theme .editor-post-title .editor-post-title__input::-webkit-input-placeholder {
957
- color: rgba(255, 255, 255, 0.65);
958
- }
959
- .is-dark-theme .editor-post-title .editor-post-title__input::-moz-placeholder {
960
- opacity: 1;
961
- color: rgba(255, 255, 255, 0.65);
962
- }
963
- .is-dark-theme .editor-post-title .editor-post-title__input:-ms-input-placeholder {
964
- color: rgba(255, 255, 255, 0.65);
965
- }
966
- .editor-post-title .editor-post-title__input:focus {
967
- border: 1px solid transparent;
968
- outline: 1px solid transparent;
969
- box-shadow: none;
970
- }
971
- .editor-post-title.is-focus-mode .editor-post-title__input {
920
+ .editor-post-title.is-focus-mode {
972
921
  opacity: 0.5;
973
922
  transition: opacity 0.1s linear;
974
923
  }
975
924
  @media (prefers-reduced-motion: reduce) {
976
- .editor-post-title.is-focus-mode .editor-post-title__input {
925
+ .editor-post-title.is-focus-mode {
977
926
  transition-duration: 0s;
978
927
  transition-delay: 0s;
979
928
  }
980
929
  }
981
- .editor-post-title.is-focus-mode .editor-post-title__input:focus {
930
+ .editor-post-title.is-focus-mode:focus {
982
931
  opacity: 1;
983
932
  }
984
933
 
@@ -381,6 +381,7 @@
381
381
  }
382
382
 
383
383
  .editor-post-format__suggestion {
384
+ padding: 6px;
384
385
  text-align: right;
385
386
  font-size: 13px;
386
387
  }
@@ -634,6 +635,10 @@
634
635
  overflow: hidden;
635
636
  white-space: nowrap;
636
637
  }
638
+ .editor-post-saved-state.is-saving[aria-disabled=true], .editor-post-saved-state.is-saving[aria-disabled=true]:hover, .editor-post-saved-state.is-saved[aria-disabled=true], .editor-post-saved-state.is-saved[aria-disabled=true]:hover {
639
+ background: transparent;
640
+ color: #757575;
641
+ }
637
642
  .editor-post-saved-state svg {
638
643
  display: inline-block;
639
644
  flex: 0 0 auto;
@@ -647,7 +652,7 @@
647
652
  text-indent: inherit;
648
653
  }
649
654
  .editor-post-saved-state svg {
650
- margin-right: 4px;
655
+ margin-right: 0;
651
656
  }
652
657
  }
653
658
 
@@ -912,73 +917,17 @@
912
917
  .editor-post-title {
913
918
  position: relative;
914
919
  }
915
- .editor-post-title .editor-post-title__input {
916
- display: block;
917
- width: 100%;
918
- margin: 0;
919
- box-shadow: none;
920
- background: transparent;
921
- transition: border 0.1s ease-out, box-shadow 0.1s linear;
922
- padding: 19px 0;
923
- word-break: keep-all;
924
- font-family: inherit;
925
- color: inherit;
926
- border: 1px solid transparent;
927
- border-left-width: 0;
928
- border-right-width: 0;
929
- border-radius: 0;
930
- outline: 1px solid transparent;
931
- font-size: 2.44em;
932
- font-weight: 800;
933
- line-height: 1.4;
934
- }
935
- @media (prefers-reduced-motion: reduce) {
936
- .editor-post-title .editor-post-title__input {
937
- transition-duration: 0s;
938
- transition-delay: 0s;
939
- }
940
- }
941
- @media (min-width: 600px) {
942
- .editor-post-title .editor-post-title__input {
943
- border-width: 1px;
944
- }
945
- }
946
- .editor-post-title .editor-post-title__input::-webkit-input-placeholder {
947
- color: rgba(30, 30, 30, 0.62);
948
- }
949
- .editor-post-title .editor-post-title__input::-moz-placeholder {
950
- color: rgba(30, 30, 30, 0.62);
951
- opacity: 1;
952
- }
953
- .editor-post-title .editor-post-title__input:-ms-input-placeholder {
954
- color: rgba(30, 30, 30, 0.62);
955
- }
956
- .is-dark-theme .editor-post-title .editor-post-title__input::-webkit-input-placeholder {
957
- color: rgba(255, 255, 255, 0.65);
958
- }
959
- .is-dark-theme .editor-post-title .editor-post-title__input::-moz-placeholder {
960
- opacity: 1;
961
- color: rgba(255, 255, 255, 0.65);
962
- }
963
- .is-dark-theme .editor-post-title .editor-post-title__input:-ms-input-placeholder {
964
- color: rgba(255, 255, 255, 0.65);
965
- }
966
- .editor-post-title .editor-post-title__input:focus {
967
- border: 1px solid transparent;
968
- outline: 1px solid transparent;
969
- box-shadow: none;
970
- }
971
- .editor-post-title.is-focus-mode .editor-post-title__input {
920
+ .editor-post-title.is-focus-mode {
972
921
  opacity: 0.5;
973
922
  transition: opacity 0.1s linear;
974
923
  }
975
924
  @media (prefers-reduced-motion: reduce) {
976
- .editor-post-title.is-focus-mode .editor-post-title__input {
925
+ .editor-post-title.is-focus-mode {
977
926
  transition-duration: 0s;
978
927
  transition-delay: 0s;
979
928
  }
980
929
  }
981
- .editor-post-title.is-focus-mode .editor-post-title__input:focus {
930
+ .editor-post-title.is-focus-mode:focus {
982
931
  opacity: 1;
983
932
  }
984
933
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/editor",
3
- "version": "11.0.1",
3
+ "version": "12.0.2",
4
4
  "description": "Enhanced block editor for WordPress posts.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -31,34 +31,34 @@
31
31
  ],
32
32
  "dependencies": {
33
33
  "@babel/runtime": "^7.13.10",
34
- "@wordpress/a11y": "^3.2.1",
35
- "@wordpress/api-fetch": "^5.2.1",
36
- "@wordpress/autop": "^3.2.1",
34
+ "@wordpress/a11y": "^3.2.3",
35
+ "@wordpress/api-fetch": "^5.2.5",
36
+ "@wordpress/autop": "^3.2.2",
37
37
  "@wordpress/blob": "^3.2.1",
38
- "@wordpress/block-editor": "^7.0.1",
39
- "@wordpress/blocks": "^11.0.1",
40
- "@wordpress/components": "^16.0.0",
41
- "@wordpress/compose": "^5.0.1",
42
- "@wordpress/core-data": "^4.0.1",
43
- "@wordpress/data": "^6.0.1",
44
- "@wordpress/data-controls": "^2.2.2",
45
- "@wordpress/date": "^4.2.1",
46
- "@wordpress/deprecated": "^3.2.1",
47
- "@wordpress/element": "^4.0.0",
48
- "@wordpress/hooks": "^3.2.0",
49
- "@wordpress/html-entities": "^3.2.1",
50
- "@wordpress/i18n": "^4.2.1",
51
- "@wordpress/icons": "^5.0.1",
38
+ "@wordpress/block-editor": "^8.0.0",
39
+ "@wordpress/blocks": "^11.1.3",
40
+ "@wordpress/components": "^19.0.1",
41
+ "@wordpress/compose": "^5.0.5",
42
+ "@wordpress/core-data": "^4.0.5",
43
+ "@wordpress/data": "^6.1.3",
44
+ "@wordpress/data-controls": "^2.2.6",
45
+ "@wordpress/date": "^4.2.2",
46
+ "@wordpress/deprecated": "^3.2.2",
47
+ "@wordpress/element": "^4.0.3",
48
+ "@wordpress/hooks": "^3.2.1",
49
+ "@wordpress/html-entities": "^3.2.2",
50
+ "@wordpress/i18n": "^4.2.3",
51
+ "@wordpress/icons": "^6.1.0",
52
52
  "@wordpress/is-shallow-equal": "^4.2.0",
53
- "@wordpress/keyboard-shortcuts": "^3.0.1",
54
- "@wordpress/keycodes": "^3.2.1",
55
- "@wordpress/media-utils": "^3.0.0",
56
- "@wordpress/notices": "^3.2.2",
57
- "@wordpress/reusable-blocks": "^3.0.1",
58
- "@wordpress/rich-text": "^5.0.1",
59
- "@wordpress/server-side-render": "^3.0.1",
60
- "@wordpress/url": "^3.2.1",
61
- "@wordpress/wordcount": "^3.2.1",
53
+ "@wordpress/keyboard-shortcuts": "^3.0.5",
54
+ "@wordpress/keycodes": "^3.2.3",
55
+ "@wordpress/media-utils": "^3.0.4",
56
+ "@wordpress/notices": "^3.2.6",
57
+ "@wordpress/reusable-blocks": "^3.0.5",
58
+ "@wordpress/rich-text": "^5.0.5",
59
+ "@wordpress/server-side-render": "^3.0.5",
60
+ "@wordpress/url": "^3.3.0",
61
+ "@wordpress/wordcount": "^3.2.2",
62
62
  "classnames": "^2.3.1",
63
63
  "lodash": "^4.17.21",
64
64
  "memize": "^1.1.0",
@@ -68,5 +68,5 @@
68
68
  "publishConfig": {
69
69
  "access": "public"
70
70
  },
71
- "gitHead": "8b67fbd424bc67f81c2d825877f0fae726d6363a"
71
+ "gitHead": "393c2b5533837fd637e998d23f0124c081a10df0"
72
72
  }
@@ -42,6 +42,11 @@ export class AutosaveMonitor extends Component {
42
42
  return;
43
43
  }
44
44
 
45
+ if ( this.props.interval !== prevProps.interval ) {
46
+ clearTimeout( this.timerId );
47
+ this.setAutosaveTimer();
48
+ }
49
+
45
50
  if ( ! this.props.isDirty ) {
46
51
  this.needsAutosave = false;
47
52
  return;
@@ -36,6 +36,12 @@ describe( 'AutosaveMonitor', () => {
36
36
  } );
37
37
 
38
38
  describe( '#componentDidUpdate()', () => {
39
+ it( 'should clear and restart autosave timer when the interval changes', () => {
40
+ wrapper.setProps( { interval: 999 } );
41
+ expect( clearTimeout ).toHaveBeenCalled();
42
+ expect( setAutosaveTimerSpy ).toHaveBeenCalledTimes( 2 );
43
+ } );
44
+
39
45
  it( 'should set needsAutosave=true when editReference changes', () => {
40
46
  expect( wrapper.instance().needsAutosave ).toBe( false );
41
47
  wrapper.setProps( {
@@ -95,9 +101,9 @@ describe( 'AutosaveMonitor', () => {
95
101
  isAutosaveable: true,
96
102
  interval: 5,
97
103
  } );
98
- expect( setAutosaveTimerSpy ).toHaveBeenCalledTimes( 1 );
99
- wrapper.instance().autosaveTimerHandler();
100
104
  expect( setAutosaveTimerSpy ).toHaveBeenCalledTimes( 2 );
105
+ wrapper.instance().autosaveTimerHandler();
106
+ expect( setAutosaveTimerSpy ).toHaveBeenCalledTimes( 3 );
101
107
  expect( setTimeout ).lastCalledWith( expect.any( Function ), 5000 );
102
108
  } );
103
109
 
@@ -106,9 +112,9 @@ describe( 'AutosaveMonitor', () => {
106
112
  isAutosaveable: false,
107
113
  interval: 5,
108
114
  } );
109
- expect( setAutosaveTimerSpy ).toHaveBeenCalledTimes( 1 );
110
- wrapper.instance().autosaveTimerHandler();
111
115
  expect( setAutosaveTimerSpy ).toHaveBeenCalledTimes( 2 );
116
+ wrapper.instance().autosaveTimerHandler();
117
+ expect( setAutosaveTimerSpy ).toHaveBeenCalledTimes( 3 );
112
118
  expect( setTimeout ).lastCalledWith( expect.any( Function ), 1000 );
113
119
  } );
114
120
 
@@ -10,8 +10,9 @@ import { count as characterCount } from '@wordpress/wordcount';
10
10
  import { store as editorStore } from '../../store';
11
11
 
12
12
  export default function CharacterCount() {
13
- const content = useSelect( ( select ) =>
14
- select( editorStore ).getEditedPostAttribute( 'content' )
13
+ const content = useSelect(
14
+ ( select ) => select( editorStore ).getEditedPostAttribute( 'content' ),
15
+ []
15
16
  );
16
17
 
17
18
  return characterCount( content, 'characters_including_spaces' );
@@ -16,19 +16,24 @@ import { HelpDetailBodyText, HelpDetailImage } from './view-sections';
16
16
 
17
17
  const AddBlocks = () => {
18
18
  return (
19
- <View style={ styles.helpDetailContainer }>
20
- <HelpDetailImage source={ require( './images/add-blocks.png' ) } />
21
- <HelpDetailBodyText
22
- text={ __(
23
- 'Add a new block at any time by tapping on the + icon in the toolbar on the bottom left. '
24
- ) }
19
+ <>
20
+ <HelpDetailImage
21
+ source={ require( './images/add-light.png' ) }
22
+ sourceDarkMode={ require( './images/add-dark.png' ) }
25
23
  />
26
- <HelpDetailBodyText
27
- text={ __(
28
- 'Once you become familiar with the names of different blocks, you can add a block by typing a forward slash followed by the block name — for example, /image or /heading.'
29
- ) }
30
- />
31
- </View>
24
+ <View style={ styles.helpDetailContainer }>
25
+ <HelpDetailBodyText
26
+ text={ __(
27
+ 'Add a new block at any time by tapping on the + icon in the toolbar on the bottom left. '
28
+ ) }
29
+ />
30
+ <HelpDetailBodyText
31
+ text={ __(
32
+ 'Once you become familiar with the names of different blocks, you can add a block by typing a forward slash followed by the block name — for example, /image or /heading.'
33
+ ) }
34
+ />
35
+ </View>
36
+ </>
32
37
  );
33
38
  };
34
39
 
@@ -16,21 +16,24 @@ import { HelpDetailBodyText, HelpDetailImage } from './view-sections';
16
16
 
17
17
  const CustomizeBlocks = () => {
18
18
  return (
19
- <View style={ styles.helpDetailContainer }>
19
+ <>
20
20
  <HelpDetailImage
21
- source={ require( './images/customize-blocks.png' ) }
21
+ source={ require( './images/settings-light.png' ) }
22
+ sourceDarkMode={ require( './images/settings-dark.png' ) }
22
23
  />
23
- <HelpDetailBodyText
24
- text={ __(
25
- 'Each block has its own settings. To find them, click on a block. Its settings will appear on the toolbar at the bottom of the screen.'
26
- ) }
27
- />
28
- <HelpDetailBodyText
29
- text={ __(
30
- 'Some blocks have additional settings. Tap the settings icon on the bottom right of the block to view more options.'
31
- ) }
32
- />
33
- </View>
24
+ <View style={ styles.helpDetailContainer }>
25
+ <HelpDetailBodyText
26
+ text={ __(
27
+ 'Each block has its own settings. To find them, tap on a block. Its settings will appear on the toolbar at the bottom of the screen.'
28
+ ) }
29
+ />
30
+ <HelpDetailBodyText
31
+ text={ __(
32
+ 'Some blocks have additional settings. Tap the settings icon on the bottom right of the block to view more options.'
33
+ ) }
34
+ />
35
+ </View>
36
+ </>
34
37
  );
35
38
  };
36
39
 
@@ -1,35 +1,65 @@
1
1
  /**
2
2
  * External dependencies
3
3
  */
4
- import { View } from 'react-native';
4
+ import {
5
+ ScrollView,
6
+ StyleSheet,
7
+ TouchableWithoutFeedback,
8
+ View,
9
+ } from 'react-native';
10
+ import { useNavigation } from '@react-navigation/native';
5
11
 
6
12
  /**
7
13
  * WordPress dependencies
8
14
  */
9
- import { BottomSheet } from '@wordpress/components';
10
- import { useNavigation } from '@react-navigation/native';
11
- import { __ } from '@wordpress/i18n';
15
+ import { BottomSheet, BottomSheetContext } from '@wordpress/components';
16
+ import { useContext } from '@wordpress/element';
12
17
 
13
18
  /**
14
19
  * Internal dependencies
15
20
  */
16
21
  import styles from './style.scss';
17
22
 
18
- const HelpDetailNavigationScreen = ( { name, content } ) => {
23
+ const HelpDetailNavigationScreen = ( { content, label } ) => {
19
24
  const navigation = useNavigation();
20
25
 
21
- const goBack = () => {
22
- navigation.goBack();
23
- };
26
+ const { listProps } = useContext( BottomSheetContext );
27
+ const contentContainerStyle = StyleSheet.flatten(
28
+ listProps.contentContainerStyle
29
+ );
24
30
 
25
31
  return (
26
- <BottomSheet.NavigationScreen name={ __( 'What is a block?' ) }>
27
- <BottomSheet.NavigationHeader
28
- screen={ name }
29
- leftButtonOnPress={ goBack }
30
- />
31
- <View style={ styles.separator } />
32
- { content }
32
+ <BottomSheet.NavigationScreen isScrollable fullScreen>
33
+ <View style={ styles.container }>
34
+ <BottomSheet.NavBar>
35
+ <BottomSheet.NavBar.BackButton
36
+ onPress={ navigation.goBack }
37
+ />
38
+ <BottomSheet.NavBar.Heading>
39
+ { label }
40
+ </BottomSheet.NavBar.Heading>
41
+ </BottomSheet.NavBar>
42
+ <ScrollView
43
+ { ...listProps }
44
+ contentContainerStyle={ {
45
+ ...contentContainerStyle,
46
+ paddingBottom: Math.max(
47
+ listProps.safeAreaBottomInset,
48
+ contentContainerStyle.paddingBottom
49
+ ),
50
+ /**
51
+ * Remove margin set via `hideHeader`. Combining a header
52
+ * and navigation in this bottom sheet is at odds with the
53
+ * current `BottomSheet` implementation.
54
+ */
55
+ marginTop: 0,
56
+ } }
57
+ >
58
+ <TouchableWithoutFeedback accessible={ false }>
59
+ <View>{ content }</View>
60
+ </TouchableWithoutFeedback>
61
+ </ScrollView>
62
+ </View>
33
63
  </BottomSheet.NavigationScreen>
34
64
  );
35
65
  };
@@ -0,0 +1,38 @@
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import { Pressable, Text } from 'react-native';
5
+
6
+ /**
7
+ * WordPress dependencies
8
+ */
9
+ import { usePreferredColorSchemeStyle } from '@wordpress/compose';
10
+
11
+ /**
12
+ * Internal dependencies
13
+ */
14
+ import styles from './style.scss';
15
+
16
+ const HelpGetSupportButton = ( { onPress, title } ) => {
17
+ const buttonStyle = usePreferredColorSchemeStyle(
18
+ styles.button,
19
+ styles.buttonDark
20
+ );
21
+
22
+ const textStyle = usePreferredColorSchemeStyle(
23
+ styles.buttonText,
24
+ styles.buttonTextDark
25
+ );
26
+
27
+ return (
28
+ <Pressable
29
+ style={ buttonStyle }
30
+ onPress={ onPress }
31
+ accessibilityRole={ 'button' }
32
+ >
33
+ <Text style={ textStyle }>{ title }</Text>
34
+ </Pressable>
35
+ );
36
+ };
37
+
38
+ export default HelpGetSupportButton;
@@ -9,11 +9,11 @@ import { useNavigation } from '@react-navigation/native';
9
9
  import { TextControl, Icon } from '@wordpress/components';
10
10
  import { chevronRight } from '@wordpress/icons';
11
11
 
12
- const HelpTopicRow = ( { label, icon } ) => {
12
+ const HelpTopicRow = ( { label, icon, screenName } ) => {
13
13
  const navigation = useNavigation();
14
14
 
15
15
  const openSubSheet = () => {
16
- navigation.navigate( label );
16
+ navigation.navigate( screenName );
17
17
  };
18
18
 
19
19
  return (