@wordpress/editor 14.9.0 → 14.10.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 (338) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/bindings/api.js +0 -29
  3. package/build/bindings/api.js.map +1 -1
  4. package/build/components/autocompleters/user.js.map +1 -1
  5. package/build/components/block-manager/index.js +2 -2
  6. package/build/components/block-manager/index.js.map +1 -1
  7. package/build/components/commands/index.js.map +1 -1
  8. package/build/components/create-template-part-modal/index.js.map +1 -1
  9. package/build/components/create-template-part-modal/utils.js.map +1 -1
  10. package/build/components/document-outline/index.js.map +1 -1
  11. package/build/components/document-outline/item.js.map +1 -1
  12. package/build/components/document-tools/index.js +1 -1
  13. package/build/components/document-tools/index.js.map +1 -1
  14. package/build/components/editor-interface/index.js +1 -12
  15. package/build/components/editor-interface/index.js.map +1 -1
  16. package/build/components/entities-saved-states/index.js +1 -1
  17. package/build/components/entities-saved-states/index.js.map +1 -1
  18. package/build/components/media-categories/index.js.map +1 -1
  19. package/build/components/page-attributes/parent.js +1 -1
  20. package/build/components/page-attributes/parent.js.map +1 -1
  21. package/build/components/plugin-document-setting-panel/index.js.map +1 -1
  22. package/build/components/post-actions/index.js.map +1 -1
  23. package/build/components/post-content-information/index.js +1 -1
  24. package/build/components/post-content-information/index.js.map +1 -1
  25. package/build/components/post-featured-image/index.js.map +1 -1
  26. package/build/components/post-format/index.js +1 -1
  27. package/build/components/post-format/index.js.map +1 -1
  28. package/build/components/post-last-revision/index.js +1 -1
  29. package/build/components/post-last-revision/index.js.map +1 -1
  30. package/build/components/post-locked-modal/index.js +2 -2
  31. package/build/components/post-locked-modal/index.js.map +1 -1
  32. package/build/components/post-preview-button/index.js +1 -1
  33. package/build/components/post-preview-button/index.js.map +1 -1
  34. package/build/components/post-publish-button/index.js.map +1 -1
  35. package/build/components/post-publish-panel/maybe-post-format-panel.js +1 -1
  36. package/build/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
  37. package/build/components/post-publish-panel/maybe-upload-media.js +1 -0
  38. package/build/components/post-publish-panel/maybe-upload-media.js.map +1 -1
  39. package/build/components/post-publish-panel/media-util.js +1 -0
  40. package/build/components/post-publish-panel/media-util.js.map +1 -1
  41. package/build/components/post-publish-panel/postpublish.js +1 -1
  42. package/build/components/post-publish-panel/postpublish.js.map +1 -1
  43. package/build/components/post-schedule/label.js.map +1 -1
  44. package/build/components/post-taxonomies/flat-term-selector.js +4 -4
  45. package/build/components/post-taxonomies/flat-term-selector.js.map +1 -1
  46. package/build/components/post-taxonomies/hierarchical-term-selector.js +3 -2
  47. package/build/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
  48. package/build/components/post-taxonomies/index.js +1 -1
  49. package/build/components/post-taxonomies/index.js.map +1 -1
  50. package/build/components/post-taxonomies/panel.js.map +1 -1
  51. package/build/components/post-template/classic-theme.js +2 -4
  52. package/build/components/post-template/classic-theme.js.map +1 -1
  53. package/build/components/post-text-editor/index.js.map +1 -1
  54. package/build/components/post-title/index.js +15 -19
  55. package/build/components/post-title/index.js.map +1 -1
  56. package/build/components/post-title/index.native.js +2 -2
  57. package/build/components/post-title/index.native.js.map +1 -1
  58. package/build/components/post-url/index.js +76 -63
  59. package/build/components/post-url/index.js.map +1 -1
  60. package/build/components/post-url/panel.js +46 -26
  61. package/build/components/post-url/panel.js.map +1 -1
  62. package/build/components/post-visibility/index.js.map +1 -1
  63. package/build/components/preferences-modal/index.js.map +1 -1
  64. package/build/components/preview-dropdown/index.js.map +1 -1
  65. package/build/components/provider/index.js +1 -1
  66. package/build/components/provider/index.js.map +1 -1
  67. package/build/components/resizable-editor/resize-handle.js.map +1 -1
  68. package/build/components/time-to-read/index.js +1 -1
  69. package/build/components/time-to-read/index.js.map +1 -1
  70. package/build/components/visual-editor/edit-template-blocks-notification.js +4 -1
  71. package/build/components/visual-editor/edit-template-blocks-notification.js.map +1 -1
  72. package/build/components/visual-editor/index.js +4 -3
  73. package/build/components/visual-editor/index.js.map +1 -1
  74. package/build/components/visual-editor/use-select-nearest-editable-block.js.map +1 -1
  75. package/build/dataviews/actions/duplicate-template-part.js +1 -1
  76. package/build/dataviews/actions/duplicate-template-part.js.map +1 -1
  77. package/build/private-apis.js +0 -1
  78. package/build/private-apis.js.map +1 -1
  79. package/build/store/actions.js +26 -1
  80. package/build/store/actions.js.map +1 -1
  81. package/build/store/constants.js +1 -0
  82. package/build/store/constants.js.map +1 -1
  83. package/build/store/local-autosave.js.map +1 -1
  84. package/build/store/private-actions.js +7 -6
  85. package/build/store/private-actions.js.map +1 -1
  86. package/build/store/selectors.js +21 -0
  87. package/build/store/selectors.js.map +1 -1
  88. package/build/utils/media-upload/index.js.map +1 -1
  89. package/build-module/bindings/api.js +1 -29
  90. package/build-module/bindings/api.js.map +1 -1
  91. package/build-module/components/autocompleters/user.js +1 -3
  92. package/build-module/components/autocompleters/user.js.map +1 -1
  93. package/build-module/components/block-manager/category.js +1 -2
  94. package/build-module/components/block-manager/category.js.map +1 -1
  95. package/build-module/components/block-manager/checklist.js +1 -2
  96. package/build-module/components/block-manager/checklist.js.map +1 -1
  97. package/build-module/components/block-manager/index.js +3 -4
  98. package/build-module/components/block-manager/index.js.map +1 -1
  99. package/build-module/components/block-settings-menu/content-only-settings-menu.js +1 -3
  100. package/build-module/components/block-settings-menu/content-only-settings-menu.js.map +1 -1
  101. package/build-module/components/blog-title/index.js +1 -3
  102. package/build-module/components/blog-title/index.js.map +1 -1
  103. package/build-module/components/collapsible-block-toolbar/index.js +1 -3
  104. package/build-module/components/collapsible-block-toolbar/index.js.map +1 -1
  105. package/build-module/components/commands/index.js.map +1 -1
  106. package/build-module/components/create-template-part-modal/index.js +1 -2
  107. package/build-module/components/create-template-part-modal/index.js.map +1 -1
  108. package/build-module/components/create-template-part-modal/utils.js.map +1 -1
  109. package/build-module/components/document-bar/index.js +1 -2
  110. package/build-module/components/document-bar/index.js.map +1 -1
  111. package/build-module/components/document-outline/index.js +1 -2
  112. package/build-module/components/document-outline/index.js.map +1 -1
  113. package/build-module/components/document-outline/item.js +1 -2
  114. package/build-module/components/document-outline/item.js.map +1 -1
  115. package/build-module/components/document-tools/index.js +2 -4
  116. package/build-module/components/document-tools/index.js.map +1 -1
  117. package/build-module/components/editor/index.js +1 -3
  118. package/build-module/components/editor/index.js.map +1 -1
  119. package/build-module/components/editor-help/add-blocks.native.js +1 -3
  120. package/build-module/components/editor-help/add-blocks.native.js.map +1 -1
  121. package/build-module/components/editor-help/customize-blocks.native.js +1 -3
  122. package/build-module/components/editor-help/customize-blocks.native.js.map +1 -1
  123. package/build-module/components/editor-help/help-detail-navigation-screen.native.js +1 -2
  124. package/build-module/components/editor-help/help-detail-navigation-screen.native.js.map +1 -1
  125. package/build-module/components/editor-help/index.native.js +1 -3
  126. package/build-module/components/editor-help/index.native.js.map +1 -1
  127. package/build-module/components/editor-help/intro-to-blocks.native.js +1 -3
  128. package/build-module/components/editor-help/intro-to-blocks.native.js.map +1 -1
  129. package/build-module/components/editor-help/move-blocks.native.js +1 -3
  130. package/build-module/components/editor-help/move-blocks.native.js.map +1 -1
  131. package/build-module/components/editor-help/remove-blocks.native.js +1 -3
  132. package/build-module/components/editor-help/remove-blocks.native.js.map +1 -1
  133. package/build-module/components/editor-help/view-sections.native.js +1 -2
  134. package/build-module/components/editor-help/view-sections.native.js.map +1 -1
  135. package/build-module/components/editor-interface/index.js +2 -15
  136. package/build-module/components/editor-interface/index.js.map +1 -1
  137. package/build-module/components/editor-notices/index.js +1 -3
  138. package/build-module/components/editor-notices/index.js.map +1 -1
  139. package/build-module/components/entities-saved-states/entity-record-item.js +1 -3
  140. package/build-module/components/entities-saved-states/entity-record-item.js.map +1 -1
  141. package/build-module/components/entities-saved-states/entity-type-list.js +1 -2
  142. package/build-module/components/entities-saved-states/entity-type-list.js.map +1 -1
  143. package/build-module/components/entities-saved-states/index.js +2 -3
  144. package/build-module/components/entities-saved-states/index.js.map +1 -1
  145. package/build-module/components/error-boundary/index.native.js +1 -2
  146. package/build-module/components/error-boundary/index.native.js.map +1 -1
  147. package/build-module/components/header/index.js +1 -2
  148. package/build-module/components/header/index.js.map +1 -1
  149. package/build-module/components/keyboard-shortcut-help-modal/index.js +1 -2
  150. package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  151. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +1 -3
  152. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
  153. package/build-module/components/list-view-sidebar/list-view-outline.js +1 -3
  154. package/build-module/components/list-view-sidebar/list-view-outline.js.map +1 -1
  155. package/build-module/components/media-categories/index.js.map +1 -1
  156. package/build-module/components/more-menu/index.js +1 -3
  157. package/build-module/components/more-menu/index.js.map +1 -1
  158. package/build-module/components/offline-status/index.native.js +1 -2
  159. package/build-module/components/offline-status/index.native.js.map +1 -1
  160. package/build-module/components/page-attributes/parent.js +2 -3
  161. package/build-module/components/page-attributes/parent.js.map +1 -1
  162. package/build-module/components/plugin-document-setting-panel/index.js +1 -3
  163. package/build-module/components/plugin-document-setting-panel/index.js.map +1 -1
  164. package/build-module/components/post-actions/index.js +1 -3
  165. package/build-module/components/post-actions/index.js.map +1 -1
  166. package/build-module/components/post-author/panel.js +1 -2
  167. package/build-module/components/post-author/panel.js.map +1 -1
  168. package/build-module/components/post-card-panel/index.js +1 -2
  169. package/build-module/components/post-card-panel/index.js.map +1 -1
  170. package/build-module/components/post-content-information/index.js +1 -1
  171. package/build-module/components/post-content-information/index.js.map +1 -1
  172. package/build-module/components/post-discussion/panel.js +1 -2
  173. package/build-module/components/post-discussion/panel.js.map +1 -1
  174. package/build-module/components/post-excerpt/panel.js +1 -3
  175. package/build-module/components/post-excerpt/panel.js.map +1 -1
  176. package/build-module/components/post-featured-image/index.js +1 -2
  177. package/build-module/components/post-featured-image/index.js.map +1 -1
  178. package/build-module/components/post-format/index.js +2 -3
  179. package/build-module/components/post-format/index.js.map +1 -1
  180. package/build-module/components/post-format/panel.js +1 -2
  181. package/build-module/components/post-format/panel.js.map +1 -1
  182. package/build-module/components/post-last-revision/index.js +1 -1
  183. package/build-module/components/post-last-revision/index.js.map +1 -1
  184. package/build-module/components/post-locked-modal/index.js +3 -5
  185. package/build-module/components/post-locked-modal/index.js.map +1 -1
  186. package/build-module/components/post-panel-row/index.js +1 -2
  187. package/build-module/components/post-panel-row/index.js.map +1 -1
  188. package/build-module/components/post-preview-button/index.js +2 -4
  189. package/build-module/components/post-preview-button/index.js.map +1 -1
  190. package/build-module/components/post-publish-button/index.js +1 -2
  191. package/build-module/components/post-publish-button/index.js.map +1 -1
  192. package/build-module/components/post-publish-panel/index.js +1 -3
  193. package/build-module/components/post-publish-panel/index.js.map +1 -1
  194. package/build-module/components/post-publish-panel/maybe-category-panel.js +1 -2
  195. package/build-module/components/post-publish-panel/maybe-category-panel.js.map +1 -1
  196. package/build-module/components/post-publish-panel/maybe-post-format-panel.js +2 -3
  197. package/build-module/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
  198. package/build-module/components/post-publish-panel/maybe-tags-panel.js +1 -2
  199. package/build-module/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
  200. package/build-module/components/post-publish-panel/maybe-upload-media.js +2 -2
  201. package/build-module/components/post-publish-panel/maybe-upload-media.js.map +1 -1
  202. package/build-module/components/post-publish-panel/media-util.js +1 -0
  203. package/build-module/components/post-publish-panel/media-util.js.map +1 -1
  204. package/build-module/components/post-publish-panel/postpublish.js +2 -4
  205. package/build-module/components/post-publish-panel/postpublish.js.map +1 -1
  206. package/build-module/components/post-publish-panel/prepublish.js +1 -3
  207. package/build-module/components/post-publish-panel/prepublish.js.map +1 -1
  208. package/build-module/components/post-saved-state/index.js +1 -2
  209. package/build-module/components/post-saved-state/index.js.map +1 -1
  210. package/build-module/components/post-schedule/label.js.map +1 -1
  211. package/build-module/components/post-status/index.js +1 -3
  212. package/build-module/components/post-status/index.js.map +1 -1
  213. package/build-module/components/post-switch-to-draft-button/index.js +1 -3
  214. package/build-module/components/post-switch-to-draft-button/index.js.map +1 -1
  215. package/build-module/components/post-taxonomies/flat-term-selector.js +5 -7
  216. package/build-module/components/post-taxonomies/flat-term-selector.js.map +1 -1
  217. package/build-module/components/post-taxonomies/hierarchical-term-selector.js +4 -4
  218. package/build-module/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
  219. package/build-module/components/post-taxonomies/index.js +1 -1
  220. package/build-module/components/post-taxonomies/index.js.map +1 -1
  221. package/build-module/components/post-taxonomies/most-used-terms.js +1 -2
  222. package/build-module/components/post-taxonomies/most-used-terms.js.map +1 -1
  223. package/build-module/components/post-taxonomies/panel.js.map +1 -1
  224. package/build-module/components/post-template/block-theme.js +1 -3
  225. package/build-module/components/post-template/block-theme.js.map +1 -1
  226. package/build-module/components/post-template/classic-theme.js +3 -6
  227. package/build-module/components/post-template/classic-theme.js.map +1 -1
  228. package/build-module/components/post-template/create-new-template-modal.js +1 -2
  229. package/build-module/components/post-template/create-new-template-modal.js.map +1 -1
  230. package/build-module/components/post-template/create-new-template.js +1 -3
  231. package/build-module/components/post-template/create-new-template.js.map +1 -1
  232. package/build-module/components/post-template/swap-template-button.js +1 -3
  233. package/build-module/components/post-template/swap-template-button.js.map +1 -1
  234. package/build-module/components/post-text-editor/index.js +1 -3
  235. package/build-module/components/post-text-editor/index.js.map +1 -1
  236. package/build-module/components/post-title/index.js +15 -19
  237. package/build-module/components/post-title/index.js.map +1 -1
  238. package/build-module/components/post-title/index.native.js +2 -2
  239. package/build-module/components/post-title/index.native.js.map +1 -1
  240. package/build-module/components/post-trash/index.js +1 -2
  241. package/build-module/components/post-trash/index.js.map +1 -1
  242. package/build-module/components/post-url/index.js +78 -66
  243. package/build-module/components/post-url/index.js.map +1 -1
  244. package/build-module/components/post-url/panel.js +48 -28
  245. package/build-module/components/post-url/panel.js.map +1 -1
  246. package/build-module/components/post-visibility/index.js +1 -2
  247. package/build-module/components/post-visibility/index.js.map +1 -1
  248. package/build-module/components/posts-per-page/index.js +1 -3
  249. package/build-module/components/posts-per-page/index.js.map +1 -1
  250. package/build-module/components/preferences-modal/index.js +1 -3
  251. package/build-module/components/preferences-modal/index.js.map +1 -1
  252. package/build-module/components/preview-dropdown/index.js +1 -3
  253. package/build-module/components/preview-dropdown/index.js.map +1 -1
  254. package/build-module/components/provider/index.js +2 -4
  255. package/build-module/components/provider/index.js.map +1 -1
  256. package/build-module/components/provider/index.native.js +1 -3
  257. package/build-module/components/provider/index.native.js.map +1 -1
  258. package/build-module/components/resizable-editor/resize-handle.js +1 -3
  259. package/build-module/components/resizable-editor/resize-handle.js.map +1 -1
  260. package/build-module/components/save-publish-panels/index.js +1 -3
  261. package/build-module/components/save-publish-panels/index.js.map +1 -1
  262. package/build-module/components/sidebar/header.js +1 -2
  263. package/build-module/components/sidebar/header.js.map +1 -1
  264. package/build-module/components/sidebar/index.js +1 -2
  265. package/build-module/components/sidebar/index.js.map +1 -1
  266. package/build-module/components/sidebar/post-summary.js +1 -3
  267. package/build-module/components/sidebar/post-summary.js.map +1 -1
  268. package/build-module/components/site-discussion/index.js +1 -3
  269. package/build-module/components/site-discussion/index.js.map +1 -1
  270. package/build-module/components/start-template-options/index.js +1 -2
  271. package/build-module/components/start-template-options/index.js.map +1 -1
  272. package/build-module/components/table-of-contents/panel.js +1 -3
  273. package/build-module/components/table-of-contents/panel.js.map +1 -1
  274. package/build-module/components/template-part-menu-items/convert-to-template-part.js +1 -3
  275. package/build-module/components/template-part-menu-items/convert-to-template-part.js.map +1 -1
  276. package/build-module/components/template-validation-notice/index.js +1 -3
  277. package/build-module/components/template-validation-notice/index.js.map +1 -1
  278. package/build-module/components/text-editor/index.js +1 -2
  279. package/build-module/components/text-editor/index.js.map +1 -1
  280. package/build-module/components/time-to-read/index.js +1 -1
  281. package/build-module/components/time-to-read/index.js.map +1 -1
  282. package/build-module/components/visual-editor/edit-template-blocks-notification.js +4 -1
  283. package/build-module/components/visual-editor/edit-template-blocks-notification.js.map +1 -1
  284. package/build-module/components/visual-editor/index.js +5 -6
  285. package/build-module/components/visual-editor/index.js.map +1 -1
  286. package/build-module/components/visual-editor/use-select-nearest-editable-block.js.map +1 -1
  287. package/build-module/dataviews/actions/duplicate-template-part.js +1 -1
  288. package/build-module/dataviews/actions/duplicate-template-part.js.map +1 -1
  289. package/build-module/hooks/pattern-overrides.js +1 -3
  290. package/build-module/hooks/pattern-overrides.js.map +1 -1
  291. package/build-module/private-apis.js +1 -2
  292. package/build-module/private-apis.js.map +1 -1
  293. package/build-module/store/actions.js +26 -1
  294. package/build-module/store/actions.js.map +1 -1
  295. package/build-module/store/constants.js +1 -0
  296. package/build-module/store/constants.js.map +1 -1
  297. package/build-module/store/local-autosave.js.map +1 -1
  298. package/build-module/store/private-actions.js +7 -6
  299. package/build-module/store/private-actions.js.map +1 -1
  300. package/build-module/store/selectors.js +21 -0
  301. package/build-module/store/selectors.js.map +1 -1
  302. package/build-module/utils/media-upload/index.js.map +1 -1
  303. package/build-style/style-rtl.css +20 -5
  304. package/build-style/style.css +20 -5
  305. package/build-types/bindings/api.d.ts +0 -13
  306. package/build-types/bindings/api.d.ts.map +1 -1
  307. package/build-types/components/editor-interface/index.d.ts +1 -2
  308. package/build-types/components/editor-interface/index.d.ts.map +1 -1
  309. package/build-types/components/post-taxonomies/hierarchical-term-selector.d.ts.map +1 -1
  310. package/build-types/components/post-template/classic-theme.d.ts.map +1 -1
  311. package/build-types/components/post-url/index.d.ts.map +1 -1
  312. package/build-types/components/post-url/panel.d.ts.map +1 -1
  313. package/build-types/components/provider/index.d.ts.map +1 -1
  314. package/build-types/components/visual-editor/edit-template-blocks-notification.d.ts.map +1 -1
  315. package/build-types/components/visual-editor/index.d.ts.map +1 -1
  316. package/build-types/private-apis.d.ts.map +1 -1
  317. package/build-types/store/actions.d.ts +1 -4
  318. package/build-types/store/actions.d.ts.map +1 -1
  319. package/build-types/store/selectors.d.ts +21 -0
  320. package/build-types/store/selectors.d.ts.map +1 -1
  321. package/package.json +38 -38
  322. package/src/bindings/api.js +1 -32
  323. package/src/components/document-tools/index.js +1 -1
  324. package/src/components/editor-interface/index.js +0 -15
  325. package/src/components/header/style.scss +1 -0
  326. package/src/components/post-saved-state/test/__snapshots__/index.js.snap +1 -1
  327. package/src/components/post-taxonomies/hierarchical-term-selector.js +1 -0
  328. package/src/components/post-template/classic-theme.js +1 -2
  329. package/src/components/post-url/index.js +67 -55
  330. package/src/components/post-url/panel.js +57 -33
  331. package/src/components/post-url/style.scss +21 -3
  332. package/src/components/provider/index.js +1 -0
  333. package/src/components/visual-editor/edit-template-blocks-notification.js +5 -1
  334. package/src/components/visual-editor/index.js +3 -1
  335. package/src/private-apis.js +1 -5
  336. package/src/store/actions.js +28 -1
  337. package/src/store/selectors.js +21 -0
  338. package/tsconfig.tsbuildinfo +1 -1
