@wordpress/editor 13.10.0 → 13.12.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 (373) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/build/components/autosave-monitor/index.js +1 -2
  3. package/build/components/autosave-monitor/index.js.map +1 -1
  4. package/build/components/deprecated.js +3 -4
  5. package/build/components/deprecated.js.map +1 -1
  6. package/build/components/document-outline/check.js +4 -5
  7. package/build/components/document-outline/check.js.map +1 -1
  8. package/build/components/document-outline/index.js +12 -16
  9. package/build/components/document-outline/index.js.map +1 -1
  10. package/build/components/document-outline/item.js +22 -25
  11. package/build/components/document-outline/item.js.map +1 -1
  12. package/build/components/editor-help/help-detail-navigation-screen.native.js +4 -5
  13. package/build/components/editor-help/help-detail-navigation-screen.native.js.map +1 -1
  14. package/build/components/editor-help/help-get-support-button.native.js +4 -5
  15. package/build/components/editor-help/help-get-support-button.native.js.map +1 -1
  16. package/build/components/editor-help/help-section-title.native.js +3 -4
  17. package/build/components/editor-help/help-section-title.native.js.map +1 -1
  18. package/build/components/editor-help/help-topic-row.native.js +6 -7
  19. package/build/components/editor-help/help-topic-row.native.js.map +1 -1
  20. package/build/components/editor-help/index.native.js +19 -24
  21. package/build/components/editor-help/index.native.js.map +1 -1
  22. package/build/components/editor-help/view-sections.native.js +16 -20
  23. package/build/components/editor-help/view-sections.native.js.map +1 -1
  24. package/build/components/editor-notices/index.js +12 -19
  25. package/build/components/editor-notices/index.js.map +1 -1
  26. package/build/components/editor-snackbars/index.js +3 -6
  27. package/build/components/editor-snackbars/index.js.map +1 -1
  28. package/build/components/entities-saved-states/entity-record-item.js +7 -10
  29. package/build/components/entities-saved-states/entity-record-item.js.map +1 -1
  30. package/build/components/entities-saved-states/entity-type-list.js +6 -7
  31. package/build/components/entities-saved-states/entity-type-list.js.map +1 -1
  32. package/build/components/entities-saved-states/hooks/use-is-dirty.js +84 -0
  33. package/build/components/entities-saved-states/hooks/use-is-dirty.js.map +1 -0
  34. package/build/components/entities-saved-states/index.js +42 -110
  35. package/build/components/entities-saved-states/index.js.map +1 -1
  36. package/build/components/error-boundary/index.js +4 -5
  37. package/build/components/error-boundary/index.js.map +1 -1
  38. package/build/components/global-keyboard-shortcuts/save-shortcut.js +3 -4
  39. package/build/components/global-keyboard-shortcuts/save-shortcut.js.map +1 -1
  40. package/build/components/index.js +9 -0
  41. package/build/components/index.js.map +1 -1
  42. package/build/components/media-categories/index.js +25 -42
  43. package/build/components/media-categories/index.js.map +1 -1
  44. package/build/components/page-attributes/check.js +4 -7
  45. package/build/components/page-attributes/check.js.map +1 -1
  46. package/build/components/page-attributes/order.js +5 -8
  47. package/build/components/page-attributes/order.js.map +1 -1
  48. package/build/components/page-attributes/parent.js +5 -12
  49. package/build/components/page-attributes/parent.js.map +1 -1
  50. package/build/components/post-author/check.js +6 -7
  51. package/build/components/post-author/check.js.map +1 -1
  52. package/build/components/post-author/combobox.js +3 -6
  53. package/build/components/post-author/combobox.js.map +1 -1
  54. package/build/components/post-author/index.js +1 -1
  55. package/build/components/post-author/index.js.map +1 -1
  56. package/build/components/post-comments/index.js +4 -6
  57. package/build/components/post-comments/index.js.map +1 -1
  58. package/build/components/post-excerpt/index.js +4 -5
  59. package/build/components/post-excerpt/index.js.map +1 -1
  60. package/build/components/post-featured-image/index.js +56 -69
  61. package/build/components/post-featured-image/index.js.map +1 -1
  62. package/build/components/post-format/check.js +4 -5
  63. package/build/components/post-format/check.js.map +1 -1
  64. package/build/components/post-format/index.js +1 -1
  65. package/build/components/post-format/index.js.map +1 -1
  66. package/build/components/post-last-revision/check.js +5 -7
  67. package/build/components/post-last-revision/check.js.map +1 -1
  68. package/build/components/post-last-revision/index.js +4 -5
  69. package/build/components/post-last-revision/index.js.map +1 -1
  70. package/build/components/post-locked-modal/index.js +1 -1
  71. package/build/components/post-locked-modal/index.js.map +1 -1
  72. package/build/components/post-pending-status/check.js +7 -9
  73. package/build/components/post-pending-status/check.js.map +1 -1
  74. package/build/components/post-pending-status/index.js +4 -6
  75. package/build/components/post-pending-status/index.js.map +1 -1
  76. package/build/components/post-pingbacks/index.js +4 -6
  77. package/build/components/post-pingbacks/index.js.map +1 -1
  78. package/build/components/post-preview-button/index.js +8 -12
  79. package/build/components/post-preview-button/index.js.map +1 -1
  80. package/build/components/post-publish-button/index.js +6 -13
  81. package/build/components/post-publish-button/index.js.map +1 -1
  82. package/build/components/post-publish-button/label.js +14 -17
  83. package/build/components/post-publish-button/label.js.map +1 -1
  84. package/build/components/post-publish-panel/index.js +6 -7
  85. package/build/components/post-publish-panel/index.js.map +1 -1
  86. package/build/components/post-publish-panel/maybe-category-panel.js +2 -4
  87. package/build/components/post-publish-panel/maybe-category-panel.js.map +1 -1
  88. package/build/components/post-publish-panel/maybe-post-format-panel.js +9 -12
  89. package/build/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
  90. package/build/components/post-publish-panel/maybe-tags-panel.js +4 -7
  91. package/build/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
  92. package/build/components/post-publish-panel/postpublish.js +8 -11
  93. package/build/components/post-publish-panel/postpublish.js.map +1 -1
  94. package/build/components/post-publish-panel/prepublish.js +5 -6
  95. package/build/components/post-publish-panel/prepublish.js.map +1 -1
  96. package/build/components/post-saved-state/index.js +13 -8
  97. package/build/components/post-saved-state/index.js.map +1 -1
  98. package/build/components/post-schedule/check.js +6 -8
  99. package/build/components/post-schedule/check.js.map +1 -1
  100. package/build/components/post-schedule/index.js +8 -12
  101. package/build/components/post-schedule/index.js.map +1 -1
  102. package/build/components/post-schedule/label.js +7 -10
  103. package/build/components/post-schedule/label.js.map +1 -1
  104. package/build/components/post-slug/check.js +3 -4
  105. package/build/components/post-slug/check.js.map +1 -1
  106. package/build/components/post-slug/index.js +5 -6
  107. package/build/components/post-slug/index.js.map +1 -1
  108. package/build/components/post-sticky/check.js +7 -9
  109. package/build/components/post-sticky/check.js.map +1 -1
  110. package/build/components/post-sticky/index.js +4 -5
  111. package/build/components/post-sticky/index.js.map +1 -1
  112. package/build/components/post-switch-to-draft-button/index.js +6 -7
  113. package/build/components/post-switch-to-draft-button/index.js.map +1 -1
  114. package/build/components/post-taxonomies/check.js +6 -7
  115. package/build/components/post-taxonomies/check.js.map +1 -1
  116. package/build/components/post-taxonomies/flat-term-selector.js +13 -14
  117. package/build/components/post-taxonomies/flat-term-selector.js.map +1 -1
  118. package/build/components/post-taxonomies/hierarchical-term-selector.js +13 -14
  119. package/build/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
  120. package/build/components/post-taxonomies/index.js +6 -11
  121. package/build/components/post-taxonomies/index.js.map +1 -1
  122. package/build/components/post-taxonomies/most-used-terms.js +5 -6
  123. package/build/components/post-taxonomies/most-used-terms.js.map +1 -1
  124. package/build/components/post-template/index.js +6 -9
  125. package/build/components/post-template/index.js.map +1 -1
  126. package/build/components/post-title/index.js +2 -6
  127. package/build/components/post-title/index.js.map +1 -1
  128. package/build/components/post-title/index.native.js +8 -11
  129. package/build/components/post-title/index.native.js.map +1 -1
  130. package/build/components/post-trash/check.js +7 -9
  131. package/build/components/post-trash/check.js.map +1 -1
  132. package/build/components/post-type-support-check/index.js +5 -6
  133. package/build/components/post-type-support-check/index.js.map +1 -1
  134. package/build/components/post-url/check.js +4 -5
  135. package/build/components/post-url/check.js.map +1 -1
  136. package/build/components/post-url/index.js +8 -9
  137. package/build/components/post-url/index.js.map +1 -1
  138. package/build/components/post-visibility/check.js +6 -7
  139. package/build/components/post-visibility/check.js.map +1 -1
  140. package/build/components/post-visibility/index.js +10 -12
  141. package/build/components/post-visibility/index.js.map +1 -1
  142. package/build/components/post-visibility/label.js +1 -3
  143. package/build/components/post-visibility/label.js.map +1 -1
  144. package/build/components/provider/index.js +9 -10
  145. package/build/components/provider/index.js.map +1 -1
  146. package/build/components/provider/index.native.js +14 -20
  147. package/build/components/provider/index.native.js.map +1 -1
  148. package/build/components/provider/use-block-editor-settings.js +6 -10
  149. package/build/components/provider/use-block-editor-settings.js.map +1 -1
  150. package/build/components/provider/use-block-editor-settings.native.js +1 -3
  151. package/build/components/provider/use-block-editor-settings.native.js.map +1 -1
  152. package/build/components/table-of-contents/index.js +26 -33
  153. package/build/components/table-of-contents/index.js.map +1 -1
  154. package/build/components/table-of-contents/panel.js +4 -5
  155. package/build/components/table-of-contents/panel.js.map +1 -1
  156. package/build/components/template-validation-notice/index.js +4 -6
  157. package/build/components/template-validation-notice/index.js.map +1 -1
  158. package/build/components/theme-support-check/index.js +7 -8
  159. package/build/components/theme-support-check/index.js.map +1 -1
  160. package/build/hooks/custom-sources-backwards-compatibility.js +16 -35
  161. package/build/hooks/custom-sources-backwards-compatibility.js.map +1 -1
  162. package/build/hooks/default-autocompleters.js +1 -2
  163. package/build/hooks/default-autocompleters.js.map +1 -1
  164. package/build/private-apis.js +4 -1
  165. package/build/private-apis.js.map +1 -1
  166. package/build/store/actions.js +147 -179
  167. package/build/store/actions.js.map +1 -1
  168. package/build/store/actions.native.js +1 -2
  169. package/build/store/actions.native.js.map +1 -1
  170. package/build/store/reducer.js +14 -44
  171. package/build/store/reducer.js.map +1 -1
  172. package/build/store/reducer.native.js +3 -12
  173. package/build/store/reducer.native.js.map +1 -1
  174. package/build/store/selectors.js +23 -54
  175. package/build/store/selectors.js.map +1 -1
  176. package/build/store/utils/notice-builder.js +3 -3
  177. package/build/store/utils/notice-builder.js.map +1 -1
  178. package/build/utils/media-upload/index.js +11 -15
  179. package/build/utils/media-upload/index.js.map +1 -1
  180. package/build/utils/terms.js +3 -6
  181. package/build/utils/terms.js.map +1 -1
  182. package/build-module/components/autosave-monitor/index.js +1 -2
  183. package/build-module/components/autosave-monitor/index.js.map +1 -1
  184. package/build-module/components/deprecated.js +3 -4
  185. package/build-module/components/deprecated.js.map +1 -1
  186. package/build-module/components/document-outline/check.js +4 -5
  187. package/build-module/components/document-outline/check.js.map +1 -1
  188. package/build-module/components/document-outline/index.js +12 -16
  189. package/build-module/components/document-outline/index.js.map +1 -1
  190. package/build-module/components/document-outline/item.js +22 -25
  191. package/build-module/components/document-outline/item.js.map +1 -1
  192. package/build-module/components/editor-help/help-detail-navigation-screen.native.js +4 -5
  193. package/build-module/components/editor-help/help-detail-navigation-screen.native.js.map +1 -1
  194. package/build-module/components/editor-help/help-get-support-button.native.js +4 -5
  195. package/build-module/components/editor-help/help-get-support-button.native.js.map +1 -1
  196. package/build-module/components/editor-help/help-section-title.native.js +3 -4
  197. package/build-module/components/editor-help/help-section-title.native.js.map +1 -1
  198. package/build-module/components/editor-help/help-topic-row.native.js +6 -7
  199. package/build-module/components/editor-help/help-topic-row.native.js.map +1 -1
  200. package/build-module/components/editor-help/index.native.js +19 -23
  201. package/build-module/components/editor-help/index.native.js.map +1 -1
  202. package/build-module/components/editor-help/view-sections.native.js +16 -20
  203. package/build-module/components/editor-help/view-sections.native.js.map +1 -1
  204. package/build-module/components/editor-notices/index.js +12 -19
  205. package/build-module/components/editor-notices/index.js.map +1 -1
  206. package/build-module/components/editor-snackbars/index.js +3 -6
  207. package/build-module/components/editor-snackbars/index.js.map +1 -1
  208. package/build-module/components/entities-saved-states/entity-record-item.js +7 -10
  209. package/build-module/components/entities-saved-states/entity-record-item.js.map +1 -1
  210. package/build-module/components/entities-saved-states/entity-type-list.js +6 -7
  211. package/build-module/components/entities-saved-states/entity-type-list.js.map +1 -1
  212. package/build-module/components/entities-saved-states/hooks/use-is-dirty.js +70 -0
  213. package/build-module/components/entities-saved-states/hooks/use-is-dirty.js.map +1 -0
  214. package/build-module/components/entities-saved-states/index.js +43 -113
  215. package/build-module/components/entities-saved-states/index.js.map +1 -1
  216. package/build-module/components/error-boundary/index.js +4 -5
  217. package/build-module/components/error-boundary/index.js.map +1 -1
  218. package/build-module/components/global-keyboard-shortcuts/save-shortcut.js +3 -4
  219. package/build-module/components/global-keyboard-shortcuts/save-shortcut.js.map +1 -1
  220. package/build-module/components/index.js +1 -0
  221. package/build-module/components/index.js.map +1 -1
  222. package/build-module/components/media-categories/index.js +25 -42
  223. package/build-module/components/media-categories/index.js.map +1 -1
  224. package/build-module/components/page-attributes/check.js +4 -7
  225. package/build-module/components/page-attributes/check.js.map +1 -1
  226. package/build-module/components/page-attributes/order.js +5 -8
  227. package/build-module/components/page-attributes/order.js.map +1 -1
  228. package/build-module/components/page-attributes/parent.js +5 -12
  229. package/build-module/components/page-attributes/parent.js.map +1 -1
  230. package/build-module/components/post-author/check.js +6 -7
  231. package/build-module/components/post-author/check.js.map +1 -1
  232. package/build-module/components/post-author/combobox.js +3 -6
  233. package/build-module/components/post-author/combobox.js.map +1 -1
  234. package/build-module/components/post-author/index.js +1 -1
  235. package/build-module/components/post-author/index.js.map +1 -1
  236. package/build-module/components/post-comments/index.js +4 -6
  237. package/build-module/components/post-comments/index.js.map +1 -1
  238. package/build-module/components/post-excerpt/index.js +4 -5
  239. package/build-module/components/post-excerpt/index.js.map +1 -1
  240. package/build-module/components/post-featured-image/index.js +56 -69
  241. package/build-module/components/post-featured-image/index.js.map +1 -1
  242. package/build-module/components/post-format/check.js +4 -5
  243. package/build-module/components/post-format/check.js.map +1 -1
  244. package/build-module/components/post-format/index.js +1 -1
  245. package/build-module/components/post-format/index.js.map +1 -1
  246. package/build-module/components/post-last-revision/check.js +5 -7
  247. package/build-module/components/post-last-revision/check.js.map +1 -1
  248. package/build-module/components/post-last-revision/index.js +4 -5
  249. package/build-module/components/post-last-revision/index.js.map +1 -1
  250. package/build-module/components/post-locked-modal/index.js +1 -1
  251. package/build-module/components/post-locked-modal/index.js.map +1 -1
  252. package/build-module/components/post-pending-status/check.js +7 -9
  253. package/build-module/components/post-pending-status/check.js.map +1 -1
  254. package/build-module/components/post-pending-status/index.js +4 -6
  255. package/build-module/components/post-pending-status/index.js.map +1 -1
  256. package/build-module/components/post-pingbacks/index.js +4 -6
  257. package/build-module/components/post-pingbacks/index.js.map +1 -1
  258. package/build-module/components/post-preview-button/index.js +8 -12
  259. package/build-module/components/post-preview-button/index.js.map +1 -1
  260. package/build-module/components/post-publish-button/index.js +6 -13
  261. package/build-module/components/post-publish-button/index.js.map +1 -1
  262. package/build-module/components/post-publish-button/label.js +14 -17
  263. package/build-module/components/post-publish-button/label.js.map +1 -1
  264. package/build-module/components/post-publish-panel/index.js +6 -7
  265. package/build-module/components/post-publish-panel/index.js.map +1 -1
  266. package/build-module/components/post-publish-panel/maybe-category-panel.js +2 -4
  267. package/build-module/components/post-publish-panel/maybe-category-panel.js.map +1 -1
  268. package/build-module/components/post-publish-panel/maybe-post-format-panel.js +9 -12
  269. package/build-module/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
  270. package/build-module/components/post-publish-panel/maybe-tags-panel.js +4 -7
  271. package/build-module/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
  272. package/build-module/components/post-publish-panel/postpublish.js +8 -11
  273. package/build-module/components/post-publish-panel/postpublish.js.map +1 -1
  274. package/build-module/components/post-publish-panel/prepublish.js +5 -6
  275. package/build-module/components/post-publish-panel/prepublish.js.map +1 -1
  276. package/build-module/components/post-saved-state/index.js +13 -8
  277. package/build-module/components/post-saved-state/index.js.map +1 -1
  278. package/build-module/components/post-schedule/check.js +6 -8
  279. package/build-module/components/post-schedule/check.js.map +1 -1
  280. package/build-module/components/post-schedule/index.js +8 -12
  281. package/build-module/components/post-schedule/index.js.map +1 -1
  282. package/build-module/components/post-schedule/label.js +7 -10
  283. package/build-module/components/post-schedule/label.js.map +1 -1
  284. package/build-module/components/post-slug/check.js +3 -4
  285. package/build-module/components/post-slug/check.js.map +1 -1
  286. package/build-module/components/post-slug/index.js +5 -6
  287. package/build-module/components/post-slug/index.js.map +1 -1
  288. package/build-module/components/post-sticky/check.js +7 -9
  289. package/build-module/components/post-sticky/check.js.map +1 -1
  290. package/build-module/components/post-sticky/index.js +4 -5
  291. package/build-module/components/post-sticky/index.js.map +1 -1
  292. package/build-module/components/post-switch-to-draft-button/index.js +6 -7
  293. package/build-module/components/post-switch-to-draft-button/index.js.map +1 -1
  294. package/build-module/components/post-taxonomies/check.js +6 -7
  295. package/build-module/components/post-taxonomies/check.js.map +1 -1
  296. package/build-module/components/post-taxonomies/flat-term-selector.js +13 -14
  297. package/build-module/components/post-taxonomies/flat-term-selector.js.map +1 -1
  298. package/build-module/components/post-taxonomies/hierarchical-term-selector.js +13 -14
  299. package/build-module/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
  300. package/build-module/components/post-taxonomies/index.js +6 -11
  301. package/build-module/components/post-taxonomies/index.js.map +1 -1
  302. package/build-module/components/post-taxonomies/most-used-terms.js +5 -6
  303. package/build-module/components/post-taxonomies/most-used-terms.js.map +1 -1
  304. package/build-module/components/post-template/index.js +6 -9
  305. package/build-module/components/post-template/index.js.map +1 -1
  306. package/build-module/components/post-title/index.js +2 -6
  307. package/build-module/components/post-title/index.js.map +1 -1
  308. package/build-module/components/post-title/index.native.js +8 -11
  309. package/build-module/components/post-title/index.native.js.map +1 -1
  310. package/build-module/components/post-trash/check.js +7 -9
  311. package/build-module/components/post-trash/check.js.map +1 -1
  312. package/build-module/components/post-type-support-check/index.js +5 -6
  313. package/build-module/components/post-type-support-check/index.js.map +1 -1
  314. package/build-module/components/post-url/check.js +4 -5
  315. package/build-module/components/post-url/check.js.map +1 -1
  316. package/build-module/components/post-url/index.js +8 -9
  317. package/build-module/components/post-url/index.js.map +1 -1
  318. package/build-module/components/post-visibility/check.js +6 -7
  319. package/build-module/components/post-visibility/check.js.map +1 -1
  320. package/build-module/components/post-visibility/index.js +10 -12
  321. package/build-module/components/post-visibility/index.js.map +1 -1
  322. package/build-module/components/post-visibility/label.js +1 -3
  323. package/build-module/components/post-visibility/label.js.map +1 -1
  324. package/build-module/components/provider/index.js +9 -10
  325. package/build-module/components/provider/index.js.map +1 -1
  326. package/build-module/components/provider/index.native.js +14 -20
  327. package/build-module/components/provider/index.native.js.map +1 -1
  328. package/build-module/components/provider/use-block-editor-settings.js +6 -10
  329. package/build-module/components/provider/use-block-editor-settings.js.map +1 -1
  330. package/build-module/components/provider/use-block-editor-settings.native.js +1 -3
  331. package/build-module/components/provider/use-block-editor-settings.native.js.map +1 -1
  332. package/build-module/components/table-of-contents/index.js +26 -33
  333. package/build-module/components/table-of-contents/index.js.map +1 -1
  334. package/build-module/components/table-of-contents/panel.js +4 -5
  335. package/build-module/components/table-of-contents/panel.js.map +1 -1
  336. package/build-module/components/template-validation-notice/index.js +4 -6
  337. package/build-module/components/template-validation-notice/index.js.map +1 -1
  338. package/build-module/components/theme-support-check/index.js +7 -8
  339. package/build-module/components/theme-support-check/index.js.map +1 -1
  340. package/build-module/hooks/custom-sources-backwards-compatibility.js +16 -35
  341. package/build-module/hooks/custom-sources-backwards-compatibility.js.map +1 -1
  342. package/build-module/hooks/default-autocompleters.js +1 -2
  343. package/build-module/hooks/default-autocompleters.js.map +1 -1
  344. package/build-module/private-apis.js +3 -1
  345. package/build-module/private-apis.js.map +1 -1
  346. package/build-module/store/actions.js +147 -179
  347. package/build-module/store/actions.js.map +1 -1
  348. package/build-module/store/actions.native.js +1 -2
  349. package/build-module/store/actions.native.js.map +1 -1
  350. package/build-module/store/reducer.js +14 -44
  351. package/build-module/store/reducer.js.map +1 -1
  352. package/build-module/store/reducer.native.js +3 -12
  353. package/build-module/store/reducer.native.js.map +1 -1
  354. package/build-module/store/selectors.js +21 -54
  355. package/build-module/store/selectors.js.map +1 -1
  356. package/build-module/store/utils/notice-builder.js +3 -3
  357. package/build-module/store/utils/notice-builder.js.map +1 -1
  358. package/build-module/utils/media-upload/index.js +11 -15
  359. package/build-module/utils/media-upload/index.js.map +1 -1
  360. package/build-module/utils/terms.js +3 -6
  361. package/build-module/utils/terms.js.map +1 -1
  362. package/build-style/style-rtl.css +1 -1
  363. package/build-style/style.css +1 -1
  364. package/package.json +31 -31
  365. package/src/components/entities-saved-states/hooks/use-is-dirty.js +85 -0
  366. package/src/components/entities-saved-states/index.js +29 -107
  367. package/src/components/entities-saved-states/test/use-is-dirty.js +94 -0
  368. package/src/components/index.js +1 -0
  369. package/src/components/post-saved-state/index.js +6 -0
  370. package/src/components/post-taxonomies/flat-term-selector.js +1 -1
  371. package/src/components/post-title/index.js +2 -1
  372. package/src/components/provider/use-block-editor-settings.js +1 -0
  373. package/src/private-apis.js +2 -0