@@ -1 +1 @@
1
- {"version":3,"names":["clsx","__","isRTL","useSelect","useDispatch","Button","__experimentalText","Text","__unstableMotion","motion","__unstableAnimatePresence","AnimatePresence","BlockIcon","chevronLeftSmall","chevronRightSmall","displayShortcut","store","coreStore","commandsStore","useRef","useEffect","useReducedMotion","decodeEntities","TEMPLATE_POST_TYPES","GLOBAL_POST_TYPES","editorStore","jsx","_jsx","jsxs","_jsxs","MotionButton","DocumentBar","props","postType","postTypeLabel","documentTitle","isNotFound","isUnsyncedPattern","templateTitle","onNavigateToPreviousEntityRecord","select","getCurrentPostType","getCurrentPostId","getEditorSettings","__experimentalGetTemplateInfo","getTemplateInfo","getEditedEntityRecord","getPostType","isResolving","isResolvingSelector","_postType","_postId","_document","_templateInfo","_postTypeLabel","labels","singular_name","title","wp_pattern_sync_status","open","openCommandCenter","isReducedMotion","isTemplate","includes","isGlobalEntity","hasBackButton","entityTitle","icon","mountedRef","current","className","children","onClick","event","stopPropagation","size","initial","opacity","transform","animate","exit","transition","duration","undefined","div","as","primary"],"sources":["@wordpress/editor/src/components/document-bar/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __, isRTL } from '@wordpress/i18n';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tButton,\n\t__experimentalText as Text,\n\t__unstableMotion as motion,\n\t__unstableAnimatePresence as AnimatePresence,\n} from '@wordpress/components';\nimport { BlockIcon } from '@wordpress/block-editor';\nimport { chevronLeftSmall, chevronRightSmall } from '@wordpress/icons';\nimport { displayShortcut } from '@wordpress/keycodes';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as commandsStore } from '@wordpress/commands';\nimport { useRef, useEffect } from '@wordpress/element';\nimport { useReducedMotion } from '@wordpress/compose';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport { TEMPLATE_POST_TYPES, GLOBAL_POST_TYPES } from '../../store/constants';\nimport { store as editorStore } from '../../store';\n\n/** @typedef {import(\"@wordpress/components\").IconType} IconType */\n\nconst MotionButton = motion( Button );\n\n/**\n * This component renders a navigation bar at the top of the editor. It displays the title of the current document,\n * a back button (if applicable), and a command center button. It also handles different states of the document,\n * such as \"not found\" or \"unsynced\".\n *\n * @example\n * ```jsx\n * <DocumentBar />\n * ```\n * @param {Object} props The component props.\n * @param {string} props.title A title for the document, defaulting to the document or\n * template title currently being edited.\n * @param {IconType} props.icon An icon for the document, no default.\n * (A default icon indicating the document post type is no longer used.)\n *\n * @return {JSX.Element} The rendered DocumentBar component.\n */\nexport default function DocumentBar( props ) {\n\tconst {\n\t\tpostType,\n\t\tpostTypeLabel,\n\t\tdocumentTitle,\n\t\tisNotFound,\n\t\tisUnsyncedPattern,\n\t\ttemplateTitle,\n\t\tonNavigateToPreviousEntityRecord,\n\t} = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetCurrentPostType,\n\t\t\tgetCurrentPostId,\n\t\t\tgetEditorSettings,\n\t\t\t__experimentalGetTemplateInfo: getTemplateInfo,\n\t\t} = select( editorStore );\n\t\tconst {\n\t\t\tgetEditedEntityRecord,\n\t\t\tgetPostType,\n\t\t\tisResolving: isResolvingSelector,\n\t\t} = select( coreStore );\n\t\tconst _postType = getCurrentPostType();\n\t\tconst _postId = getCurrentPostId();\n\t\tconst _document = getEditedEntityRecord(\n\t\t\t'postType',\n\t\t\t_postType,\n\t\t\t_postId\n\t\t);\n\t\tconst _templateInfo = getTemplateInfo( _document );\n\t\tconst _postTypeLabel = getPostType( _postType )?.labels?.singular_name;\n\n\t\treturn {\n\t\t\tpostType: _postType,\n\t\t\tpostTypeLabel: _postTypeLabel,\n\t\t\tdocumentTitle: _document.title,\n\t\t\tisNotFound:\n\t\t\t\t! _document &&\n\t\t\t\t! isResolvingSelector(\n\t\t\t\t\t'getEditedEntityRecord',\n\t\t\t\t\t'postType',\n\t\t\t\t\t_postType,\n\t\t\t\t\t_postId\n\t\t\t\t),\n\t\t\tisUnsyncedPattern: _document?.wp_pattern_sync_status === 'unsynced',\n\t\t\ttemplateTitle: _templateInfo.title,\n\t\t\tonNavigateToPreviousEntityRecord:\n\t\t\t\tgetEditorSettings().onNavigateToPreviousEntityRecord,\n\t\t};\n\t}, [] );\n\n\tconst { open: openCommandCenter } = useDispatch( commandsStore );\n\tconst isReducedMotion = useReducedMotion();\n\n\tconst isTemplate = TEMPLATE_POST_TYPES.includes( postType );\n\tconst isGlobalEntity = GLOBAL_POST_TYPES.includes( postType );\n\tconst hasBackButton = !! onNavigateToPreviousEntityRecord;\n\tconst entityTitle = isTemplate ? templateTitle : documentTitle;\n\tconst title = props.title || entityTitle;\n\tconst icon = props.icon;\n\n\tconst mountedRef = useRef( false );\n\tuseEffect( () => {\n\t\tmountedRef.current = true;\n\t}, [] );\n\n\treturn (\n\t\t<div\n\t\t\tclassName={ clsx( 'editor-document-bar', {\n\t\t\t\t'has-back-button': hasBackButton,\n\t\t\t\t'is-global': isGlobalEntity && ! isUnsyncedPattern,\n\t\t\t} ) }\n\t\t>\n\t\t\t<AnimatePresence>\n\t\t\t\t{ hasBackButton && (\n\t\t\t\t\t<MotionButton\n\t\t\t\t\t\tclassName=\"editor-document-bar__back\"\n\t\t\t\t\t\ticon={ isRTL() ? chevronRightSmall : chevronLeftSmall }\n\t\t\t\t\t\tonClick={ ( event ) => {\n\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t\tonNavigateToPreviousEntityRecord();\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\tinitial={\n\t\t\t\t\t\t\tmountedRef.current\n\t\t\t\t\t\t\t\t? { opacity: 0, transform: 'translateX(15%)' }\n\t\t\t\t\t\t\t\t: false // Don't show entry animation when DocumentBar mounts.\n\t\t\t\t\t\t}\n\t\t\t\t\t\tanimate={ { opacity: 1, transform: 'translateX(0%)' } }\n\t\t\t\t\t\texit={ { opacity: 0, transform: 'translateX(15%)' } }\n\t\t\t\t\t\ttransition={\n\t\t\t\t\t\t\tisReducedMotion ? { duration: 0 } : undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Back' ) }\n\t\t\t\t\t</MotionButton>\n\t\t\t\t) }\n\t\t\t</AnimatePresence>\n\t\t\t{ isNotFound ? (\n\t\t\t\t<Text>{ __( 'Document not found' ) }</Text>\n\t\t\t) : (\n\t\t\t\t<Button\n\t\t\t\t\tclassName=\"editor-document-bar__command\"\n\t\t\t\t\tonClick={ () => openCommandCenter() }\n\t\t\t\t\tsize=\"compact\"\n\t\t\t\t>\n\t\t\t\t\t<motion.div\n\t\t\t\t\t\tclassName=\"editor-document-bar__title\"\n\t\t\t\t\t\t// Force entry animation when the back button is added or removed.\n\t\t\t\t\t\tkey={ hasBackButton }\n\t\t\t\t\t\tinitial={\n\t\t\t\t\t\t\tmountedRef.current\n\t\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\t\topacity: 0,\n\t\t\t\t\t\t\t\t\t\ttransform: hasBackButton\n\t\t\t\t\t\t\t\t\t\t\t? 'translateX(15%)'\n\t\t\t\t\t\t\t\t\t\t\t: 'translateX(-15%)',\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t: false // Don't show entry animation when DocumentBar mounts.\n\t\t\t\t\t\t}\n\t\t\t\t\t\tanimate={ {\n\t\t\t\t\t\t\topacity: 1,\n\t\t\t\t\t\t\ttransform: 'translateX(0%)',\n\t\t\t\t\t\t} }\n\t\t\t\t\t\ttransition={\n\t\t\t\t\t\t\tisReducedMotion ? { duration: 0 } : undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t{ icon && <BlockIcon icon={ icon } /> }\n\t\t\t\t\t\t<Text size=\"body\" as=\"h1\">\n\t\t\t\t\t\t\t<span className=\"editor-document-bar__post-title\">\n\t\t\t\t\t\t\t\t{ title\n\t\t\t\t\t\t\t\t\t? decodeEntities( title )\n\t\t\t\t\t\t\t\t\t: __( 'No title' ) }\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t{ postTypeLabel && ! props.title && (\n\t\t\t\t\t\t\t\t<span className=\"editor-document-bar__post-type-label\">\n\t\t\t\t\t\t\t\t\t{ '· ' + decodeEntities( postTypeLabel ) }\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t</motion.div>\n\t\t\t\t\t<span className=\"editor-document-bar__shortcut\">\n\t\t\t\t\t\t{ displayShortcut.primary( 'k' ) }\n\t\t\t\t\t</span>\n\t\t\t\t</Button>\n\t\t\t) }\n\t\t</div>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,EAAE,EAAEC,KAAK,QAAQ,iBAAiB;AAC3C,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SACCC,MAAM,EACNC,kBAAkB,IAAIC,IAAI,EAC1BC,gBAAgB,IAAIC,MAAM,EAC1BC,yBAAyB,IAAIC,eAAe,QACtC,uBAAuB;AAC9B,SAASC,SAAS,QAAQ,yBAAyB;AACnD,SAASC,gBAAgB,EAAEC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AAa,GACrB,iBAAiB,GACjB;QACH,CAAC,GACD,KAAK,CAAC;QACT;QACDc,OAAO,EAAG;UACTF,OAAO,EAAE,CAAC;UACVC,SAAS,EAAE;QACZ,CAAG;QACHG,UAAU,EACTpB,eAAe,GAAG;UAAEqB,QAAQ,EAAE;QAAE,CAAC,GAAGC,SACpC;QAAAZ,QAAA,GAECJ,IAAI,iBAAIxC,IAAA,CAACf,SAAS;UAACuD,IAAI,EAAGA;QAAM,CAAE,CAAC,eACrCtC,KAAA,CAACtB,IAAI;UAACoE,IAAI,EAAC,MAAM;UAACU,EAAE,EAAC,IAAI;UAAAd,QAAA,gBACxB5C,IAAA;YAAM2C,SAAS,EAAC,iCAAiC;YAAAC,QAAA,EAC9Cd,KAAK,GACJnC,cAAc,CAAEmC,KAAM,CAAC,GACvBxD,EAAE,CAAE,UAAW;UAAC,CACd,CAAC,EACLiC,aAAa,IAAI,CAAEF,KAAK,CAACyB,KAAK,iBAC/B9B,IAAA;YAAM2C,SAAS,EAAC,sCAAsC;YAAAC,QAAA,EACnD,IAAI,GAAGjD,cAAc,CAAEY,aAAc;UAAC,CACnC,CACN;QAAA,CACI,CAAC;MAAA,GA/BD+B,aAgCK,CAAC,eACbtC,IAAA;QAAM2C,SAAS,EAAC,+BAA+B;QAAAC,QAAA,EAC5CxD,eAAe,CAACuE,OAAO,CAAE,GAAI;MAAC,CAC3B,CAAC;IAAA,CACA,CACR;EAAA,CACG,CAAC;AAER","ignoreList":[]}
1
+ {"version":3,"names":["clsx","__","isRTL","useSelect","useDispatch","Button","__experimentalText","Text","__unstableMotion","motion","__unstableAnimatePresence","AnimatePresence","BlockIcon","chevronLeftSmall","chevronRightSmall","displayShortcut","store","coreStore","commandsStore","useRef","useEffect","useReducedMotion","decodeEntities","TEMPLATE_POST_TYPES","GLOBAL_POST_TYPES","editorStore","jsx","_jsx","jsxs","_jsxs","MotionButton","DocumentBar","props","postType","postTypeLabel","documentTitle","isNotFound","isUnsyncedPattern","templateTitle","onNavigateToPreviousEntityRecord","select","getCurrentPostType","getCurrentPostId","getEditorSettings","__experimentalGetTemplateInfo","getTemplateInfo","getEditedEntityRecord","getPostType","isResolving","isResolvingSelector","_postType","_postId","_document","_templateInfo","_postTypeLabel","labels","singular_name","title","wp_pattern_sync_status","open","openCommandCenter","isReducedMotion","isTemplate","includes","isGlobalEntity","hasBackButton","entityTitle","icon","mountedRef","current","className","children","onClick","event","stopPropagation","size","initial","opacity","transform","animate","exit","transition","duration","undefined","div","as","primary"],"sources":["@wordpress/editor/src/components/document-bar/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __, isRTL } from '@wordpress/i18n';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tButton,\n\t__experimentalText as Text,\n\t__unstableMotion as motion,\n\t__unstableAnimatePresence as AnimatePresence,\n} from '@wordpress/components';\nimport { BlockIcon } from '@wordpress/block-editor';\nimport { chevronLeftSmall, chevronRightSmall } from '@wordpress/icons';\nimport { displayShortcut } from '@wordpress/keycodes';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as commandsStore } from '@wordpress/commands';\nimport { useRef, useEffect } from '@wordpress/element';\nimport { useReducedMotion } from '@wordpress/compose';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport { TEMPLATE_POST_TYPES, GLOBAL_POST_TYPES } from '../../store/constants';\nimport { store as editorStore } from '../../store';\n\n/** @typedef {import(\"@wordpress/components\").IconType} IconType */\n\nconst MotionButton = motion( Button );\n\n/**\n * This component renders a navigation bar at the top of the editor. It displays the title of the current document,\n * a back button (if applicable), and a command center button. It also handles different states of the document,\n * such as \"not found\" or \"unsynced\".\n *\n * @example\n * ```jsx\n * <DocumentBar />\n * ```\n * @param {Object} props The component props.\n * @param {string} props.title A title for the document, defaulting to the document or\n * template title currently being edited.\n * @param {IconType} props.icon An icon for the document, no default.\n * (A default icon indicating the document post type is no longer used.)\n *\n * @return {JSX.Element} The rendered DocumentBar component.\n */\nexport default function DocumentBar( props ) {\n\tconst {\n\t\tpostType,\n\t\tpostTypeLabel,\n\t\tdocumentTitle,\n\t\tisNotFound,\n\t\tisUnsyncedPattern,\n\t\ttemplateTitle,\n\t\tonNavigateToPreviousEntityRecord,\n\t} = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetCurrentPostType,\n\t\t\tgetCurrentPostId,\n\t\t\tgetEditorSettings,\n\t\t\t__experimentalGetTemplateInfo: getTemplateInfo,\n\t\t} = select( editorStore );\n\t\tconst {\n\t\t\tgetEditedEntityRecord,\n\t\t\tgetPostType,\n\t\t\tisResolving: isResolvingSelector,\n\t\t} = select( coreStore );\n\t\tconst _postType = getCurrentPostType();\n\t\tconst _postId = getCurrentPostId();\n\t\tconst _document = getEditedEntityRecord(\n\t\t\t'postType',\n\t\t\t_postType,\n\t\t\t_postId\n\t\t);\n\t\tconst _templateInfo = getTemplateInfo( _document );\n\t\tconst _postTypeLabel = getPostType( _postType )?.labels?.singular_name;\n\n\t\treturn {\n\t\t\tpostType: _postType,\n\t\t\tpostTypeLabel: _postTypeLabel,\n\t\t\tdocumentTitle: _document.title,\n\t\t\tisNotFound:\n\t\t\t\t! _document &&\n\t\t\t\t! isResolvingSelector(\n\t\t\t\t\t'getEditedEntityRecord',\n\t\t\t\t\t'postType',\n\t\t\t\t\t_postType,\n\t\t\t\t\t_postId\n\t\t\t\t),\n\t\t\tisUnsyncedPattern: _document?.wp_pattern_sync_status === 'unsynced',\n\t\t\ttemplateTitle: _templateInfo.title,\n\t\t\tonNavigateToPreviousEntityRecord:\n\t\t\t\tgetEditorSettings().onNavigateToPreviousEntityRecord,\n\t\t};\n\t}, [] );\n\n\tconst { open: openCommandCenter } = useDispatch( commandsStore );\n\tconst isReducedMotion = useReducedMotion();\n\n\tconst isTemplate = TEMPLATE_POST_TYPES.includes( postType );\n\tconst isGlobalEntity = GLOBAL_POST_TYPES.includes( postType );\n\tconst hasBackButton = !! onNavigateToPreviousEntityRecord;\n\tconst entityTitle = isTemplate ? templateTitle : documentTitle;\n\tconst title = props.title || entityTitle;\n\tconst icon = props.icon;\n\n\tconst mountedRef = useRef( false );\n\tuseEffect( () => {\n\t\tmountedRef.current = true;\n\t}, [] );\n\n\treturn (\n\t\t<div\n\t\t\tclassName={ clsx( 'editor-document-bar', {\n\t\t\t\t'has-back-button': hasBackButton,\n\t\t\t\t'is-global': isGlobalEntity && ! isUnsyncedPattern,\n\t\t\t} ) }\n\t\t>\n\t\t\t<AnimatePresence>\n\t\t\t\t{ hasBackButton && (\n\t\t\t\t\t<MotionButton\n\t\t\t\t\t\tclassName=\"editor-document-bar__back\"\n\t\t\t\t\t\ticon={ isRTL() ? chevronRightSmall : chevronLeftSmall }\n\t\t\t\t\t\tonClick={ ( event ) => {\n\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t\tonNavigateToPreviousEntityRecord();\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\tinitial={\n\t\t\t\t\t\t\tmountedRef.current\n\t\t\t\t\t\t\t\t? { opacity: 0, transform: 'translateX(15%)' }\n\t\t\t\t\t\t\t\t: false // Don't show entry animation when DocumentBar mounts.\n\t\t\t\t\t\t}\n\t\t\t\t\t\tanimate={ { opacity: 1, transform: 'translateX(0%)' } }\n\t\t\t\t\t\texit={ { opacity: 0, transform: 'translateX(15%)' } }\n\t\t\t\t\t\ttransition={\n\t\t\t\t\t\t\tisReducedMotion ? { duration: 0 } : undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Back' ) }\n\t\t\t\t\t</MotionButton>\n\t\t\t\t) }\n\t\t\t</AnimatePresence>\n\t\t\t{ isNotFound ? (\n\t\t\t\t<Text>{ __( 'Document not found' ) }</Text>\n\t\t\t) : (\n\t\t\t\t<Button\n\t\t\t\t\tclassName=\"editor-document-bar__command\"\n\t\t\t\t\tonClick={ () => openCommandCenter() }\n\t\t\t\t\tsize=\"compact\"\n\t\t\t\t>\n\t\t\t\t\t<motion.div\n\t\t\t\t\t\tclassName=\"editor-document-bar__title\"\n\t\t\t\t\t\t// Force entry animation when the back button is added or removed.\n\t\t\t\t\t\tkey={ hasBackButton }\n\t\t\t\t\t\tinitial={\n\t\t\t\t\t\t\tmountedRef.current\n\t\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\t\topacity: 0,\n\t\t\t\t\t\t\t\t\t\ttransform: hasBackButton\n\t\t\t\t\t\t\t\t\t\t\t? 'translateX(15%)'\n\t\t\t\t\t\t\t\t\t\t\t: 'translateX(-15%)',\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t: false // Don't show entry animation when DocumentBar mounts.\n\t\t\t\t\t\t}\n\t\t\t\t\t\tanimate={ {\n\t\t\t\t\t\t\topacity: 1,\n\t\t\t\t\t\t\ttransform: 'translateX(0%)',\n\t\t\t\t\t\t} }\n\t\t\t\t\t\ttransition={\n\t\t\t\t\t\t\tisReducedMotion ? { duration: 0 } : undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t{ icon && <BlockIcon icon={ icon } /> }\n\t\t\t\t\t\t<Text size=\"body\" as=\"h1\">\n\t\t\t\t\t\t\t<span className=\"editor-document-bar__post-title\">\n\t\t\t\t\t\t\t\t{ title\n\t\t\t\t\t\t\t\t\t? decodeEntities( title )\n\t\t\t\t\t\t\t\t\t: __( 'No title' ) }\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t{ postTypeLabel && ! props.title && (\n\t\t\t\t\t\t\t\t<span className=\"editor-document-bar__post-type-label\">\n\t\t\t\t\t\t\t\t\t{ '· ' + decodeEntities( postTypeLabel ) }\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t</motion.div>\n\t\t\t\t\t<span className=\"editor-document-bar__shortcut\">\n\t\t\t\t\t\t{ displayShortcut.prim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5CxD,eAAe,CAACuE,OAAO,CAAE,GAAI;MAAC,CAC3B,CAAC;IAAA,CACA,CACR;EAAA,CACG,CAAC;AAER","ignoreList":[]}
@@ -17,8 +17,7 @@ import { store as editorStore } from '../../store';
17
17
  /**
18
18
  * Module constants
19
19
  */
20
- import { jsx as _jsx } from "react/jsx-runtime";
21
- import { jsxs as _jsxs } from "react/jsx-runtime";
20
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
22
21
  const emptyHeadingContent = /*#__PURE__*/_jsx("em", {
23
22
  children: __('(Empty heading)')
24
23
  });
@@ -1 +1 @@
1
- {"version":3,"names":["__","useDispatch","useSelect","create","getTextContent","store","blockEditorStore","coreStore","Path","SVG","Line","Rect","DocumentOutlineItem","editorStore","jsx","_jsx","jsxs","_jsxs","emptyHeadingContent","children","incorrectLevelContent","singleH1Headings","multipleH1Headings","EmptyOutlineIllustration","width","height","viewBox","fill","xmlns","rx","x1","y1","x2","y2","stroke","x","y","d","computeOutlineHeadings","blocks","flatMap","block","name","level","attributes","isEmpty","isEmptyHeading","innerBlocks","heading","content","trim","length","DocumentOutline","onSelect","isTitleSupported","hasOutlineItemsDisabled","selectBlock","title","select","_postType$supports$ti","getBlocks","getEditedPostAttribute","getPostType","postType","supports","headings","className","prevHeadingLevel","titleNode","document","querySelector","hasTitle","countByLevel","reduce","acc","hasMultipleH1","isValid","href","id","isDisabled","map","item","index","isIncorrectLevel","clientId","html"],"sources":["@wordpress/editor/src/components/document-outline/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useDispatch, useSelect } 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';\nimport { Path, SVG, Line, Rect } from '@wordpress/components';\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];\nfunction EmptyOutlineIllustration() {\n\treturn (\n\t\t<SVG\n\t\t\twidth=\"138\"\n\t\t\theight=\"148\"\n\t\t\tviewBox=\"0 0 138 148\"\n\t\t\tfill=\"none\"\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t>\n\t\t\t<Rect width=\"138\" height=\"148\" rx=\"4\" fill=\"#F0F6FC\" />\n\t\t\t<Line x1=\"44\" y1=\"28\" x2=\"24\" y2=\"28\" stroke=\"#DDDDDD\" />\n\t\t\t<Rect x=\"48\" y=\"16\" width=\"27\" height=\"23\" rx=\"4\" fill=\"#DDDDDD\" />\n\t\t\t<Path\n\t\t\t\td=\"M54.7585 32V23.2727H56.6037V26.8736H60.3494V23.2727H62.1903V32H60.3494V28.3949H56.6037V32H54.7585ZM67.4574 23.2727V32H65.6122V25.0241H65.5611L63.5625 26.277V24.6406L65.723 23.2727H67.4574Z\"\n\t\t\t\tfill=\"black\"\n\t\t\t/>\n\t\t\t<Line x1=\"55\" y1=\"59\" x2=\"24\" y2=\"59\" stroke=\"#DDDDDD\" />\n\t\t\t<Rect x=\"59\" y=\"47\" width=\"29\" height=\"23\" rx=\"4\" fill=\"#DDDDDD\" />\n\t\t\t<Path\n\t\t\t\td=\"M65.7585 63V54.2727H67.6037V57.8736H71.3494V54.2727H73.1903V63H71.3494V59.3949H67.6037V63H65.7585ZM74.6605 63V61.6705L77.767 58.794C78.0313 58.5384 78.2528 58.3082 78.4318 58.1037C78.6136 57.8991 78.7514 57.6989 78.8452 57.5028C78.9389 57.304 78.9858 57.0895 78.9858 56.8594C78.9858 56.6037 78.9276 56.3835 78.8111 56.1989C78.6946 56.0114 78.5355 55.8679 78.3338 55.7685C78.1321 55.6662 77.9034 55.6151 77.6477 55.6151C77.3807 55.6151 77.1477 55.669 76.9489 55.777C76.75 55.8849 76.5966 56.0398 76.4886 56.2415C76.3807 56.4432 76.3267 56.6832 76.3267 56.9616H74.5753C74.5753 56.3906 74.7045 55.8949 74.9631 55.4744C75.2216 55.054 75.5838 54.7287 76.0497 54.4986C76.5156 54.2685 77.0526 54.1534 77.6605 54.1534C78.2855 54.1534 78.8295 54.2642 79.2926 54.4858C79.7585 54.7045 80.1207 55.0085 80.3793 55.3977C80.6378 55.7869 80.767 56.233 80.767 56.7358C80.767 57.0653 80.7017 57.3906 80.571 57.7116C80.4432 58.0327 80.2145 58.3892 79.8849 58.7812C79.5554 59.1705 79.0909 59.6378 78.4915 60.1832L77.2173 61.4318V61.4915H80.8821V63H74.6605Z\"\n\t\t\t\tfill=\"black\"\n\t\t\t/>\n\t\t\t<Line x1=\"80\" y1=\"90\" x2=\"24\" y2=\"90\" stroke=\"#DDDDDD\" />\n\t\t\t<Rect x=\"84\" y=\"78\" width=\"30\" height=\"23\" rx=\"4\" fill=\"#F0B849\" />\n\t\t\t<Path\n\t\t\t\td=\"M90.7585 94V85.2727H92.6037V88.8736H96.3494V85.2727H98.1903V94H96.3494V90.3949H92.6037V94H90.7585ZM99.5284 92.4659V91.0128L103.172 85.2727H104.425V87.2841H103.683L101.386 90.919V90.9872H106.564V92.4659H99.5284ZM103.717 94V92.0227L103.751 91.3793V85.2727H105.482V94H103.717Z\"\n\t\t\t\tfill=\"black\"\n\t\t\t/>\n\t\t\t<Line x1=\"66\" y1=\"121\" x2=\"24\" y2=\"121\" stroke=\"#DDDDDD\" />\n\t\t\t<Rect x=\"70\" y=\"109\" width=\"29\" height=\"23\" rx=\"4\" fill=\"#DDDDDD\" />\n\t\t\t<Path\n\t\t\t\td=\"M76.7585 125V116.273H78.6037V119.874H82.3494V116.273H84.1903V125H82.3494V121.395H78.6037V125H76.7585ZM88.8864 125.119C88.25 125.119 87.6832 125.01 87.1861 124.791C86.6918 124.57 86.3011 124.266 86.0142 123.879C85.7301 123.49 85.5838 123.041 85.5753 122.533H87.4332C87.4446 122.746 87.5142 122.933 87.642 123.095C87.7727 123.254 87.946 123.378 88.1619 123.466C88.3778 123.554 88.6207 123.598 88.8906 123.598C89.1719 123.598 89.4205 123.548 89.6364 123.449C89.8523 123.349 90.0213 123.212 90.1435 123.036C90.2656 122.859 90.3267 122.656 90.3267 122.426C90.3267 122.193 90.2614 121.987 90.1307 121.808C90.0028 121.626 89.8182 121.484 89.5767 121.382C89.3381 121.28 89.054 121.229 88.7244 121.229H87.9105V119.874H88.7244C89.0028 119.874 89.2486 119.825 89.4616 119.729C89.6776 119.632 89.8452 119.499 89.9645 119.328C90.0838 119.155 90.1435 118.953 90.1435 118.723C90.1435 118.504 90.0909 118.312 89.9858 118.148C89.8835 117.98 89.7386 117.849 89.5511 117.756C89.3665 117.662 89.1506 117.615 88.9034 117.615C88.6534 117.615 88.4247 117.661 88.2173 117.751C88.0099 117.839 87.8438 117.966 87.7188 118.131C87.5938 118.295 87.527 118.489 87.5185 118.71H85.75C85.7585 118.207 85.902 117.764 86.1804 117.381C86.4588 116.997 86.8338 116.697 87.3054 116.482C87.7798 116.263 88.3153 116.153 88.9119 116.153C89.5142 116.153 90.0412 116.263 90.4929 116.482C90.9446 116.7 91.2955 116.996 91.5455 117.368C91.7983 117.737 91.9233 118.152 91.9205 118.612C91.9233 119.101 91.7713 119.509 91.4645 119.835C91.1605 120.162 90.7642 120.369 90.2756 120.457V120.526C90.9176 120.608 91.4063 120.831 91.7415 121.195C92.0795 121.555 92.2472 122.007 92.2443 122.55C92.2472 123.047 92.1037 123.489 91.8139 123.875C91.527 124.261 91.1307 124.565 90.625 124.787C90.1193 125.009 89.5398 125.119 88.8864 125.119Z\"\n\t\t\t\tfill=\"black\"\n\t\t\t/>\n\t\t</SVG>\n\t);\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 ||\n\theading.attributes.content.trim().length === 0;\n\n/**\n * Renders a document outline component.\n *\n * @param {Object} props Props.\n * @param {Function} props.onSelect Function to be called when an outline item is selected.\n * @param {boolean} props.isTitleSupported Indicates whether the title is supported.\n * @param {boolean} props.hasOutlineItemsDisabled Indicates whether the outline items are disabled.\n *\n * @return {Component} The component to be rendered.\n */\nexport default function DocumentOutline( {\n\tonSelect,\n\tisTitleSupported,\n\thasOutlineItemsDisabled,\n} ) {\n\tconst { selectBlock } = useDispatch( blockEditorStore );\n\tconst { blocks, title } = useSelect( ( 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\n\tconst headings = computeOutlineHeadings( blocks );\n\tif ( headings.length < 1 ) {\n\t\treturn (\n\t\t\t<div className=\"editor-document-outline has-no-headings\">\n\t\t\t\t<EmptyOutlineIllustration />\n\t\t\t\t<p>\n\t\t\t\t\t{ __(\n\t\t\t\t\t\t'Navigate the structure of your document and address issues like empty or incorrect heading levels.'\n\t\t\t\t\t) }\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t);\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"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;AACxD,SAASC,MAAM,EAAEC,cAAc,QAAQ,sBAAsB;AAC7D,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,yBAAyB;AACnE,SAASD,KAAK,IAAIE,SAAS,QAAQ,sBAAsB;AACzD,SAASC,IAAI,EAAEC,GAAG,EAAEC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ACb,CAAG;UAAAlC,QAAA,GAED8D,IAAI,CAACpC,OAAO,GACX3B,mBAAmB,GACnBd,cAAc,CACdD,MAAM,CAAE;YACPkF,IAAI,EAAEJ,IAAI,CAACrC,UAAU,CAACK;UACvB,CAAE,CACF,CAAC,EACFkC,gBAAgB,IAAI/D,qBAAqB,EACzC6D,IAAI,CAACtC,KAAK,KAAK,CAAC,IACjBgC,aAAa,IACbrD,kBAAkB,EACjBiD,QAAQ,IACTU,IAAI,CAACtC,KAAK,KAAK,CAAC,IAChB,CAAEgC,aAAa,IACftD,gBAAgB;QAAA,GAxBX6D,KAyBc,CAAC;MAExB,CAAE,CAAC;IAAA,CACA;EAAC,CACD,CAAC;AAER","ignoreList":[]}
1
+ {"version":3,"names":["__","useDispatch","useSelect","create","getTextContent","store","blockEditorStore","coreStore","Path","SVG","Line","Rect","DocumentOutlineItem","editorStore","jsx","_jsx","jsxs","_jsxs","emptyHeadingContent","children","incorrectLevelContent","singleH1Headings","multipleH1Headings","EmptyOutlineIllustration","width","height","viewBox","fill","xmlns","rx","x1","y1","x2","y2","stroke","x","y","d","computeOutlineHeadings","blocks","flatMap","block","name","level","attributes","isEmpty","isEmptyHeading","innerBlocks","heading","content","trim","length","DocumentOutline","onSelect","isTitleSupported","hasOutlineItemsDisabled","selectBlock","title","select","_postType$supports$ti","getBlocks","getEditedPostAttribute","getPostType","postType","supports","headings","className","prevHeadingLevel","titleNode","document","querySelector","hasTitle","countByLevel","reduce","acc","hasMultipleH1","isValid","href","id","isDisabled","map","item","index","isIncorrectLevel","clientId","html"],"sources":["@wordpress/editor/src/components/document-outline/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useDispatch, useSelect } 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';\nimport { Path, SVG, Line, Rect } from '@wordpress/components';\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];\nfunction EmptyOutlineIllustration() {\n\treturn (\n\t\t<SVG\n\t\t\twidth=\"138\"\n\t\t\theight=\"148\"\n\t\t\tviewBox=\"0 0 138 148\"\n\t\t\tfill=\"none\"\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t>\n\t\t\t<Rect width=\"138\" height=\"148\" rx=\"4\" fill=\"#F0F6FC\" />\n\t\t\t<Line x1=\"44\" y1=\"28\" x2=\"24\" y2=\"28\" stroke=\"#DDDDDD\" />\n\t\t\t<Rect x=\"48\" y=\"16\" width=\"27\" height=\"23\" rx=\"4\" fill=\"#DDDDDD\" />\n\t\t\t<Path\n\t\t\t\td=\"M54.7585 32V23.2727H56.6037V26.8736H60.3494V23.2727H62.1903V32H60.3494V28.3949H56.6037V32H54.7585ZM67.4574 23.2727V32H65.6122V25.0241H65.5611L63.5625 26.277V24.6406L65.723 23.2727H67.4574Z\"\n\t\t\t\tfill=\"black\"\n\t\t\t/>\n\t\t\t<Line x1=\"55\" y1=\"59\" x2=\"24\" y2=\"59\" stroke=\"#DDDDDD\" />\n\t\t\t<Rect x=\"59\" y=\"47\" width=\"29\" height=\"23\" rx=\"4\" fill=\"#DDDDDD\" />\n\t\t\t<Path\n\t\t\t\td=\"M65.7585 63V54.2727H67.6037V57.8736H71.3494V54.2727H73.1903V63H71.3494V59.3949H67.6037V63H65.7585ZM74.6605 63V61.6705L77.767 58.794C78.0313 58.5384 78.2528 58.3082 78.4318 58.1037C78.6136 57.8991 78.7514 57.6989 78.8452 57.5028C78.9389 57.304 78.9858 57.0895 78.9858 56.8594C78.9858 56.6037 78.9276 56.3835 78.8111 56.1989C78.6946 56.0114 78.5355 55.8679 78.3338 55.7685C78.1321 55.6662 77.9034 55.6151 77.6477 55.6151C77.3807 55.6151 77.1477 55.669 76.9489 55.777C76.75 55.8849 76.5966 56.0398 76.4886 56.2415C76.3807 56.4432 76.3267 56.6832 76.3267 56.9616H74.5753C74.5753 56.3906 74.7045 55.8949 74.9631 55.4744C75.2216 55.054 75.5838 54.7287 76.0497 54.4986C76.5156 54.2685 77.0526 54.1534 77.6605 54.1534C78.2855 54.1534 78.8295 54.2642 79.2926 54.4858C79.7585 54.7045 80.1207 55.0085 80.3793 55.3977C80.6378 55.7869 80.767 56.233 80.767 56.7358C80.767 57.0653 80.7017 57.3906 80.571 57.7116C80.4432 58.0327 80.2145 58.3892 79.8849 58.7812C79.5554 59.1705 79.0909 59.6378 78.4915 60.1832L77.2173 61.4318V61.4915H80.8821V63H74.6605Z\"\n\t\t\t\tfill=\"black\"\n\t\t\t/>\n\t\t\t<Line x1=\"80\" y1=\"90\" x2=\"24\" y2=\"90\" stroke=\"#DDDDDD\" />\n\t\t\t<Rect x=\"84\" y=\"78\" width=\"30\" height=\"23\" rx=\"4\" fill=\"#F0B849\" />\n\t\t\t<Path\n\t\t\t\td=\"M90.7585 94V85.2727H92.6037V88.8736H96.3494V85.2727H98.1903V94H96.3494V90.3949H92.6037V94H90.7585ZM99.5284 92.4659V91.0128L103.172 85.2727H104.425V87.2841H103.683L101.386 90.919V90.9872H106.564V92.4659H99.5284ZM103.717 94V92.0227L103.751 91.3793V85.2727H105.482V94H103.717Z\"\n\t\t\t\tfill=\"black\"\n\t\t\t/>\n\t\t\t<Line x1=\"66\" y1=\"121\" x2=\"24\" y2=\"121\" stroke=\"#DDDDDD\" />\n\t\t\t<Rect x=\"70\" y=\"109\" width=\"29\" height=\"23\" rx=\"4\" fill=\"#DDDDDD\" />\n\t\t\t<Path\n\t\t\t\td=\"M76.7585 125V116.273H78.6037V119.874H82.3494V116.273H84.1903V125H82.3494V121.395H78.6037V125H76.7585ZM88.8864 125.119C88.25 125.119 87.6832 125.01 87.1861 124.791C86.6918 124.57 86.3011 124.266 86.0142 123.879C85.7301 123.49 85.5838 123.041 85.5753 122.533H87.4332C87.4446 122.746 87.5142 122.933 87.642 123.095C87.7727 123.254 87.946 123.378 88.1619 123.466C88.3778 123.554 88.6207 123.598 88.8906 123.598C89.1719 123.598 89.4205 123.548 89.6364 123.449C89.8523 123.349 90.0213 123.212 90.1435 123.036C90.2656 122.859 90.3267 122.656 90.3267 122.426C90.3267 122.193 90.2614 121.987 90.1307 121.808C90.0028 121.626 89.8182 121.484 89.5767 121.382C89.3381 121.28 89.054 121.229 88.7244 121.229H87.9105V119.874H88.7244C89.0028 119.874 89.2486 119.825 89.4616 119.729C89.6776 119.632 89.8452 119.499 89.9645 119.328C90.0838 119.155 90.1435 118.953 90.1435 118.723C90.1435 118.504 90.0909 118.312 89.9858 118.148C89.8835 117.98 89.7386 117.849 89.5511 117.756C89.3665 117.662 89.1506 117.615 88.9034 117.615C88.6534 117.615 88.4247 117.661 88.2173 117.751C88.0099 117.839 87.8438 117.966 87.7188 118.131C87.5938 118.295 87.527 118.489 87.5185 118.71H85.75C85.7585 118.207 85.902 117.764 86.1804 117.381C86.4588 116.997 86.8338 116.697 87.3054 116.482C87.7798 116.263 88.3153 116.153 88.9119 116.153C89.5142 116.153 90.0412 116.263 90.4929 116.482C90.9446 116.7 91.2955 116.996 91.5455 117.368C91.7983 117.737 91.9233 118.152 91.9205 118.612C91.9233 119.101 91.7713 119.509 91.4645 119.835C91.1605 120.162 90.7642 120.369 90.2756 120.457V120.526C90.9176 120.608 91.4063 120.831 91.7415 121.195C92.0795 121.555 92.2472 122.007 92.2443 122.55C92.2472 123.047 92.1037 123.489 91.8139 123.875C91.527 124.261 91.1307 124.565 90.625 124.787C90.1193 125.009 89.5398 125.119 88.8864 125.119Z\"\n\t\t\t\tfill=\"black\"\n\t\t\t/>\n\t\t</SVG>\n\t);\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 ||\n\theading.attributes.content.trim().length === 0;\n\n/**\n * Renders a document outline component.\n *\n * @param {Object} props Props.\n * @param {Function} props.onSelect Function to be called when an outline item is selected.\n * @param {boolean} props.isTitleSupported Indicates whether the title is supported.\n * @param {boolean} props.hasOutlineItemsDisabled Indicates whether the outline items are disabled.\n *\n * @return {Component} The component to be rendered.\n */\nexport default function DocumentOutline( {\n\tonSelect,\n\tisTitleSupported,\n\thasOutlineItemsDisabled,\n} ) {\n\tconst { selectBlock } = useDispatch( blockEditorStore );\n\tconst { blocks, title } = useSelect( ( 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\n\tconst headings = computeOutlineHeadings( blocks );\n\tif ( headings.length < 1 ) {\n\t\treturn (\n\t\t\t<div className=\"editor-document-outline has-no-headings\">\n\t\t\t\t<EmptyOutlineIllustration />\n\t\t\t\t<p>\n\t\t\t\t\t{ __(\n\t\t\t\t\t\t'Navigate the structure of your document and address issues like empty or incorrect heading levels.'\n\t\t\t\t\t) }\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t);\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"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;AACxD,SAASC,MAAM,EAAEC,cAAc,QAAQ,sBAAsB;AAC7D,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,yBAAyB;AACnE,SAASD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WAAW,CAAEyB,IAAI,CAACG,QAAS,CAAC;YAC5B/B,QAAQ,GAAG,CAAC;UACb,CAAG;UAAAlC,QAAA,GAED8D,IAAI,CAACpC,OAAO,GACX3B,mBAAmB,GACnBd,cAAc,CACdD,MAAM,CAAE;YACPkF,IAAI,EAAEJ,IAAI,CAACrC,UAAU,CAACK;UACvB,CAAE,CACF,CAAC,EACFkC,gBAAgB,IAAI/D,qBAAqB,EACzC6D,IAAI,CAACtC,KAAK,KAAK,CAAC,IACjBgC,aAAa,IACbrD,kBAAkB,EACjBiD,QAAQ,IACTU,IAAI,CAACtC,KAAK,KAAK,CAAC,IAChB,CAAEgC,aAAa,IACftD,gBAAgB;QAAA,GAxBX6D,KAyBc,CAAC;MAExB,CAAE,CAAC;IAAA,CACA;EAAC,CACD,CAAC;AAER","ignoreList":[]}
@@ -2,8 +2,7 @@
2
2
  * External dependencies
3
3
  */
4
4
  import clsx from 'clsx';
5
- import { jsx as _jsx } from "react/jsx-runtime";
6
- import { jsxs as _jsxs } from "react/jsx-runtime";
5
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
7
6
  const TableOfContentsItem = ({
8
7
  children,
9
8
  isValid,
@@ -1 +1 @@
1
- {"version":3,"names":["clsx","jsx","_jsx","jsxs","_jsxs","TableOfContentsItem","children","isValid","level","href","onSelect","className","toLowerCase","onClick"],"sources":["@wordpress/editor/src/components/document-outline/item.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\nconst TableOfContentsItem = ( {\n\tchildren,\n\tisValid,\n\tlevel,\n\thref,\n\tonSelect,\n} ) => (\n\t<li\n\t\tclassName={ clsx(\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"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAExB,MAAMC,mBAAmB,GAAGA,CAAE;EAC7BC,QAAQ;EACRC,OAAO;EACPC,KAAK;EACLC,IAAI;EACJC;AACD,CAAC,kBACAR,IAAA;EACCS,SAAS,EAAGX,IAAI,CACf,wBAAwB,EACvB,MAAMQ,KAAK,CAACI,WAAW,CAAC,CAAG,EAAC,EAC7B;IACC,YAAY,EAAE,CAAEL;EACjB,CACD,CAAG;EAAAD,QAAA,eAEHF,KAAA;IACCK,IAAI,EAAGA,IAAM;IACbE,SAAS,EAAC,0BAA0B;IACpCE,OAAO,EAAGH,QAAU;IAAAJ,QAAA,gBAEpBJ,IAAA;MACCS,SAAS,EAAC,0BAA0B;MACpC,eAAY;IAAM,CACZ,CAAC,eACRT,IAAA;MAAQS,SAAS,EAAC,yBAAyB;MAAAL,QAAA,EAAGE;IAAK,CAAU,CAAC,eAC9DN,IAAA;MAAMS,SAAS,EAAC,gCAAgC;MAAAL,QAAA,EAAGA;IAAQ,CAAQ,CAAC;EAAA,CAClE;AAAC,CACD,CACJ;AAED,eAAeD,mBAAmB","ignoreList":[]}
1
+ {"version":3,"names":["clsx","jsx","_jsx","jsxs","_jsxs","TableOfContentsItem","children","isValid","level","href","onSelect","className","toLowerCase","onClick"],"sources":["@wordpress/editor/src/components/document-outline/item.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\nconst TableOfContentsItem = ( {\n\tchildren,\n\tisValid,\n\tlevel,\n\thref,\n\tonSelect,\n} ) => (\n\t<li\n\t\tclassName={ clsx(\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"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAExB,MAAMC,mBAAmB,GAAGA,CAAE;EAC7BC,QAAQ;EACRC,OAAO;EACPC,KAAK;EACLC,IAAI;EACJC;AACD,CAAC,kBACAR,IAAA;EACCS,SAAS,EAAGX,IAAI,CACf,wBAAwB,EACxB,MAAOQ,KAAK,CAACI,WAAW,CAAC,CAAC,EAAG,EAC7B;IACC,YAAY,EAAE,CAAEL;EACjB,CACD,CAAG;EAAAD,QAAA,eAEHF,KAAA;IACCK,IAAI,EAAGA,IAAM;IACbE,SAAS,EAAC,0BAA0B;IACpCE,OAAO,EAAGH,QAAU;IAAAJ,QAAA,gBAEpBJ,IAAA;MACCS,SAAS,EAAC,0BAA0B;MACpC,eAAY;IAAM,CACZ,CAAC,eACRT,IAAA;MAAQS,SAAS,EAAC,yBAAyB;MAAAL,QAAA,EAAGE;IAAK,CAAU,CAAC,eAC9DN,IAAA;MAAMS,SAAS,EAAC,gCAAgC;MAAAL,QAAA,EAAGA;IAAQ,CAAQ,CAAC;EAAA,CAClE;AAAC,CACD,CACJ;AAED,eAAeD,mBAAmB","ignoreList":[]}
@@ -23,9 +23,7 @@ import { unlock } from '../../lock-unlock';
23
23
  import { store as editorStore } from '../../store';
24
24
  import EditorHistoryRedo from '../editor-history/redo';
25
25
  import EditorHistoryUndo from '../editor-history/undo';
26
- import { jsx as _jsx } from "react/jsx-runtime";
27
- import { Fragment as _Fragment } from "react/jsx-runtime";
28
- import { jsxs as _jsxs } from "react/jsx-runtime";
26
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
29
27
  function DocumentTools({
30
28
  className,
31
29
  disableBlockTools = false
@@ -91,7 +89,7 @@ function DocumentTools({
91
89
  const toggleInserter = useCallback(() => setIsInserterOpened(!isInserterOpened), [isInserterOpened, setIsInserterOpened]);
92
90
 
93
91
  /* translators: button label text should, if possible, be under 16 characters. */
94
- const longLabel = _x('Toggle block inserter', 'Generic label for block inserter button');
92
+ const longLabel = _x('Block Inserter', 'Generic label for block inserter button');
95
93
  const shortLabel = !isInserterOpened ? __('Add') : __('Close');
96
94
  return (
97
95
  /*#__PURE__*/
@@ -1 +1 @@
1
- {"version":3,"names":["clsx","useViewportMatch","useSelect","useDispatch","__","_x","NavigableToolbar","ToolSelector","store","blockEditorStore","Button","ToolbarItem","listView","plus","useCallback","keyboardShortcutsStore","preferencesStore","unlock","editorStore","EditorHistoryRedo","EditorHistoryUndo","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","DocumentTools","className","disableBlockTools","setIsInserterOpened","setIsListViewOpened","isDistractionFree","isInserterOpened","isListViewOpen","listViewShortcut","inserterSidebarToggleRef","listViewToggleRef","showIconLabels","select","get","isListViewOpened","getEditorMode","getInserterSidebarToggleRef","getListViewToggleRef","getShortcutRepresentation","__unstableGetEditorMode","isVisualMode","isZoomedOutView","preventDefault","event","isLargeViewport","isWideViewport","toolbarAriaLabel","toggleListView","toggleInserter","longLabel","shortLabel","variant","children","ref","as","isPressed","onMouseDown","onClick","disabled","icon","label","showTooltip","undefined","size","shortcut"],"sources":["@wordpress/editor/src/components/document-tools/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useViewportMatch } from '@wordpress/compose';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __, _x } from '@wordpress/i18n';\nimport {\n\tNavigableToolbar,\n\tToolSelector,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { Button, ToolbarItem } from '@wordpress/components';\nimport { listView, plus } from '@wordpress/icons';\nimport { useCallback } from '@wordpress/element';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as editorStore } from '../../store';\nimport EditorHistoryRedo from '../editor-history/redo';\nimport EditorHistoryUndo from '../editor-history/undo';\n\nfunction DocumentTools( { className, disableBlockTools = false } ) {\n\tconst { setIsInserterOpened, setIsListViewOpened } =\n\t\tuseDispatch( editorStore );\n\tconst {\n\t\tisDistractionFree,\n\t\tisInserterOpened,\n\t\tisListViewOpen,\n\t\tlistViewShortcut,\n\t\tinserterSidebarToggleRef,\n\t\tlistViewToggleRef,\n\t\tshowIconLabels,\n\t} = useSelect( ( select ) => {\n\t\tconst { get } = select( preferencesStore );\n\t\tconst {\n\t\t\tisListViewOpened,\n\t\t\tgetEditorMode,\n\t\t\tgetInserterSidebarToggleRef,\n\t\t\tgetListViewToggleRef,\n\t\t} = unlock( select( editorStore ) );\n\t\tconst { getShortcutRepresentation } = select( keyboardShortcutsStore );\n\t\tconst { __unstableGetEditorMode } = select( blockEditorStore );\n\n\t\treturn {\n\t\t\tisInserterOpened: select( editorStore ).isInserterOpened(),\n\t\t\tisListViewOpen: isListViewOpened(),\n\t\t\tlistViewShortcut: getShortcutRepresentation(\n\t\t\t\t'core/editor/toggle-list-view'\n\t\t\t),\n\t\t\tinserterSidebarToggleRef: getInserterSidebarToggleRef(),\n\t\t\tlistViewToggleRef: getListViewToggleRef(),\n\t\t\tshowIconLabels: get( 'core', 'showIconLabels' ),\n\t\t\tisDistractionFree: get( 'core', 'distractionFree' ),\n\t\t\tisVisualMode: getEditorMode() === 'visual',\n\t\t\tisZoomedOutView: __unstableGetEditorMode() === 'zoom-out',\n\t\t};\n\t}, [] );\n\n\tconst preventDefault = ( event ) => {\n\t\t// Because the inserter behaves like a dialog,\n\t\t// if the inserter is opened already then when we click on the toggle button\n\t\t// then the initial click event will close the inserter and then be propagated\n\t\t// to the inserter toggle and it will open it again.\n\t\t// To prevent this we need to stop the propagation of the event.\n\t\t// This won't be necessary when the inserter no longer behaves like a dialog.\n\n\t\tif ( isInserterOpened ) {\n\t\t\tevent.preventDefault();\n\t\t}\n\t};\n\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst isWideViewport = useViewportMatch( 'wide' );\n\n\t/* translators: accessibility text for the editor toolbar */\n\tconst toolbarAriaLabel = __( 'Document tools' );\n\n\tconst toggleListView = useCallback(\n\t\t() => setIsListViewOpened( ! isListViewOpen ),\n\t\t[ setIsListViewOpened, isListViewOpen ]\n\t);\n\n\tconst toggleInserter = useCallback(\n\t\t() => setIsInserterOpened( ! isInserterOpened ),\n\t\t[ isInserterOpened, setIsInserterOpened ]\n\t);\n\n\t/* translators: button label text should, if possible, be under 16 characters. */\n\tconst longLabel = _x(\n\t\t'Toggle block inserter',\n\t\t'Generic label for block inserter button'\n\t);\n\tconst shortLabel = ! isInserterOpened ? __( 'Add' ) : __( 'Close' );\n\n\treturn (\n\t\t// Some plugins expect and use the `edit-post-header-toolbar` CSS class to\n\t\t// find the toolbar and inject UI elements into it. This is not officially\n\t\t// supported, but we're keeping it in the list of class names for backwards\n\t\t// compatibility.\n\t\t<NavigableToolbar\n\t\t\tclassName={ clsx(\n\t\t\t\t'editor-document-tools',\n\t\t\t\t'edit-post-header-toolbar',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\taria-label={ toolbarAriaLabel }\n\t\t\tvariant=\"unstyled\"\n\t\t>\n\t\t\t<div className=\"editor-document-tools__left\">\n\t\t\t\t{ ! isDistractionFree && (\n\t\t\t\t\t<ToolbarItem\n\t\t\t\t\t\tref={ inserterSidebarToggleRef }\n\t\t\t\t\t\tas={ Button }\n\t\t\t\t\t\tclassName=\"editor-document-tools__inserter-toggle\"\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\tisPressed={ isInserterOpened }\n\t\t\t\t\t\tonMouseDown={ preventDefault }\n\t\t\t\t\t\tonClick={ toggleInserter }\n\t\t\t\t\t\tdisabled={ disableBlockTools }\n\t\t\t\t\t\ticon={ plus }\n\t\t\t\t\t\tlabel={ showIconLabels ? shortLabel : longLabel }\n\t\t\t\t\t\tshowTooltip={ ! showIconLabels }\n\t\t\t\t\t\taria-expanded={ isInserterOpened }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ ( isWideViewport || ! showIconLabels ) && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ isLargeViewport && (\n\t\t\t\t\t\t\t<ToolbarItem\n\t\t\t\t\t\t\t\tas={ ToolSelector }\n\t\t\t\t\t\t\t\tshowTooltip={ ! showIconLabels }\n\t\t\t\t\t\t\t\tvariant={\n\t\t\t\t\t\t\t\t\tshowIconLabels ? 'tertiary' : undefined\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdisabled={ disableBlockTools }\n\t\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<ToolbarItem\n\t\t\t\t\t\t\tas={ EditorHistoryUndo }\n\t\t\t\t\t\t\tshowTooltip={ ! showIconLabels }\n\t\t\t\t\t\t\tvariant={ showIconLabels ? 'tertiary' : undefined }\n\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<ToolbarItem\n\t\t\t\t\t\t\tas={ EditorHistoryRedo }\n\t\t\t\t\t\t\tshowTooltip={ ! showIconLabels }\n\t\t\t\t\t\t\tvariant={ showIconLabels ? 'tertiary' : undefined }\n\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{ ! isDistractionFree && (\n\t\t\t\t\t\t\t<ToolbarItem\n\t\t\t\t\t\t\t\tas={ Button }\n\t\t\t\t\t\t\t\tclassName=\"editor-document-tools__document-overview-toggle\"\n\t\t\t\t\t\t\t\ticon={ listView }\n\t\t\t\t\t\t\t\tdisabled={ disableBlockTools }\n\t\t\t\t\t\t\t\tisPressed={ isListViewOpen }\n\t\t\t\t\t\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\t\t\t\t\t\tlabel={ __( 'Document Overview' ) }\n\t\t\t\t\t\t\t\tonClick={ toggleListView }\n\t\t\t\t\t\t\t\tshortcut={ listViewShortcut }\n\t\t\t\t\t\t\t\tshowTooltip={ ! showIconLabels }\n\t\t\t\t\t\t\t\tvariant={\n\t\t\t\t\t\t\t\t\tshowIconLabels ? 'tertiary' : undefined\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\taria-expanded={ isListViewOpen }\n\t\t\t\t\t\t\t\tref={ listViewToggleRef }\n\t\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t</NavigableToolbar>\n\t);\n}\n\nexport default DocumentTools;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,EAAE,EAAEC,EAAE,QAAQ,iBAAiB;AACxC,SACCC,gBAAgB,EAChBC,YAAY,EACZC,KAAK,IAAIC,gBAAgB,QACnB,yBAAyB;AAChC,SAASC,MAAM,EAAEC,WAAW,QAAQ,uBAAuB;AAC3D,SAASC,QAAQ,EAAEC,IAAI,QAAQ,kBAAkB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AAI,EAAC;UAAS,CACd,CAAC,EACA,CAAEtC,iBAAiB,iBACpBV,IAAA,CAACX,WAAW;YACXkD,EAAE,EAAGnD,MAAQ;YACbkB,SAAS,EAAC,iDAAiD;YAC3DsC,IAAI,EAAGtD,QAAU;YACjBqD,QAAQ,EAAGpC,iBAAmB;YAC9BiC,SAAS,EAAG5B;YACZ;YACAiC,KAAK,EAAG/D,EAAE,CAAE,mBAAoB,CAAG;YACnC4D,OAAO,EAAGV,cAAgB;YAC1BiB,QAAQ,EAAGpC,gBAAkB;YAC7BiC,WAAW,EAAG,CAAE9B,cAAgB;YAChCoB,OAAO,EACNpB,cAAc,GAAG,UAAU,GAAG+B,SAC9B;YACD,iBAAgBnC,cAAgB;YAChC0B,GAAG,EAAGvB,iBAAmB;YACzBiC,IAAI,EAAC;UAAS,CACd,CACD;QAAA,CACA,CACF;MAAA,CACG;IAAC,CACW;EAAC;AAErB;AAEA,eAAe3C,aAAa","ignoreList":[]}
1
+ {"version":3,"names":["clsx","useViewportMatch","useSelect","useDispatch","__","_x","NavigableToolbar","ToolSelector","store","blockEditorStore","Button","ToolbarItem","listView","plus","useCallback","keyboardShortcutsStore","preferencesStore","unlock","editorStore","EditorHistoryRedo","EditorHistoryUndo","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","DocumentTools","className","disableBlockTools","setIsInserterOpened","setIsListViewOpened","isDistractionFree","isInserterOpened","isListViewOpen","listViewShortcut","inserterSidebarToggleRef","listViewToggleRef","showIconLabels","select","get","isListViewOpened","getEditorMode","getInserterSidebarToggleRef","getListViewToggleRef","getShortcutRepresentation","__unstableGetEditorMode","isVisualMode","isZoomedOutView","preventDefault","event","isLargeViewport","isWideViewport","toolbarAriaLabel","toggleListView","toggleInserter","longLabel","shortLabel","variant","children","ref","as","isPressed","onMouseDown","onClick","disabled","icon","label","showTooltip","undefined","size","shortcut"],"sources":["@wordpress/editor/src/components/document-tools/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useViewportMatch } from '@wordpress/compose';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __, _x } from '@wordpress/i18n';\nimport {\n\tNavigableToolbar,\n\tToolSelector,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { Button, ToolbarItem } from '@wordpress/components';\nimport { listView, plus } from '@wordpress/icons';\nimport { useCallback } from '@wordpress/element';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as editorStore } from '../../store';\nimport EditorHistoryRedo from '../editor-history/redo';\nimport EditorHistoryUndo from '../editor-history/undo';\n\nfunction DocumentTools( { className, disableBlockTools = false } ) {\n\tconst { setIsInserterOpened, setIsListViewOpened } =\n\t\tuseDispatch( editorStore );\n\tconst {\n\t\tisDistractionFree,\n\t\tisInserterOpened,\n\t\tisListViewOpen,\n\t\tlistViewShortcut,\n\t\tinserterSidebarToggleRef,\n\t\tlistViewToggleRef,\n\t\tshowIconLabels,\n\t} = useSelect( ( select ) => {\n\t\tconst { get } = select( preferencesStore );\n\t\tconst {\n\t\t\tisListViewOpened,\n\t\t\tgetEditorMode,\n\t\t\tgetInserterSidebarToggleRef,\n\t\t\tgetListViewToggleRef,\n\t\t} = unlock( select( editorStore ) );\n\t\tconst { getShortcutRepresentation } = select( keyboardShortcutsStore );\n\t\tconst { __unstableGetEditorMode } = select( blockEditorStore );\n\n\t\treturn {\n\t\t\tisInserterOpened: select( editorStore ).isInserterOpened(),\n\t\t\tisListViewOpen: isListViewOpened(),\n\t\t\tlistViewShortcut: getShortcutRepresentation(\n\t\t\t\t'core/editor/toggle-list-view'\n\t\t\t),\n\t\t\tinserterSidebarToggleRef: getInserterSidebarToggleRef(),\n\t\t\tlistViewToggleRef: getListViewToggleRef(),\n\t\t\tshowIconLabels: get( 'core', 'showIconLabels' ),\n\t\t\tisDistractionFree: get( 'core', 'distractionFree' ),\n\t\t\tisVisualMode: getEditorMode() === 'visual',\n\t\t\tisZoomedOutView: __unstableGetEditorMode() === 'zoom-out',\n\t\t};\n\t}, [] );\n\n\tconst preventDefault = ( event ) => {\n\t\t// Because the inserter behaves like a dialog,\n\t\t// if the inserter is opened already then when we click on the toggle button\n\t\t// then the initial click event will close the inserter and then be propagated\n\t\t// to the inserter toggle and it will open it again.\n\t\t// To prevent this we need to stop the propagation of the event.\n\t\t// This won't be necessary when the inserter no longer behaves like a dialog.\n\n\t\tif ( isInserterOpened ) {\n\t\t\tevent.preventDefault();\n\t\t}\n\t};\n\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst isWideViewport = useViewportMatch( 'wide' );\n\n\t/* translators: accessibility text for the editor toolbar */\n\tconst toolbarAriaLabel = __( 'Document tools' );\n\n\tconst toggleListView = useCallback(\n\t\t() => setIsListViewOpened( ! isListViewOpen ),\n\t\t[ setIsListViewOpened, isListViewOpen ]\n\t);\n\n\tconst toggleInserter = useCallback(\n\t\t() => setIsInserterOpened( ! isInserterOpened ),\n\t\t[ isInserterOpened, setIsInserterOpened ]\n\t);\n\n\t/* translators: button label text should, if possible, be under 16 characters. */\n\tconst longLabel = _x(\n\t\t'Block Inserter',\n\t\t'Generic label for block inserter button'\n\t);\n\tconst shortLabel = ! isInserterOpened ? __( 'Add' ) : __( 'Close' );\n\n\treturn (\n\t\t// Some plugins expect and use the `edit-post-header-toolbar` CSS class to\n\t\t// find the toolbar and inject UI elements into it. This is not officially\n\t\t// supported, but we're keeping it in the list of class names for backwards\n\t\t// compatibility.\n\t\t<NavigableToolbar\n\t\t\tclassName={ clsx(\n\t\t\t\t'editor-document-tools',\n\t\t\t\t'edit-post-header-toolbar',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\taria-label={ toolbarAriaLabel }\n\t\t\tvariant=\"unstyled\"\n\t\t>\n\t\t\t<div className=\"editor-document-tools__left\">\n\t\t\t\t{ ! isDistractionFree && (\n\t\t\t\t\t<ToolbarItem\n\t\t\t\t\t\tref={ inserterSidebarToggleRef }\n\t\t\t\t\t\tas={ Button }\n\t\t\t\t\t\tclassName=\"editor-document-tools__inserter-toggle\"\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\tisPressed={ isInserterOpened }\n\t\t\t\t\t\tonMouseDown={ preventDefault }\n\t\t\t\t\t\tonClick={ toggleInserter }\n\t\t\t\t\t\tdisabled={ disableBlockTools }\n\t\t\t\t\t\ticon={ plus }\n\t\t\t\t\t\tlabel={ showIconLabels ? shortLabel : longLabel }\n\t\t\t\t\t\tshowTooltip={ ! showIconLabels }\n\t\t\t\t\t\taria-expanded={ isInserterOpened }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ ( isWideViewport || ! showIconLabels ) && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ isLargeViewport && (\n\t\t\t\t\t\t\t<ToolbarItem\n\t\t\t\t\t\t\t\tas={ ToolSelector }\n\t\t\t\t\t\t\t\tshowTooltip={ ! showIconLabels }\n\t\t\t\t\t\t\t\tvariant={\n\t\t\t\t\t\t\t\t\tshowIconLabels ? 'tertiary' : undefined\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdisabled={ disableBlockTools }\n\t\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<ToolbarItem\n\t\t\t\t\t\t\tas={ EditorHistoryUndo }\n\t\t\t\t\t\t\tshowTooltip={ ! showIconLabels }\n\t\t\t\t\t\t\tvariant={ showIconLabels ? 'tertiary' : undefined }\n\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<ToolbarItem\n\t\t\t\t\t\t\tas={ EditorHistoryRedo }\n\t\t\t\t\t\t\tshowTooltip={ ! showIconLabels }\n\t\t\t\t\t\t\tvariant={ showIconLabels ? 'tertiary' : undefined }\n\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{ ! isDistractionFree && (\n\t\t\t\t\t\t\t<ToolbarItem\n\t\t\t\t\t\t\t\tas={ Button }\n\t\t\t\t\t\t\t\tclassName=\"editor-document-tools__document-overview-toggle\"\n\t\t\t\t\t\t\t\ticon={ listView }\n\t\t\t\t\t\t\t\tdisabled={ disableBlockTools }\n\t\t\t\t\t\t\t\tisPressed={ isListViewOpen }\n\t\t\t\t\t\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\t\t\t\t\t\tlabel={ __( 'Document Overview' ) }\n\t\t\t\t\t\t\t\tonClick={ toggleListView }\n\t\t\t\t\t\t\t\tshortcut={ listViewShortcut }\n\t\t\t\t\t\t\t\tshowTooltip={ ! showIconLabels }\n\t\t\t\t\t\t\t\tvariant={\n\t\t\t\t\t\t\t\t\tshowIconLabels ? 'tertiary' : undefined\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\taria-expanded={ isListViewOpen }\n\t\t\t\t\t\t\t\tref={ listViewToggleRef }\n\t\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t</NavigableToolbar>\n\t);\n}\n\nexport default DocumentTools;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,EAAE,EAAEC,EAAE,QAAQ,iBAAiB;AACxC,SACCC,gBAAgB,EAChBC,YAAY,EACZC,KAAK,IAAIC,gBAAgB,QACnB,yBAAyB;AAChC,SAASC,MAAM,EAAEC,WAAW,QAAQ,uBAAuB;AAC3D,SAASC,QAAQ,EAAEC,IAAI,QAAQ,kBAAkB;AACjD,SAASC,WAAW,QAAQ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EtC,iBAAiB,iBACpBV,IAAA,CAACX,WAAW;YACXkD,EAAE,EAAGnD,MAAQ;YACbkB,SAAS,EAAC,iDAAiD;YAC3DsC,IAAI,EAAGtD,QAAU;YACjBqD,QAAQ,EAAGpC,iBAAmB;YAC9BiC,SAAS,EAAG5B;YACZ;YACAiC,KAAK,EAAG/D,EAAE,CAAE,mBAAoB,CAAG;YACnC4D,OAAO,EAAGV,cAAgB;YAC1BiB,QAAQ,EAAGpC,gBAAkB;YAC7BiC,WAAW,EAAG,CAAE9B,cAAgB;YAChCoB,OAAO,EACNpB,cAAc,GAAG,UAAU,GAAG+B,SAC9B;YACD,iBAAgBnC,cAAgB;YAChC0B,GAAG,EAAGvB,iBAAmB;YACzBiC,IAAI,EAAC;UAAS,CACd,CACD;QAAA,CACA,CACF;MAAA,CACG;IAAC,CACW;EAAC;AAErB;AAEA,eAAe3C,aAAa","ignoreList":[]}
@@ -13,9 +13,7 @@ import { TEMPLATE_POST_TYPE } from '../../store/constants';
13
13
  import EditorInterface from '../editor-interface';
14
14
  import { ExperimentalEditorProvider } from '../provider';
15
15
  import Sidebar from '../sidebar';
16
- import { jsx as _jsx } from "react/jsx-runtime";
17
- import { jsxs as _jsxs } from "react/jsx-runtime";
18
- import { Fragment as _Fragment } from "react/jsx-runtime";
16
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
19
17
  function Editor({
20
18
  postType,
21
19
  postId,
@@ -1 +1 @@
1
- {"version":3,"names":["useSelect","store","coreStore","Notice","__","TEMPLATE_POST_TYPE","EditorInterface","ExperimentalEditorProvider","Sidebar","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","Editor","postType","postId","templateId","settings","children","initialEdits","onActionPerformed","extraContent","extraSidebarPanels","props","post","template","hasLoadedPost","select","getEntityRecord","hasFinishedResolution","undefined","status","isDismissible","__unstableTemplate","useSubRegistry","extraPanels"],"sources":["@wordpress/editor/src/components/editor/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { Notice } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { TEMPLATE_POST_TYPE } from '../../store/constants';\nimport EditorInterface from '../editor-interface';\nimport { ExperimentalEditorProvider } from '../provider';\nimport Sidebar from '../sidebar';\n\nfunction Editor( {\n\tpostType,\n\tpostId,\n\ttemplateId,\n\tsettings,\n\tchildren,\n\tinitialEdits,\n\n\t// This could be part of the settings.\n\tonActionPerformed,\n\n\t// The following abstractions are not ideal but necessary\n\t// to account for site editor and post editor differences for now.\n\textraContent,\n\textraSidebarPanels,\n\t...props\n} ) {\n\tconst { post, template, hasLoadedPost } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEntityRecord, hasFinishedResolution } =\n\t\t\t\tselect( coreStore );\n\t\t\treturn {\n\t\t\t\tpost: getEntityRecord( 'postType', postType, postId ),\n\t\t\t\ttemplate: templateId\n\t\t\t\t\t? getEntityRecord(\n\t\t\t\t\t\t\t'postType',\n\t\t\t\t\t\t\tTEMPLATE_POST_TYPE,\n\t\t\t\t\t\t\ttemplateId\n\t\t\t\t\t )\n\t\t\t\t\t: undefined,\n\t\t\t\thasLoadedPost: hasFinishedResolution( 'getEntityRecord', [\n\t\t\t\t\t'postType',\n\t\t\t\t\tpostType,\n\t\t\t\t\tpostId,\n\t\t\t\t] ),\n\t\t\t};\n\t\t},\n\t\t[ postType, postId, templateId ]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t{ hasLoadedPost && ! post && (\n\t\t\t\t<Notice status=\"warning\" isDismissible={ false }>\n\t\t\t\t\t{ __(\n\t\t\t\t\t\t\"You attempted to edit an item that doesn't exist. Perhaps it was deleted?\"\n\t\t\t\t\t) }\n\t\t\t\t</Notice>\n\t\t\t) }\n\t\t\t{ !! post && (\n\t\t\t\t<ExperimentalEditorProvider\n\t\t\t\t\tpost={ post }\n\t\t\t\t\t__unstableTemplate={ template }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tinitialEdits={ initialEdits }\n\t\t\t\t\tuseSubRegistry={ false }\n\t\t\t\t>\n\t\t\t\t\t<EditorInterface { ...props }>\n\t\t\t\t\t\t{ extraContent }\n\t\t\t\t\t</EditorInterface>\n\t\t\t\t\t{ children }\n\t\t\t\t\t<Sidebar\n\t\t\t\t\t\tonActionPerformed={ onActionPerformed }\n\t\t\t\t\t\textraPanels={ extraSidebarPanels }\n\t\t\t\t\t/>\n\t\t\t\t</ExperimentalEditorProvider>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default Editor;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;AACzD,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;AACA,SAASC,kBAAkB,QAAQ,uBAAuB;AAC1D,OAAOC,eAAe,MAAM,qBAAqB;AACjD,SAASC,0BAA0B,QAAQ,aAAa;AACxD,OAAOC,OAAO,MAAM,YAAY;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAEjC,SAASC,MAAMA,CAAE;EAChBC,QAAQ;EACRC,MAAM;EACNC,UAAU;EACVC,QAAQ;EACRC,QAAQ;EACRC,YAAY;EAEZ;EACAC,iBAAiB;EAEjB;EACA;EACAC,YAAY;EACZC,kBAAkB;EAClB,GAAGC;AACJ,CAAC,EAAG;EACH,MAAM;IAAEC,IAAI;IAAEC,QAAQ;IAAEC;EAAc,CAAC,GAAG5B,SAAS,CAChD6B,MAAM,IAAM;IACb,MAAM;MAAEC,eAAe;MAAEC;IAAsB,CAAC,GAC/CF,MAAM,CAAE3B,SAAU,CAAC;IACpB,OAAO;MACNwB,IAAI,EAAEI,eAAe,CAAE,UAAU,EAAEd,QAAQ,EAAEC,MAAO,CAAC;MACrDU,QAAQ,EAAET,UAAU,GACjBY,eAAe,CACf,UAAU,EACVzB,kBAAkB,EAClBa,UACA,CAAC,GACDc,SAAS;MACZJ,aAAa,EAAEG,qBAAqB,CAAE,iBAAiB,EAAE,CACxD,UAAU,EACVf,QAAQ,EACRC,MAAM,CACL;IACH,CAAC;EACF,CAAC,EACD,CAAED,QAAQ,EAAEC,MAAM,EAAEC,UAAU,CAC/B,CAAC;EAED,oBACCN,KAAA,CAAAE,SAAA;IAAAM,QAAA,GACGQ,aAAa,IAAI,CAAEF,IAAI,iBACxBhB,IAAA,CAACP,MAAM;MAAC8B,MAAM,EAAC,SAAS;MAACC,aAAa,EAAG,KAAO;MAAAd,QAAA,EAC7ChB,EAAE,CACH,2EACD;IAAC,CACM,CACR,EACC,CAAC,CAAEsB,IAAI,iBACRd,KAAA,CAACL,0BAA0B;MAC1BmB,IAAI,EAAGA,IAAM;MACbS,kBAAkB,EAAGR,QAAU;MAC/BR,QAAQ,EAAGA,QAAU;MACrBE,YAAY,EAAGA,YAAc;MAC7Be,cAAc,EAAG,KAAO;MAAAhB,QAAA,gBAExBV,IAAA,CAACJ,eAAe;QAAA,GAAMmB,KAAK;QAAAL,QAAA,EACxBG;MAAY,CACE,CAAC,EAChBH,QAAQ,eACVV,IAAA,CAACF,OAAO;QACPc,iBAAiB,EAAGA,iBAAmB;QACvCe,WAAW,EAAGb;MAAoB,CAClC,CAAC;IAAA,CACyB,CAC5B;EAAA,CACA,CAAC;AAEL;AAEA,eAAeT,MAAM","ignoreList":[]}
1
+ {"version":3,"names":["useSelect","store","coreStore","Notice","__","TEMPLATE_POST_TYPE","EditorInterface","ExperimentalEditorProvider","Sidebar","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","Editor","postType","postId","templateId","settings","children","initialEdits","onActionPerformed","extraContent","extraSidebarPanels","props","post","template","hasLoadedPost","select","getEntityRecord","hasFinishedResolution","undefined","status","isDismissible","__unstableTemplate","useSubRegistry","extraPanels"],"sources":["@wordpress/editor/src/components/editor/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { Notice } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { TEMPLATE_POST_TYPE } from '../../store/constants';\nimport EditorInterface from '../editor-interface';\nimport { ExperimentalEditorProvider } from '../provider';\nimport Sidebar from '../sidebar';\n\nfunction Editor( {\n\tpostType,\n\tpostId,\n\ttemplateId,\n\tsettings,\n\tchildren,\n\tinitialEdits,\n\n\t// This could be part of the settings.\n\tonActionPerformed,\n\n\t// The following abstractions are not ideal but necessary\n\t// to account for site editor and post editor differences for now.\n\textraContent,\n\textraSidebarPanels,\n\t...props\n} ) {\n\tconst { post, template, hasLoadedPost } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEntityRecord, hasFinishedResolution } =\n\t\t\t\tselect( coreStore );\n\t\t\treturn {\n\t\t\t\tpost: getEntityRecord( 'postType', postType, postId ),\n\t\t\t\ttemplate: templateId\n\t\t\t\t\t? getEntityRecord(\n\t\t\t\t\t\t\t'postType',\n\t\t\t\t\t\t\tTEMPLATE_POST_TYPE,\n\t\t\t\t\t\t\ttemplateId\n\t\t\t\t\t )\n\t\t\t\t\t: undefined,\n\t\t\t\thasLoadedPost: hasFinishedResolution( 'getEntityRecord', [\n\t\t\t\t\t'postType',\n\t\t\t\t\tpostType,\n\t\t\t\t\tpostId,\n\t\t\t\t] ),\n\t\t\t};\n\t\t},\n\t\t[ postType, postId, templateId ]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t{ hasLoadedPost && ! post && (\n\t\t\t\t<Notice status=\"warning\" isDismissible={ false }>\n\t\t\t\t\t{ __(\n\t\t\t\t\t\t\"You attempted to edit an item that doesn't exist. Perhaps it was deleted?\"\n\t\t\t\t\t) }\n\t\t\t\t</Notice>\n\t\t\t) }\n\t\t\t{ !! post && (\n\t\t\t\t<ExperimentalEditorProvider\n\t\t\t\t\tpost={ post }\n\t\t\t\t\t__unstableTemplate={ template }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tinitialEdits={ initialEdits }\n\t\t\t\t\tuseSubRegistry={ false }\n\t\t\t\t>\n\t\t\t\t\t<EditorInterface { ...props }>\n\t\t\t\t\t\t{ extraContent }\n\t\t\t\t\t</EditorInterface>\n\t\t\t\t\t{ children }\n\t\t\t\t\t<Sidebar\n\t\t\t\t\t\tonActionPerformed={ onActionPerformed }\n\t\t\t\t\t\textraPanels={ extraSidebarPanels }\n\t\t\t\t\t/>\n\t\t\t\t</ExperimentalEditorProvider>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default Editor;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;AACzD,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;AACA,SAASC,kBAAkB,QAAQ,uBAAuB;AAC1D,OAAOC,eAAe,MAAM,qBAAqB;AACjD,SAASC,0BAA0B,QAAQ,aAAa;AACxD,OAAOC,OAAO,MAAM,YAAY;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA,EAAAC,QAAA,IAAAC,SAAA;AAEjC,SAASC,MAAMA,CAAE;EAChBC,QAAQ;EACRC,MAAM;EACNC,UAAU;EACVC,QAAQ;EACRC,QAAQ;EACRC,YAAY;EAEZ;EACAC,iBAAiB;EAEjB;EACA;EACAC,YAAY;EACZC,kBAAkB;EAClB,GAAGC;AACJ,CAAC,EAAG;EACH,MAAM;IAAEC,IAAI;IAAEC,QAAQ;IAAEC;EAAc,CAAC,GAAG5B,SAAS,CAChD6B,MAAM,IAAM;IACb,MAAM;MAAEC,eAAe;MAAEC;IAAsB,CAAC,GAC/CF,MAAM,CAAE3B,SAAU,CAAC;IACpB,OAAO;MACNwB,IAAI,EAAEI,eAAe,CAAE,UAAU,EAAEd,QAAQ,EAAEC,MAAO,CAAC;MACrDU,QAAQ,EAAET,UAAU,GACjBY,eAAe,CACf,UAAU,EACVzB,kBAAkB,EAClBa,UACA,CAAC,GACDc,SAAS;MACZJ,aAAa,EAAEG,qBAAqB,CAAE,iBAAiB,EAAE,CACxD,UAAU,EACVf,QAAQ,EACRC,MAAM,CACL;IACH,CAAC;EACF,CAAC,EACD,CAAED,QAAQ,EAAEC,MAAM,EAAEC,UAAU,CAC/B,CAAC;EAED,oBACCN,KAAA,CAAAE,SAAA;IAAAM,QAAA,GACGQ,aAAa,IAAI,CAAEF,IAAI,iBACxBhB,IAAA,CAACP,MAAM;MAAC8B,MAAM,EAAC,SAAS;MAACC,aAAa,EAAG,KAAO;MAAAd,QAAA,EAC7ChB,EAAE,CACH,2EACD;IAAC,CACM,CACR,EACC,CAAC,CAAEsB,IAAI,iBACRd,KAAA,CAACL,0BAA0B;MAC1BmB,IAAI,EAAGA,IAAM;MACbS,kBAAkB,EAAGR,QAAU;MAC/BR,QAAQ,EAAGA,QAAU;MACrBE,YAAY,EAAGA,YAAc;MAC7Be,cAAc,EAAG,KAAO;MAAAhB,QAAA,gBAExBV,IAAA,CAACJ,eAAe;QAAA,GAAMmB,KAAK;QAAAL,QAAA,EACxBG;MAAY,CACE,CAAC,EAChBH,QAAQ,eACVV,IAAA,CAACF,OAAO;QACPc,iBAAiB,EAAGA,iBAAmB;QACvCe,WAAW,EAAGb;MAAoB,CAClC,CAAC;IAAA,CACyB,CAC5B;EAAA,CACA,CAAC;AAEL;AAEA,eAAeT,MAAM","ignoreList":[]}
@@ -13,9 +13,7 @@ import { __ } from '@wordpress/i18n';
13
13
  */
14
14
  import styles from './style.scss';
15
15
  import { HelpDetailBodyText, HelpDetailImage } from './view-sections';
16
- import { jsx as _jsx } from "react/jsx-runtime";
17
- import { jsxs as _jsxs } from "react/jsx-runtime";
18
- import { Fragment as _Fragment } from "react/jsx-runtime";
16
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
19
17
  const AddBlocks = () => {
20
18
  return /*#__PURE__*/_jsxs(_Fragment, {
21
19
  children: [/*#__PURE__*/_jsx(HelpDetailImage, {
@@ -1 +1 @@
1
- {"version":3,"names":["View","__","styles","HelpDetailBodyText","HelpDetailImage","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","AddBlocks","children","source","require","sourceDarkMode","style","helpDetailContainer","text"],"sources":["@wordpress/editor/src/components/editor-help/add-blocks.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { View } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\nimport { HelpDetailBodyText, HelpDetailImage } from './view-sections';\n\nconst AddBlocks = () => {\n\treturn (\n\t\t<>\n\t\t\t<HelpDetailImage\n\t\t\t\tsource={ require( './images/add-light.png' ) }\n\t\t\t\tsourceDarkMode={ require( './images/add-dark.png' ) }\n\t\t\t/>\n\t\t\t<View style={ styles.helpDetailContainer }>\n\t\t\t\t<HelpDetailBodyText\n\t\t\t\t\ttext={ __(\n\t\t\t\t\t\t'Add a new block at any time by tapping on the + icon in the toolbar on the bottom left.'\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t\t<HelpDetailBodyText\n\t\t\t\t\ttext={ __(\n\t\t\t\t\t\t'Once you become familiar with the names of different blocks, you can add a block by typing a forward slash followed by the block name — for example, /image or /heading.'\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t</View>\n\t\t</>\n\t);\n};\n\nexport default AddBlocks;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,IAAI,QAAQ,cAAc;;AAEnC;AACA;AACA;AACA,SAASC,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;AACA,OAAOC,MAAM,MAAM,cAAc;AACjC,SAASC,kBAAkB,EAAEC,eAAe,QAAQ,iBAAiB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAEtE,MAAMC,SAAS,GAAGA,CAAA,KAAM;EACvB,oBACCH,KAAA,CAAAE,SAAA;IAAAE,QAAA,gBACCN,IAAA,CAACF,eAAe;MACfS,MAAM,EAAGC,OAAO,CAAE,wBAAyB,CAAG;MAC9CC,cAAc,EAAGD,OAAO,CAAE,uBAAwB;IAAG,CACrD,CAAC,eACFN,KAAA,CAACR,IAAI;MAACgB,KAAK,EAAGd,MAAM,CAACe,mBAAqB;MAAAL,QAAA,gBACzCN,IAAA,CAACH,kBAAkB;QAClBe,IAAI,EAAGjB,EAAE,CACR,yFACD;MAAG,CACH,CAAC,eACFK,IAAA,CAACH,kBAAkB;QAClBe,IAAI,EAAGjB,EAAE,CACR,0KACD;MAAG,CACH,CAAC;IAAA,CACG,CAAC;EAAA,CACN,CAAC;AAEL,CAAC;AAED,eAAeU,SAAS","ignoreList":[]}
1
+ {"version":3,"names":["View","__","styles","HelpDetailBodyText","HelpDetailImage","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","AddBlocks","children","source","require","sourceDarkMode","style","helpDetailContainer","text"],"sources":["@wordpress/editor/src/components/editor-help/add-blocks.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { View } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\nimport { HelpDetailBodyText, HelpDetailImage } from './view-sections';\n\nconst AddBlocks = () => {\n\treturn (\n\t\t<>\n\t\t\t<HelpDetailImage\n\t\t\t\tsource={ require( './images/add-light.png' ) }\n\t\t\t\tsourceDarkMode={ require( './images/add-dark.png' ) }\n\t\t\t/>\n\t\t\t<View style={ styles.helpDetailContainer }>\n\t\t\t\t<HelpDetailBodyText\n\t\t\t\t\ttext={ __(\n\t\t\t\t\t\t'Add a new block at any time by tapping on the + icon in the toolbar on the bottom left.'\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t\t<HelpDetailBodyText\n\t\t\t\t\ttext={ __(\n\t\t\t\t\t\t'Once you become familiar with the names of different blocks, you can add a block by typing a forward slash followed by the block name — for example, /image or /heading.'\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t</View>\n\t\t</>\n\t);\n};\n\nexport default AddBlocks;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,IAAI,QAAQ,cAAc;;AAEnC;AACA;AACA;AACA,SAASC,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;AACA,OAAOC,MAAM,MAAM,cAAc;AACjC,SAASC,kBAAkB,EAAEC,eAAe,QAAQ,iBAAiB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA,EAAAC,QAAA,IAAAC,SAAA;AAEtE,MAAMC,SAAS,GAAGA,CAAA,KAAM;EACvB,oBACCH,KAAA,CAAAE,SAAA;IAAAE,QAAA,gBACCN,IAAA,CAACF,eAAe;MACfS,MAAM,EAAGC,OAAO,CAAE,wBAAyB,CAAG;MAC9CC,cAAc,EAAGD,OAAO,CAAE,uBAAwB;IAAG,CACrD,CAAC,eACFN,KAAA,CAACR,IAAI;MAACgB,KAAK,EAAGd,MAAM,CAACe,mBAAqB;MAAAL,QAAA,gBACzCN,IAAA,CAACH,kBAAkB;QAClBe,IAAI,EAAGjB,EAAE,CACR,yFACD;MAAG,CACH,CAAC,eACFK,IAAA,CAACH,kBAAkB;QAClBe,IAAI,EAAGjB,EAAE,CACR,0KACD;MAAG,CACH,CAAC;IAAA,CACG,CAAC;EAAA,CACN,CAAC;AAEL,CAAC;AAED,eAAeU,SAAS","ignoreList":[]}
@@ -13,9 +13,7 @@ import { __ } from '@wordpress/i18n';
13
13
  */
14
14
  import styles from './style.scss';
15
15
  import { HelpDetailBodyText, HelpDetailImage } from './view-sections';
16
- import { jsx as _jsx } from "react/jsx-runtime";
17
- import { jsxs as _jsxs } from "react/jsx-runtime";
18
- import { Fragment as _Fragment } from "react/jsx-runtime";
16
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
19
17
  const CustomizeBlocks = () => {
20
18
  return /*#__PURE__*/_jsxs(_Fragment, {
21
19
  children: [/*#__PURE__*/_jsx(HelpDetailImage, {
@@ -1 +1 @@
1
- {"version":3,"names":["View","__","styles","HelpDetailBodyText","HelpDetailImage","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","CustomizeBlocks","children","source","require","sourceDarkMode","style","helpDetailContainer","text"],"sources":["@wordpress/editor/src/components/editor-help/customize-blocks.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { View } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\nimport { HelpDetailBodyText, HelpDetailImage } from './view-sections';\n\nconst CustomizeBlocks = () => {\n\treturn (\n\t\t<>\n\t\t\t<HelpDetailImage\n\t\t\t\tsource={ require( './images/settings-light.png' ) }\n\t\t\t\tsourceDarkMode={ require( './images/settings-dark.png' ) }\n\t\t\t/>\n\t\t\t<View style={ styles.helpDetailContainer }>\n\t\t\t\t<HelpDetailBodyText\n\t\t\t\t\ttext={ __(\n\t\t\t\t\t\t'Each block has its own settings. To find them, tap on a block. Its settings will appear on the toolbar at the bottom of the screen.'\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t\t<HelpDetailBodyText\n\t\t\t\t\ttext={ __(\n\t\t\t\t\t\t'Some blocks have additional settings. Tap the settings icon on the bottom right of the block to view more options.'\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t</View>\n\t\t</>\n\t);\n};\n\nexport default CustomizeBlocks;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,IAAI,QAAQ,cAAc;;AAEnC;AACA;AACA;AACA,SAASC,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;AACA,OAAOC,MAAM,MAAM,cAAc;AACjC,SAASC,kBAAkB,EAAEC,eAAe,QAAQ,iBAAiB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAEtE,MAAMC,eAAe,GAAGA,CAAA,KAAM;EAC7B,oBACCH,KAAA,CAAAE,SAAA;IAAAE,QAAA,gBACCN,IAAA,CAACF,eAAe;MACfS,MAAM,EAAGC,OAAO,CAAE,6BAA8B,CAAG;MACnDC,cAAc,EAAGD,OAAO,CAAE,4BAA6B;IAAG,CAC1D,CAAC,eACFN,KAAA,CAACR,IAAI;MAACgB,KAAK,EAAGd,MAAM,CAACe,mBAAqB;MAAAL,QAAA,gBACzCN,IAAA,CAACH,kBAAkB;QAClBe,IAAI,EAAGjB,EAAE,CACR,qIACD;MAAG,CACH,CAAC,eACFK,IAAA,CAACH,kBAAkB;QAClBe,IAAI,EAAGjB,EAAE,CACR,oHACD;MAAG,CACH,CAAC;IAAA,CACG,CAAC;EAAA,CACN,CAAC;AAEL,CAAC;AAED,eAAeU,eAAe","ignoreList":[]}
1
+ {"version":3,"names":["View","__","styles","HelpDetailBodyText","HelpDetailImage","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","CustomizeBlocks","children","source","require","sourceDarkMode","style","helpDetailContainer","text"],"sources":["@wordpress/editor/src/components/editor-help/customize-blocks.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { View } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\nimport { HelpDetailBodyText, HelpDetailImage } from './view-sections';\n\nconst CustomizeBlocks = () => {\n\treturn (\n\t\t<>\n\t\t\t<HelpDetailImage\n\t\t\t\tsource={ require( './images/settings-light.png' ) }\n\t\t\t\tsourceDarkMode={ require( './images/settings-dark.png' ) }\n\t\t\t/>\n\t\t\t<View style={ styles.helpDetailContainer }>\n\t\t\t\t<HelpDetailBodyText\n\t\t\t\t\ttext={ __(\n\t\t\t\t\t\t'Each block has its own settings. To find them, tap on a block. Its settings will appear on the toolbar at the bottom of the screen.'\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t\t<HelpDetailBodyText\n\t\t\t\t\ttext={ __(\n\t\t\t\t\t\t'Some blocks have additional settings. Tap the settings icon on the bottom right of the block to view more options.'\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t</View>\n\t\t</>\n\t);\n};\n\nexport default CustomizeBlocks;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,IAAI,QAAQ,cAAc;;AAEnC;AACA;AACA;AACA,SAASC,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;AACA,OAAOC,MAAM,MAAM,cAAc;AACjC,SAASC,kBAAkB,EAAEC,eAAe,QAAQ,iBAAiB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA,EAAAC,QAAA,IAAAC,SAAA;AAEtE,MAAMC,eAAe,GAAGA,CAAA,KAAM;EAC7B,oBACCH,KAAA,CAAAE,SAAA;IAAAE,QAAA,gBACCN,IAAA,CAACF,eAAe;MACfS,MAAM,EAAGC,OAAO,CAAE,6BAA8B,CAAG;MACnDC,cAAc,EAAGD,OAAO,CAAE,4BAA6B;IAAG,CAC1D,CAAC,eACFN,KAAA,CAACR,IAAI;MAACgB,KAAK,EAAGd,MAAM,CAACe,mBAAqB;MAAAL,QAAA,gBACzCN,IAAA,CAACH,kBAAkB;QAClBe,IAAI,EAAGjB,EAAE,CACR,qIACD;MAAG,CACH,CAAC,eACFK,IAAA,CAACH,kBAAkB;QAClBe,IAAI,EAAGjB,EAAE,CACR,oHACD;MAAG,CACH,CAAC;IAAA,CACG,CAAC;EAAA,CACN,CAAC;AAEL,CAAC;AAED,eAAeU,eAAe","ignoreList":[]}
@@ -14,8 +14,7 @@ import { useContext } from '@wordpress/element';
14
14
  * Internal dependencies
15
15
  */
16
16
  import styles from './style.scss';
17
- import { jsx as _jsx } from "react/jsx-runtime";
18
- import { jsxs as _jsxs } from "react/jsx-runtime";
17
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
19
18
  const HelpDetailNavigationScreen = ({
20
19
  content,
21
20
  label
@@ -1 +1 @@
1
- {"version":3,"names":["ScrollView","StyleSheet","TouchableWithoutFeedback","View","useNavigation","BottomSheet","BottomSheetContext","useContext","styles","jsx","_jsx","jsxs","_jsxs","HelpDetailNavigationScreen","content","label","navigation","listProps","contentContainerStyle","flatten","NavigationScreen","isScrollable","fullScreen","children","style","container","NavBar","BackButton","onPress","goBack","Heading","paddingBottom","Math","max","safeAreaBottomInset","marginTop","accessible"],"sources":["@wordpress/editor/src/components/editor-help/help-detail-navigation-screen.native.js"],"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"],"mappings":"AAAA;AACA;AACA;AACA,SACCA,UAAU,EACVC,UAAU,EACVC,wBAAwB,EACxBC,IAAI,QACE,cAAc;AACrB,SAASC,aAAa,QAAQ,0BAA0B;;AAExD;AACA;AACA;AACA,SAASC,WAAW,EAAEC,kBAAkB,QAAQ,uBAAuB;AACvE,SAASC,UAAU,QAAQ,oBAAoB;;AAE/C;AACA;AACA;AACA,OAAOC,MAAM,MAAM,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAElC,MAAMC,0BAA0B,GAAGA,CAAE;EAAEC,OAAO;EAAEC;AAAM,CAAC,KAAM;EAC5D,MAAMC,UAAU,GAAGZ,aAAa,CAAC,CAAC;EAElC,MAAM;IAAEa;EAAU,CAAC,GAAGV,UAAU,CAAED,kBAAmB,CAAC;EACtD,MAAMY,qBAAqB,GAAGjB,UAAU,CAACkB,OAAO,CAC/CF,SAAS,CAACC,qBACX,CAAC;EAED,oBACCR,IAAA,CAACL,WAAW,CAACe,gBAAgB;IAACC,YAAY;IAACC,UAAU;IAAAC,QAAA,eACpDX,KAAA,CAACT,IAAI;MAACqB,KAAK,EAAGhB,MAAM,CAACiB,SAAW;MAAAF,QAAA,gBAC/BX,KAAA,CAACP,WAAW,CAACqB,MAAM;QAAAH,QAAA,gBAClBb,IAAA,CAACL,WAAW,CAACqB,MAAM,CAACC,UAAU;UAC7BC,OAAO,EAAGZ,UAAU,CAACa;QAAQ,CAC7B,CAAC,eACFnB,IAAA,CAACL,WAAW,CAACqB,MAAM,CAACI,OAAO;UAAAP,QAAA,EACxBR;QAAK,CACoB,CAAC;MAAA,CACV,CAAC,eACrBL,IAAA,CAACV,UAAU;QAAA,GACLiB,SAAS;QACdC,qBAAqB,EAAG;UACvB,GAAGA,qBAAqB;UACxBa,aAAa,EAAEC,IAAI,CAACC,GAAG,CACtBhB,SAAS,CAACiB,mBAAmB,EAC7BhB,qBAAqB,CAACa,aACvB,CAAC;UACD;AACN;AACA;AACA;AACA;UACMI,SAAS,EAAE;QACZ,CAAG;QAAAZ,QAAA,eAEHb,IAAA,CAACR,wBAAwB;UAACkC,UAAU,EAAG,KAAO;UAAAb,QAAA,eAC7Cb,IAAA,CAACP,IAAI;YAAAoB,QAAA,EAAGT;UAAO,CAAQ;QAAC,CACC;MAAC,CAChB,CAAC;IAAA,CACR;EAAC,CACsB,CAAC;AAEjC,CAAC;AAED,eAAeD,0BAA0B","ignoreList":[]}
1
+ {"version":3,"names":["ScrollView","StyleSheet","TouchableWithoutFeedback","View","useNavigation","BottomSheet","BottomSheetContext","useContext","styles","jsx","_jsx","jsxs","_jsxs","HelpDetailNavigationScreen","content","label","navigation","listProps","contentContainerStyle","flatten","NavigationScreen","isScrollable","fullScreen","children","style","container","NavBar","BackButton","onPress","goBack","Heading","paddingBottom","Math","max","safeAreaBottomInset","marginTop","accessible"],"sources":["@wordpress/editor/src/components/editor-help/help-detail-navigation-screen.native.js"],"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"],"mappings":"AAAA;AACA;AACA;AACA,SACCA,UAAU,EACVC,UAAU,EACVC,wBAAwB,EACxBC,IAAI,QACE,cAAc;AACrB,SAASC,aAAa,QAAQ,0BAA0B;;AAExD;AACA;AACA;AACA,SAASC,WAAW,EAAEC,kBAAkB,QAAQ,uBAAuB;AACvE,SAASC,UAAU,QAAQ,oBAAoB;;AAE/C;AACA;AACA;AACA,OAAOC,MAAM,MAAM,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAElC,MAAMC,0BAA0B,GAAGA,CAAE;EAAEC,OAAO;EAAEC;AAAM,CAAC,KAAM;EAC5D,MAAMC,UAAU,GAAGZ,aAAa,CAAC,CAAC;EAElC,MAAM;IAAEa;EAAU,CAAC,GAAGV,UAAU,CAAED,kBAAmB,CAAC;EACtD,MAAMY,qBAAqB,GAAGjB,UAAU,CAACkB,OAAO,CAC/CF,SAAS,CAACC,qBACX,CAAC;EAED,oBACCR,IAAA,CAACL,WAAW,CAACe,gBAAgB;IAACC,YAAY;IAACC,UAAU;IAAAC,QAAA,eACpDX,KAAA,CAACT,IAAI;MAACqB,KAAK,EAAGhB,MAAM,CAACiB,SAAW;MAAAF,QAAA,gBAC/BX,KAAA,CAACP,WAAW,CAACqB,MAAM;QAAAH,QAAA,gBAClBb,IAAA,CAACL,WAAW,CAACqB,MAAM,CAACC,UAAU;UAC7BC,OAAO,EAAGZ,UAAU,CAACa;QAAQ,CAC7B,CAAC,eACFnB,IAAA,CAACL,WAAW,CAACqB,MAAM,CAACI,OAAO;UAAAP,QAAA,EACxBR;QAAK,CACoB,CAAC;MAAA,CACV,CAAC,eACrBL,IAAA,CAACV,UAAU;QAAA,GACLiB,SAAS;QACdC,qBAAqB,EAAG;UACvB,GAAGA,qBAAqB;UACxBa,aAAa,EAAEC,IAAI,CAACC,GAAG,CACtBhB,SAAS,CAACiB,mBAAmB,EAC7BhB,qBAAqB,CAACa,aACvB,CAAC;UACD;AACN;AACA;AACA;AACA;UACMI,SAAS,EAAE;QACZ,CAAG;QAAAZ,QAAA,eAEHb,IAAA,CAACR,wBAAwB;UAACkC,UAAU,EAAG,KAAO;UAAAb,QAAA,eAC7Cb,IAAA,CAACP,IAAI;YAAAoB,QAAA,EAAGT;UAAO,CAAQ;QAAC,CACC;MAAC,CAChB,CAAC;IAAA,CACR;EAAC,CACsB,CAAC;AAEjC,CAAC;AAED,eAAeD,0BAA0B","ignoreList":[]}
@@ -28,9 +28,7 @@ import RemoveBlocks from './remove-blocks';
28
28
  import CustomizeBlocks from './customize-blocks';
29
29
  import moveBlocksIcon from './icon-move-blocks';
30
30
  import HelpSectionTitle from './help-section-title';
31
- import { jsx as _jsx } from "react/jsx-runtime";
32
- import { Fragment as _Fragment } from "react/jsx-runtime";
33
- import { jsxs as _jsxs } from "react/jsx-runtime";
31
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
34
32
  const HELP_TOPICS = [{
35
33
  label: __('What is a block?'),
36
34
  slug: 'what-is-a-block',
@@ -1 +1 @@
1
- {"version":3,"names":["SafeAreaView","ScrollView","StyleSheet","View","TransitionPresets","BottomSheet","BottomSheetConsumer","PanelBody","__","helpFilled","plusCircleFilled","trash","cog","useSelect","store","editorStore","requestContactCustomerSupport","requestGotoCustomerSupportOptions","styles","HelpDetailNavigationScreen","HelpTopicRow","HelpGetSupportButton","IntroToBlocks","AddBlocks","MoveBlocks","RemoveBlocks","CustomizeBlocks","moveBlocksIcon","HelpSectionTitle","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","HELP_TOPICS","label","slug","icon","view","EditorHelpTopics","close","isVisible","onClose","showSupport","postType","select","getEditedPostAttribute","title","supportSection","children","onPress","hideHeader","hasNavigation","contentStyle","contentContainer","testID","style","safeAreaContainer","NavigationContainer","animate","main","navigationContainer","NavigationScreen","isScrollable","fullScreen","name","container","NavBar","DismissButton","iosText","Heading","listProps","contentContainerStyle","flatten","paddingBottom","Math","max","safeAreaBottomInset","marginTop","map","index","isLastItem","length","screenName","content","options","gestureEnabled","DefaultTransition"],"sources":["@wordpress/editor/src/components/editor-help/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { SafeAreaView, ScrollView, StyleSheet, View } from 'react-native';\nimport { TransitionPresets } from '@react-navigation/stack';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tBottomSheet,\n\tBottomSheetConsumer,\n\tPanelBody,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { helpFilled, plusCircleFilled, trash, cog } from '@wordpress/icons';\nimport { useSelect } from '@wordpress/data';\nimport { store as editorStore } from '@wordpress/editor';\nimport {\n\trequestContactCustomerSupport,\n\trequestGotoCustomerSupportOptions,\n} from '@wordpress/react-native-bridge';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\nimport HelpDetailNavigationScreen from './help-detail-navigation-screen';\nimport HelpTopicRow from './help-topic-row';\nimport HelpGetSupportButton from './help-get-support-button';\nimport IntroToBlocks from './intro-to-blocks';\nimport AddBlocks from './add-blocks';\nimport MoveBlocks from './move-blocks';\nimport RemoveBlocks from './remove-blocks';\nimport CustomizeBlocks from './customize-blocks';\nimport moveBlocksIcon from './icon-move-blocks';\nimport HelpSectionTitle from './help-section-title';\n\nconst HELP_TOPICS = [\n\t{\n\t\tlabel: __( 'What is a block?' ),\n\t\tslug: 'what-is-a-block',\n\t\ticon: helpFilled,\n\t\tview: <IntroToBlocks />,\n\t},\n\t{\n\t\tlabel: __( 'Add blocks' ),\n\t\tslug: 'add-blocks',\n\t\ticon: plusCircleFilled,\n\t\tview: <AddBlocks />,\n\t},\n\t{\n\t\tlabel: __( 'Move blocks' ),\n\t\tslug: 'move-blocks',\n\t\ticon: moveBlocksIcon,\n\t\tview: <MoveBlocks />,\n\t},\n\t{\n\t\tlabel: __( 'Remove blocks' ),\n\t\tslug: 'remove-blocks',\n\t\ticon: trash,\n\t\tview: <RemoveBlocks />,\n\t},\n\t{\n\t\tlabel: __( 'Customize blocks' ),\n\t\tslug: 'customize-blocks',\n\t\ticon: cog,\n\t\tview: <CustomizeBlocks />,\n\t},\n];\n\nfunction EditorHelpTopics( { close, isVisible, onClose, showSupport } ) {\n\tconst { postType } = useSelect( ( select ) => ( {\n\t\tpostType: select( editorStore ).getEditedPostAttribute( 'type' ),\n\t} ) );\n\n\tconst title =\n\t\tpostType === 'page'\n\t\t\t? __( 'How to edit your page' )\n\t\t\t: __( 'How to edit your post' );\n\n\tconst supportSection = (\n\t\t<>\n\t\t\t<HelpSectionTitle>{ __( 'Get support' ) }</HelpSectionTitle>\n\t\t\t<HelpGetSupportButton\n\t\t\t\ttitle={ __( 'Contact support' ) }\n\t\t\t\tonPress={ requestContactCustomerSupport }\n\t\t\t/>\n\t\t\t<HelpGetSupportButton\n\t\t\t\ttitle={ __( 'More support options' ) }\n\t\t\t\tonPress={ requestGotoCustomerSupportOptions }\n\t\t\t/>\n\t\t</>\n\t);\n\n\treturn (\n\t\t<BottomSheet\n\t\t\tisVisible={ isVisible }\n\t\t\tonClose={ onClose }\n\t\t\thideHeader\n\t\t\thasNavigation\n\t\t\tcontentStyle={ styles.contentContainer }\n\t\t\ttestID=\"editor-help-modal\"\n\t\t>\n\t\t\t<SafeAreaView style={ styles.safeAreaContainer }>\n\t\t\t\t<BottomSheet.NavigationContainer\n\t\t\t\t\tanimate\n\t\t\t\t\tmain\n\t\t\t\t\tstyle={ styles.navigationContainer }\n\t\t\t\t>\n\t\t\t\t\t<BottomSheet.NavigationScreen\n\t\t\t\t\t\tisScrollable\n\t\t\t\t\t\tfullScreen\n\t\t\t\t\t\tname=\"help-topics\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<View style={ styles.container }>\n\t\t\t\t\t\t\t<BottomSheet.NavBar>\n\t\t\t\t\t\t\t\t<BottomSheet.NavBar.DismissButton\n\t\t\t\t\t\t\t\t\tonPress={ close }\n\t\t\t\t\t\t\t\t\tiosText={ __( 'Close' ) }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<BottomSheet.NavBar.Heading>\n\t\t\t\t\t\t\t\t\t{ title }\n\t\t\t\t\t\t\t\t</BottomSheet.NavBar.Heading>\n\t\t\t\t\t\t\t</BottomSheet.NavBar>\n\t\t\t\t\t\t\t<BottomSheetConsumer>\n\t\t\t\t\t\t\t\t{ ( { listProps } ) => {\n\t\t\t\t\t\t\t\t\tconst contentContainerStyle =\n\t\t\t\t\t\t\t\t\t\tStyleSheet.flatten(\n\t\t\t\t\t\t\t\t\t\t\tlistProps.contentContainerStyle\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<ScrollView\n\t\t\t\t\t\t\t\t\t\t\t{ ...listProps }\n\t\t\t\t\t\t\t\t\t\t\tcontentContainerStyle={ {\n\t\t\t\t\t\t\t\t\t\t\t\t...contentContainerStyle,\n\t\t\t\t\t\t\t\t\t\t\t\tpaddingBottom: Math.max(\n\t\t\t\t\t\t\t\t\t\t\t\t\tlistProps.safeAreaBottomInset,\n\t\t\t\t\t\t\t\t\t\t\t\t\tcontentContainerStyle.paddingBottom\n\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t\t\t\t\t\t * Remove margin set via `hideHeader`. Combining a header\n\t\t\t\t\t\t\t\t\t\t\t\t * and navigation in this bottom sheet is at odds with the\n\t\t\t\t\t\t\t\t\t\t\t\t * current `BottomSheet` implementation.\n\t\t\t\t\t\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\t\t\t\t\tmarginTop: 0,\n\t\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<PanelBody>\n\t\t\t\t\t\t\t\t\t\t\t\t<HelpSectionTitle>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{ __( 'The basics' ) }\n\t\t\t\t\t\t\t\t\t\t\t\t</HelpSectionTitle>\n\t\t\t\t\t\t\t\t\t\t\t\t{ /* Print out help topics. */ }\n\t\t\t\t\t\t\t\t\t\t\t\t{ HELP_TOPICS.map(\n\t\t\t\t\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{ label, icon, slug },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tindex\n\t\t\t\t\t\t\t\t\t\t\t\t\t) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst isLastItem =\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tindex ===\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tHELP_TOPICS.length -\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<HelpTopicRow\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={ slug }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tscreenName={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tslug\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisLastItem={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisLastItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t\t{ showSupport &&\n\t\t\t\t\t\t\t\t\t\t\t\t\tsupportSection }\n\t\t\t\t\t\t\t\t\t\t\t</PanelBody>\n\t\t\t\t\t\t\t\t\t\t</ScrollView>\n\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</BottomSheetConsumer>\n\t\t\t\t\t\t</View>\n\t\t\t\t\t</BottomSheet.NavigationScreen>\n\t\t\t\t\t{ /* Print out help detail screens. */ }\n\t\t\t\t\t{ HELP_TOPICS.map( ( { view, label, slug } ) => {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<HelpDetailNavigationScreen\n\t\t\t\t\t\t\t\tkey={ slug }\n\t\t\t\t\t\t\t\tname={ slug }\n\t\t\t\t\t\t\t\tcontent={ view }\n\t\t\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t\t\t\toptions={ {\n\t\t\t\t\t\t\t\t\tgestureEnabled: false,\n\t\t\t\t\t\t\t\t\t...TransitionPresets.DefaultTransition,\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t);\n\t\t\t\t\t} ) }\n\t\t\t\t</BottomSheet.NavigationContainer>\n\t\t\t</SafeAreaView>\n\t\t</BottomSheet>\n\t);\n}\n\nexport default EditorHelpTopics;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,YAAY,EAAEC,UAAU,EAAEC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AACzE,SAASC,iBAAiB,QAAQ,yBAAyB;;AAE3D;AACA;AACA;AACA,SACCC,WAAW,EACXC,mBAAmB,EACnBC,SAAS,QACH,uBAAuB;AAC9B,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,UAAU,EAAEC,gBAAgB,EAAEC,KAAK,EAAEC,GAAG,QAAQ,kBAAkB;AAC3E,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,KAAK,IAAIC,WAAW,QAAQ,mBAAmB;AACxD,SACCC,6B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C;sBAAE5C,KAAK;sBAAEE,IAAI;sBAAED;oBAAK,CAAC,EACrB4C,KAAK,KACD;sBACJ,MAAMC,UAAU,GACfD,KAAK,KACL9C,WAAW,CAACgD,MAAM,GACjB,CAAC;sBACH,oBACCrD,IAAA,CAACV,YAAY;wBAEZgB,KAAK,EAAGA,KAAO;wBACfE,IAAI,EAAGA,IAAM;wBACb8C,UAAU,EACT/C,IACA;wBACD6C,UAAU,EACTA;sBACA,GARK7C,IASN,CAAC;oBAEJ,CACD,CAAC,EACCO,WAAW,IACZK,cAAc;kBAAA,CACL;gBAAC,CACD,CAAC;cAEf;YAAC,CACmB,CAAC;UAAA,CACjB;QAAC,CACsB,CAAC,EAE7Bd,WAAW,CAAC6C,GAAG,CAAE,CAAE;UAAEzC,IAAI;UAAEH,KAAK;UAAEC;QAAK,CAAC,KAAM;UAC/C,oBACCP,IAAA,CAACX,0BAA0B;YAE1B+C,IAAI,EAAG7B,IAAM;YACbgD,OAAO,EAAG9C,IAAM;YAChBH,KAAK,EAAGA,KAAO;YACfkD,OAAO,EAAG;cACTC,cAAc,EAAE,KAAK;cACrB,GAAGnF,iBAAiB,CAACoF;YACtB;UAAG,GAPGnD,IAQN,CAAC;QAEJ,CAAE,CAAC;MAAA,CAC6B;IAAC,CACrB;EAAC,CACH,CAAC;AAEhB;AAEA,eAAeG,gBAAgB","ignoreList":[]}
1
+ {"version":3,"names":["SafeAreaView","ScrollView","StyleSheet","View","TransitionPresets","BottomSheet","BottomSheetConsumer","PanelBody","__","helpFilled","plusCircleFilled","trash","cog","useSelect","store","editorStore","requestContactCustomerSupport","requestGotoCustomerSupportOptions","styles","HelpDetailNavigationScreen","HelpTopicRow","HelpGetSupportButton","IntroToBlocks","AddBlocks","MoveBlocks","RemoveBlocks","CustomizeBlocks","moveBlocksIcon","HelpSectionTitle","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","HELP_TOPICS","label","slug","icon","view","EditorHelpTopics","close","isVisible","onClose","showSupport","postType","select","getEditedPostAttribute","title","supportSection","children","onPress","hideHeader","hasNavigation","contentStyle","contentContainer","testID","style","safeAreaContainer","NavigationContainer","animate","main","navigationContainer","NavigationScreen","isScrollable","fullScreen","name","container","NavBar","DismissButton","iosText","Heading","listProps","contentContainerStyle","flatten","paddingBottom","Math","max","safeAreaBottomInset","marginTop","map","index","isLastItem","length","screenName","content","options","gestureEnabled","DefaultTransition"],"sources":["@wordpress/editor/src/components/editor-help/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { SafeAreaView, ScrollView, StyleSheet, View } from 'react-native';\nimport { TransitionPresets } from '@react-navigation/stack';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tBottomSheet,\n\tBottomSheetConsumer,\n\tPanelBody,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { helpFilled, plusCircleFilled, trash, cog } from '@wordpress/icons';\nimport { useSelect } from '@wordpress/data';\nimport { store as editorStore } from '@wordpress/editor';\nimport {\n\trequestContactCustomerSupport,\n\trequestGotoCustomerSupportOptions,\n} from '@wordpress/react-native-bridge';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\nimport HelpDetailNavigationScreen from './help-detail-navigation-screen';\nimport HelpTopicRow from './help-topic-row';\nimport HelpGetSupportButton from './help-get-support-button';\nimport IntroToBlocks from './intro-to-blocks';\nimport AddBlocks from './add-blocks';\nimport MoveBlocks from './move-blocks';\nimport RemoveBlocks from './remove-blocks';\nimport CustomizeBlocks from './customize-blocks';\nimport moveBlocksIcon from './icon-move-blocks';\nimport HelpSectionTitle from './help-section-title';\n\nconst HELP_TOPICS = [\n\t{\n\t\tlabel: __( 'What is a block?' ),\n\t\tslug: 'what-is-a-block',\n\t\ticon: helpFilled,\n\t\tview: <IntroToBlocks />,\n\t},\n\t{\n\t\tlabel: __( 'Add blocks' ),\n\t\tslug: 'add-blocks',\n\t\ticon: plusCircleFilled,\n\t\tview: <AddBlocks />,\n\t},\n\t{\n\t\tlabel: __( 'Move blocks' ),\n\t\tslug: 'move-blocks',\n\t\ticon: moveBlocksIcon,\n\t\tview: <MoveBlocks />,\n\t},\n\t{\n\t\tlabel: __( 'Remove blocks' ),\n\t\tslug: 'remove-blocks',\n\t\ticon: trash,\n\t\tview: <RemoveBlocks />,\n\t},\n\t{\n\t\tlabel: __( 'Customize blocks' ),\n\t\tslug: 'customize-blocks',\n\t\ticon: cog,\n\t\tview: <CustomizeBlocks />,\n\t},\n];\n\nfunction EditorHelpTopics( { close, isVisible, onClose, showSupport } ) {\n\tconst { postType } = useSelect( ( select ) => ( {\n\t\tpostType: select( editorStore ).getEditedPostAttribute( 'type' ),\n\t} ) );\n\n\tconst title =\n\t\tpostType === 'page'\n\t\t\t? __( 'How to edit your page' )\n\t\t\t: __( 'How to edit your post' );\n\n\tconst supportSection = (\n\t\t<>\n\t\t\t<HelpSectionTitle>{ __( 'Get support' ) }</HelpSectionTitle>\n\t\t\t<HelpGetSupportButton\n\t\t\t\ttitle={ __( 'Contact support' ) }\n\t\t\t\tonPress={ requestContactCustomerSupport }\n\t\t\t/>\n\t\t\t<HelpGetSupportButton\n\t\t\t\ttitle={ __( 'More support options' ) }\n\t\t\t\tonPress={ requestGotoCustomerSupportOptions }\n\t\t\t/>\n\t\t</>\n\t);\n\n\treturn (\n\t\t<BottomSheet\n\t\t\tisVisible={ isVisible }\n\t\t\tonClose={ onClose }\n\t\t\thideHeader\n\t\t\thasNavigation\n\t\t\tcontentStyle={ styles.contentContainer }\n\t\t\ttestID=\"editor-help-modal\"\n\t\t>\n\t\t\t<SafeAreaView style={ styles.safeAreaContainer }>\n\t\t\t\t<BottomSheet.NavigationContainer\n\t\t\t\t\tanimate\n\t\t\t\t\tmain\n\t\t\t\t\tstyle={ styles.navigationContainer }\n\t\t\t\t>\n\t\t\t\t\t<BottomSheet.NavigationScreen\n\t\t\t\t\t\tisScrollable\n\t\t\t\t\t\tfullScreen\n\t\t\t\t\t\tname=\"help-topics\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<View style={ styles.container }>\n\t\t\t\t\t\t\t<BottomSheet.NavBar>\n\t\t\t\t\t\t\t\t<BottomSheet.NavBar.DismissButton\n\t\t\t\t\t\t\t\t\tonPress={ close }\n\t\t\t\t\t\t\t\t\tiosText={ __( 'Close' ) }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<BottomSheet.NavBar.Heading>\n\t\t\t\t\t\t\t\t\t{ title }\n\t\t\t\t\t\t\t\t</BottomSheet.NavBar.Heading>\n\t\t\t\t\t\t\t</BottomSheet.NavBar>\n\t\t\t\t\t\t\t<BottomSheetConsumer>\n\t\t\t\t\t\t\t\t{ ( { listProps } ) => {\n\t\t\t\t\t\t\t\t\tconst contentContainerStyle =\n\t\t\t\t\t\t\t\t\t\tStyleSheet.flatten(\n\t\t\t\t\t\t\t\t\t\t\tlistProps.contentContainerStyle\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<ScrollView\n\t\t\t\t\t\t\t\t\t\t\t{ ...listProps }\n\t\t\t\t\t\t\t\t\t\t\tcontentContainerStyle={ {\n\t\t\t\t\t\t\t\t\t\t\t\t...contentContainerStyle,\n\t\t\t\t\t\t\t\t\t\t\t\tpaddingBottom: Math.max(\n\t\t\t\t\t\t\t\t\t\t\t\t\tlistProps.safeAreaBottomInset,\n\t\t\t\t\t\t\t\t\t\t\t\t\tcontentContainerStyle.paddingBottom\n\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t\t\t\t\t\t * Remove margin set via `hideHeader`. Combining a header\n\t\t\t\t\t\t\t\t\t\t\t\t * and navigation in this bottom sheet is at odds with the\n\t\t\t\t\t\t\t\t\t\t\t\t * current `BottomSheet` implementation.\n\t\t\t\t\t\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\t\t\t\t\tmarginTop: 0,\n\t\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<PanelBody>\n\t\t\t\t\t\t\t\t\t\t\t\t<HelpSectionTitle>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{ __( 'The basics' ) }\n\t\t\t\t\t\t\t\t\t\t\t\t</HelpSectionTitle>\n\t\t\t\t\t\t\t\t\t\t\t\t{ /* Print out help topics. */ }\n\t\t\t\t\t\t\t\t\t\t\t\t{ HELP_TOPICS.map(\n\t\t\t\t\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{ label, icon, slug },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tindex\n\t\t\t\t\t\t\t\t\t\t\t\t\t) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst isLastItem =\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tindex ===\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tHELP_TOPICS.length -\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<HelpTopicRow\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={ slug }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tscreenName={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tslug\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisLastItem={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisLastItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t\t{ showSupport &&\n\t\t\t\t\t\t\t\t\t\t\t\t\tsupportSection }\n\t\t\t\t\t\t\t\t\t\t\t</PanelBody>\n\t\t\t\t\t\t\t\t\t\t</ScrollView>\n\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</BottomSheetConsumer>\n\t\t\t\t\t\t</View>\n\t\t\t\t\t</BottomSheet.NavigationScreen>\n\t\t\t\t\t{ /* Print out help detail screens. */ }\n\t\t\t\t\t{ HELP_TOPICS.map( ( { view, label, slug } ) => {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<HelpDetailNavigationScreen\n\t\t\t\t\t\t\t\tkey={ slug }\n\t\t\t\t\t\t\t\tname={ slug }\n\t\t\t\t\t\t\t\tcontent={ view }\n\t\t\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t\t\t\toptions={ {\n\t\t\t\t\t\t\t\t\tgestureEnabled: false,\n\t\t\t\t\t\t\t\t\t...TransitionPresets.DefaultTransition,\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t);\n\t\t\t\t\t} ) }\n\t\t\t\t</BottomSheet.NavigationContainer>\n\t\t\t</SafeAreaView>\n\t\t</BottomSheet>\n\t);\n}\n\nexport default EditorHelpTopics;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,YAAY,EAAEC,UAAU,EAAEC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AACzE,SAASC,iBAAiB,QAAQ,yBAAyB;;AAE3D;AACA;AACA;AACA,SACCC,WAAW,EACXC,mBAAmB,EACnBC,SAAS,QACH,uBAAuB;AAC9B,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,UAAU,EAAEC,gBAAgB,EAAEC,KAAK,EAAEC,GAAG,QAAQ,kBAAkB;AAC3E,SAASC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AAE,CAAE,YAAa;oBAAC,CACH,CAAC,EAEjB2B,WAAW,CAAC6C,GAAG,CAChB,CACC;sBAAE5C,KAAK;sBAAEE,IAAI;sBAAED;oBAAK,CAAC,EACrB4C,KAAK,KACD;sBACJ,MAAMC,UAAU,GACfD,KAAK,KACL9C,WAAW,CAACgD,MAAM,GACjB,CAAC;sBACH,oBACCrD,IAAA,CAACV,YAAY;wBAEZgB,KAAK,EAAGA,KAAO;wBACfE,IAAI,EAAGA,IAAM;wBACb8C,UAAU,EACT/C,IACA;wBACD6C,UAAU,EACTA;sBACA,GARK7C,IASN,CAAC;oBAEJ,CACD,CAAC,EACCO,WAAW,IACZK,cAAc;kBAAA,CACL;gBAAC,CACD,CAAC;cAEf;YAAC,CACmB,CAAC;UAAA,CACjB;QAAC,CACsB,CAAC,EAE7Bd,WAAW,CAAC6C,GAAG,CAAE,CAAE;UAAEzC,IAAI;UAAEH,KAAK;UAAEC;QAAK,CAAC,KAAM;UAC/C,oBACCP,IAAA,CAACX,0BAA0B;YAE1B+C,IAAI,EAAG7B,IAAM;YACbgD,OAAO,EAAG9C,IAAM;YAChBH,KAAK,EAAGA,KAAO;YACfkD,OAAO,EAAG;cACTC,cAAc,EAAE,KAAK;cACrB,GAAGnF,iBAAiB,CAACoF;YACtB;UAAG,GAPGnD,IAQN,CAAC;QAEJ,CAAE,CAAC;MAAA,CAC6B;IAAC,CACrB;EAAC,CACH,CAAC;AAEhB;AAEA,eAAeG,gBAAgB","ignoreList":[]}
@@ -14,9 +14,7 @@ import { usePreferredColorSchemeStyle } from '@wordpress/compose';
14
14
  */
15
15
  import styles from './style.scss';
16
16
  import { HelpDetailBodyText, HelpDetailSectionHeadingText, HelpDetailImage } from './view-sections';
17
- import { jsx as _jsx } from "react/jsx-runtime";
18
- import { jsxs as _jsxs } from "react/jsx-runtime";
19
- import { Fragment as _Fragment } from "react/jsx-runtime";
17
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
20
18
  const IntroToBlocks = () => {
21
19
  const titleStyle = usePreferredColorSchemeStyle(styles.helpDetailTitle, styles.helpDetailTitleDark);
22
20
  return /*#__PURE__*/_jsxs(_Fragment, {
@@ -1 +1 @@
1
- {"version":3,"names":["View","Text","__","usePreferredColorSchemeStyle","styles","HelpDetailBodyText","HelpDetailSectionHeadingText","HelpDetailImage","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","IntroToBlocks","titleStyle","helpDetailTitle","helpDetailTitleDark","children","source","require","style","helpDetailContainer","accessibilityRole","selectable","text","accessible","accessibilityLabel","sourceDarkMode"],"sources":["@wordpress/editor/src/components/editor-help/intro-to-blocks.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { View, Text } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { usePreferredColorSchemeStyle } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\nimport {\n\tHelpDetailBodyText,\n\tHelpDetailSectionHeadingText,\n\tHelpDetailImage,\n} from './view-sections';\n\nconst IntroToBlocks = () => {\n\tconst titleStyle = usePreferredColorSchemeStyle(\n\t\tstyles.helpDetailTitle,\n\t\tstyles.helpDetailTitleDark\n\t);\n\treturn (\n\t\t<>\n\t\t\t<HelpDetailImage\n\t\t\t\tsource={ require( './images/block-layout-collage.png' ) }\n\t\t\t/>\n\t\t\t<View style={ styles.helpDetailContainer }>\n\t\t\t\t<Text\n\t\t\t\t\taccessibilityRole=\"header\"\n\t\t\t\t\tselectable\n\t\t\t\t\tstyle={ titleStyle }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Welcome to the world of blocks' ) }\n\t\t\t\t</Text>\n\t\t\t\t<HelpDetailBodyText\n\t\t\t\t\ttext={ __(\n\t\t\t\t\t\t'Blocks are pieces of content that you can insert, rearrange, and style without needing to know how to code. Blocks are an easy and modern way for you to create beautiful layouts.'\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t\t<HelpDetailSectionHeadingText\n\t\t\t\t\ttext={ __( 'Rich text editing' ) }\n\t\t\t\t/>\n\t\t\t\t<HelpDetailBodyText\n\t\t\t\t\ttext={ __(\n\t\t\t\t\t\t'Blocks allow you to focus on writing your content, knowing that all the formatting tools you need are there to help you get your message across.'\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t\t<HelpDetailImage\n\t\t\t\t\taccessible\n\t\t\t\t\taccessibilityLabel={ __(\n\t\t\t\t\t\t'Text formatting controls are located within the toolbar positioned above the keyboard while editing a text block'\n\t\t\t\t\t) }\n\t\t\t\t\tsource={ require( './images/rich-text-light.png' ) }\n\t\t\t\t\tsourceDarkMode={ require( './images/rich-text-dark.png' ) }\n\t\t\t\t/>\n\t\t\t\t<HelpDetailSectionHeadingText text={ __( 'Embed media' ) } />\n\t\t\t\t<HelpDetailBodyText\n\t\t\t\t\ttext={ __(\n\t\t\t\t\t\t'Make your content stand out by adding images, gifs, videos, and embedded media to your pages.'\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t\t<HelpDetailImage\n\t\t\t\t\tsource={ require( './images/embed-media-light.png' ) }\n\t\t\t\t\tsourceDarkMode={ require( './images/embed-media-dark.png' ) }\n\t\t\t\t/>\n\t\t\t\t<HelpDetailSectionHeadingText text={ __( 'Build layouts' ) } />\n\t\t\t\t<HelpDetailBodyText\n\t\t\t\t\ttext={ __(\n\t\t\t\t\t\t'Arrange your content into columns, add Call to Action buttons, and overlay images with text.'\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t\t<HelpDetailImage\n\t\t\t\t\tsource={ require( './images/build-layouts-light.png' ) }\n\t\t\t\t\tsourceDarkMode={ require( './images/build-layouts-dark.png' ) }\n\t\t\t\t/>\n\t\t\t\t<HelpDetailBodyText\n\t\t\t\t\ttext={ __(\n\t\t\t\t\t\t'Give it a try by adding a few blocks to your post or page!'\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t</View>\n\t\t</>\n\t);\n};\n\nexport default IntroToB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C,OAAO,CAAE,8BAA+B,CAAG;QACpDQ,cAAc,EAAGR,OAAO,CAAE,6BAA8B;MAAG,CAC3D,CAAC,eACFX,IAAA,CAACH,4BAA4B;QAACmB,IAAI,EAAGvB,EAAE,CAAE,aAAc;MAAG,CAAE,CAAC,eAC7DO,IAAA,CAACJ,kBAAkB;QAClBoB,IAAI,EAAGvB,EAAE,CACR,+FACD;MAAG,CACH,CAAC,eACFO,IAAA,CAACF,eAAe;QACfY,MAAM,EAAGC,OAAO,CAAE,gCAAiC,CAAG;QACtDQ,cAAc,EAAGR,OAAO,CAAE,+BAAgC;MAAG,CAC7D,CAAC,eACFX,IAAA,CAACH,4BAA4B;QAACmB,IAAI,EAAGvB,EAAE,CAAE,eAAgB;MAAG,CAAE,CAAC,eAC/DO,IAAA,CAACJ,kBAAkB;QAClBoB,IAAI,EAAGvB,EAAE,CACR,8FACD;MAAG,CACH,CAAC,eACFO,IAAA,CAACF,eAAe;QACfY,MAAM,EAAGC,OAAO,CAAE,kCAAmC,CAAG;QACxDQ,cAAc,EAAGR,OAAO,CAAE,iCAAkC;MAAG,CAC/D,CAAC,eACFX,IAAA,CAACJ,kBAAkB;QAClBoB,IAAI,EAAGvB,EAAE,CACR,4DACD;MAAG,CACH,CAAC;IAAA,CACG,CAAC;EAAA,CACN,CAAC;AAEL,CAAC;AAED,eAAeY,aAAa","ignoreList":[]}
1
+ {"version":3,"names":["View","Text","__","usePreferredColorSchemeStyle","styles","HelpDetailBodyText","HelpDetailSectionHeadingText","HelpDetailImage","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","IntroToBlocks","titleStyle","helpDetailTitle","helpDetailTitleDark","children","source","require","style","helpDetailContainer","accessibilityRole","selectable","text","accessible","accessibilityLabel","sourceDarkMode"],"sources":["@wordpress/editor/src/components/editor-help/intro-to-blocks.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { View, Text } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { usePreferredColorSchemeStyle } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\nimport {\n\tHelpDetailBodyText,\n\tHelpDetailSectionHeadingText,\n\tHelpDetailImage,\n} from './view-sections';\n\nconst IntroToBlocks = () => {\n\tconst titleStyle = usePreferredColorSchemeStyle(\n\t\tstyles.helpDetailTitle,\n\t\tstyles.helpDetailTitleDark\n\t);\n\treturn (\n\t\t<>\n\t\t\t<HelpDetailImage\n\t\t\t\tsource={ require( './images/block-layout-collage.png' ) }\n\t\t\t/>\n\t\t\t<View style={ styles.helpDetailContainer }>\n\t\t\t\t<Text\n\t\t\t\t\taccessibilityRole=\"header\"\n\t\t\t\t\tselectable\n\t\t\t\t\tstyle={ titleStyle }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Welcome to the world of blocks' ) }\n\t\t\t\t</Text>\n\t\t\t\t<HelpDetailBodyText\n\t\t\t\t\ttext={ __(\n\t\t\t\t\t\t'Blocks are pieces of content that you can insert, rearrange, and style without needing to know how to code. Blocks are an easy and modern way for you to create beautiful layouts.'\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t\t<HelpDetailSectionHeadingText\n\t\t\t\t\ttext={ __( 'Rich text editing' ) }\n\t\t\t\t/>\n\t\t\t\t<HelpDetailBodyText\n\t\t\t\t\ttext={ __(\n\t\t\t\t\t\t'Blocks allow you to focus on writing your content, knowing that all the formatting tools you need are there to help you get your message across.'\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t\t<HelpDetailImage\n\t\t\t\t\taccessible\n\t\t\t\t\taccessibilityLabel={ __(\n\t\t\t\t\t\t'Text formatting controls are located within the toolbar positioned above the keyboard while editing a text block'\n\t\t\t\t\t) }\n\t\t\t\t\tsource={ require( './images/rich-text-light.png' ) }\n\t\t\t\t\tsourceDarkMode={ require( './images/rich-text-dark.png' ) }\n\t\t\t\t/>\n\t\t\t\t<HelpDetailSectionHeadingText text={ __( 'Embed media' ) } />\n\t\t\t\t<HelpDetailBodyText\n\t\t\t\t\ttext={ __(\n\t\t\t\t\t\t'Make your content stand out by adding images, gifs, videos, and embedded media to your pages.'\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t\t<HelpDetailImage\n\t\t\t\t\tsource={ require( './images/embed-media-light.png' ) }\n\t\t\t\t\tsourceDarkMode={ require( './images/embed-media-dark.png' ) }\n\t\t\t\t/>\n\t\t\t\t<HelpDetailSectionHeadingText text={ __( 'Build layouts' ) } />\n\t\t\t\t<HelpDetailBodyText\n\t\t\t\t\ttext={ __(\n\t\t\t\t\t\t'Arrange your content into columns, add Call to Action buttons, and overlay images with text.'\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t\t<HelpDetailImage\n\t\t\t\t\tsource={ require( './images/build-layouts-light.png' ) }\n\t\t\t\t\tsourceDarkMode={ require( './images/build-layouts-dark.png' ) }\n\t\t\t\t/>\n\t\t\t\t<HelpDetailBodyText\n\t\t\t\t\ttext={ __(\n\t\t\t\t\t\t'Give it a try by adding a few blocks to your post or page!'\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t</View>\n\t\t</>\n\t);\n};\n\nexport default IntroToBlocks;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,IAAI,EAAEC,IAAI,QAAQ,cAAc;;AAEzC;AACA;AACA;AACA,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,4BAA4B,QAAQ,oBAAoB;;AAEjE;AACA;AACA;AACA,OAAOC,MAAM,MAAM,cAAc;AACjC,SACCC,kBAAkB,EAClBC,4BAA4B,EAC5BC,eAAe,QACT,iBAAiB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA,EAAAC,QAAA,IAAAC,SAAA;AAEzB,MAAMC,aAAa,GAAGA,CAAA,KAAM;EAC3B,MAAMC,UAAU,GAAGZ,4BAA4B,CAC9CC,MAAM,CAACY,eAAe,EACtBZ,MAAM,CAACa,mBACR,CAAC;EACD,oBACCN,KAA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AAGvB,EAAE,CACR,8FACD;MAAG,CACH,CAAC,eACFO,IAAA,CAACF,eAAe;QACfY,MAAM,EAAGC,OAAO,CAAE,kCAAmC,CAAG;QACxDQ,cAAc,EAAGR,OAAO,CAAE,iCAAkC;MAAG,CAC/D,CAAC,eACFX,IAAA,CAACJ,kBAAkB;QAClBoB,IAAI,EAAGvB,EAAE,CACR,4DACD;MAAG,CACH,CAAC;IAAA,CACG,CAAC;EAAA,CACN,CAAC;AAEL,CAAC;AAED,eAAeY,aAAa","ignoreList":[]}
@@ -13,9 +13,7 @@ import { __ } from '@wordpress/i18n';
13
13
  */
14
14
  import styles from './style.scss';
15
15
  import { HelpDetailBodyText, HelpDetailImage, HelpDetailSectionHeadingText } from './view-sections';
16
- import { jsx as _jsx } from "react/jsx-runtime";
17
- import { jsxs as _jsxs } from "react/jsx-runtime";
18
- import { Fragment as _Fragment } from "react/jsx-runtime";
16
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
19
17
  const MoveBlocks = () => {
20
18
  return /*#__PURE__*/_jsxs(_Fragment, {
21
19
  children: [/*#__PURE__*/_jsx(HelpDetailImage, {
@@ -1 +1 @@
1
- {"version":3,"names":["View","__","styles","HelpDetailBodyText","HelpDetailImage","HelpDetailSectionHeadingText","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","MoveBlocks","children","source","require","sourceDarkMode","style","helpDetailContainer","text","badge"],"sources":["@wordpress/editor/src/components/editor-help/move-blocks.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { View } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\nimport {\n\tHelpDetailBodyText,\n\tHelpDetailImage,\n\tHelpDetailSectionHeadingText,\n} from './view-sections';\n\nconst MoveBlocks = () => {\n\treturn (\n\t\t<>\n\t\t\t<HelpDetailImage\n\t\t\t\tsource={ require( './images/drag-and-drop-light.png' ) }\n\t\t\t\tsourceDarkMode={ require( './images/drag-and-drop-dark.png' ) }\n\t\t\t/>\n\t\t\t<View style={ styles.helpDetailContainer }>\n\t\t\t\t<HelpDetailSectionHeadingText\n\t\t\t\t\ttext={ __( 'Drag & drop' ) }\n\t\t\t\t\tbadge={ __( 'NEW' ) }\n\t\t\t\t/>\n\t\t\t\t<HelpDetailBodyText\n\t\t\t\t\ttext={ __(\n\t\t\t\t\t\t'Drag & drop makes rearranging blocks a breeze. Press and hold on a block, then drag it to its new location and release.'\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t</View>\n\t\t\t<HelpDetailImage\n\t\t\t\tsource={ require( './images/move-light.png' ) }\n\t\t\t\tsourceDarkMode={ require( './images/move-dark.png' ) }\n\t\t\t/>\n\t\t\t<View style={ styles.helpDetailContainer }>\n\t\t\t\t<HelpDetailSectionHeadingText text={ __( 'Arrow buttons' ) } />\n\t\t\t\t<HelpDetailBodyText\n\t\t\t\t\ttext={ __(\n\t\t\t\t\t\t'You can also rearrange blocks by tapping a block and then tapping the up and down arrows that appear on the bottom left side of the block to move it up or down.'\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t</View>\n\t\t</>\n\t);\n};\n\nexport default MoveBlocks;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,IAAI,QAAQ,cAAc;;AAEnC;AACA;AACA;AACA,SAASC,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;AACA,OAAOC,MAAM,MAAM,cAAc;AACjC,SACCC,kBAAkB,EAClBC,eAAe,EACfC,4BAA4B,QACtB,iBAAiB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAEzB,MAAMC,UAAU,GAAGA,CAAA,KAAM;EACxB,oBACCH,KAAA,CAAAE,SAAA;IAAAE,QAAA,gBACCN,IAAA,CAACH,eAAe;MACfU,MAAM,EAAGC,OAAO,CAAE,kCAAmC,CAAG;MACxDC,cAAc,EAAGD,OAAO,CAAE,iCAAkC;IAAG,CAC/D,CAAC,eACFN,KAAA,CAACT,IAAI;MAACiB,KAAK,EAAGf,MAAM,CAACgB,mBAAqB;MAAAL,QAAA,gBACzCN,IAAA,CAACF,4BAA4B;QAC5Bc,IAAI,EAAGlB,EAAE,CAAE,aAAc,CAAG;QAC5BmB,KAAK,EAAGnB,EAAE,CAAE,KAAM;MAAG,CACrB,CAAC,eACFM,IAAA,CAACJ,kBAAkB;QAClBgB,IAAI,EAAGlB,EAAE,CACR,yHACD;MAAG,CACH,CAAC;IAAA,CACG,CAAC,eACPM,IAAA,CAACH,eAAe;MACfU,MAAM,EAAGC,OAAO,CAAE,yBAA0B,CAAG;MAC/CC,cAAc,EAAGD,OAAO,CAAE,wBAAyB;IAAG,CACtD,CAAC,eACFN,KAAA,CAACT,IAAI;MAACiB,KAAK,EAAGf,MAAM,CAACgB,mBAAqB;MAAAL,QAAA,gBACzCN,IAAA,CAACF,4BAA4B;QAACc,IAAI,EAAGlB,EAAE,CAAE,eAAgB;MAAG,CAAE,CAAC,eAC/DM,IAAA,CAACJ,kBAAkB;QAClBgB,IAAI,EAAGlB,EAAE,CACR,kKACD;MAAG,CACH,CAAC;IAAA,CACG,CAAC;EAAA,CACN,CAAC;AAEL,CAAC;AAED,eAAeW,UAAU","ignoreList":[]}
1
+ {"version":3,"names":["View","__","styles","HelpDetailBodyText","HelpDetailImage","HelpDetailSectionHeadingText","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","MoveBlocks","children","source","require","sourceDarkMode","style","helpDetailContainer","text","badge"],"sources":["@wordpress/editor/src/components/editor-help/move-blocks.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { View } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\nimport {\n\tHelpDetailBodyText,\n\tHelpDetailImage,\n\tHelpDetailSectionHeadingText,\n} from './view-sections';\n\nconst MoveBlocks = () => {\n\treturn (\n\t\t<>\n\t\t\t<HelpDetailImage\n\t\t\t\tsource={ require( './images/drag-and-drop-light.png' ) }\n\t\t\t\tsourceDarkMode={ require( './images/drag-and-drop-dark.png' ) }\n\t\t\t/>\n\t\t\t<View style={ styles.helpDetailContainer }>\n\t\t\t\t<HelpDetailSectionHeadingText\n\t\t\t\t\ttext={ __( 'Drag & drop' ) }\n\t\t\t\t\tbadge={ __( 'NEW' ) }\n\t\t\t\t/>\n\t\t\t\t<HelpDetailBodyText\n\t\t\t\t\ttext={ __(\n\t\t\t\t\t\t'Drag & drop makes rearranging blocks a breeze. Press and hold on a block, then drag it to its new location and release.'\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t</View>\n\t\t\t<HelpDetailImage\n\t\t\t\tsource={ require( './images/move-light.png' ) }\n\t\t\t\tsourceDarkMode={ require( './images/move-dark.png' ) }\n\t\t\t/>\n\t\t\t<View style={ styles.helpDetailContainer }>\n\t\t\t\t<HelpDetailSectionHeadingText text={ __( 'Arrow buttons' ) } />\n\t\t\t\t<HelpDetailBodyText\n\t\t\t\t\ttext={ __(\n\t\t\t\t\t\t'You can also rearrange blocks by tapping a block and then tapping the up and down arrows that appear on the bottom left side of the block to move it up or down.'\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t</View>\n\t\t</>\n\t);\n};\n\nexport default MoveBlocks;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,IAAI,QAAQ,cAAc;;AAEnC;AACA;AACA;AACA,SAASC,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;AACA,OAAOC,MAAM,MAAM,cAAc;AACjC,SACCC,kBAAkB,EAClBC,eAAe,EACfC,4BAA4B,QACtB,iBAAiB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA,EAAAC,QAAA,IAAAC,SAAA;AAEzB,MAAMC,UAAU,GAAGA,CAAA,KAAM;EACxB,oBACCH,KAAA,CAAAE,SAAA;IAAAE,QAAA,gBACCN,IAAA,CAACH,eAAe;MACfU,MAAM,EAAGC,OAAO,CAAE,kCAAmC,CAAG;MACxDC,cAAc,EAAGD,OAAO,CAAE,iCAAkC;IAAG,CAC/D,CAAC,eACFN,KAAA,CAACT,IAAI;MAACiB,KAAK,EAAGf,MAAM,CAACgB,mBAAqB;MAAAL,QAAA,gBACzCN,IAAA,CAACF,4BAA4B;QAC5Bc,IAAI,EAAGlB,EAAE,CAAE,aAAc,CAAG;QAC5BmB,KAAK,EAAGnB,EAAE,CAAE,KAAM;MAAG,CACrB,CAAC,eACFM,IAAA,CAACJ,kBAAkB;QAClBgB,IAAI,EAAGlB,EAAE,CACR,yHACD;MAAG,CACH,CAAC;IAAA,CACG,CAAC,eACPM,IAAA,CAACH,eAAe;MACfU,MAAM,EAAGC,OAAO,CAAE,yBAA0B,CAAG;MAC/CC,cAAc,EAAGD,OAAO,CAAE,wBAAyB;IAAG,CACtD,CAAC,eACFN,KAAA,CAACT,IAAI;MAACiB,KAAK,EAAGf,MAAM,CAACgB,mBAAqB;MAAAL,QAAA,gBACzCN,IAAA,CAACF,4BAA4B;QAACc,IAAI,EAAGlB,EAAE,CAAE,eAAgB;MAAG,CAAE,CAAC,eAC/DM,IAAA,CAACJ,kBAAkB;QAClBgB,IAAI,EAAGlB,EAAE,CACR,kKACD;MAAG,CACH,CAAC;IAAA,CACG,CAAC;EAAA,CACN,CAAC;AAEL,CAAC;AAED,eAAeW,UAAU","ignoreList":[]}
@@ -13,9 +13,7 @@ import { __ } from '@wordpress/i18n';
13
13
  */
14
14
  import styles from './style.scss';
15
15
  import { HelpDetailBodyText, HelpDetailImage } from './view-sections';
16
- import { jsx as _jsx } from "react/jsx-runtime";
17
- import { Fragment as _Fragment } from "react/jsx-runtime";
18
- import { jsxs as _jsxs } from "react/jsx-runtime";
16
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
19
17
  const RemoveBlocks = () => {
20
18
  return /*#__PURE__*/_jsxs(_Fragment, {
21
19
  children: [/*#__PURE__*/_jsx(HelpDetailImage, {