package/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 13.12.0 (2023-06-07)
6
+
7
+ ## 13.11.0 (2023-05-24)
8
+
5
9
  ## 13.10.0 (2023-05-10)
6
10
 
7
11
  ## 13.9.0 (2023-04-26)
@@ -79,8 +79,7 @@ class AutosaveMonitor extends _element.Component {
79
79
  clearTimeout(this.timerId);
80
80
  }
81
81
 
82
- setAutosaveTimer() {
83
- let timeout = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props.interval * 1000;
82
+ setAutosaveTimer(timeout = this.props.interval * 1000) {
84
83
  this.timerId = setTimeout(() => {
85
84
  this.autosaveTimerHandler();
86
85
  }, timeout);
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/editor/src/components/autosave-monitor/index.js"],"names":["AutosaveMonitor","Component","constructor","props","needsAutosave","isDirty","isAutosaveable","componentDidMount","disableIntervalChecks","setAutosaveTimer","componentDidUpdate","prevProps","editsReference","autosave","interval","clearTimeout","timerId","isAutosaving","componentWillUnmount","timeout","setTimeout","autosaveTimerHandler","render","select","ownProps","getReferenceByDistinctEdits","coreStore","isEditedPostDirty","isEditedPostAutosaveable","isAutosavingPost","getEditorSettings","editorStore","autosaveInterval","dispatch"],"mappings":";;;;;;;AAGA;;AACA;;AACA;;AACA;;AAKA;;AAXA;AACA;AACA;;AAMA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,eAAN,SAA8BC,kBAA9B,CAAwC;AAC9CC,EAAAA,WAAW,CAAEC,KAAF,EAAU;AACpB,UAAOA,KAAP;AACA,SAAKC,aAAL,GAAqB,CAAC,EAAID,KAAK,CAACE,OAAN,IAAiBF,KAAK,CAACG,cAA3B,CAAt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AACA;;AAED,QAAK,KAAKL,aAAV,EAA0B;AACzB,WAAKA,aAAL,GAAqB,KAArB;AACA,WAAKD,KAAL,CAAWU,QAAX;AACA;;AAED,SAAKJ,gBAAL;AACA;;AAEDa,EAAAA,MAAM,GAAG;AACR,WAAO,IAAP;AACA;;AAlE6C;;;;eAqEhC,sBAAS,CACvB,sBAAY,CAAEC,MAAF,EAAUC,QAAV,KAAwB;AACnC,QAAM;AAAEC,IAAAA;AAAF,MAAkCF,MAAM,CAAEG,eAAF,CAA9C;AAEA,QAAM;AACLC,IAAAA,iBADK;AAELC,IAAAA,wBAFK;AAGLC,IAAAA,gBAHK;AAILC,IAAAA;AAJK,MAKFP,MAAM,CAAEQ,YAAF,CALV;AAOA,QAAM;AAAEjB,IAAAA,QAAQ,GAAGgB,iBAAiB,GAAGE;AAAjC,MAAsDR,QAA5D;AAEA,SAAO;AACNZ,IAAAA,cAAc,EAAEa,2BAA2B,EADrC;AAENpB,IAAAA,OAAO,EAAEsB,iBAAiB,EAFpB;AAGNrB,IAAAA,cAAc,EAAEsB,wBAAwB,EAHlC;AAINX,IAAAA,YAAY,EAAEY,gBAAgB,EAJxB;AAKNf,IAAAA;AALM,GAAP;AAOA,CAnBD,CADuB,EAqBvB,wBAAc,CAAEmB,QAAF,EAAYT,QAAZ,MAA4B;AACzCX,EAAAA,QAAQ,GAAG;AACV,UAAM;AAAEA,MAAAA,QAAQ,GAAGoB,QAAQ,CAAEF,YAAF,CAAR,CAAwBlB;AAArC,QAAkDW,QAAxD;AACAX,IAAAA,QAAQ;AACR;;AAJwC,CAA5B,CAAd,CArBuB,CAAT,EA2BVb,eA3BU,C","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { compose } from '@wordpress/compose';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * AutosaveMonitor invokes `props.autosave()` within at most `interval` seconds after an unsaved change is detected.\n *\n * The logic is straightforward: a check is performed every `props.interval` seconds. If any changes are detected, `props.autosave()` is called.\n * The time between the change and the autosave varies but is no larger than `props.interval` seconds. Refer to the code below for more details, such as\n * the specific way of detecting changes.\n *\n * There are two caveats:\n * * If `props.isAutosaveable` happens to be false at a time of checking for changes, the check is retried every second.\n * * The timer may be disabled by setting `props.disableIntervalChecks` to `true`. In that mode, any change will immediately trigger `props.autosave()`.\n */\nexport class AutosaveMonitor extends Component {\n\tconstructor( props ) {\n\t\tsuper( props );\n\t\tthis.needsAutosave = !! ( props.isDirty && props.isAutosaveable );\n\t}\n\n\tcomponentDidMount() {\n\t\tif ( ! this.props.disableIntervalChecks ) {\n\t\t\tthis.setAutosaveTimer();\n\t\t}\n\t}\n\n\tcomponentDidUpdate( prevProps ) {\n\t\tif ( this.props.disableIntervalChecks ) {\n\t\t\tif ( this.props.editsReference !== prevProps.editsReference ) {\n\t\t\t\tthis.props.autosave();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tif ( this.props.interval !== prevProps.interval ) {\n\t\t\tclearTimeout( this.timerId );\n\t\t\tthis.setAutosaveTimer();\n\t\t}\n\n\t\tif ( ! this.props.isDirty ) {\n\t\t\tthis.needsAutosave = false;\n\t\t\treturn;\n\t\t}\n\n\t\tif ( this.props.isAutosaving && ! prevProps.isAutosaving ) {\n\t\t\tthis.needsAutosave = false;\n\t\t\treturn;\n\t\t}\n\n\t\tif ( this.props.editsReference !== prevProps.editsReference ) {\n\t\t\tthis.needsAutosave = true;\n\t\t}\n\t}\n\n\tcomponentWillUnmount() {\n\t\tclearTimeout( this.timerId );\n\t}\n\n\tsetAutosaveTimer( timeout = this.props.interval * 1000 ) {\n\t\tthis.timerId = setTimeout( () => {\n\t\t\tthis.autosaveTimerHandler();\n\t\t}, timeout );\n\t}\n\n\tautosaveTimerHandler() {\n\t\tif ( ! this.props.isAutosaveable ) {\n\t\t\tthis.setAutosaveTimer( 1000 );\n\t\t\treturn;\n\t\t}\n\n\t\tif ( this.needsAutosave ) {\n\t\t\tthis.needsAutosave = false;\n\t\t\tthis.props.autosave();\n\t\t}\n\n\t\tthis.setAutosaveTimer();\n\t}\n\n\trender() {\n\t\treturn null;\n\t}\n}\n\nexport default compose( [\n\twithSelect( ( select, ownProps ) => {\n\t\tconst { getReferenceByDistinctEdits } = select( coreStore );\n\n\t\tconst {\n\t\t\tisEditedPostDirty,\n\t\t\tisEditedPostAutosaveable,\n\t\t\tisAutosavingPost,\n\t\t\tgetEditorSettings,\n\t\t} = select( editorStore );\n\n\t\tconst { interval = getEditorSettings().autosaveInterval } = ownProps;\n\n\t\treturn {\n\t\t\teditsReference: getReferenceByDistinctEdits(),\n\t\t\tisDirty: isEditedPostDirty(),\n\t\t\tisAutosaveable: isEditedPostAutosaveable(),\n\t\t\tisAutosaving: isAutosavingPost(),\n\t\t\tinterval,\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch, ownProps ) => ( {\n\t\tautosave() {\n\t\t\tconst { autosave = dispatch( editorStore ).autosave } = ownProps;\n\t\t\tautosave();\n\t\t},\n\t} ) ),\n] )( AutosaveMonitor );\n"]}
1
+ {"version":3,"sources":["@wordpress/editor/src/components/autosave-monitor/index.js"],"names":["AutosaveMonitor","Component","constructor","props","needsAutosave","isDirty","isAutosaveable","componentDidMount","disableIntervalChecks","setAutosaveTimer","componentDidUpdate","prevProps","editsReference","autosave","interval","clearTimeout","timerId","isAutosaving","componentWillUnmount","timeout","setTimeout","autosaveTimerHandler","render","select","ownProps","getReferenceByDistinctEdits","coreStore","isEditedPostDirty","isEditedPostAutosaveable","isAutosavingPost","getEditorSettings","editorStore","autosaveInterval","dispatch"],"mappings":";;;;;;;AAGA;;AACA;;AACA;;AACA;;AAKA;;AAXA;AACA;AACA;;AAMA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,eAAN,SAA8BC,kBAA9B,CAAwC;AAC9CC,EA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GA;;AAEDE,EAAAA,oBAAoB,GAAG;AACtB,QAAK,CAAE,KAAKlB,KAAL,CAAWG,cAAlB,EAAmC;AAClC,WAAKG,gBAAL,CAAuB,IAAvB;AACA;AACA;;AAED,QAAK,KAAKL,aAAV,EAA0B;AACzB,WAAKA,aAAL,GAAqB,KAArB;AACA,WAAKD,KAAL,CAAWU,QAAX;AACA;;AAED,SAAKJ,gBAAL;AACA;;AAEDa,EAAAA,MAAM,GAAG;AACR,WAAO,IAAP;AACA;;AAlE6C;;;;eAqEhC,sBAAS,CACvB,sBAAY,CAAEC,MAAF,EAAUC,QAAV,KAAwB;AACnC,QAAM;AAAEC,IAAAA;AAAF,MAAkCF,MAAM,CAAEG,eAAF,CAA9C;AAEA,QAAM;AACLC,IAAAA,iBADK;AAELC,IAAAA,wBAFK;AAGLC,IAAAA,gBAHK;AAILC,IAAAA;AAJK,MAKFP,MAAM,CAAEQ,YAAF,CALV;AAOA,QAAM;AAAEjB,IAAAA,QAAQ,GAAGgB,iBAAiB,GAAGE;AAAjC,MAAsDR,QAA5D;AAEA,SAAO;AACNZ,IAAAA,cAAc,EAAEa,2BAA2B,EADrC;AAENpB,IAAAA,OAAO,EAAEsB,iBAAiB,EAFpB;AAGNrB,IAAAA,cAAc,EAAEsB,wBAAwB,EAHlC;AAINX,IAAAA,YAAY,EAAEY,gBAAgB,EAJxB;AAKNf,IAAAA;AALM,GAAP;AAOA,CAnBD,CADuB,EAqBvB,wBAAc,CAAEmB,QAAF,EAAYT,QAAZ,MAA4B;AACzCX,EAAAA,QAAQ,GAAG;AACV,UAAM;AAAEA,MAAAA,QAAQ,GAAGoB,QAAQ,CAAEF,YAAF,CAAR,CAAwBlB;AAArC,QAAkDW,QAAxD;AACAX,IAAAA,QAAQ;AACR;;AAJwC,CAA5B,CAAd,CArBuB,CAAT,EA2BVb,eA3BU,C","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { compose } from '@wordpress/compose';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * AutosaveMonitor invokes `props.autosave()` within at most `interval` seconds after an unsaved change is detected.\n *\n * The logic is straightforward: a check is performed every `props.interval` seconds. If any changes are detected, `props.autosave()` is called.\n * The time between the change and the autosave varies but is no larger than `props.interval` seconds. Refer to the code below for more details, such as\n * the specific way of detecting changes.\n *\n * There are two caveats:\n * * If `props.isAutosaveable` happens to be false at a time of checking for changes, the check is retried every second.\n * * The timer may be disabled by setting `props.disableIntervalChecks` to `true`. In that mode, any change will immediately trigger `props.autosave()`.\n */\nexport class AutosaveMonitor extends Component {\n\tconstructor( props ) {\n\t\tsuper( props );\n\t\tthis.needsAutosave = !! ( props.isDirty && props.isAutosaveable );\n\t}\n\n\tcomponentDidMount() {\n\t\tif ( ! this.props.disableIntervalChecks ) {\n\t\t\tthis.setAutosaveTimer();\n\t\t}\n\t}\n\n\tcomponentDidUpdate( prevProps ) {\n\t\tif ( this.props.disableIntervalChecks ) {\n\t\t\tif ( this.props.editsReference !== prevProps.editsReference ) {\n\t\t\t\tthis.props.autosave();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tif ( this.props.interval !== prevProps.interval ) {\n\t\t\tclearTimeout( this.timerId );\n\t\t\tthis.setAutosaveTimer();\n\t\t}\n\n\t\tif ( ! this.props.isDirty ) {\n\t\t\tthis.needsAutosave = false;\n\t\t\treturn;\n\t\t}\n\n\t\tif ( this.props.isAutosaving && ! prevProps.isAutosaving ) {\n\t\t\tthis.needsAutosave = false;\n\t\t\treturn;\n\t\t}\n\n\t\tif ( this.props.editsReference !== prevProps.editsReference ) {\n\t\t\tthis.needsAutosave = true;\n\t\t}\n\t}\n\n\tcomponentWillUnmount() {\n\t\tclearTimeout( this.timerId );\n\t}\n\n\tsetAutosaveTimer( timeout = this.props.interval * 1000 ) {\n\t\tthis.timerId = setTimeout( () => {\n\t\t\tthis.autosaveTimerHandler();\n\t\t}, timeout );\n\t}\n\n\tautosaveTimerHandler() {\n\t\tif ( ! this.props.isAutosaveable ) {\n\t\t\tthis.setAutosaveTimer( 1000 );\n\t\t\treturn;\n\t\t}\n\n\t\tif ( this.needsAutosave ) {\n\t\t\tthis.needsAutosave = false;\n\t\t\tthis.props.autosave();\n\t\t}\n\n\t\tthis.setAutosaveTimer();\n\t}\n\n\trender() {\n\t\treturn null;\n\t}\n}\n\nexport default compose( [\n\twithSelect( ( select, ownProps ) => {\n\t\tconst { getReferenceByDistinctEdits } = select( coreStore );\n\n\t\tconst {\n\t\t\tisEditedPostDirty,\n\t\t\tisEditedPostAutosaveable,\n\t\t\tisAutosavingPost,\n\t\t\tgetEditorSettings,\n\t\t} = select( editorStore );\n\n\t\tconst { interval = getEditorSettings().autosaveInterval } = ownProps;\n\n\t\treturn {\n\t\t\teditsReference: getReferenceByDistinctEdits(),\n\t\t\tisDirty: isEditedPostDirty(),\n\t\t\tisAutosaveable: isEditedPostAutosaveable(),\n\t\t\tisAutosaving: isAutosavingPost(),\n\t\t\tinterval,\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch, ownProps ) => ( {\n\t\tautosave() {\n\t\t\tconst { autosave = dispatch( editorStore ).autosave } = ownProps;\n\t\t\tautosave();\n\t\t},\n\t} ) ),\n] )( AutosaveMonitor );\n"]}
@@ -29,8 +29,7 @@ var _serverSideRender = _interopRequireDefault(require("@wordpress/server-side-r
29
29
  /**
30
30
  * WordPress dependencies
31
31
  */
32
- function deprecateComponent(name, Wrapped) {
33
- let staticsToHoist = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
32
+ function deprecateComponent(name, Wrapped, staticsToHoist = []) {
34
33
  const Component = (0, _element.forwardRef)((props, ref) => {
35
34
  (0, _deprecated.default)('wp.editor.' + name, {
36
35
  since: '5.3',
@@ -48,13 +47,13 @@ function deprecateComponent(name, Wrapped) {
48
47
  }
49
48
 
50
49
  function deprecateFunction(name, func) {
51
- return function () {
50
+ return (...args) => {
52
51
  (0, _deprecated.default)('wp.editor.' + name, {
53
52
  since: '5.3',
54
53
  alternative: 'wp.blockEditor.' + name,
55
54
  version: '6.2'
56
55
  });
57
- return func(...arguments);
56
+ return func(...args);
58
57
  };
59
58
  }
60
59
 
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/editor/src/components/deprecated.js"],"names":["deprecateComponent","name","Wrapped","staticsToHoist","Component","props","ref","since","alternative","version","forEach","staticName","deprecateFunction","func","RichText","RootRichText","isEmpty","Autocomplete","RootAutocomplete","AlignmentToolbar","RootAlignmentToolbar","BlockAlignmentToolbar","RootBlockAlignmentToolbar","BlockControls","RootBlockControls","BlockEdit","RootBlockEdit","BlockEditorKeyboardShortcuts","RootBlockEditorKeyboardShortcuts","BlockFormatControls","RootBlockFormatControls","BlockIcon","RootBlockIcon","BlockInspector","RootBlockInspector","BlockList","RootBlockList","BlockMover","RootBlockMover","BlockNavigationDropdown","RootBlockNavigationDropdown","BlockSelectionClearer","RootBlockSelectionClearer","BlockSettingsMenu","RootBlockSettingsMenu","BlockTitle","RootBlockTitle","BlockToolbar","RootBlockToolbar","ColorPalette","RootColorPalette","ContrastChecker","RootContrastChecker","CopyHandler","RootCopyHandler","DefaultBlockAppender","RootDefaultBlockAppender","FontSizePicker","RootFontSizePicker","Inserter","RootInserter","InnerBlocks","RootInnerBlocks","InspectorAdvancedControls","RootInspectorAdvancedControls","InspectorControls","RootInspectorControls","PanelColorSettings","RootPanelColorSettings","PlainText","RootPlainText","RichTextShortcut","RootRichTextShortcut","RichTextToolbarButton","RootRichTextToolbarButton","__unstableRichTextInputEvent","__unstableRootRichTextInputEvent","MediaPlaceholder","RootMediaPlaceholder","MediaUpload","RootMediaUpload","MediaUploadCheck","RootMediaUploadCheck","MultiSelectScrollIntoView","RootMultiSelectScrollIntoView","NavigableToolbar","RootNavigableToolbar","ObserveTyping","RootObserveTyping","SkipToSelectedBlock","RootSkipToSelectedBlock","URLInput","RootURLInput","URLInputButton","RootURLInputButton","URLPopover","RootURLPopover","Warning","RootWarning","WritingFlow","RootWritingFlow","createCustomColorsHOC","rootCreateCustomColorsHOC","getColorClassName","rootGetColorClassName","getColorObjectByAttributeValues","rootGetColorObjectByAttributeValues","getColorObjectByColorValue","rootGetColorObjectByColorValue","getFontSize","rootGetFontSize","getFontSizeClass","rootGetFontSizeClass","withColorContext","rootWithColorContext","withColors","rootWithColors","withFontSizes","rootWithFontSizes"],"mappings":";;;;;;;;;;;;;;;;AAKA;;;;AADA;;AAEA;;AAuDA;;AA7DA;;AACA;AACA;AACA;AA4DA,SAASA,kBAAT,CAA6BC,IAA7B,EAAmCC,OAAnC,EAAkE;AAAA,MAAtBC,cAAsB,uEAAL,EAAK;AACjE,QAAMC,SAAS,GAAG,yBAAY,CAAEC,KAAF,EAASC,GAAT,KAAkB;AAC/C,6BAAY,eAAeL,IAA3B,EAAiC;AAChCM,MAAAA,KAAK,EAAE,KADyB;AAEhCC,MAAAA,WAAW,EAAE,oBAAoBP,IAFD;AAGhCQ,MAAAA,OAAO,EAAE;AAHuB,KAAjC;AAMA,WAAO,4BAAC,OAAD;AAAS,MAAA,GAAG,EAAGH;AAAf,OAA0BD,KAA1B,EAAP;AACA,GARiB,CAAlB;AAUAF,EAAAA,cAAc,CAACO,OAAf,CAA0BC,UAAF,IAAkB;AACzCP,IAAAA,SAAS,CAAEO,UAAF,CAAT,GAA0BX,kBAAkB,CAC3CC,IAAI,GAAG,GAAP,GAAaU,UAD8B,EAE3CT,OAAO,CAAES,UAAF,CAFoC,CAA5C;AAIA,GALD;AAOA,SAAOP,SAAP;AACA;;AAED,SAASQ,iBAAT,CAA4BX,IAA5B,EAAkCY,IAAlC,EAAyC;AACxC,SAAO,YAAe;AACrB,6BAAY,eAAeZ,IAA3B,EAAiC;AAChCM,MAAAA,KAAK,EAAE,KADyB;AAEhCC,MAAAA,WAAW,EAAE,oBAAoBP,IAFD;AAGhCQ,MAAAA,OAAO,EAAE;AAHuB,KAAjC;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,iBAAiB,CACjD,mBADiD,EAEjD4F,8BAFiD,CAA3C;;AAIA,MAAMC,+BAA+B,GAAG7F,iBAAiB,CAC/D,iCAD+D,EAE/D8F,4CAF+D,CAAzD;;AAIA,MAAMC,0BAA0B,GAAG/F,iBAAiB,CAC1D,4BAD0D,EAE1DgG,uCAF0D,CAApD;;AAIA,MAAMC,WAAW,GAAGjG,iBAAiB,CAAE,aAAF,EAAiBkG,wBAAjB,CAArC;;AACA,MAAMC,gBAAgB,GAAGnG,iBAAiB,CAChD,kBADgD,EAEhDoG,6BAFgD,CAA1C;;AAIA,MAAMC,gBAAgB,GAAGrG,iBAAiB,CAChD,kBADgD,EAEhDsG,6BAFgD,CAA1C;;AAIA,MAAMC,UAAU,GAAGvG,iBAAiB,CAAE,YAAF,EAAgBwG,uBAAhB,CAApC;;AACA,MAAMC,aAAa,GAAGzG,iBAAiB,CAC7C,eAD6C,EAE7C0G,0BAF6C,CAAvC","sourcesContent":["// Block Creation Components.\n/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { forwardRef } from '@wordpress/element';\nimport {\n\tAutocomplete as RootAutocomplete,\n\tAlignmentToolbar as RootAlignmentToolbar,\n\tBlockAlignmentToolbar as RootBlockAlignmentToolbar,\n\tBlockControls as RootBlockControls,\n\tBlockEdit as RootBlockEdit,\n\tBlockEditorKeyboardShortcuts as RootBlockEditorKeyboardShortcuts,\n\tBlockFormatControls as RootBlockFormatControls,\n\tBlockIcon as RootBlockIcon,\n\tBlockInspector as RootBlockInspector,\n\tBlockList as RootBlockList,\n\tBlockMover as RootBlockMover,\n\tBlockNavigationDropdown as RootBlockNavigationDropdown,\n\tBlockSelectionClearer as RootBlockSelectionClearer,\n\tBlockSettingsMenu as RootBlockSettingsMenu,\n\tBlockTitle as RootBlockTitle,\n\tBlockToolbar as RootBlockToolbar,\n\tColorPalette as RootColorPalette,\n\tContrastChecker as RootContrastChecker,\n\tCopyHandler as RootCopyHandler,\n\tcreateCustomColorsHOC as rootCreateCustomColorsHOC,\n\tDefaultBlockAppender as RootDefaultBlockAppender,\n\tFontSizePicker as RootFontSizePicker,\n\tgetColorClassName as rootGetColorClassName,\n\tgetColorObjectByAttributeValues as rootGetColorObjectByAttributeValues,\n\tgetColorObjectByColorValue as rootGetColorObjectByColorValue,\n\tgetFontSize as rootGetFontSize,\n\tgetFontSizeClass as rootGetFontSizeClass,\n\tInserter as RootInserter,\n\tInnerBlocks as RootInnerBlocks,\n\tInspectorAdvancedControls as RootInspectorAdvancedControls,\n\tInspectorControls as RootInspectorControls,\n\tPanelColorSettings as RootPanelColorSettings,\n\tPlainText as RootPlainText,\n\tRichText as RootRichText,\n\tRichTextShortcut as RootRichTextShortcut,\n\tRichTextToolbarButton as RootRichTextToolbarButton,\n\t__unstableRichTextInputEvent as __unstableRootRichTextInputEvent,\n\tMediaPlaceholder as RootMediaPlaceholder,\n\tMediaUpload as RootMediaUpload,\n\tMediaUploadCheck as RootMediaUploadCheck,\n\tMultiSelectScrollIntoView as RootMultiSelectScrollIntoView,\n\tNavigableToolbar as RootNavigableToolbar,\n\tObserveTyping as RootObserveTyping,\n\tSkipToSelectedBlock as RootSkipToSelectedBlock,\n\tURLInput as RootURLInput,\n\tURLInputButton as RootURLInputButton,\n\tURLPopover as RootURLPopover,\n\tWarning as RootWarning,\n\tWritingFlow as RootWritingFlow,\n\twithColorContext as rootWithColorContext,\n\twithColors as rootWithColors,\n\twithFontSizes as rootWithFontSizes,\n} from '@wordpress/block-editor';\n\nexport { default as ServerSideRender } from '@wordpress/server-side-render';\n\nfunction deprecateComponent( name, Wrapped, staticsToHoist = [] ) {\n\tconst Component = forwardRef( ( props, ref ) => {\n\t\tdeprecated( 'wp.editor.' + name, {\n\t\t\tsince: '5.3',\n\t\t\talternative: 'wp.blockEditor.' + name,\n\t\t\tversion: '6.2',\n\t\t} );\n\n\t\treturn <Wrapped ref={ ref } { ...props } />;\n\t} );\n\n\tstaticsToHoist.forEach( ( staticName ) => {\n\t\tComponent[ staticName ] = deprecateComponent(\n\t\t\tname + '.' + staticName,\n\t\t\tWrapped[ staticName ]\n\t\t);\n\t} );\n\n\treturn Component;\n}\n\nfunction deprecateFunction( name, func ) {\n\treturn ( ...args ) => {\n\t\tdeprecated( 'wp.editor.' + name, {\n\t\t\tsince: '5.3',\n\t\t\talternative: 'wp.blockEditor.' + name,\n\t\t\tversion: '6.2',\n\t\t} );\n\n\t\treturn func( ...args );\n\t};\n}\n\nconst RichText = deprecateComponent( 'RichText', RootRichText, [ 'Content' ] );\nRichText.isEmpty = deprecateFunction(\n\t'RichText.isEmpty',\n\tRootRichText.isEmpty\n);\n\nexport { RichText };\nexport const Autocomplete = deprecateComponent(\n\t'Autocomplete',\n\tRootAutocomplete\n);\nexport const AlignmentToolbar = deprecateComponent(\n\t'AlignmentToolbar',\n\tRootAlignmentToolbar\n);\nexport const BlockAlignmentToolbar = deprecateComponent(\n\t'BlockAlignmentToolbar',\n\tRootBlockAlignmentToolbar\n);\nexport const BlockControls = deprecateComponent(\n\t'BlockControls',\n\tRootBlockControls,\n\t[ 'Slot' ]\n);\nexport const BlockEdit = deprecateComponent( 'BlockEdit', RootBlockEdit );\nexport const BlockEditorKeyboardShortcuts = deprecateComponent(\n\t'BlockEditorKeyboardShortcuts',\n\tRootBlockEditorKeyboardShortcuts\n);\nexport const BlockFormatControls = deprecateComponent(\n\t'BlockFormatControls',\n\tRootBlockFormatControls,\n\t[ 'Slot' ]\n);\nexport const BlockIcon = deprecateComponent( 'BlockIcon', RootBlockIcon );\nexport const BlockInspector = deprecateComponent(\n\t'BlockInspector',\n\tRootBlockInspector\n);\nexport const BlockList = deprecateComponent( 'BlockList', RootBlockList );\nexport const BlockMover = deprecateComponent( 'BlockMover', RootBlockMover );\nexport const BlockNavigationDropdown = deprecateComponent(\n\t'BlockNavigationDropdown',\n\tRootBlockNavigationDropdown\n);\nexport const BlockSelectionClearer = deprecateComponent(\n\t'BlockSelectionClearer',\n\tRootBlockSelectionClearer\n);\nexport const BlockSettingsMenu = deprecateComponent(\n\t'BlockSettingsMenu',\n\tRootBlockSettingsMenu\n);\nexport const BlockTitle = deprecateComponent( 'BlockTitle', RootBlockTitle );\nexport const BlockToolbar = deprecateComponent(\n\t'BlockToolbar',\n\tRootBlockToolbar\n);\nexport const ColorPalette = deprecateComponent(\n\t'ColorPalette',\n\tRootColorPalette\n);\nexport const ContrastChecker = deprecateComponent(\n\t'ContrastChecker',\n\tRootContrastChecker\n);\nexport const CopyHandler = deprecateComponent( 'CopyHandler', RootCopyHandler );\nexport const DefaultBlockAppender = deprecateComponent(\n\t'DefaultBlockAppender',\n\tRootDefaultBlockAppender\n);\nexport const FontSizePicker = deprecateComponent(\n\t'FontSizePicker',\n\tRootFontSizePicker\n);\nexport const Inserter = deprecateComponent( 'Inserter', RootInserter );\nexport const InnerBlocks = deprecateComponent( 'InnerBlocks', RootInnerBlocks, [\n\t'ButtonBlockAppender',\n\t'DefaultBlockAppender',\n\t'Content',\n] );\nexport const InspectorAdvancedControls = deprecateComponent(\n\t'InspectorAdvancedControls',\n\tRootInspectorAdvancedControls,\n\t[ 'Slot' ]\n);\nexport const InspectorControls = deprecateComponent(\n\t'InspectorControls',\n\tRootInspectorControls,\n\t[ 'Slot' ]\n);\nexport const PanelColorSettings = deprecateComponent(\n\t'PanelColorSettings',\n\tRootPanelColorSettings\n);\nexport const PlainText = deprecateComponent( 'PlainText', RootPlainText );\nexport const RichTextShortcut = deprecateComponent(\n\t'RichTextShortcut',\n\tRootRichTextShortcut\n);\nexport const RichTextToolbarButton = deprecateComponent(\n\t'RichTextToolbarButton',\n\tRootRichTextToolbarButton\n);\nexport const __unstableRichTextInputEvent = deprecateComponent(\n\t'__unstableRichTextInputEvent',\n\t__unstableRootRichTextInputEvent\n);\nexport const MediaPlaceholder = deprecateComponent(\n\t'MediaPlaceholder',\n\tRootMediaPlaceholder\n);\nexport const MediaUpload = deprecateComponent( 'MediaUpload', RootMediaUpload );\nexport const MediaUploadCheck = deprecateComponent(\n\t'MediaUploadCheck',\n\tRootMediaUploadCheck\n);\nexport const MultiSelectScrollIntoView = deprecateComponent(\n\t'MultiSelectScrollIntoView',\n\tRootMultiSelectScrollIntoView\n);\nexport const NavigableToolbar = deprecateComponent(\n\t'NavigableToolbar',\n\tRootNavigableToolbar\n);\nexport const ObserveTyping = deprecateComponent(\n\t'ObserveTyping',\n\tRootObserveTyping\n);\nexport const SkipToSelectedBlock = deprecateComponent(\n\t'SkipToSelectedBlock',\n\tRootSkipToSelectedBlock\n);\nexport const URLInput = deprecateComponent( 'URLInput', RootURLInput );\nexport const URLInputButton = deprecateComponent(\n\t'URLInputButton',\n\tRootURLInputButton\n);\nexport const URLPopover = deprecateComponent( 'URLPopover', RootURLPopover );\nexport const Warning = deprecateComponent( 'Warning', RootWarning );\nexport const WritingFlow = deprecateComponent( 'WritingFlow', RootWritingFlow );\n\nexport const createCustomColorsHOC = deprecateFunction(\n\t'createCustomColorsHOC',\n\trootCreateCustomColorsHOC\n);\nexport const getColorClassName = deprecateFunction(\n\t'getColorClassName',\n\trootGetColorClassName\n);\nexport const getColorObjectByAttributeValues = deprecateFunction(\n\t'getColorObjectByAttributeValues',\n\trootGetColorObjectByAttributeValues\n);\nexport const getColorObjectByColorValue = deprecateFunction(\n\t'getColorObjectByColorValue',\n\trootGetColorObjectByColorValue\n);\nexport const getFontSize = deprecateFunction( 'getFontSize', rootGetFontSize );\nexport const getFontSizeClass = deprecateFunction(\n\t'getFontSizeClass',\n\trootGetFontSizeClass\n);\nexport const withColorContext = deprecateFunction(\n\t'withColorContext',\n\trootWithColorContext\n);\nexport const withColors = deprecateFunction( 'withColors', rootWithColors );\nexport const withFontSizes = deprecateFunction(\n\t'withFontSizes',\n\trootWithFontSizes\n);\n"]}
1
+ {"version":3,"sources":["@wordpress/editor/src/components/deprecated.js"],"names":["deprecateComponent","name","Wrapped","staticsToHoist","Component","props","ref","since","alternative","version","forEach","staticName","deprecateFunction","func","args","RichText","RootRichText","isEmpty","Autocomplete","RootAutocomplete","AlignmentToolbar","RootAlignmentToolbar","BlockAlignmentToolbar","RootBlockAlignmentToolbar","BlockControls","RootBlockControls","BlockEdit","RootBlockEdit","BlockEditorKeyboardShortcuts","RootBlockEditorKeyboardShortcuts","BlockFormatControls","RootBlockFormatControls","BlockIcon","RootBlockIcon","BlockInspector","RootBlockInspector","BlockList","RootBlockList","BlockMover","RootBlockMover","BlockNavigationDropdown","RootBlockNavigationDropdown","BlockSelectionClearer","RootBlockSelectionClearer","BlockSettingsMenu","RootBlockSettingsMenu","BlockTitle","RootBlockTitle","BlockToolbar","RootBlockToolbar","ColorPalette","RootColorPalette","ContrastChecker","RootContrastChecker","CopyHandler","RootCopyHandler","DefaultBlockAppender","RootDefaultBlockAppender","FontSizePicker","RootFontSizePicker","Inserter","RootInserter","InnerBlocks","RootInnerBlocks","InspectorAdvancedControls","RootInspectorAdvancedControls","InspectorControls","RootInspectorControls","PanelColorSettings","RootPanelColorSettings","PlainText","RootPlainText","RichTextShortcut","RootRichTextShortcut","RichTextToolbarButton","RootRichTextToolbarButton","__unstableRichTextInputEvent","__unstableRootRichTextInputEvent","MediaPlaceholder","RootMediaPlaceholder","MediaUpload","RootMediaUpload","MediaUploadCheck","RootMediaUploadCheck","MultiSelectScrollIntoView","RootMultiSelectScrollIntoView","NavigableToolbar","RootNavigableToolbar","ObserveTyping","RootObserveTyping","SkipToSelectedBlock","RootSkipToSelectedBlock","URLInput","RootURLInput","URLInputButton","RootURLInputButton","URLPopover","RootURLPopover","Warning","RootWarning","WritingFlow","RootWritingFlow","createCustomColorsHOC","rootCreateCustomColorsHOC","getColorClassName","rootGetColorClassName","getColorObjectByAttributeValues","rootGetColorObjectByAttributeValues","getColorObjectByColorValue","rootGetColorObjectByColorValue","getFontSize","rootGetFontSize","getFontSizeClass","rootGetFontSizeClass","withColorContext","rootWithColorContext","withColors","rootWithColors","withFontSizes","rootWithFontSizes"],"mappings":";;;;;;;;;;;;;;;;AAKA;;;;AADA;;AAEA;;AAuDA;;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B,CAChD,kBADgD,EAEhDqG,6BAFgD,CAA1C;;AAIA,MAAMC,gBAAgB,GAAGtG,iBAAiB,CAChD,kBADgD,EAEhDuG,6BAFgD,CAA1C;;AAIA,MAAMC,UAAU,GAAGxG,iBAAiB,CAAE,YAAF,EAAgByG,uBAAhB,CAApC;;AACA,MAAMC,aAAa,GAAG1G,iBAAiB,CAC7C,eAD6C,EAE7C2G,0BAF6C,CAAvC","sourcesContent":["// Block Creation Components.\n/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { forwardRef } from '@wordpress/element';\nimport {\n\tAutocomplete as RootAutocomplete,\n\tAlignmentToolbar as RootAlignmentToolbar,\n\tBlockAlignmentToolbar as RootBlockAlignmentToolbar,\n\tBlockControls as RootBlockControls,\n\tBlockEdit as RootBlockEdit,\n\tBlockEditorKeyboardShortcuts as RootBlockEditorKeyboardShortcuts,\n\tBlockFormatControls as RootBlockFormatControls,\n\tBlockIcon as RootBlockIcon,\n\tBlockInspector as RootBlockInspector,\n\tBlockList as RootBlockList,\n\tBlockMover as RootBlockMover,\n\tBlockNavigationDropdown as RootBlockNavigationDropdown,\n\tBlockSelectionClearer as RootBlockSelectionClearer,\n\tBlockSettingsMenu as RootBlockSettingsMenu,\n\tBlockTitle as RootBlockTitle,\n\tBlockToolbar as RootBlockToolbar,\n\tColorPalette as RootColorPalette,\n\tContrastChecker as RootContrastChecker,\n\tCopyHandler as RootCopyHandler,\n\tcreateCustomColorsHOC as rootCreateCustomColorsHOC,\n\tDefaultBlockAppender as RootDefaultBlockAppender,\n\tFontSizePicker as RootFontSizePicker,\n\tgetColorClassName as rootGetColorClassName,\n\tgetColorObjectByAttributeValues as rootGetColorObjectByAttributeValues,\n\tgetColorObjectByColorValue as rootGetColorObjectByColorValue,\n\tgetFontSize as rootGetFontSize,\n\tgetFontSizeClass as rootGetFontSizeClass,\n\tInserter as RootInserter,\n\tInnerBlocks as RootInnerBlocks,\n\tInspectorAdvancedControls as RootInspectorAdvancedControls,\n\tInspectorControls as RootInspectorControls,\n\tPanelColorSettings as RootPanelColorSettings,\n\tPlainText as RootPlainText,\n\tRichText as RootRichText,\n\tRichTextShortcut as RootRichTextShortcut,\n\tRichTextToolbarButton as RootRichTextToolbarButton,\n\t__unstableRichTextInputEvent as __unstableRootRichTextInputEvent,\n\tMediaPlaceholder as RootMediaPlaceholder,\n\tMediaUpload as RootMediaUpload,\n\tMediaUploadCheck as RootMediaUploadCheck,\n\tMultiSelectScrollIntoView as RootMultiSelectScrollIntoView,\n\tNavigableToolbar as RootNavigableToolbar,\n\tObserveTyping as RootObserveTyping,\n\tSkipToSelectedBlock as RootSkipToSelectedBlock,\n\tURLInput as RootURLInput,\n\tURLInputButton as RootURLInputButton,\n\tURLPopover as RootURLPopover,\n\tWarning as RootWarning,\n\tWritingFlow as RootWritingFlow,\n\twithColorContext as rootWithColorContext,\n\twithColors as rootWithColors,\n\twithFontSizes as rootWithFontSizes,\n} from '@wordpress/block-editor';\n\nexport { default as ServerSideRender } from '@wordpress/server-side-render';\n\nfunction deprecateComponent( name, Wrapped, staticsToHoist = [] ) {\n\tconst Component = forwardRef( ( props, ref ) => {\n\t\tdeprecated( 'wp.editor.' + name, {\n\t\t\tsince: '5.3',\n\t\t\talternative: 'wp.blockEditor.' + name,\n\t\t\tversion: '6.2',\n\t\t} );\n\n\t\treturn <Wrapped ref={ ref } { ...props } />;\n\t} );\n\n\tstaticsToHoist.forEach( ( staticName ) => {\n\t\tComponent[ staticName ] = deprecateComponent(\n\t\t\tname + '.' + staticName,\n\t\t\tWrapped[ staticName ]\n\t\t);\n\t} );\n\n\treturn Component;\n}\n\nfunction deprecateFunction( name, func ) {\n\treturn ( ...args ) => {\n\t\tdeprecated( 'wp.editor.' + name, {\n\t\t\tsince: '5.3',\n\t\t\talternative: 'wp.blockEditor.' + name,\n\t\t\tversion: '6.2',\n\t\t} );\n\n\t\treturn func( ...args );\n\t};\n}\n\nconst RichText = deprecateComponent( 'RichText', RootRichText, [ 'Content' ] );\nRichText.isEmpty = deprecateFunction(\n\t'RichText.isEmpty',\n\tRootRichText.isEmpty\n);\n\nexport { RichText };\nexport const Autocomplete = deprecateComponent(\n\t'Autocomplete',\n\tRootAutocomplete\n);\nexport const AlignmentToolbar = deprecateComponent(\n\t'AlignmentToolbar',\n\tRootAlignmentToolbar\n);\nexport const BlockAlignmentToolbar = deprecateComponent(\n\t'BlockAlignmentToolbar',\n\tRootBlockAlignmentToolbar\n);\nexport const BlockControls = deprecateComponent(\n\t'BlockControls',\n\tRootBlockControls,\n\t[ 'Slot' ]\n);\nexport const BlockEdit = deprecateComponent( 'BlockEdit', RootBlockEdit );\nexport const BlockEditorKeyboardShortcuts = deprecateComponent(\n\t'BlockEditorKeyboardShortcuts',\n\tRootBlockEditorKeyboardShortcuts\n);\nexport const BlockFormatControls = deprecateComponent(\n\t'BlockFormatControls',\n\tRootBlockFormatControls,\n\t[ 'Slot' ]\n);\nexport const BlockIcon = deprecateComponent( 'BlockIcon', RootBlockIcon );\nexport const BlockInspector = deprecateComponent(\n\t'BlockInspector',\n\tRootBlockInspector\n);\nexport const BlockList = deprecateComponent( 'BlockList', RootBlockList );\nexport const BlockMover = deprecateComponent( 'BlockMover', RootBlockMover );\nexport const BlockNavigationDropdown = deprecateComponent(\n\t'BlockNavigationDropdown',\n\tRootBlockNavigationDropdown\n);\nexport const BlockSelectionClearer = deprecateComponent(\n\t'BlockSelectionClearer',\n\tRootBlockSelectionClearer\n);\nexport const BlockSettingsMenu = deprecateComponent(\n\t'BlockSettingsMenu',\n\tRootBlockSettingsMenu\n);\nexport const BlockTitle = deprecateComponent( 'BlockTitle', RootBlockTitle );\nexport const BlockToolbar = deprecateComponent(\n\t'BlockToolbar',\n\tRootBlockToolbar\n);\nexport const ColorPalette = deprecateComponent(\n\t'ColorPalette',\n\tRootColorPalette\n);\nexport const ContrastChecker = deprecateComponent(\n\t'ContrastChecker',\n\tRootContrastChecker\n);\nexport const CopyHandler = deprecateComponent( 'CopyHandler', RootCopyHandler );\nexport const DefaultBlockAppender = deprecateComponent(\n\t'DefaultBlockAppender',\n\tRootDefaultBlockAppender\n);\nexport const FontSizePicker = deprecateComponent(\n\t'FontSizePicker',\n\tRootFontSizePicker\n);\nexport const Inserter = deprecateComponent( 'Inserter', RootInserter );\nexport const InnerBlocks = deprecateComponent( 'InnerBlocks', RootInnerBlocks, [\n\t'ButtonBlockAppender',\n\t'DefaultBlockAppender',\n\t'Content',\n] );\nexport const InspectorAdvancedControls = deprecateComponent(\n\t'InspectorAdvancedControls',\n\tRootInspectorAdvancedControls,\n\t[ 'Slot' ]\n);\nexport const InspectorControls = deprecateComponent(\n\t'InspectorControls',\n\tRootInspectorControls,\n\t[ 'Slot' ]\n);\nexport const PanelColorSettings = deprecateComponent(\n\t'PanelColorSettings',\n\tRootPanelColorSettings\n);\nexport const PlainText = deprecateComponent( 'PlainText', RootPlainText );\nexport const RichTextShortcut = deprecateComponent(\n\t'RichTextShortcut',\n\tRootRichTextShortcut\n);\nexport const RichTextToolbarButton = deprecateComponent(\n\t'RichTextToolbarButton',\n\tRootRichTextToolbarButton\n);\nexport const __unstableRichTextInputEvent = deprecateComponent(\n\t'__unstableRichTextInputEvent',\n\t__unstableRootRichTextInputEvent\n);\nexport const MediaPlaceholder = deprecateComponent(\n\t'MediaPlaceholder',\n\tRootMediaPlaceholder\n);\nexport const MediaUpload = deprecateComponent( 'MediaUpload', RootMediaUpload );\nexport const MediaUploadCheck = deprecateComponent(\n\t'MediaUploadCheck',\n\tRootMediaUploadCheck\n);\nexport const MultiSelectScrollIntoView = deprecateComponent(\n\t'MultiSelectScrollIntoView',\n\tRootMultiSelectScrollIntoView\n);\nexport const NavigableToolbar = deprecateComponent(\n\t'NavigableToolbar',\n\tRootNavigableToolbar\n);\nexport const ObserveTyping = deprecateComponent(\n\t'ObserveTyping',\n\tRootObserveTyping\n);\nexport const SkipToSelectedBlock = deprecateComponent(\n\t'SkipToSelectedBlock',\n\tRootSkipToSelectedBlock\n);\nexport const URLInput = deprecateComponent( 'URLInput', RootURLInput );\nexport const URLInputButton = deprecateComponent(\n\t'URLInputButton',\n\tRootURLInputButton\n);\nexport const URLPopover = deprecateComponent( 'URLPopover', RootURLPopover );\nexport const Warning = deprecateComponent( 'Warning', RootWarning );\nexport const WritingFlow = deprecateComponent( 'WritingFlow', RootWritingFlow );\n\nexport const createCustomColorsHOC = deprecateFunction(\n\t'createCustomColorsHOC',\n\trootCreateCustomColorsHOC\n);\nexport const getColorClassName = deprecateFunction(\n\t'getColorClassName',\n\trootGetColorClassName\n);\nexport const getColorObjectByAttributeValues = deprecateFunction(\n\t'getColorObjectByAttributeValues',\n\trootGetColorObjectByAttributeValues\n);\nexport const getColorObjectByColorValue = deprecateFunction(\n\t'getColorObjectByColorValue',\n\trootGetColorObjectByColorValue\n);\nexport const getFontSize = deprecateFunction( 'getFontSize', rootGetFontSize );\nexport const getFontSizeClass = deprecateFunction(\n\t'getFontSizeClass',\n\trootGetFontSizeClass\n);\nexport const withColorContext = deprecateFunction(\n\t'withColorContext',\n\trootWithColorContext\n);\nexport const withColors = deprecateFunction( 'withColors', rootWithColors );\nexport const withFontSizes = deprecateFunction(\n\t'withFontSizes',\n\trootWithFontSizes\n);\n"]}
@@ -12,11 +12,10 @@ var _blockEditor = require("@wordpress/block-editor");
12
12
  /**
13
13
  * WordPress dependencies
14
14
  */
15
- function DocumentOutlineCheck(_ref) {
16
- let {
17
- blocks,
18
- children
19
- } = _ref;
15
+ function DocumentOutlineCheck({
16
+ blocks,
17
+ children
18
+ }) {
20
19
  const headings = blocks.filter(block => block.name === 'core/heading');
21
20
 
22
21
  if (headings.length < 1) {
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/editor/src/components/document-outline/check.js"],"names":["DocumentOutlineCheck","blocks","children","headings","filter","block","name","length","select","blockEditorStore","getBlocks"],"mappings":";;;;;;;AAGA;;AACA;;AAJA;AACA;AACA;AAIA,SAASA,oBAAT,OAAsD;AAAA,MAAvB;AAAEC,IAAAA,MAAF;AAAUC,IAAAA;AAAV,GAAuB;AACrD,QAAMC,QAAQ,GAAGF,MAAM,CAACG,MAAP,CACdC,KAAF,IAAaA,KAAK,CAACC,IAAN,KAAe,cADZ,CAAjB;;AAIA,MAAKH,QAAQ,CAACI,MAAT,GAAkB,CAAvB,EAA2B;AAC1B,WAAO,IAAP;AACA;;AAED,SAAOL,QAAP;AACA;;eAEc,sBAAcM,MAAF,KAAgB;AAC1CP,EAAAA,MAAM,EAAEO,MAAM,CAAEC,kBAAF,CAAN,CAA2BC,SAA3B;AADkC,CAAhB,CAAZ,EAERV,oBAFQ,C","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { withSelect } from '@wordpress/data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\nfunction DocumentOutlineCheck( { blocks, children } ) {\n\tconst headings = blocks.filter(\n\t\t( block ) => block.name === 'core/heading'\n\t);\n\n\tif ( headings.length < 1 ) {\n\t\treturn null;\n\t}\n\n\treturn children;\n}\n\nexport default withSelect( ( select ) => ( {\n\tblocks: select( blockEditorStore ).getBlocks(),\n} ) )( DocumentOutlineCheck );\n"]}
1
+ {"version":3,"sources":["@wordpress/editor/src/components/document-outline/check.js"],"names":["DocumentOutlineCheck","blocks","children","headings","filter","block","name","length","select","blockEditorStore","getBlocks"],"mappings":";;;;;;;AAGA;;AACA;;AAJA;AACA;AACA;AAIA,SAASA,oBAAT,CAA+B;AAAEC,EAAAA,MAAF;AAAUC,EAAAA;AAAV,CAA/B,EAAsD;AACrD,QAAMC,QAAQ,GAAGF,MAAM,CAACG,MAAP,CACdC,KAAF,IAAaA,KAAK,CAACC,IAAN,KAAe,cADZ,CAAjB;;AAIA,MAAKH,QAAQ,CAACI,MAAT,GAAkB,CAAvB,EAA2B;AAC1B,WAAO,IAAP;AACA;;AAED,SAAOL,QAAP;AACA;;eAEc,sBAAcM,MAAF,KAAgB;AAC1CP,EAAAA,MAAM,EAAEO,MAAM,CAAEC,kBAAF,CAAN,CAA2BC,SAA3B;AADkC,CAAhB,CAAZ,EAERV,oBAFQ,C","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { withSelect } from '@wordpress/data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\nfunction DocumentOutlineCheck( { blocks, children } ) {\n\tconst headings = blocks.filter(\n\t\t( block ) => block.name === 'core/heading'\n\t);\n\n\tif ( headings.length < 1 ) {\n\t\treturn null;\n\t}\n\n\treturn children;\n}\n\nexport default withSelect( ( select ) => ( {\n\tblocks: select( blockEditorStore ).getBlocks(),\n} ) )( DocumentOutlineCheck );\n"]}
@@ -62,11 +62,8 @@ const multipleH1Headings = [(0, _element.createElement)("br", {
62
62
  * @return {Array} An array of heading blocks enhanced with the properties described above.
63
63
  */
64
64
 
65
- const computeOutlineHeadings = function () {
66
- let blocks = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
67
- return blocks.flatMap(function () {
68
- let block = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
69
-
65
+ const computeOutlineHeadings = (blocks = []) => {
66
+ return blocks.flatMap((block = {}) => {
70
67
  if (block.name === 'core/heading') {
71
68
  return { ...block,
72
69
  level: block.attributes.level,
@@ -80,14 +77,13 @@ const computeOutlineHeadings = function () {
80
77
 
81
78
  const isEmptyHeading = heading => !heading.attributes.content || heading.attributes.content.length === 0;
82
79
 
83
- const DocumentOutline = _ref => {
84
- let {
85
- blocks = [],
86
- title,
87
- onSelect,
88
- isTitleSupported,
89
- hasOutlineItemsDisabled
90
- } = _ref;
80
+ const DocumentOutline = ({
81
+ blocks = [],
82
+ title,
83
+ onSelect,
84
+ isTitleSupported,
85
+ hasOutlineItemsDisabled
86
+ }) => {
91
87
  const headings = computeOutlineHeadings(blocks);
92
88
  const {
93
89
  selectBlock
@@ -127,7 +123,7 @@ const DocumentOutline = _ref => {
127
123
  href: `#block-${item.clientId}`,
128
124
  onSelect: () => {
129
125
  selectBlock(item.clientId);
130
- onSelect === null || onSelect === void 0 ? void 0 : onSelect();
126
+ onSelect?.();
131
127
  }
132
128
  }, item.isEmpty ? emptyHeadingContent : (0, _richText.getTextContent)((0, _richText.create)({
133
129
  html: item.attributes.content
@@ -138,7 +134,7 @@ const DocumentOutline = _ref => {
138
134
  exports.DocumentOutline = DocumentOutline;
139
135
 
140
136
  var _default = (0, _compose.compose)((0, _data.withSelect)(select => {
141
- var _postType$supports$ti, _postType$supports;
137
+ var _postType$supports$ti;
142
138
 
143
139
  const {
144
140
  getBlocks
@@ -153,7 +149,7 @@ var _default = (0, _compose.compose)((0, _data.withSelect)(select => {
153
149
  return {
154
150
  title: getEditedPostAttribute('title'),
155
151
  blocks: getBlocks(),
156
- isTitleSupported: (_postType$supports$ti = postType === null || postType === void 0 ? void 0 : (_postType$supports = postType.supports) === null || _postType$supports === void 0 ? void 0 : _postType$supports.title) !== null && _postType$supports$ti !== void 0 ? _postType$supports$ti : false
152
+ isTitleSupported: (_postType$supports$ti = postType?.supports?.title) !== null && _postType$supports$ti !== void 0 ? _postType$supports$ti : false
157
153
  };
158
154
  }))(DocumentOutline);
159
155
 
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/editor/src/components/document-outline/index.js"],"names":["emptyHeadingContent","incorrectLevelContent","singleH1Headings","multipleH1Headings","computeOutlineHeadings","blocks","flatMap","block","name","level","attributes","isEmpty","isEmptyHeading","innerBlocks","heading","content","length","DocumentOutline","title","onSelect","isTitleSupported","hasOutlineItemsDisabled","headings","selectBlock","blockEditorStore","prevHeadingLevel","titleNode","document","querySelector","hasTitle","countByLevel","reduce","acc","hasMultipleH1","id","map","item","index","isIncorrectLevel","isValid","clientId","html","select","getBlocks","getEditedPostAttribute","editorStore","getPostType","coreStore","postType","supports"],"mappings":";;;;;;;;;;;AAGA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAKA;;AACA;;AAdA;AACA;AACA;;AAQA;AACA;AACA;;AAIA;AACA;AACA;AACA,MAAMA,mBAAmB,GAAG,wCAAM,cAAI,iBAAJ,CAAN,CAA5B;AACA,M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,CAAEF,sBAAsB,CAAE,MAAF,CAAxB,CAA5B;AAEA,SAAO;AACN1B,IAAAA,KAAK,EAAE0B,sBAAsB,CAAE,OAAF,CADvB;AAENvC,IAAAA,MAAM,EAAEsC,SAAS,EAFX;AAGNvB,IAAAA,gBAAgB,2BAAE4B,QAAF,aAAEA,QAAF,6CAAEA,QAAQ,CAAEC,QAAZ,uDAAE,mBAAoB/B,KAAtB,yEAA+B;AAHzC,GAAP;AAKA,CAXD,CADc,EAaZD,eAbY,C","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { compose } from '@wordpress/compose';\nimport { withSelect, useDispatch } from '@wordpress/data';\nimport { create, getTextContent } from '@wordpress/rich-text';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport DocumentOutlineItem from './item';\nimport { store as editorStore } from '../../store';\n\n/**\n * Module constants\n */\nconst emptyHeadingContent = <em>{ __( '(Empty heading)' ) }</em>;\nconst incorrectLevelContent = [\n\t<br key=\"incorrect-break\" />,\n\t<em key=\"incorrect-message\">{ __( '(Incorrect heading level)' ) }</em>,\n];\nconst singleH1Headings = [\n\t<br key=\"incorrect-break-h1\" />,\n\t<em key=\"incorrect-message-h1\">\n\t\t{ __( '(Your theme may already use a H1 for the post title)' ) }\n\t</em>,\n];\nconst multipleH1Headings = [\n\t<br key=\"incorrect-break-multiple-h1\" />,\n\t<em key=\"incorrect-message-multiple-h1\">\n\t\t{ __( '(Multiple H1 headings are not recommended)' ) }\n\t</em>,\n];\n\n/**\n * Returns an array of heading blocks enhanced with the following properties:\n * level - An integer with the heading level.\n * isEmpty - Flag indicating if the heading has no content.\n *\n * @param {?Array} blocks An array of blocks.\n *\n * @return {Array} An array of heading blocks enhanced with the properties described above.\n */\nconst computeOutlineHeadings = ( blocks = [] ) => {\n\treturn blocks.flatMap( ( block = {} ) => {\n\t\tif ( block.name === 'core/heading' ) {\n\t\t\treturn {\n\t\t\t\t...block,\n\t\t\t\tlevel: block.attributes.level,\n\t\t\t\tisEmpty: isEmptyHeading( block ),\n\t\t\t};\n\t\t}\n\t\treturn computeOutlineHeadings( block.innerBlocks );\n\t} );\n};\n\nconst isEmptyHeading = ( heading ) =>\n\t! heading.attributes.content || heading.attributes.content.length === 0;\n\nexport const DocumentOutline = ( {\n\tblocks = [],\n\ttitle,\n\tonSelect,\n\tisTitleSupported,\n\thasOutlineItemsDisabled,\n} ) => {\n\tconst headings = computeOutlineHeadings( blocks );\n\tconst { selectBlock } = useDispatch( blockEditorStore );\n\tif ( headings.length < 1 ) {\n\t\treturn null;\n\t}\n\n\tlet prevHeadingLevel = 1;\n\n\t// Not great but it's the simplest way to locate the title right now.\n\tconst titleNode = document.querySelector( '.editor-post-title__input' );\n\tconst hasTitle = isTitleSupported && title && titleNode;\n\tconst countByLevel = headings.reduce(\n\t\t( acc, heading ) => ( {\n\t\t\t...acc,\n\t\t\t[ heading.level ]: ( acc[ heading.level ] || 0 ) + 1,\n\t\t} ),\n\t\t{}\n\t);\n\tconst hasMultipleH1 = countByLevel[ 1 ] > 1;\n\n\treturn (\n\t\t<div className=\"document-outline\">\n\t\t\t<ul>\n\t\t\t\t{ hasTitle && (\n\t\t\t\t\t<DocumentOutlineItem\n\t\t\t\t\t\tlevel={ __( 'Title' ) }\n\t\t\t\t\t\tisValid\n\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t\thref={ `#${ titleNode.id }` }\n\t\t\t\t\t\tisDisabled={ hasOutlineItemsDisabled }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ title }\n\t\t\t\t\t</DocumentOutlineItem>\n\t\t\t\t) }\n\t\t\t\t{ headings.map( ( item, index ) => {\n\t\t\t\t\t// Headings remain the same, go up by one, or down by any amount.\n\t\t\t\t\t// Otherwise there are missing levels.\n\t\t\t\t\tconst isIncorrectLevel = item.level > prevHeadingLevel + 1;\n\n\t\t\t\t\tconst isValid =\n\t\t\t\t\t\t! item.isEmpty &&\n\t\t\t\t\t\t! isIncorrectLevel &&\n\t\t\t\t\t\t!! item.level &&\n\t\t\t\t\t\t( item.level !== 1 ||\n\t\t\t\t\t\t\t( ! hasMultipleH1 && ! hasTitle ) );\n\t\t\t\t\tprevHeadingLevel = item.level;\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<DocumentOutlineItem\n\t\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\t\tlevel={ `H${ item.level }` }\n\t\t\t\t\t\t\tisValid={ isValid }\n\t\t\t\t\t\t\tisDisabled={ hasOutlineItemsDisabled }\n\t\t\t\t\t\t\thref={ `#block-${ item.clientId }` }\n\t\t\t\t\t\t\tonSelect={ () => {\n\t\t\t\t\t\t\t\tselectBlock( item.clientId );\n\t\t\t\t\t\t\t\tonSelect?.();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ item.isEmpty\n\t\t\t\t\t\t\t\t? emptyHeadingContent\n\t\t\t\t\t\t\t\t: getTextContent(\n\t\t\t\t\t\t\t\t\t\tcreate( {\n\t\t\t\t\t\t\t\t\t\t\thtml: item.attributes.content,\n\t\t\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t\t ) }\n\t\t\t\t\t\t\t{ isIncorrectLevel && incorrectLevelContent }\n\t\t\t\t\t\t\t{ item.level === 1 &&\n\t\t\t\t\t\t\t\thasMultipleH1 &&\n\t\t\t\t\t\t\t\tmultipleH1Headings }\n\t\t\t\t\t\t\t{ hasTitle &&\n\t\t\t\t\t\t\t\titem.level === 1 &&\n\t\t\t\t\t\t\t\t! hasMultipleH1 &&\n\t\t\t\t\t\t\t\tsingleH1Headings }\n\t\t\t\t\t\t</DocumentOutlineItem>\n\t\t\t\t\t);\n\t\t\t\t} ) }\n\t\t\t</ul>\n\t\t</div>\n\t);\n};\n\nexport default compose(\n\twithSelect( ( select ) => {\n\t\tconst { getBlocks } = select( blockEditorStore );\n\t\tconst { getEditedPostAttribute } = select( editorStore );\n\t\tconst { getPostType } = select( coreStore );\n\t\tconst postType = getPostType( getEditedPostAttribute( 'type' ) );\n\n\t\treturn {\n\t\t\ttitle: getEditedPostAttribute( 'title' ),\n\t\t\tblocks: getBlocks(),\n\t\t\tisTitleSupported: postType?.supports?.title ?? false,\n\t\t};\n\t} )\n)( DocumentOutline );\n"]}
1
+ {"version":3,"sources":["@wordpress/editor/src/components/document-outline/index.js"],"names":["emptyHeadingContent","incorrectLevelContent","singleH1Headings","multipleH1Headings","computeOutlineHeadings","blocks","flatMap","block","name","level","attributes","isEmpty","isEmptyHeading","innerBlocks","heading","content","length","DocumentOutline","title","onSelect","isTitleSupported","hasOutlineItemsDisabled","headings","selectBlock","blockEditorStore","prevHeadingLevel","titleNode","document","querySelector","hasTitle","countByLevel","reduce","acc","hasMultipleH1","id","map","item","index","isIncorrectLevel","isValid","clientId","html","select","getBlocks","getEditedPostAttribute","editorStore","getPostType","coreStore","postType","supports"],"mappings":";;;;;;;;;;;AAGA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAKA;;AACA;;AAdA;AACA;AACA;;AAQA;AACA;AACA;;AAIA;AACA;AACA;AACA,MAAMA,mBAAmB,GAAG,wCAAM,cAAI,iBAAJ,CAAN,CAA5B;AACA,MAAMC,qBAAqB,GAAG,CAC7B;AAAI,EAAA,GAAG,EAAC;AAAR,EAD6B,EAE7B;AAAI,EAAA,GAAG,EAAC;AAAR,GAA8B,cAAI,2BAAJ,CAA9B,CAF6B,CAA9B;AAIA,MAAMC,gBAAgB,GAAG,CACxB;AAAI,EAAA,GAAG,EAAC;AAAR,EADwB,EAExB;AAAI,EAAA,GAAG,EAAC;AAAR,GACG,cAAI,sDAAJ,CADH,CAFwB,CAAzB;AAMA,MAAMC,kBAAkB,GAAG,CAC1B;AAAI,EAAA,GAAG,EAAC;AAAR,EAD0B,EAE1B;AAAI,EAAA,GAAG,EAAC;AAAR,GACG,cAAI,4CAAJ,CADH,CAF0B,CAA3B;AAOA;AACA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AACI,QAAP,CAAX;AACArB,QAAAA,QAAQ;AACR;AATF,OAWGiB,IAAI,CAACzB,OAAL,GACCX,mBADD,GAEC,8BACA,sBAAQ;AACPyC,MAAAA,IAAI,EAAEL,IAAI,CAAC1B,UAAL,CAAgBK;AADf,KAAR,CADA,CAbJ,EAkBGuB,gBAAgB,IAAIrC,qBAlBvB,EAmBGmC,IAAI,CAAC3B,KAAL,KAAe,CAAf,IACDwB,aADC,IAED9B,kBArBF,EAsBG0B,QAAQ,IACTO,IAAI,CAAC3B,KAAL,KAAe,CADd,IAED,CAAEwB,aAFD,IAGD/B,gBAzBF,CADD;AA6BA,GA1CC,CAZH,CADD,CADD;AA4DA,CAvFM;;;;eAyFQ,sBACd,sBAAcwC,MAAF,IAAc;AAAA;;AACzB,QAAM;AAAEC,IAAAA;AAAF,MAAgBD,MAAM,CAAElB,kBAAF,CAA5B;AACA,QAAM;AAAEoB,IAAAA;AAAF,MAA6BF,MAAM,CAAEG,YAAF,CAAzC;AACA,QAAM;AAAEC,IAAAA;AAAF,MAAkBJ,MAAM,CAAEK,eAAF,CAA9B;AACA,QAAMC,QAAQ,GAAGF,WAAW,CAAEF,sBAAsB,CAAE,MAAF,CAAxB,CAA5B;AAEA,SAAO;AACN1B,IAAAA,KAAK,EAAE0B,sBAAsB,CAAE,OAAF,CADvB;AAENvC,IAAAA,MAAM,EAAEsC,SAAS,EAFX;AAGNvB,IAAAA,gBAAgB,2BAAE4B,QAAQ,EAAEC,QAAV,EAAoB/B,KAAtB,yEAA+B;AAHzC,GAAP;AAKA,CAXD,CADc,EAaZD,eAbY,C","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { compose } from '@wordpress/compose';\nimport { withSelect, useDispatch } from '@wordpress/data';\nimport { create, getTextContent } from '@wordpress/rich-text';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport DocumentOutlineItem from './item';\nimport { store as editorStore } from '../../store';\n\n/**\n * Module constants\n */\nconst emptyHeadingContent = <em>{ __( '(Empty heading)' ) }</em>;\nconst incorrectLevelContent = [\n\t<br key=\"incorrect-break\" />,\n\t<em key=\"incorrect-message\">{ __( '(Incorrect heading level)' ) }</em>,\n];\nconst singleH1Headings = [\n\t<br key=\"incorrect-break-h1\" />,\n\t<em key=\"incorrect-message-h1\">\n\t\t{ __( '(Your theme may already use a H1 for the post title)' ) }\n\t</em>,\n];\nconst multipleH1Headings = [\n\t<br key=\"incorrect-break-multiple-h1\" />,\n\t<em key=\"incorrect-message-multiple-h1\">\n\t\t{ __( '(Multiple H1 headings are not recommended)' ) }\n\t</em>,\n];\n\n/**\n * Returns an array of heading blocks enhanced with the following properties:\n * level - An integer with the heading level.\n * isEmpty - Flag indicating if the heading has no content.\n *\n * @param {?Array} blocks An array of blocks.\n *\n * @return {Array} An array of heading blocks enhanced with the properties described above.\n */\nconst computeOutlineHeadings = ( blocks = [] ) => {\n\treturn blocks.flatMap( ( block = {} ) => {\n\t\tif ( block.name === 'core/heading' ) {\n\t\t\treturn {\n\t\t\t\t...block,\n\t\t\t\tlevel: block.attributes.level,\n\t\t\t\tisEmpty: isEmptyHeading( block ),\n\t\t\t};\n\t\t}\n\t\treturn computeOutlineHeadings( block.innerBlocks );\n\t} );\n};\n\nconst isEmptyHeading = ( heading ) =>\n\t! heading.attributes.content || heading.attributes.content.length === 0;\n\nexport const DocumentOutline = ( {\n\tblocks = [],\n\ttitle,\n\tonSelect,\n\tisTitleSupported,\n\thasOutlineItemsDisabled,\n} ) => {\n\tconst headings = computeOutlineHeadings( blocks );\n\tconst { selectBlock } = useDispatch( blockEditorStore );\n\tif ( headings.length < 1 ) {\n\t\treturn null;\n\t}\n\n\tlet prevHeadingLevel = 1;\n\n\t// Not great but it's the simplest way to locate the title right now.\n\tconst titleNode = document.querySelector( '.editor-post-title__input' );\n\tconst hasTitle = isTitleSupported && title && titleNode;\n\tconst countByLevel = headings.reduce(\n\t\t( acc, heading ) => ( {\n\t\t\t...acc,\n\t\t\t[ heading.level ]: ( acc[ heading.level ] || 0 ) + 1,\n\t\t} ),\n\t\t{}\n\t);\n\tconst hasMultipleH1 = countByLevel[ 1 ] > 1;\n\n\treturn (\n\t\t<div className=\"document-outline\">\n\t\t\t<ul>\n\t\t\t\t{ hasTitle && (\n\t\t\t\t\t<DocumentOutlineItem\n\t\t\t\t\t\tlevel={ __( 'Title' ) }\n\t\t\t\t\t\tisValid\n\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t\thref={ `#${ titleNode.id }` }\n\t\t\t\t\t\tisDisabled={ hasOutlineItemsDisabled }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ title }\n\t\t\t\t\t</DocumentOutlineItem>\n\t\t\t\t) }\n\t\t\t\t{ headings.map( ( item, index ) => {\n\t\t\t\t\t// Headings remain the same, go up by one, or down by any amount.\n\t\t\t\t\t// Otherwise there are missing levels.\n\t\t\t\t\tconst isIncorrectLevel = item.level > prevHeadingLevel + 1;\n\n\t\t\t\t\tconst isValid =\n\t\t\t\t\t\t! item.isEmpty &&\n\t\t\t\t\t\t! isIncorrectLevel &&\n\t\t\t\t\t\t!! item.level &&\n\t\t\t\t\t\t( item.level !== 1 ||\n\t\t\t\t\t\t\t( ! hasMultipleH1 && ! hasTitle ) );\n\t\t\t\t\tprevHeadingLevel = item.level;\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<DocumentOutlineItem\n\t\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\t\tlevel={ `H${ item.level }` }\n\t\t\t\t\t\t\tisValid={ isValid }\n\t\t\t\t\t\t\tisDisabled={ hasOutlineItemsDisabled }\n\t\t\t\t\t\t\thref={ `#block-${ item.clientId }` }\n\t\t\t\t\t\t\tonSelect={ () => {\n\t\t\t\t\t\t\t\tselectBlock( item.clientId );\n\t\t\t\t\t\t\t\tonSelect?.();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ item.isEmpty\n\t\t\t\t\t\t\t\t? emptyHeadingContent\n\t\t\t\t\t\t\t\t: getTextContent(\n\t\t\t\t\t\t\t\t\t\tcreate( {\n\t\t\t\t\t\t\t\t\t\t\thtml: item.attributes.content,\n\t\t\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t\t ) }\n\t\t\t\t\t\t\t{ isIncorrectLevel && incorrectLevelContent }\n\t\t\t\t\t\t\t{ item.level === 1 &&\n\t\t\t\t\t\t\t\thasMultipleH1 &&\n\t\t\t\t\t\t\t\tmultipleH1Headings }\n\t\t\t\t\t\t\t{ hasTitle &&\n\t\t\t\t\t\t\t\titem.level === 1 &&\n\t\t\t\t\t\t\t\t! hasMultipleH1 &&\n\t\t\t\t\t\t\t\tsingleH1Headings }\n\t\t\t\t\t\t</DocumentOutlineItem>\n\t\t\t\t\t);\n\t\t\t\t} ) }\n\t\t\t</ul>\n\t\t</div>\n\t);\n};\n\nexport default compose(\n\twithSelect( ( select ) => {\n\t\tconst { getBlocks } = select( blockEditorStore );\n\t\tconst { getEditedPostAttribute } = select( editorStore );\n\t\tconst { getPostType } = select( coreStore );\n\t\tconst postType = getPostType( getEditedPostAttribute( 'type' ) );\n\n\t\treturn {\n\t\t\ttitle: getEditedPostAttribute( 'title' ),\n\t\t\tblocks: getBlocks(),\n\t\t\tisTitleSupported: postType?.supports?.title ?? false,\n\t\t};\n\t} )\n)( DocumentOutline );\n"]}
@@ -14,31 +14,28 @@ var _classnames = _interopRequireDefault(require("classnames"));
14
14
  /**
15
15
  * External dependencies
16
16
  */
17
- const TableOfContentsItem = _ref => {
18
- let {
19
- children,
20
- isValid,
21
- level,
22
- href,
23
- onSelect
24
- } = _ref;
25
- return (0, _element.createElement)("li", {
26
- className: (0, _classnames.default)('document-outline__item', `is-${level.toLowerCase()}`, {
27
- 'is-invalid': !isValid
28
- })
29
- }, (0, _element.createElement)("a", {
30
- href: href,
31
- className: "document-outline__button",
32
- onClick: onSelect
33
- }, (0, _element.createElement)("span", {
34
- className: "document-outline__emdash",
35
- "aria-hidden": "true"
36
- }), (0, _element.createElement)("strong", {
37
- className: "document-outline__level"
38
- }, level), (0, _element.createElement)("span", {
39
- className: "document-outline__item-content"
40
- }, children)));
41
- };
17
+ const TableOfContentsItem = ({
18
+ children,
19
+ isValid,
20
+ level,
21
+ href,
22
+ onSelect
23
+ }) => (0, _element.createElement)("li", {
24
+ className: (0, _classnames.default)('document-outline__item', `is-${level.toLowerCase()}`, {
25
+ 'is-invalid': !isValid
26
+ })
27
+ }, (0, _element.createElement)("a", {
28
+ href: href,
29
+ className: "document-outline__button",
30
+ onClick: onSelect
31
+ }, (0, _element.createElement)("span", {
32
+ className: "document-outline__emdash",
33
+ "aria-hidden": "true"
34
+ }), (0, _element.createElement)("strong", {
35
+ className: "document-outline__level"
36
+ }, level), (0, _element.createElement)("span", {
37
+ className: "document-outline__item-content"
38
+ }, children)));
42
39
 
43
40
  var _default = TableOfContentsItem;
44
41
  exports.default = _default;
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/editor/src/components/document-outline/item.js"],"names":["TableOfContentsItem","children","isValid","level","href","onSelect","toLowerCase"],"mappings":";;;;;;;;;;;AAGA;;AAHA;AACA;AACA;AAGA,MAAMA,mBAAmB,GAAG;AAAA,MAAE;AAC7BC,IAAAA,QAD6B;AAE7BC,IAAAA,OAF6B;AAG7BC,IAAAA,KAH6B;AAI7BC,IAAAA,IAJ6B;AAK7BC,IAAAA;AAL6B,GAAF;AAAA,SAO3B;AACC,IAAA,SAAS,EAAG,yBACX,wBADW,EAEV,MAAMF,KAAK,CAACG,WAAN,EAAqB,EAFjB,EAGX;AACC,oBAAc,CAAEJ;AADjB,KAHW;AADb,KASC;AACC,IAAA,IAAI,EAAGE,IADR;AAEC,IAAA,SAAS,EAAC,0BAFX;AAGC,IAAA,OAAO,EAAGC;AAHX,KAKC;AACC,IAAA,SAAS,EAAC,0BADX;AAEC,mBAAY;AAFb,IALD,EASC;AAAQ,IAAA,SAAS,EAAC;AAAlB,KAA8CF,KAA9C,CATD,EAUC;AAAM,IAAA,SAAS,EAAC;AAAhB,KAAmDF,QAAnD,CAVD,CATD,CAP2B;AAAA,CAA5B;;eA+BeD,mB","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\nconst TableOfContentsItem = ( {\n\tchildren,\n\tisValid,\n\tlevel,\n\thref,\n\tonSelect,\n} ) => (\n\t<li\n\t\tclassName={ classnames(\n\t\t\t'document-outline__item',\n\t\t\t`is-${ level.toLowerCase() }`,\n\t\t\t{\n\t\t\t\t'is-invalid': ! isValid,\n\t\t\t}\n\t\t) }\n\t>\n\t\t<a\n\t\t\thref={ href }\n\t\t\tclassName=\"document-outline__button\"\n\t\t\tonClick={ onSelect }\n\t\t>\n\t\t\t<span\n\t\t\t\tclassName=\"document-outline__emdash\"\n\t\t\t\taria-hidden=\"true\"\n\t\t\t></span>\n\t\t\t<strong className=\"document-outline__level\">{ level }</strong>\n\t\t\t<span className=\"document-outline__item-content\">{ children }</span>\n\t\t</a>\n\t</li>\n);\n\nexport default TableOfContentsItem;\n"]}
1
+ {"version":3,"sources":["@wordpress/editor/src/components/document-outline/item.js"],"names":["TableOfContentsItem","children","isValid","level","href","onSelect","toLowerCase"],"mappings":";;;;;;;;;;;AAGA;;AAHA;AACA;AACA;AAGA,MAAMA,mBAAmB,GAAG,CAAE;AAC7BC,EAAAA,QAD6B;AAE7BC,EAAAA,OAF6B;AAG7BC,EAAAA,KAH6B;AAI7BC,EAAAA,IAJ6B;AAK7BC,EAAAA;AAL6B,CAAF,KAO3B;AACC,EAAA,SAAS,EAAG,yBACX,wBADW,EAEV,MAAMF,KAAK,CAACG,WAAN,EAAqB,EAFjB,EAGX;AACC,kBAAc,CAAEJ;AADjB,GAHW;AADb,GASC;AACC,EAAA,IAAI,EAAGE,IADR;AAEC,EAAA,SAAS,EAAC,0BAFX;AAGC,EAAA,OAAO,EAAGC;AAHX,GAKC;AACC,EAAA,SAAS,EAAC,0BADX;AAEC,iBAAY;AAFb,EALD,EASC;AAAQ,EAAA,SAAS,EAAC;AAAlB,GAA8CF,KAA9C,CATD,EAUC;AAAM,EAAA,SAAS,EAAC;AAAhB,GAAmDF,QAAnD,CAVD,CATD,CAPD;;eA+BeD,mB","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\nconst TableOfContentsItem = ( {\n\tchildren,\n\tisValid,\n\tlevel,\n\thref,\n\tonSelect,\n} ) => (\n\t<li\n\t\tclassName={ classnames(\n\t\t\t'document-outline__item',\n\t\t\t`is-${ level.toLowerCase() }`,\n\t\t\t{\n\t\t\t\t'is-invalid': ! isValid,\n\t\t\t}\n\t\t) }\n\t>\n\t\t<a\n\t\t\thref={ href }\n\t\t\tclassName=\"document-outline__button\"\n\t\t\tonClick={ onSelect }\n\t\t>\n\t\t\t<span\n\t\t\t\tclassName=\"document-outline__emdash\"\n\t\t\t\taria-hidden=\"true\"\n\t\t\t></span>\n\t\t\t<strong className=\"document-outline__level\">{ level }</strong>\n\t\t\t<span className=\"document-outline__item-content\">{ children }</span>\n\t\t</a>\n\t</li>\n);\n\nexport default TableOfContentsItem;\n"]}
@@ -30,11 +30,10 @@ var _style = _interopRequireDefault(require("./style.scss"));
30
30
  /**
31
31
  * Internal dependencies
32
32
  */
33
- const HelpDetailNavigationScreen = _ref => {
34
- let {
35
- content,
36
- label
37
- } = _ref;
33
+ const HelpDetailNavigationScreen = ({
34
+ content,
35
+ label
36
+ }) => {
38
37
  const navigation = (0, _native.useNavigation)();
39
38
  const {
40
39
  listProps
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/editor/src/components/editor-help/help-detail-navigation-screen.native.js"],"names":["HelpDetailNavigationScreen","content","label","navigation","listProps","BottomSheetContext","contentContainerStyle","StyleSheet","flatten","styles","container","goBack","paddingBottom","Math","max","safeAreaBottomInset","marginTop"],"mappings":";;;;;;;;;AAeA;;;;AAZA;;AAMA;;AAKA;;AAMA;;AApBA;AACA;AACA;;AASA;AACA;AACA;;AAIA;AACA;AACA;AAGA,MAAMA,0BAA0B,GAAG,QAA0B;AAAA,MAAxB;AAAEC,IAAAA,OAAF;AAAWC,IAAAA;AAAX,GAAwB;AAC5D,QAAMC,UAAU,GAAG,4BAAnB;AAEA,QAAM;AAAEC,IAAAA;AAAF,MAAgB,yBAAYC,8BAAZ,CAAtB;;AACA,QAAMC,qBAAqB,GAAGC,wBAAWC,OAAX,CAC7BJ,SAAS,CAACE,qBADmB,CAA9B;;AAIA,SACC,4BAAC,uBAAD,CAAa,gBAAb;AAA8B,IAAA,YAAY,MAA1C;AAA2C,IAAA,UAAU;AAArD,KACC,4BAAC,iBAAD;AAAM,IAAA,KAAK,EAAGG,eAAOC;AAArB,KACC,4BAAC,uBAAD,CAAa,MAAb,QACC,4BAAC,uBAAD,CAAa,MAAb,CAAoB,UAApB;AACC,IAAA,OAAO,EAAGP,UAAU,CAACQ;AADtB,IADD,EAIC,4BAAC,uBAAD,CAAa,MAAb,CAAoB,OAApB,QACGT,KADH,CAJD,CADD,EASC,4BAAC,uBAAD,6BACME,SADN;AAEC,IAAA,qBAAqB,EAAG,EACvB,GAAGE,qBADoB;AAEvBM,MAAAA,aAAa,EAAEC,IAAI,CAACC,GAAL,CACdV,SAAS,CAACW,mBADI,EAEdT,qBAAqB,CAACM,aAFR,CAFQ;;AAMvB;AACN;AACA;AACA;AACA;AACMI,MAAAA,SAAS,EAAE;AAXY;AAFzB,MAgBC,4BAAC,qCAAD;AAA0B,IAAA,UAAU,EAAG;AAAvC,KACC,4BAAC,iBAAD,QAAQf,OAAR,CADD,CAhBD,CATD,CADD,CADD;AAkCA,CA1CD;;eA4CeD,0B","sourcesContent":["/**\n * External dependencies\n */\nimport {\n\tScrollView,\n\tStyleSheet,\n\tTouchableWithoutFeedback,\n\tView,\n} from 'react-native';\nimport { useNavigation } from '@react-navigation/native';\n\n/**\n * WordPress dependencies\n */\nimport { BottomSheet, BottomSheetContext } from '@wordpress/components';\nimport { useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\n\nconst HelpDetailNavigationScreen = ( { content, label } ) => {\n\tconst navigation = useNavigation();\n\n\tconst { listProps } = useContext( BottomSheetContext );\n\tconst contentContainerStyle = StyleSheet.flatten(\n\t\tlistProps.contentContainerStyle\n\t);\n\n\treturn (\n\t\t<BottomSheet.NavigationScreen isScrollable fullScreen>\n\t\t\t<View style={ styles.container }>\n\t\t\t\t<BottomSheet.NavBar>\n\t\t\t\t\t<BottomSheet.NavBar.BackButton\n\t\t\t\t\t\tonPress={ navigation.goBack }\n\t\t\t\t\t/>\n\t\t\t\t\t<BottomSheet.NavBar.Heading>\n\t\t\t\t\t\t{ label }\n\t\t\t\t\t</BottomSheet.NavBar.Heading>\n\t\t\t\t</BottomSheet.NavBar>\n\t\t\t\t<ScrollView\n\t\t\t\t\t{ ...listProps }\n\t\t\t\t\tcontentContainerStyle={ {\n\t\t\t\t\t\t...contentContainerStyle,\n\t\t\t\t\t\tpaddingBottom: Math.max(\n\t\t\t\t\t\t\tlistProps.safeAreaBottomInset,\n\t\t\t\t\t\t\tcontentContainerStyle.paddingBottom\n\t\t\t\t\t\t),\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Remove margin set via `hideHeader`. Combining a header\n\t\t\t\t\t\t * and navigation in this bottom sheet is at odds with the\n\t\t\t\t\t\t * current `BottomSheet` implementation.\n\t\t\t\t\t\t */\n\t\t\t\t\t\tmarginTop: 0,\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t<TouchableWithoutFeedback accessible={ false }>\n\t\t\t\t\t\t<View>{ content }</View>\n\t\t\t\t\t</TouchableWithoutFeedback>\n\t\t\t\t</ScrollView>\n\t\t\t</View>\n\t\t</BottomSheet.NavigationScreen>\n\t);\n};\n\nexport default HelpDetailNavigationScreen;\n"]}
1
+ {"version":3,"sources":["@wordpress/editor/src/components/editor-help/help-detail-navigation-screen.native.js"],"names":["HelpDetailNavigationScreen","content","label","navigation","listProps","BottomSheetContext","contentContainerStyle","StyleSheet","flatten","styles","container","goBack","paddingBottom","Math","max","safeAreaBottomInset","marginTop"],"mappings":";;;;;;;;;AAeA;;;;AAZA;;AAMA;;AAKA;;AAMA;;AApBA;AACA;AACA;;AASA;AACA;AACA;;AAIA;AACA;AACA;AAGA,MAAMA,0BAA0B,GAAG,CAAE;AAAEC,EAAAA,OAAF;AAAWC,EAAAA;AAAX,CAAF,KAA0B;AAC5D,QAAMC,UAAU,GAAG,4BAAnB;AAEA,QAAM;AAAEC,IAAAA;AAAF,MAAgB,yBAAYC,8BAAZ,CAAtB;;AACA,QAAMC,qBAAqB,GAAGC,wBAAWC,OAAX,CAC7BJ,SAAS,CAACE,qBADmB,CAA9B;;AAIA,SACC,4BAAC,uBAAD,CAAa,gBAAb;AAA8B,IAAA,YAAY,MAA1C;AAA2C,IAAA,UAAU;AAArD,KACC,4BAAC,iBAAD;AAAM,IAAA,KAAK,EAAGG,eAAOC;AAArB,KACC,4BAAC,uBAAD,CAAa,MAAb,QACC,4BAAC,uBAAD,CAAa,MAAb,CAAoB,UAApB;AACC,IAAA,OAAO,EAAGP,UAAU,CAACQ;AADtB,IADD,EAIC,4BAAC,uBAAD,CAAa,MAAb,CAAoB,OAApB,QACGT,KADH,CAJD,CADD,EASC,4BAAC,uBAAD,6BACME,SADN;AAEC,IAAA,qBAAqB,EAAG,EACvB,GAAGE,qBADoB;AAEvBM,MAAAA,aAAa,EAAEC,IAAI,CAACC,GAAL,CACdV,SAAS,CAACW,mBADI,EAEdT,qBAAqB,CAACM,aAFR,CAFQ;;AAMvB;AACN;AACA;AACA;AACA;AACMI,MAAAA,SAAS,EAAE;AAXY;AAFzB,MAgBC,4BAAC,qCAAD;AAA0B,IAAA,UAAU,EAAG;AAAvC,KACC,4BAAC,iBAAD,QAAQf,OAAR,CADD,CAhBD,CATD,CADD,CADD;AAkCA,CA1CD;;eA4CeD,0B","sourcesContent":["/**\n * External dependencies\n */\nimport {\n\tScrollView,\n\tStyleSheet,\n\tTouchableWithoutFeedback,\n\tView,\n} from 'react-native';\nimport { useNavigation } from '@react-navigation/native';\n\n/**\n * WordPress dependencies\n */\nimport { BottomSheet, BottomSheetContext } from '@wordpress/components';\nimport { useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\n\nconst HelpDetailNavigationScreen = ( { content, label } ) => {\n\tconst navigation = useNavigation();\n\n\tconst { listProps } = useContext( BottomSheetContext );\n\tconst contentContainerStyle = StyleSheet.flatten(\n\t\tlistProps.contentContainerStyle\n\t);\n\n\treturn (\n\t\t<BottomSheet.NavigationScreen isScrollable fullScreen>\n\t\t\t<View style={ styles.container }>\n\t\t\t\t<BottomSheet.NavBar>\n\t\t\t\t\t<BottomSheet.NavBar.BackButton\n\t\t\t\t\t\tonPress={ navigation.goBack }\n\t\t\t\t\t/>\n\t\t\t\t\t<BottomSheet.NavBar.Heading>\n\t\t\t\t\t\t{ label }\n\t\t\t\t\t</BottomSheet.NavBar.Heading>\n\t\t\t\t</BottomSheet.NavBar>\n\t\t\t\t<ScrollView\n\t\t\t\t\t{ ...listProps }\n\t\t\t\t\tcontentContainerStyle={ {\n\t\t\t\t\t\t...contentContainerStyle,\n\t\t\t\t\t\tpaddingBottom: Math.max(\n\t\t\t\t\t\t\tlistProps.safeAreaBottomInset,\n\t\t\t\t\t\t\tcontentContainerStyle.paddingBottom\n\t\t\t\t\t\t),\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Remove margin set via `hideHeader`. Combining a header\n\t\t\t\t\t\t * and navigation in this bottom sheet is at odds with the\n\t\t\t\t\t\t * current `BottomSheet` implementation.\n\t\t\t\t\t\t */\n\t\t\t\t\t\tmarginTop: 0,\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t<TouchableWithoutFeedback accessible={ false }>\n\t\t\t\t\t\t<View>{ content }</View>\n\t\t\t\t\t</TouchableWithoutFeedback>\n\t\t\t\t</ScrollView>\n\t\t\t</View>\n\t\t</BottomSheet.NavigationScreen>\n\t);\n};\n\nexport default HelpDetailNavigationScreen;\n"]}
@@ -26,11 +26,10 @@ var _style = _interopRequireDefault(require("./style.scss"));
26
26
  /**
27
27
  * Internal dependencies
28
28
  */
29
- const HelpGetSupportButton = _ref => {
30
- let {
31
- onPress,
32
- title
33
- } = _ref;
29
+ const HelpGetSupportButton = ({
30
+ onPress,
31
+ title
32
+ }) => {
34
33
  const buttonStyle = (0, _compose.usePreferredColorSchemeStyle)(_style.default.button, _style.default.buttonDark);
35
34
  const textStyle = (0, _compose.usePreferredColorSchemeStyle)(_style.default.buttonText, _style.default.buttonTextDark);
36
35
  return (0, _element.createElement)(_reactNative.Pressable, {
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/editor/src/components/editor-help/help-get-support-button.native.js"],"names":["HelpGetSupportButton","onPress","title","buttonStyle","styles","button","buttonDark","textStyle","buttonText","buttonTextDark"],"mappings":";;;;;;;;;;;AAGA;;AAKA;;AAKA;;AAbA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;AAGA,MAAMA,oBAAoB,GAAG,QAA0B;AAAA,MAAxB;AAAEC,IAAAA,OAAF;AAAWC,IAAAA;AAAX,GAAwB;AACtD,QAAMC,WAAW,GAAG,2CACnBC,eAAOC,MADY,EAEnBD,eAAOE,UAFY,CAApB;AAKA,QAAMC,SAAS,GAAG,2CACjBH,eAAOI,UADU,EAEjBJ,eAAOK,cAFU,CAAlB;AAKA,SACC,4BAAC,sBAAD;AACC,IAAA,KAAK,EAAGN,WADT;AAEC,IAAA,OAAO,EAAGF,OAFX;AAGC,IAAA,iBAAiB,EAAG;AAHrB,KAKC,4BAAC,iBAAD;AAAM,IAAA,KAAK,EAAGM;AAAd,KAA4BL,KAA5B,CALD,CADD;AASA,CApBD;;eAsBeF,oB","sourcesContent":["/**\n * External dependencies\n */\nimport { Pressable, Text } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { usePreferredColorSchemeStyle } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\n\nconst HelpGetSupportButton = ( { onPress, title } ) => {\n\tconst buttonStyle = usePreferredColorSchemeStyle(\n\t\tstyles.button,\n\t\tstyles.buttonDark\n\t);\n\n\tconst textStyle = usePreferredColorSchemeStyle(\n\t\tstyles.buttonText,\n\t\tstyles.buttonTextDark\n\t);\n\n\treturn (\n\t\t<Pressable\n\t\t\tstyle={ buttonStyle }\n\t\t\tonPress={ onPress }\n\t\t\taccessibilityRole={ 'button' }\n\t\t>\n\t\t\t<Text style={ textStyle }>{ title }</Text>\n\t\t</Pressable>\n\t);\n};\n\nexport default HelpGetSupportButton;\n"]}
1
+ {"version":3,"sources":["@wordpress/editor/src/components/editor-help/help-get-support-button.native.js"],"names":["HelpGetSupportButton","onPress","title","buttonStyle","styles","button","buttonDark","textStyle","buttonText","buttonTextDark"],"mappings":";;;;;;;;;;;AAGA;;AAKA;;AAKA;;AAbA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;AAGA,MAAMA,oBAAoB,GAAG,CAAE;AAAEC,EAAAA,OAAF;AAAWC,EAAAA;AAAX,CAAF,KAA0B;AACtD,QAAMC,WAAW,GAAG,2CACnBC,eAAOC,MADY,EAEnBD,eAAOE,UAFY,CAApB;AAKA,QAAMC,SAAS,GAAG,2CACjBH,eAAOI,UADU,EAEjBJ,eAAOK,cAFU,CAAlB;AAKA,SACC,4BAAC,sBAAD;AACC,IAAA,KAAK,EAAGN,WADT;AAEC,IAAA,OAAO,EAAGF,OAFX;AAGC,IAAA,iBAAiB,EAAG;AAHrB,KAKC,4BAAC,iBAAD;AAAM,IAAA,KAAK,EAAGM;AAAd,KAA4BL,KAA5B,CALD,CADD;AASA,CApBD;;eAsBeF,oB","sourcesContent":["/**\n * External dependencies\n */\nimport { Pressable, Text } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { usePreferredColorSchemeStyle } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\n\nconst HelpGetSupportButton = ( { onPress, title } ) => {\n\tconst buttonStyle = usePreferredColorSchemeStyle(\n\t\tstyles.button,\n\t\tstyles.buttonDark\n\t);\n\n\tconst textStyle = usePreferredColorSchemeStyle(\n\t\tstyles.buttonText,\n\t\tstyles.buttonTextDark\n\t);\n\n\treturn (\n\t\t<Pressable\n\t\t\tstyle={ buttonStyle }\n\t\t\tonPress={ onPress }\n\t\t\taccessibilityRole={ 'button' }\n\t\t>\n\t\t\t<Text style={ textStyle }>{ title }</Text>\n\t\t</Pressable>\n\t);\n};\n\nexport default HelpGetSupportButton;\n"]}
@@ -26,10 +26,9 @@ var _style = _interopRequireDefault(require("./style.scss"));
26
26
  /**
27
27
  * Internal dependencies
28
28
  */
29
- const HelpSectionTitle = _ref => {
30
- let {
31
- children
32
- } = _ref;
29
+ const HelpSectionTitle = ({
30
+ children
31
+ }) => {
33
32
  const helpSectionTitle = (0, _compose.usePreferredColorSchemeStyle)(_style.default.helpSectionTitle, _style.default.helpSectionTitleDark);
34
33
  return (0, _element.createElement)(_reactNative.View, {
35
34
  style: _style.default.helpSectionTitleContainer
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/editor/src/components/editor-help/help-section-title.native.js"],"names":["HelpSectionTitle","children","helpSectionTitle","styles","helpSectionTitleDark","helpSectionTitleContainer"],"mappings":";;;;;;;;;;;AAGA;;AAKA;;AAKA;;AAbA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;AAGA,MAAMA,gBAAgB,GAAG,QAAoB;AAAA,MAAlB;AAAEC,IAAAA;AAAF,GAAkB;AAC5C,QAAMC,gBAAgB,GAAG,2CACxBC,eAAOD,gBADiB,EAExBC,eAAOC,oBAFiB,CAAzB;AAKA,SACC,4BAAC,iBAAD;AAAM,IAAA,KAAK,EAAGD,eAAOE;AAArB,KACC,4BAAC,iBAAD;AAAM,IAAA,KAAK,EAAGH;AAAd,KAAmCD,QAAnC,CADD,CADD;AAKA,CAXD;;eAaeD,gB","sourcesContent":["/**\n * External dependencies\n */\nimport { Text, View } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { usePreferredColorSchemeStyle } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\n\nconst HelpSectionTitle = ( { children } ) => {\n\tconst helpSectionTitle = usePreferredColorSchemeStyle(\n\t\tstyles.helpSectionTitle,\n\t\tstyles.helpSectionTitleDark\n\t);\n\n\treturn (\n\t\t<View style={ styles.helpSectionTitleContainer }>\n\t\t\t<Text style={ helpSectionTitle }>{ children }</Text>\n\t\t</View>\n\t);\n};\n\nexport default HelpSectionTitle;\n"]}
1
+ {"version":3,"sources":["@wordpress/editor/src/components/editor-help/help-section-title.native.js"],"names":["HelpSectionTitle","children","helpSectionTitle","styles","helpSectionTitleDark","helpSectionTitleContainer"],"mappings":";;;;;;;;;;;AAGA;;AAKA;;AAKA;;AAbA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;AAGA,MAAMA,gBAAgB,GAAG,CAAE;AAAEC,EAAAA;AAAF,CAAF,KAAoB;AAC5C,QAAMC,gBAAgB,GAAG,2CACxBC,eAAOD,gBADiB,EAExBC,eAAOC,oBAFiB,CAAzB;AAKA,SACC,4BAAC,iBAAD;AAAM,IAAA,KAAK,EAAGD,eAAOE;AAArB,KACC,4BAAC,iBAAD;AAAM,IAAA,KAAK,EAAGH;AAAd,KAAmCD,QAAnC,CADD,CADD;AAKA,CAXD;;eAaeD,gB","sourcesContent":["/**\n * External dependencies\n */\nimport { Text, View } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { usePreferredColorSchemeStyle } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\n\nconst HelpSectionTitle = ( { children } ) => {\n\tconst helpSectionTitle = usePreferredColorSchemeStyle(\n\t\tstyles.helpSectionTitle,\n\t\tstyles.helpSectionTitleDark\n\t);\n\n\treturn (\n\t\t<View style={ styles.helpSectionTitleContainer }>\n\t\t\t<Text style={ helpSectionTitle }>{ children }</Text>\n\t\t</View>\n\t);\n};\n\nexport default HelpSectionTitle;\n"]}
@@ -20,13 +20,12 @@ var _icons = require("@wordpress/icons");
20
20
  /**
21
21
  * WordPress dependencies
22
22
  */
23
- const HelpTopicRow = _ref => {
24
- let {
25
- label,
26
- icon,
27
- screenName,
28
- isLastItem
29
- } = _ref;
23
+ const HelpTopicRow = ({
24
+ label,
25
+ icon,
26
+ screenName,
27
+ isLastItem
28
+ }) => {
30
29
  const navigation = (0, _native.useNavigation)();
31
30
 
32
31
  const openSubSheet = () => {
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/editor/src/components/editor-help/help-topic-row.native.js"],"names":["HelpTopicRow","label","icon","screenName","isLastItem","navigation","openSubSheet","navigate","chevronRight"],"mappings":";;;;;;;;;AAGA;;AAKA;;AACA;;AATA;AACA;AACA;;AAGA;AACA;AACA;AAIA,MAAMA,YAAY,GAAG,QAA+C;AAAA,MAA7C;AAAEC,IAAAA,KAAF;AAASC,IAAAA,IAAT;AAAeC,IAAAA,UAAf;AAA2BC,IAAAA;AAA3B,GAA6C;AACnE,QAAMC,UAAU,GAAG,4BAAnB;;AAEA,QAAMC,YAAY,GAAG,MAAM;AAC1BD,IAAAA,UAAU,CAACE,QAAX,CAAqBJ,UAArB;AACA,GAFD;;AAIA,SACC,4BAAC,uBAAD;AACC,IAAA,aAAa,EAAGC,UAAU,GAAG,MAAH,GAAY,YADvC;AAEC,IAAA,kBAAkB,MAFnB;AAGC,IAAA,SAAS,MAHV;AAIC,IAAA,OAAO,EAAGE,YAJX;AAKC,IAAA,KAAK,EAAGL,KALT;AAMC,IAAA,IAAI,EAAGC;AANR,KAQC,4BAAC,gBAAD;AAAM,IAAA,IAAI,EAAGM;AAAb,IARD,CADD;AAYA,CAnBD;;eAqBeR,Y","sourcesContent":["/**\n * External dependencies\n */\nimport { useNavigation } from '@react-navigation/native';\n\n/**\n * WordPress dependencies\n */\nimport { TextControl, Icon } from '@wordpress/components';\nimport { chevronRight } from '@wordpress/icons';\n\nconst HelpTopicRow = ( { label, icon, screenName, isLastItem } ) => {\n\tconst navigation = useNavigation();\n\n\tconst openSubSheet = () => {\n\t\tnavigation.navigate( screenName );\n\t};\n\n\treturn (\n\t\t<TextControl\n\t\t\tseparatorType={ isLastItem ? 'none' : 'leftMargin' }\n\t\t\tcustomActionButton\n\t\t\tleftAlign\n\t\t\tonPress={ openSubSheet }\n\t\t\tlabel={ label }\n\t\t\ticon={ icon }\n\t\t>\n\t\t\t<Icon icon={ chevronRight } />\n\t\t</TextControl>\n\t);\n};\n\nexport default HelpTopicRow;\n"]}
1
+ {"version":3,"sources":["@wordpress/editor/src/components/editor-help/help-topic-row.native.js"],"names":["HelpTopicRow","label","icon","screenName","isLastItem","navigation","openSubSheet","navigate","chevronRight"],"mappings":";;;;;;;;;AAGA;;AAKA;;AACA;;AATA;AACA;AACA;;AAGA;AACA;AACA;AAIA,MAAMA,YAAY,GAAG,CAAE;AAAEC,EAAAA,KAAF;AAASC,EAAAA,IAAT;AAAeC,EAAAA,UAAf;AAA2BC,EAAAA;AAA3B,CAAF,KAA+C;AACnE,QAAMC,UAAU,GAAG,4BAAnB;;AAEA,QAAMC,YAAY,GAAG,MAAM;AAC1BD,IAAAA,UAAU,CAACE,QAAX,CAAqBJ,UAArB;AACA,GAFD;;AAIA,SACC,4BAAC,uBAAD;AACC,IAAA,aAAa,EAAGC,UAAU,GAAG,MAAH,GAAY,YADvC;AAEC,IAAA,kBAAkB,MAFnB;AAGC,IAAA,SAAS,MAHV;AAIC,IAAA,OAAO,EAAGE,YAJX;AAKC,IAAA,KAAK,EAAGL,KALT;AAMC,IAAA,IAAI,EAAGC;AANR,KAQC,4BAAC,gBAAD;AAAM,IAAA,IAAI,EAAGM;AAAb,IARD,CADD;AAYA,CAnBD;;eAqBeR,Y","sourcesContent":["/**\n * External dependencies\n */\nimport { useNavigation } from '@react-navigation/native';\n\n/**\n * WordPress dependencies\n */\nimport { TextControl, Icon } from '@wordpress/components';\nimport { chevronRight } from '@wordpress/icons';\n\nconst HelpTopicRow = ( { label, icon, screenName, isLastItem } ) => {\n\tconst navigation = useNavigation();\n\n\tconst openSubSheet = () => {\n\t\tnavigation.navigate( screenName );\n\t};\n\n\treturn (\n\t\t<TextControl\n\t\t\tseparatorType={ isLastItem ? 'none' : 'leftMargin' }\n\t\t\tcustomActionButton\n\t\t\tleftAlign\n\t\t\tonPress={ openSubSheet }\n\t\t\tlabel={ label }\n\t\t\ticon={ icon }\n\t\t>\n\t\t\t<Icon icon={ chevronRight } />\n\t\t</TextControl>\n\t);\n};\n\nexport default HelpTopicRow;\n"]}
@@ -87,13 +87,12 @@ const HELP_TOPICS = [{
87
87
  view: (0, _element.createElement)(_customizeBlocks.default, null)
88
88
  }];
89
89
 
90
- function EditorHelpTopics(_ref) {
91
- let {
92
- close,
93
- isVisible,
94
- onClose,
95
- showSupport
96
- } = _ref;
90
+ function EditorHelpTopics({
91
+ close,
92
+ isVisible,
93
+ onClose,
94
+ showSupport
95
+ }) {
97
96
  const {
98
97
  postType
99
98
  } = (0, _data.useSelect)(select => ({
@@ -127,11 +126,9 @@ function EditorHelpTopics(_ref) {
127
126
  }, (0, _element.createElement)(_components.BottomSheet.NavBar, null, (0, _element.createElement)(_components.BottomSheet.NavBar.DismissButton, {
128
127
  onPress: close,
129
128
  iosText: (0, _i18n.__)('Close')
130
- }), (0, _element.createElement)(_components.BottomSheet.NavBar.Heading, null, title)), (0, _element.createElement)(_components.BottomSheetConsumer, null, _ref2 => {
131
- let {
132
- listProps
133
- } = _ref2;
134
-
129
+ }), (0, _element.createElement)(_components.BottomSheet.NavBar.Heading, null, title)), (0, _element.createElement)(_components.BottomSheetConsumer, null, ({
130
+ listProps
131
+ }) => {
135
132
  const contentContainerStyle = _reactNative.StyleSheet.flatten(listProps.contentContainerStyle);
136
133
 
137
134
  return (0, _element.createElement)(_reactNative.ScrollView, (0, _extends2.default)({}, listProps, {
@@ -145,12 +142,11 @@ function EditorHelpTopics(_ref) {
145
142
  */
146
143
  marginTop: 0
147
144
  }
148
- }), (0, _element.createElement)(_components.PanelBody, null, (0, _element.createElement)(_helpSectionTitle.default, null, (0, _i18n.__)('The basics')), HELP_TOPICS.map((_ref3, index) => {
149
- let {
150
- label,
151
- icon,
152
- slug
153
- } = _ref3;
145
+ }), (0, _element.createElement)(_components.PanelBody, null, (0, _element.createElement)(_helpSectionTitle.default, null, (0, _i18n.__)('The basics')), HELP_TOPICS.map(({
146
+ label,
147
+ icon,
148
+ slug
149
+ }, index) => {
154
150
  const isLastItem = index === HELP_TOPICS.length - 1;
155
151
  return (0, _element.createElement)(_helpTopicRow.default, {
156
152
  key: slug,
@@ -160,12 +156,11 @@ function EditorHelpTopics(_ref) {
160
156
  isLastItem: isLastItem
161
157
  });
162
158
  }), showSupport && supportSection));
163
- }))), HELP_TOPICS.map(_ref4 => {
164
- let {
165
- view,
166
- label,
167
- slug
168
- } = _ref4;
159
+ }))), HELP_TOPICS.map(({
160
+ view,
161
+ label,
162
+ slug
163
+ }) => {
169
164
  return (0, _element.createElement)(_helpDetailNavigationScreen.default, {
170
165
  key: slug,
171
166
  name: slug,