@wordpress/editor 14.13.1-next.cd6172eb0.0 → 14.15.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 (478) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/LICENSE.md +1 -1
  3. package/README.md +1 -0
  4. package/build/bindings/pattern-overrides.js +1 -0
  5. package/build/bindings/pattern-overrides.js.map +1 -1
  6. package/build/bindings/post-meta.js +1 -0
  7. package/build/bindings/post-meta.js.map +1 -1
  8. package/build/components/autocompleters/user.js +1 -0
  9. package/build/components/autocompleters/user.js.map +1 -1
  10. package/build/components/block-removal-warnings/index.js +1 -0
  11. package/build/components/block-removal-warnings/index.js.map +1 -1
  12. package/build/components/block-settings-menu/content-only-settings-menu.js +1 -0
  13. package/build/components/block-settings-menu/content-only-settings-menu.js.map +1 -1
  14. package/build/components/block-settings-menu/plugin-block-settings-menu-item.js +1 -0
  15. package/build/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -1
  16. package/build/components/collab-sidebar/add-comment.js +1 -1
  17. package/build/components/collab-sidebar/add-comment.js.map +1 -1
  18. package/build/components/collab-sidebar/comment-button.js +7 -2
  19. package/build/components/collab-sidebar/comment-button.js.map +1 -1
  20. package/build/components/collab-sidebar/comment-form.js +4 -1
  21. package/build/components/collab-sidebar/comment-form.js.map +1 -1
  22. package/build/components/collab-sidebar/comments.js +199 -185
  23. package/build/components/collab-sidebar/comments.js.map +1 -1
  24. package/build/components/collab-sidebar/index.js +11 -4
  25. package/build/components/collab-sidebar/index.js.map +1 -1
  26. package/build/components/collab-sidebar/utils.js +1 -0
  27. package/build/components/collab-sidebar/utils.js.map +1 -1
  28. package/build/components/commands/index.js +28 -0
  29. package/build/components/commands/index.js.map +1 -1
  30. package/build/components/deprecated.js +1 -0
  31. package/build/components/deprecated.js.map +1 -1
  32. package/build/components/document-bar/index.js +5 -2
  33. package/build/components/document-bar/index.js.map +1 -1
  34. package/build/components/document-outline/index.js +1 -0
  35. package/build/components/document-outline/index.js.map +1 -1
  36. package/build/components/document-tools/index.js +3 -6
  37. package/build/components/document-tools/index.js.map +1 -1
  38. package/build/components/editor-help/index.native.js +1 -0
  39. package/build/components/editor-help/index.native.js.map +1 -1
  40. package/build/components/editor-help/intro-to-blocks.native.js +1 -1
  41. package/build/components/editor-help/intro-to-blocks.native.js.map +1 -1
  42. package/build/components/editor-notices/index.js +1 -0
  43. package/build/components/editor-notices/index.js.map +1 -1
  44. package/build/components/editor-snackbars/index.js +1 -0
  45. package/build/components/editor-snackbars/index.js.map +1 -1
  46. package/build/components/entities-saved-states/entity-type-list.js +1 -0
  47. package/build/components/entities-saved-states/entity-type-list.js.map +1 -1
  48. package/build/components/entities-saved-states/hooks/use-is-dirty.js +1 -0
  49. package/build/components/entities-saved-states/hooks/use-is-dirty.js.map +1 -1
  50. package/build/components/entities-saved-states/index.js +3 -1
  51. package/build/components/entities-saved-states/index.js.map +1 -1
  52. package/build/components/error-boundary/index.js +26 -13
  53. package/build/components/error-boundary/index.js.map +1 -1
  54. package/build/components/error-boundary/index.native.js +1 -1
  55. package/build/components/error-boundary/index.native.js.map +1 -1
  56. package/build/components/keyboard-shortcut-help-modal/index.js +1 -0
  57. package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  58. package/build/components/keyboard-shortcut-help-modal/shortcut.js +1 -0
  59. package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
  60. package/build/components/list-view-sidebar/index.js +1 -0
  61. package/build/components/list-view-sidebar/index.js.map +1 -1
  62. package/build/components/local-autosave-monitor/index.js +1 -0
  63. package/build/components/local-autosave-monitor/index.js.map +1 -1
  64. package/build/components/mode-switcher/index.js +1 -0
  65. package/build/components/mode-switcher/index.js.map +1 -1
  66. package/build/components/more-menu/index.js +0 -1
  67. package/build/components/more-menu/index.js.map +1 -1
  68. package/build/components/page-attributes/parent.js +1 -0
  69. package/build/components/page-attributes/parent.js.map +1 -1
  70. package/build/components/post-actions/actions.js +10 -4
  71. package/build/components/post-actions/actions.js.map +1 -1
  72. package/build/components/post-actions/index.js +80 -91
  73. package/build/components/post-actions/index.js.map +1 -1
  74. package/build/components/post-actions/set-as-homepage.js +23 -34
  75. package/build/components/post-actions/set-as-homepage.js.map +1 -1
  76. package/build/components/post-actions/set-as-posts-page.js +154 -0
  77. package/build/components/post-actions/set-as-posts-page.js.map +1 -0
  78. package/build/components/post-author/hook.js +1 -0
  79. package/build/components/post-author/hook.js.map +1 -1
  80. package/build/components/post-card-panel/index.js +64 -24
  81. package/build/components/post-card-panel/index.js.map +1 -1
  82. package/build/components/post-fields/index.js +1 -0
  83. package/build/components/post-fields/index.js.map +1 -1
  84. package/build/components/post-format/index.js +1 -0
  85. package/build/components/post-format/index.js.map +1 -1
  86. package/build/components/post-format/panel.js +1 -0
  87. package/build/components/post-format/panel.js.map +1 -1
  88. package/build/components/post-publish-button/index.js +1 -0
  89. package/build/components/post-publish-button/index.js.map +1 -1
  90. package/build/components/post-publish-panel/maybe-category-panel.js +1 -0
  91. package/build/components/post-publish-panel/maybe-category-panel.js.map +1 -1
  92. package/build/components/post-publish-panel/maybe-post-format-panel.js +1 -0
  93. package/build/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
  94. package/build/components/post-publish-panel/maybe-upload-media.js +2 -1
  95. package/build/components/post-publish-panel/maybe-upload-media.js.map +1 -1
  96. package/build/components/post-publish-panel/media-util.js +1 -0
  97. package/build/components/post-publish-panel/media-util.js.map +1 -1
  98. package/build/components/post-publish-panel/prepublish.js +1 -1
  99. package/build/components/post-publish-panel/prepublish.js.map +1 -1
  100. package/build/components/post-saved-state/index.js +1 -0
  101. package/build/components/post-saved-state/index.js.map +1 -1
  102. package/build/components/post-schedule/index.js +1 -0
  103. package/build/components/post-schedule/index.js.map +1 -1
  104. package/build/components/post-taxonomies/flat-term-selector.js +1 -0
  105. package/build/components/post-taxonomies/flat-term-selector.js.map +1 -1
  106. package/build/components/post-taxonomies/hierarchical-term-selector.js +1 -0
  107. package/build/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
  108. package/build/components/post-taxonomies/index.js +1 -0
  109. package/build/components/post-taxonomies/index.js.map +1 -1
  110. package/build/components/post-taxonomies/most-used-terms.js +1 -0
  111. package/build/components/post-taxonomies/most-used-terms.js.map +1 -1
  112. package/build/components/post-template/classic-theme.js +1 -0
  113. package/build/components/post-template/classic-theme.js.map +1 -1
  114. package/build/components/post-template/swap-template-button.js +1 -0
  115. package/build/components/post-template/swap-template-button.js.map +1 -1
  116. package/build/components/post-transform-panel/hooks.js +1 -0
  117. package/build/components/post-transform-panel/hooks.js.map +1 -1
  118. package/build/components/post-type-support-check/index.js +1 -0
  119. package/build/components/post-type-support-check/index.js.map +1 -1
  120. package/build/components/preferences-modal/block-visibility.js +1 -0
  121. package/build/components/preferences-modal/block-visibility.js.map +1 -1
  122. package/build/components/preferences-modal/index.js +3 -4
  123. package/build/components/preferences-modal/index.js.map +1 -1
  124. package/build/components/preview-dropdown/index.js +0 -1
  125. package/build/components/preview-dropdown/index.js.map +1 -1
  126. package/build/components/provider/disable-non-page-content-blocks.js +66 -13
  127. package/build/components/provider/disable-non-page-content-blocks.js.map +1 -1
  128. package/build/components/provider/index.js +9 -13
  129. package/build/components/provider/index.js.map +1 -1
  130. package/build/components/provider/index.native.js +1 -0
  131. package/build/components/provider/index.native.js.map +1 -1
  132. package/build/components/provider/use-block-editor-settings.js +4 -1
  133. package/build/components/provider/use-block-editor-settings.js.map +1 -1
  134. package/build/components/sidebar/index.js +1 -0
  135. package/build/components/sidebar/index.js.map +1 -1
  136. package/build/components/start-page-options/index.js +20 -106
  137. package/build/components/start-page-options/index.js.map +1 -1
  138. package/build/components/start-template-options/index.js +1 -0
  139. package/build/components/start-template-options/index.js.map +1 -1
  140. package/build/components/template-part-content-panel/index.js +1 -0
  141. package/build/components/template-part-content-panel/index.js.map +1 -1
  142. package/build/components/template-part-menu-items/index.js +2 -10
  143. package/build/components/template-part-menu-items/index.js.map +1 -1
  144. package/build/components/theme-support-check/index.js +1 -0
  145. package/build/components/theme-support-check/index.js.map +1 -1
  146. package/build/components/visual-editor/use-select-nearest-editable-block.js +1 -0
  147. package/build/components/visual-editor/use-select-nearest-editable-block.js.map +1 -1
  148. package/build/dataviews/store/private-actions.js +16 -2
  149. package/build/dataviews/store/private-actions.js.map +1 -1
  150. package/build/dataviews/store/reducer.js +1 -0
  151. package/build/dataviews/store/reducer.js.map +1 -1
  152. package/build/hooks/custom-sources-backwards-compatibility.js +1 -0
  153. package/build/hooks/custom-sources-backwards-compatibility.js.map +1 -1
  154. package/build/hooks/pattern-overrides.js +1 -0
  155. package/build/hooks/pattern-overrides.js.map +1 -1
  156. package/build/store/actions.js +1 -2
  157. package/build/store/actions.js.map +1 -1
  158. package/build/store/constants.js +1 -3
  159. package/build/store/constants.js.map +1 -1
  160. package/build/store/private-actions.js +2 -1
  161. package/build/store/private-actions.js.map +1 -1
  162. package/build/store/private-selectors.js +1 -0
  163. package/build/store/private-selectors.js.map +1 -1
  164. package/build/store/reducer.js +1 -0
  165. package/build/store/reducer.js.map +1 -1
  166. package/build/store/reducer.native.js +1 -0
  167. package/build/store/reducer.native.js.map +1 -1
  168. package/build/store/selectors.js +1 -0
  169. package/build/store/selectors.js.map +1 -1
  170. package/build/store/utils/notice-builder.js +3 -8
  171. package/build/store/utils/notice-builder.js.map +1 -1
  172. package/build/utils/get-item-title.js +32 -0
  173. package/build/utils/get-item-title.js.map +1 -0
  174. package/build/utils/get-template-info.js +1 -0
  175. package/build/utils/get-template-info.js.map +1 -1
  176. package/build/utils/media-sideload/index.js +21 -0
  177. package/build/utils/media-sideload/index.js.map +1 -0
  178. package/build/utils/media-sideload/index.native.js +8 -0
  179. package/build/utils/media-sideload/index.native.js.map +1 -0
  180. package/build/utils/media-upload/index.js +5 -2
  181. package/build/utils/media-upload/index.js.map +1 -1
  182. package/build/utils/pageTypeBadge.js +6 -12
  183. package/build/utils/pageTypeBadge.js.map +1 -1
  184. package/build/utils/terms.js +1 -0
  185. package/build/utils/terms.js.map +1 -1
  186. package/build-module/bindings/pattern-overrides.js +1 -0
  187. package/build-module/bindings/pattern-overrides.js.map +1 -1
  188. package/build-module/bindings/post-meta.js +1 -0
  189. package/build-module/bindings/post-meta.js.map +1 -1
  190. package/build-module/components/autocompleters/user.js +1 -0
  191. package/build-module/components/autocompleters/user.js.map +1 -1
  192. package/build-module/components/block-removal-warnings/index.js +1 -0
  193. package/build-module/components/block-removal-warnings/index.js.map +1 -1
  194. package/build-module/components/block-settings-menu/content-only-settings-menu.js +1 -0
  195. package/build-module/components/block-settings-menu/content-only-settings-menu.js.map +1 -1
  196. package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js +1 -0
  197. package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -1
  198. package/build-module/components/collab-sidebar/add-comment.js +1 -1
  199. package/build-module/components/collab-sidebar/add-comment.js.map +1 -1
  200. package/build-module/components/collab-sidebar/comment-button.js +7 -2
  201. package/build-module/components/collab-sidebar/comment-button.js.map +1 -1
  202. package/build-module/components/collab-sidebar/comment-form.js +4 -1
  203. package/build-module/components/collab-sidebar/comment-form.js.map +1 -1
  204. package/build-module/components/collab-sidebar/comments.js +201 -187
  205. package/build-module/components/collab-sidebar/comments.js.map +1 -1
  206. package/build-module/components/collab-sidebar/index.js +11 -4
  207. package/build-module/components/collab-sidebar/index.js.map +1 -1
  208. package/build-module/components/collab-sidebar/utils.js +1 -0
  209. package/build-module/components/collab-sidebar/utils.js.map +1 -1
  210. package/build-module/components/commands/index.js +28 -0
  211. package/build-module/components/commands/index.js.map +1 -1
  212. package/build-module/components/deprecated.js +1 -0
  213. package/build-module/components/deprecated.js.map +1 -1
  214. package/build-module/components/document-bar/index.js +5 -2
  215. package/build-module/components/document-bar/index.js.map +1 -1
  216. package/build-module/components/document-outline/index.js +1 -0
  217. package/build-module/components/document-outline/index.js.map +1 -1
  218. package/build-module/components/document-tools/index.js +4 -7
  219. package/build-module/components/document-tools/index.js.map +1 -1
  220. package/build-module/components/editor-help/index.native.js +1 -0
  221. package/build-module/components/editor-help/index.native.js.map +1 -1
  222. package/build-module/components/editor-help/intro-to-blocks.native.js +1 -1
  223. package/build-module/components/editor-help/intro-to-blocks.native.js.map +1 -1
  224. package/build-module/components/editor-notices/index.js +1 -0
  225. package/build-module/components/editor-notices/index.js.map +1 -1
  226. package/build-module/components/editor-snackbars/index.js +1 -0
  227. package/build-module/components/editor-snackbars/index.js.map +1 -1
  228. package/build-module/components/entities-saved-states/entity-type-list.js +1 -0
  229. package/build-module/components/entities-saved-states/entity-type-list.js.map +1 -1
  230. package/build-module/components/entities-saved-states/hooks/use-is-dirty.js +1 -0
  231. package/build-module/components/entities-saved-states/hooks/use-is-dirty.js.map +1 -1
  232. package/build-module/components/entities-saved-states/index.js +3 -1
  233. package/build-module/components/entities-saved-states/index.js.map +1 -1
  234. package/build-module/components/error-boundary/index.js +28 -15
  235. package/build-module/components/error-boundary/index.js.map +1 -1
  236. package/build-module/components/error-boundary/index.native.js +2 -2
  237. package/build-module/components/error-boundary/index.native.js.map +1 -1
  238. package/build-module/components/keyboard-shortcut-help-modal/index.js +1 -0
  239. package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  240. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +1 -0
  241. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
  242. package/build-module/components/list-view-sidebar/index.js +1 -0
  243. package/build-module/components/list-view-sidebar/index.js.map +1 -1
  244. package/build-module/components/local-autosave-monitor/index.js +1 -0
  245. package/build-module/components/local-autosave-monitor/index.js.map +1 -1
  246. package/build-module/components/mode-switcher/index.js +1 -0
  247. package/build-module/components/mode-switcher/index.js.map +1 -1
  248. package/build-module/components/more-menu/index.js +0 -1
  249. package/build-module/components/more-menu/index.js.map +1 -1
  250. package/build-module/components/page-attributes/parent.js +1 -0
  251. package/build-module/components/page-attributes/parent.js.map +1 -1
  252. package/build-module/components/post-actions/actions.js +10 -4
  253. package/build-module/components/post-actions/actions.js.map +1 -1
  254. package/build-module/components/post-actions/index.js +81 -93
  255. package/build-module/components/post-actions/index.js.map +1 -1
  256. package/build-module/components/post-actions/set-as-homepage.js +22 -33
  257. package/build-module/components/post-actions/set-as-homepage.js.map +1 -1
  258. package/build-module/components/post-actions/set-as-posts-page.js +146 -0
  259. package/build-module/components/post-actions/set-as-posts-page.js.map +1 -0
  260. package/build-module/components/post-author/hook.js +1 -0
  261. package/build-module/components/post-author/hook.js.map +1 -1
  262. package/build-module/components/post-card-panel/index.js +66 -26
  263. package/build-module/components/post-card-panel/index.js.map +1 -1
  264. package/build-module/components/post-fields/index.js +1 -0
  265. package/build-module/components/post-fields/index.js.map +1 -1
  266. package/build-module/components/post-format/index.js +1 -0
  267. package/build-module/components/post-format/index.js.map +1 -1
  268. package/build-module/components/post-format/panel.js +1 -0
  269. package/build-module/components/post-format/panel.js.map +1 -1
  270. package/build-module/components/post-publish-button/index.js +1 -0
  271. package/build-module/components/post-publish-button/index.js.map +1 -1
  272. package/build-module/components/post-publish-panel/maybe-category-panel.js +1 -0
  273. package/build-module/components/post-publish-panel/maybe-category-panel.js.map +1 -1
  274. package/build-module/components/post-publish-panel/maybe-post-format-panel.js +1 -0
  275. package/build-module/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
  276. package/build-module/components/post-publish-panel/maybe-upload-media.js +3 -2
  277. package/build-module/components/post-publish-panel/maybe-upload-media.js.map +1 -1
  278. package/build-module/components/post-publish-panel/media-util.js +1 -0
  279. package/build-module/components/post-publish-panel/media-util.js.map +1 -1
  280. package/build-module/components/post-publish-panel/prepublish.js +1 -1
  281. package/build-module/components/post-publish-panel/prepublish.js.map +1 -1
  282. package/build-module/components/post-saved-state/index.js +1 -0
  283. package/build-module/components/post-saved-state/index.js.map +1 -1
  284. package/build-module/components/post-schedule/index.js +1 -0
  285. package/build-module/components/post-schedule/index.js.map +1 -1
  286. package/build-module/components/post-taxonomies/flat-term-selector.js +1 -0
  287. package/build-module/components/post-taxonomies/flat-term-selector.js.map +1 -1
  288. package/build-module/components/post-taxonomies/hierarchical-term-selector.js +1 -0
  289. package/build-module/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
  290. package/build-module/components/post-taxonomies/index.js +1 -0
  291. package/build-module/components/post-taxonomies/index.js.map +1 -1
  292. package/build-module/components/post-taxonomies/most-used-terms.js +1 -0
  293. package/build-module/components/post-taxonomies/most-used-terms.js.map +1 -1
  294. package/build-module/components/post-template/classic-theme.js +1 -0
  295. package/build-module/components/post-template/classic-theme.js.map +1 -1
  296. package/build-module/components/post-template/swap-template-button.js +1 -0
  297. package/build-module/components/post-template/swap-template-button.js.map +1 -1
  298. package/build-module/components/post-transform-panel/hooks.js +1 -0
  299. package/build-module/components/post-transform-panel/hooks.js.map +1 -1
  300. package/build-module/components/post-type-support-check/index.js +1 -0
  301. package/build-module/components/post-type-support-check/index.js.map +1 -1
  302. package/build-module/components/preferences-modal/block-visibility.js +1 -0
  303. package/build-module/components/preferences-modal/block-visibility.js.map +1 -1
  304. package/build-module/components/preferences-modal/index.js +3 -4
  305. package/build-module/components/preferences-modal/index.js.map +1 -1
  306. package/build-module/components/preview-dropdown/index.js +0 -1
  307. package/build-module/components/preview-dropdown/index.js.map +1 -1
  308. package/build-module/components/provider/disable-non-page-content-blocks.js +66 -13
  309. package/build-module/components/provider/disable-non-page-content-blocks.js.map +1 -1
  310. package/build-module/components/provider/index.js +10 -14
  311. package/build-module/components/provider/index.js.map +1 -1
  312. package/build-module/components/provider/index.native.js +1 -0
  313. package/build-module/components/provider/index.native.js.map +1 -1
  314. package/build-module/components/provider/use-block-editor-settings.js +4 -1
  315. package/build-module/components/provider/use-block-editor-settings.js.map +1 -1
  316. package/build-module/components/sidebar/index.js +1 -0
  317. package/build-module/components/sidebar/index.js.map +1 -1
  318. package/build-module/components/start-page-options/index.js +21 -106
  319. package/build-module/components/start-page-options/index.js.map +1 -1
  320. package/build-module/components/start-template-options/index.js +1 -0
  321. package/build-module/components/start-template-options/index.js.map +1 -1
  322. package/build-module/components/template-part-content-panel/index.js +1 -0
  323. package/build-module/components/template-part-content-panel/index.js.map +1 -1
  324. package/build-module/components/template-part-menu-items/index.js +2 -10
  325. package/build-module/components/template-part-menu-items/index.js.map +1 -1
  326. package/build-module/components/theme-support-check/index.js +1 -0
  327. package/build-module/components/theme-support-check/index.js.map +1 -1
  328. package/build-module/components/visual-editor/use-select-nearest-editable-block.js +1 -0
  329. package/build-module/components/visual-editor/use-select-nearest-editable-block.js.map +1 -1
  330. package/build-module/dataviews/store/private-actions.js +16 -2
  331. package/build-module/dataviews/store/private-actions.js.map +1 -1
  332. package/build-module/dataviews/store/reducer.js +1 -0
  333. package/build-module/dataviews/store/reducer.js.map +1 -1
  334. package/build-module/hooks/custom-sources-backwards-compatibility.js +1 -0
  335. package/build-module/hooks/custom-sources-backwards-compatibility.js.map +1 -1
  336. package/build-module/hooks/pattern-overrides.js +1 -0
  337. package/build-module/hooks/pattern-overrides.js.map +1 -1
  338. package/build-module/store/actions.js +1 -2
  339. package/build-module/store/actions.js.map +1 -1
  340. package/build-module/store/constants.js +0 -2
  341. package/build-module/store/constants.js.map +1 -1
  342. package/build-module/store/private-actions.js +2 -1
  343. package/build-module/store/private-actions.js.map +1 -1
  344. package/build-module/store/private-selectors.js +1 -0
  345. package/build-module/store/private-selectors.js.map +1 -1
  346. package/build-module/store/reducer.js +1 -0
  347. package/build-module/store/reducer.js.map +1 -1
  348. package/build-module/store/reducer.native.js +1 -0
  349. package/build-module/store/reducer.native.js.map +1 -1
  350. package/build-module/store/selectors.js +1 -0
  351. package/build-module/store/selectors.js.map +1 -1
  352. package/build-module/store/utils/notice-builder.js +3 -8
  353. package/build-module/store/utils/notice-builder.js.map +1 -1
  354. package/build-module/utils/get-item-title.js +26 -0
  355. package/build-module/utils/get-item-title.js.map +1 -0
  356. package/build-module/utils/get-template-info.js +1 -0
  357. package/build-module/utils/get-template-info.js.map +1 -1
  358. package/build-module/utils/media-sideload/index.js +14 -0
  359. package/build-module/utils/media-sideload/index.js.map +1 -0
  360. package/build-module/utils/media-sideload/index.native.js +2 -0
  361. package/build-module/utils/media-sideload/index.native.js.map +1 -0
  362. package/build-module/utils/media-upload/index.js +5 -2
  363. package/build-module/utils/media-upload/index.js.map +1 -1
  364. package/build-module/utils/pageTypeBadge.js +6 -12
  365. package/build-module/utils/pageTypeBadge.js.map +1 -1
  366. package/build-module/utils/terms.js +1 -0
  367. package/build-module/utils/terms.js.map +1 -1
  368. package/build-style/style-rtl.css +26 -27
  369. package/build-style/style.css +26 -27
  370. package/build-types/components/autocompleters/user.d.ts +7 -1
  371. package/build-types/components/autocompleters/user.d.ts.map +1 -1
  372. package/build-types/components/collab-sidebar/comment-button.d.ts.map +1 -1
  373. package/build-types/components/collab-sidebar/comment-form.d.ts.map +1 -1
  374. package/build-types/components/collab-sidebar/comments.d.ts +11 -7
  375. package/build-types/components/collab-sidebar/comments.d.ts.map +1 -1
  376. package/build-types/components/collab-sidebar/constants.d.ts.map +1 -1
  377. package/build-types/components/collab-sidebar/index.d.ts.map +1 -1
  378. package/build-types/components/commands/index.d.ts.map +1 -1
  379. package/build-types/components/document-bar/index.d.ts.map +1 -1
  380. package/build-types/components/document-tools/index.d.ts.map +1 -1
  381. package/build-types/components/entities-saved-states/index.d.ts.map +1 -1
  382. package/build-types/components/error-boundary/index.d.ts.map +1 -1
  383. package/build-types/components/keyboard-shortcut-help-modal/shortcut.d.ts +1 -1
  384. package/build-types/components/media-categories/index.d.ts.map +1 -1
  385. package/build-types/components/more-menu/index.d.ts.map +1 -1
  386. package/build-types/components/pattern-duplicate-modal/index.d.ts.map +1 -1
  387. package/build-types/components/pattern-rename-modal/index.d.ts.map +1 -1
  388. package/build-types/components/post-actions/actions.d.ts.map +1 -1
  389. package/build-types/components/post-actions/index.d.ts +5 -0
  390. package/build-types/components/post-actions/index.d.ts.map +1 -1
  391. package/build-types/components/post-actions/set-as-homepage.d.ts.map +1 -1
  392. package/build-types/components/post-actions/set-as-posts-page.d.ts +10 -0
  393. package/build-types/components/post-actions/set-as-posts-page.d.ts.map +1 -0
  394. package/build-types/components/post-card-panel/index.d.ts +13 -4
  395. package/build-types/components/post-card-panel/index.d.ts.map +1 -1
  396. package/build-types/components/post-taxonomies/flat-term-selector.d.ts +4 -4
  397. package/build-types/components/post-taxonomies/flat-term-selector.d.ts.map +1 -1
  398. package/build-types/components/post-taxonomies/hierarchical-term-selector.d.ts +4 -4
  399. package/build-types/components/post-taxonomies/hierarchical-term-selector.d.ts.map +1 -1
  400. package/build-types/components/post-title/constants.d.ts.map +1 -1
  401. package/build-types/components/preferences-modal/index.d.ts.map +1 -1
  402. package/build-types/components/preview-dropdown/index.d.ts.map +1 -1
  403. package/build-types/components/provider/disable-non-page-content-blocks.d.ts.map +1 -1
  404. package/build-types/components/provider/index.d.ts.map +1 -1
  405. package/build-types/components/provider/use-block-editor-settings.d.ts.map +1 -1
  406. package/build-types/components/start-page-options/index.d.ts +1 -2
  407. package/build-types/components/start-page-options/index.d.ts.map +1 -1
  408. package/build-types/dataviews/api.d.ts.map +1 -1
  409. package/build-types/dataviews/store/private-actions.d.ts.map +1 -1
  410. package/build-types/dataviews/store/reducer.d.ts +1 -1
  411. package/build-types/hooks/custom-sources-backwards-compatibility.d.ts.map +1 -1
  412. package/build-types/hooks/pattern-overrides.d.ts.map +1 -1
  413. package/build-types/store/actions.d.ts +7 -9
  414. package/build-types/store/actions.d.ts.map +1 -1
  415. package/build-types/store/constants.d.ts +0 -2
  416. package/build-types/store/constants.d.ts.map +1 -1
  417. package/build-types/store/private-actions.d.ts +1 -1
  418. package/build-types/store/private-actions.d.ts.map +1 -1
  419. package/build-types/store/private-selectors.d.ts +20 -4
  420. package/build-types/store/private-selectors.d.ts.map +1 -1
  421. package/build-types/store/reducer.d.ts +1 -1
  422. package/build-types/store/selectors.d.ts +376 -76
  423. package/build-types/store/selectors.d.ts.map +1 -1
  424. package/build-types/store/utils/notice-builder.d.ts.map +1 -1
  425. package/build-types/utils/get-item-title.d.ts +10 -0
  426. package/build-types/utils/get-item-title.d.ts.map +1 -0
  427. package/build-types/utils/media-sideload/index.d.ts +3 -0
  428. package/build-types/utils/media-sideload/index.d.ts.map +1 -0
  429. package/build-types/utils/media-upload/index.d.ts +3 -1
  430. package/build-types/utils/media-upload/index.d.ts.map +1 -1
  431. package/build-types/utils/pageTypeBadge.d.ts +3 -1
  432. package/build-types/utils/pageTypeBadge.d.ts.map +1 -1
  433. package/package.json +37 -37
  434. package/src/components/collab-sidebar/add-comment.js +1 -1
  435. package/src/components/collab-sidebar/comment-button.js +12 -7
  436. package/src/components/collab-sidebar/comment-form.js +4 -1
  437. package/src/components/collab-sidebar/comments.js +260 -243
  438. package/src/components/collab-sidebar/index.js +10 -2
  439. package/src/components/collab-sidebar/style.scss +10 -1
  440. package/src/components/commands/index.js +29 -0
  441. package/src/components/document-bar/index.js +5 -2
  442. package/src/components/document-tools/index.js +3 -6
  443. package/src/components/document-tools/style.scss +0 -6
  444. package/src/components/editor-help/intro-to-blocks.native.js +1 -1
  445. package/src/components/entities-saved-states/index.js +5 -1
  446. package/src/components/error-boundary/index.js +30 -16
  447. package/src/components/error-boundary/index.native.js +2 -2
  448. package/src/components/error-boundary/style.scss +5 -1
  449. package/src/components/more-menu/index.js +0 -1
  450. package/src/components/post-actions/actions.js +12 -4
  451. package/src/components/post-actions/index.js +90 -94
  452. package/src/components/post-actions/set-as-homepage.js +29 -45
  453. package/src/components/post-actions/set-as-posts-page.js +164 -0
  454. package/src/components/post-card-panel/index.js +71 -33
  455. package/src/components/post-card-panel/style.scss +8 -12
  456. package/src/components/post-publish-panel/maybe-upload-media.js +2 -2
  457. package/src/components/post-publish-panel/prepublish.js +1 -1
  458. package/src/components/post-publish-panel/test/__snapshots__/index.js.snap +2 -2
  459. package/src/components/preferences-modal/index.js +8 -13
  460. package/src/components/preview-dropdown/index.js +0 -1
  461. package/src/components/provider/disable-non-page-content-blocks.js +64 -13
  462. package/src/components/provider/index.js +13 -27
  463. package/src/components/provider/use-block-editor-settings.js +3 -0
  464. package/src/components/start-page-options/index.js +28 -119
  465. package/src/components/template-part-menu-items/index.js +2 -11
  466. package/src/dataviews/store/private-actions.ts +23 -8
  467. package/src/store/actions.js +0 -2
  468. package/src/store/constants.ts +0 -2
  469. package/src/store/private-actions.js +1 -1
  470. package/src/store/utils/notice-builder.js +3 -8
  471. package/src/store/utils/test/notice-builder.js +3 -4
  472. package/src/utils/get-item-title.js +25 -0
  473. package/src/utils/media-sideload/index.js +13 -0
  474. package/src/utils/media-sideload/index.native.js +1 -0
  475. package/src/utils/media-upload/index.js +4 -1
  476. package/src/utils/pageTypeBadge.js +7 -10
  477. package/tsconfig.json +1 -4
  478. package/tsconfig.tsbuildinfo +1 -1
@@ -8,7 +8,6 @@ var _element = require("@wordpress/element");
8
8
  var _i18n = require("@wordpress/i18n");
9
9
  var _components = require("@wordpress/components");
10
10
  var _data = require("@wordpress/data");
11
- var _blockEditor = require("@wordpress/block-editor");
12
11
  var _compose = require("@wordpress/compose");
13
12
  var _hooks = require("@wordpress/hooks");
14
13
  var _store = require("../../store");
@@ -34,12 +33,13 @@ function getContent() {
34
33
  }
35
34
  function CopyButton({
36
35
  text,
37
- children
36
+ children,
37
+ variant = 'secondary'
38
38
  }) {
39
39
  const ref = (0, _compose.useCopyToClipboard)(text);
40
40
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
41
41
  __next40pxDefaultSize: true,
42
- variant: "secondary",
42
+ variant: variant,
43
43
  ref: ref,
44
44
  children: children
45
45
  });
@@ -63,20 +63,33 @@ class ErrorBoundary extends _element.Component {
63
63
  const {
64
64
  error
65
65
  } = this.state;
66
+ const {
67
+ canCopyContent = false
68
+ } = this.props;
66
69
  if (!error) {
67
70
  return this.props.children;
68
71
  }
69
- const actions = [/*#__PURE__*/(0, _jsxRuntime.jsx)(CopyButton, {
70
- text: getContent,
71
- children: (0, _i18n.__)('Copy Post Text')
72
- }, "copy-post"), /*#__PURE__*/(0, _jsxRuntime.jsx)(CopyButton, {
73
- text: error.stack,
74
- children: (0, _i18n.__)('Copy Error')
75
- }, "copy-error")];
76
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_blockEditor.Warning, {
72
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.__experimentalHStack, {
77
73
  className: "editor-error-boundary",
78
- actions: actions,
79
- children: (0, _i18n.__)('The editor has encountered an unexpected error.')
74
+ alignment: "baseline",
75
+ spacing: 4,
76
+ justify: "space-between",
77
+ expanded: false,
78
+ wrap: true,
79
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalText, {
80
+ as: "p",
81
+ children: (0, _i18n.__)('The editor has encountered an unexpected error.')
82
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.__experimentalHStack, {
83
+ expanded: false,
84
+ children: [canCopyContent && /*#__PURE__*/(0, _jsxRuntime.jsx)(CopyButton, {
85
+ text: getContent,
86
+ children: (0, _i18n.__)('Copy contents')
87
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(CopyButton, {
88
+ variant: "primary",
89
+ text: error?.stack,
90
+ children: (0, _i18n.__)('Copy error')
91
+ })]
92
+ })]
80
93
  });
81
94
  }
82
95
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_i18n","_components","_data","_blockEditor","_compose","_hooks","_store","_jsxRuntime","getContent","select","editorStore","getEditedPostContent","error","CopyButton","text","children","ref","useCopyToClipboard","jsx","Button","__next40pxDefaultSize","variant","ErrorBoundary","Component","constructor","arguments","state","componentDidCatch","doAction","getDerivedStateFromError","render","props","actions","__","stack","Warning","className","_default","exports","default"],"sources":["@wordpress/editor/src/components/error-boundary/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { select } from '@wordpress/data';\nimport { Warning } from '@wordpress/block-editor';\nimport { useCopyToClipboard } from '@wordpress/compose';\nimport { doAction } from '@wordpress/hooks';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nfunction getContent() {\n\ttry {\n\t\t// While `select` in a component is generally discouraged, it is\n\t\t// used here because it (a) reduces the chance of data loss in the\n\t\t// case of additional errors by performing a direct retrieval and\n\t\t// (b) avoids the performance cost associated with unnecessary\n\t\t// content serialization throughout the lifetime of a non-erroring\n\t\t// application.\n\t\treturn select( editorStore ).getEditedPostContent();\n\t} catch ( error ) {}\n}\n\nfunction CopyButton( { text, children } ) {\n\tconst ref = useCopyToClipboard( text );\n\treturn (\n\t\t<Button __next40pxDefaultSize variant=\"secondary\" ref={ ref }>\n\t\t\t{ children }\n\t\t</Button>\n\t);\n}\n\nclass ErrorBoundary extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.state = {\n\t\t\terror: null,\n\t\t};\n\t}\n\n\tcomponentDidCatch( error ) {\n\t\tdoAction( 'editor.ErrorBoundary.errorLogged', error );\n\t}\n\n\tstatic getDerivedStateFromError( error ) {\n\t\treturn { error };\n\t}\n\n\trender() {\n\t\tconst { error } = this.state;\n\t\tif ( ! error ) {\n\t\t\treturn this.props.children;\n\t\t}\n\n\t\tconst actions = [\n\t\t\t<CopyButton key=\"copy-post\" text={ getContent }>\n\t\t\t\t{ __( 'Copy Post Text' ) }\n\t\t\t</CopyButton>,\n\t\t\t<CopyButton key=\"copy-error\" text={ error.stack }>\n\t\t\t\t{ __( 'Copy Error' ) }\n\t\t\t</CopyButton>,\n\t\t];\n\n\t\treturn (\n\t\t\t<Warning className=\"editor-error-boundary\" actions={ actions }>\n\t\t\t\t{ __( 'The editor has encountered an unexpected error.' ) }\n\t\t\t</Warning>\n\t\t);\n\t}\n}\n\n/**\n * ErrorBoundary is used to catch JavaScript errors anywhere in a child component tree, log those errors, and display a fallback UI.\n *\n * It uses the lifecycle methods getDerivedStateFromError and componentDidCatch to catch errors in a child component tree.\n *\n * getDerivedStateFromError is used to render a fallback UI after an error has been thrown, and componentDidCatch is used to log error information.\n *\n * @class ErrorBoundary\n * @augments Component\n */\nexport default ErrorBoundary;\n"],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AAKA,IAAAO,MAAA,GAAAP,OAAA;AAAmD,IAAAQ,WAAA,GAAAR,OAAA;AAdnD;AACA;AACA;;AASA;AACA;AACA;;AAGA,SAASS,UAAUA,CAAA,EAAG;EACrB,IAAI;IACH;IACA;IACA;IACA;IACA;IACA;IACA,OAAO,IAAAC,YAAM,EAAEC,YAAY,CAAC,CAACC,oBAAoB,CAAC,CAAC;EACpD,CAAC,CAAC,OAAQC,KAAK,EAAG,CAAC;AACpB;AAEA,SAASC,UAAUA,CAAE;EAAEC,IAAI;EAAEC;AAAS,CAAC,EAAG;EACzC,MAAMC,GAAG,GAAG,IAAAC,2BAAkB,EAAEH,IAAK,CAAC;EACtC,oBACC,IAAAP,WAAA,CAAAW,GAAA,EAACjB,WAAA,CAAAkB,MAAM;IAACC,qBAAqB;IAACC,OAAO,EAAC,WAAW;IAACL,GAAG,EAAGA,GAAK;IAAAD,QAAA,EAC1DA;EAAQ,CACH,CAAC;AAEX;AAEA,MAAMO,aAAa,SAASC,kBAAS,CAAC;EACrCC,WAAWA,CAAA,EAAG;IACb,KAAK,CAAE,GAAGC,SAAU,CAAC;IAErB,IAAI,CAACC,KAAK,GAAG;MACZd,KAAK,EAAE;IACR,CAAC;EACF;EAEAe,iBAAiBA,CAAEf,KAAK,EAAG;IAC1B,IAAAgB,eAAQ,EAAE,kCAAkC,EAAEhB,KAAM,CAAC;EACtD;EAEA,OAAOiB,wBAAwBA,CAAEjB,KAAK,EAAG;IACxC,OAAO;MAAEA;IAAM,CAAC;EACjB;EAEAkB,MAAMA,CAAA,EAAG;IACR,MAAM;MAAElB;IAAM,CAAC,GAAG,IAAI,CAACc,KAAK;IAC5B,IAAK,CAAEd,KAAK,EAAG;MACd,OAAO,IAAI,CAACmB,KAAK,CAAChB,QAAQ;IAC3B;IAEA,MAAMiB,OAAO,GAAG,cACf,IAAAzB,WAAA,CAAAW,GAAA,EAACL,UAAU;MAAiBC,IAAI,EAAGN,UAAY;MAAAO,QAAA,EAC5C,IAAAkB,QAAE,EAAE,gBAAiB;IAAC,GADT,WAEJ,CAAC,eACb,IAAA1B,WAAA,CAAAW,GAAA,EAACL,UAAU;MAAkBC,IAAI,EAAGF,KAAK,CAACsB,KAAO;MAAAnB,QAAA,EAC9C,IAAAkB,QAAE,EAAE,YAAa;IAAC,GADL,YAEJ,CAAC,CACb;IAED,oBACC,IAAA1B,WAAA,CAAAW,GAAA,EAACf,YAAA,CAAAgC,OAAO;MAACC,SAAS,EAAC,uBAAuB;MAACJ,OAAO,EAAGA,OAAS;MAAAjB,QAAA,EAC3D,IAAAkB,QAAE,EAAE,iDAAkD;IAAC,CACjD,CAAC;EAEZ;AACD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AATA,IAAAI,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAUejB,aAAa","ignoreList":[]}
1
+ {"version":3,"names":["_element","require","_i18n","_components","_data","_compose","_hooks","_store","_jsxRuntime","getContent","select","editorStore","getEditedPostContent","error","CopyButton","text","children","variant","ref","useCopyToClipboard","jsx","Button","__next40pxDefaultSize","ErrorBoundary","Component","constructor","arguments","state","componentDidCatch","doAction","getDerivedStateFromError","render","canCopyContent","props","jsxs","__experimentalHStack","className","alignment","spacing","justify","expanded","wrap","__experimentalText","as","__","stack","_default","exports","default"],"sources":["@wordpress/editor/src/components/error-boundary/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tButton,\n\t__experimentalHStack as HStack,\n\t__experimentalText as Text,\n} from '@wordpress/components';\nimport { select } from '@wordpress/data';\nimport { useCopyToClipboard } from '@wordpress/compose';\nimport { doAction } from '@wordpress/hooks';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nfunction getContent() {\n\ttry {\n\t\t// While `select` in a component is generally discouraged, it is\n\t\t// used here because it (a) reduces the chance of data loss in the\n\t\t// case of additional errors by performing a direct retrieval and\n\t\t// (b) avoids the performance cost associated with unnecessary\n\t\t// content serialization throughout the lifetime of a non-erroring\n\t\t// application.\n\t\treturn select( editorStore ).getEditedPostContent();\n\t} catch ( error ) {}\n}\n\nfunction CopyButton( { text, children, variant = 'secondary' } ) {\n\tconst ref = useCopyToClipboard( text );\n\treturn (\n\t\t<Button __next40pxDefaultSize variant={ variant } ref={ ref }>\n\t\t\t{ children }\n\t\t</Button>\n\t);\n}\n\nclass ErrorBoundary extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.state = {\n\t\t\terror: null,\n\t\t};\n\t}\n\n\tcomponentDidCatch( error ) {\n\t\tdoAction( 'editor.ErrorBoundary.errorLogged', error );\n\t}\n\n\tstatic getDerivedStateFromError( error ) {\n\t\treturn { error };\n\t}\n\n\trender() {\n\t\tconst { error } = this.state;\n\t\tconst { canCopyContent = false } = this.props;\n\t\tif ( ! error ) {\n\t\t\treturn this.props.children;\n\t\t}\n\n\t\treturn (\n\t\t\t<HStack\n\t\t\t\tclassName=\"editor-error-boundary\"\n\t\t\t\talignment=\"baseline\"\n\t\t\t\tspacing={ 4 }\n\t\t\t\tjustify=\"space-between\"\n\t\t\t\texpanded={ false }\n\t\t\t\twrap\n\t\t\t>\n\t\t\t\t<Text as=\"p\">\n\t\t\t\t\t{ __( 'The editor has encountered an unexpected error.' ) }\n\t\t\t\t</Text>\n\t\t\t\t<HStack expanded={ false }>\n\t\t\t\t\t{ canCopyContent && (\n\t\t\t\t\t\t<CopyButton text={ getContent }>\n\t\t\t\t\t\t\t{ __( 'Copy contents' ) }\n\t\t\t\t\t\t</CopyButton>\n\t\t\t\t\t) }\n\t\t\t\t\t<CopyButton variant=\"primary\" text={ error?.stack }>\n\t\t\t\t\t\t{ __( 'Copy error' ) }\n\t\t\t\t\t</CopyButton>\n\t\t\t\t</HStack>\n\t\t\t</HStack>\n\t\t);\n\t}\n}\n\n/**\n * ErrorBoundary is used to catch JavaScript errors anywhere in a child component tree, log those errors, and display a fallback UI.\n *\n * It uses the lifecycle methods getDerivedStateFromError and componentDidCatch to catch errors in a child component tree.\n *\n * getDerivedStateFromError is used to render a fallback UI after an error has been thrown, and componentDidCatch is used to log error information.\n *\n * @class ErrorBoundary\n * @augments Component\n */\nexport default ErrorBoundary;\n"],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAKA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AAKA,IAAAM,MAAA,GAAAN,OAAA;AAAmD,IAAAO,WAAA,GAAAP,OAAA;AAjBnD;AACA;AACA;;AAYA;AACA;AACA;;AAGA,SAASQ,UAAUA,CAAA,EAAG;EACrB,IAAI;IACH;IACA;IACA;IACA;IACA;IACA;IACA,OAAO,IAAAC,YAAM,EAAEC,YAAY,CAAC,CAACC,oBAAoB,CAAC,CAAC;EACpD,CAAC,CAAC,OAAQC,KAAK,EAAG,CAAC;AACpB;AAEA,SAASC,UAAUA,CAAE;EAAEC,IAAI;EAAEC,QAAQ;EAAEC,OAAO,GAAG;AAAY,CAAC,EAAG;EAChE,MAAMC,GAAG,GAAG,IAAAC,2BAAkB,EAAEJ,IAAK,CAAC;EACtC,oBACC,IAAAP,WAAA,CAAAY,GAAA,EAACjB,WAAA,CAAAkB,MAAM;IAACC,qBAAqB;IAACL,OAAO,EAAGA,OAAS;IAACC,GAAG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AA4B,QAAE,EAAE,eAAgB;QAAC,CACZ,CACZ,eACD,IAAApC,WAAA,CAAAY,GAAA,EAACN,UAAU;UAACG,OAAO,EAAC,SAAS;UAACF,IAAI,EAAGF,KAAK,EAAEgC,KAAO;UAAA7B,QAAA,EAChD,IAAA4B,QAAE,EAAE,YAAa;QAAC,CACT,CAAC;MAAA,CACN,CAAC;IAAA,CACF,CAAC;EAEX;AACD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AATA,IAAAE,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAUezB,aAAa","ignoreList":[]}
@@ -110,7 +110,7 @@ class ErrorBoundary extends _element.Component {
110
110
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
111
111
  style: iconContainerStyle,
112
112
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Icon, {
113
- icon: _icons.warning,
113
+ icon: _icons.cautionFilled,
114
114
  ..._style.default['error-boundary__icon']
115
115
  })
116
116
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNative","require","_clipboard","_interopRequireDefault","_reactNativeSafeAreaContext","_element","_i18n","_data","_reactNativeBridge","_compose","_icons","_components","_store","_style","_jsxRuntime","getContent","select","editorStore","getEditedPostContent","error","CopyButton","text","label","accessibilityLabel","accessibilityHint","secondary","containerStyle","usePreferredColorSchemeStyle","styles","containerSecondaryStyle","textStyle","textSecondaryStyle","jsx","TouchableOpacity","activeOpacity","style","accessibilityRole","onPress","Clipboard","setString","children","Text","ErrorBoundary","Component","constructor","arguments","state","componentDidCatch","logException","context","component_stack","componentStack","isHandled","handledBy","getDerivedStateFromError","render","props","getStylesFromColorScheme","iconContainerStyle","titleStyle","messageStyle","SafeAreaView","ScrollView","contentContainerStyle","jsxs","View","Icon","icon","warning","__","stack","_default","exports","default","withPreferredColorScheme"],"sources":["@wordpress/editor/src/components/error-boundary/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { ScrollView, Text, TouchableOpacity, View } from 'react-native';\nimport Clipboard from '@react-native-clipboard/clipboard';\nimport { SafeAreaView } from 'react-native-safe-area-context';\n\n/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { select } from '@wordpress/data';\nimport { logException } from '@wordpress/react-native-bridge';\nimport {\n\tusePreferredColorSchemeStyle,\n\twithPreferredColorScheme,\n} from '@wordpress/compose';\nimport { warning } from '@wordpress/icons';\nimport { Icon } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport styles from './style.scss';\n\nfunction getContent() {\n\ttry {\n\t\t// While `select` in a component is generally discouraged, it is\n\t\t// used here because it (a) reduces the chance of data loss in the\n\t\t// case of additional errors by performing a direct retrieval and\n\t\t// (b) avoids the performance cost associated with unnecessary\n\t\t// content serialization throughout the lifetime of a non-erroring\n\t\t// application.\n\t\treturn select( editorStore ).getEditedPostContent();\n\t} catch ( error ) {}\n}\n\nfunction CopyButton( {\n\ttext,\n\tlabel,\n\taccessibilityLabel,\n\taccessibilityHint,\n\tsecondary = false,\n} ) {\n\tconst containerStyle = usePreferredColorSchemeStyle(\n\t\tstyles[ 'copy-button__container' ],\n\t\tstyles[ 'copy-button__container--dark' ]\n\t);\n\n\tconst containerSecondaryStyle = usePreferredColorSchemeStyle(\n\t\tstyles[ 'copy-button__container--secondary' ],\n\t\tstyles[ 'copy-button__container--secondary-dark' ]\n\t);\n\n\tconst textStyle = usePreferredColorSchemeStyle(\n\t\tstyles[ 'copy-button__text' ],\n\t\tstyles[ 'copy-button__text--dark' ]\n\t);\n\n\tconst textSecondaryStyle = usePreferredColorSchemeStyle(\n\t\tstyles[ 'copy-button__text--secondary' ],\n\t\tstyles[ 'copy-button__text--secondary-dark' ]\n\t);\n\n\treturn (\n\t\t<TouchableOpacity\n\t\t\tactiveOpacity={ 0.5 }\n\t\t\taccessibilityLabel={ accessibilityLabel }\n\t\t\tstyle={ [ containerStyle, secondary && containerSecondaryStyle ] }\n\t\t\taccessibilityRole=\"button\"\n\t\t\taccessibilityHint={ accessibilityHint }\n\t\t\tonPress={ () => {\n\t\t\t\tClipboard.setString(\n\t\t\t\t\ttypeof text === 'function' ? text() : text || ''\n\t\t\t\t);\n\t\t\t} }\n\t\t>\n\t\t\t<Text style={ [ textStyle, secondary && textSecondaryStyle ] }>\n\t\t\t\t{ label }\n\t\t\t</Text>\n\t\t</TouchableOpacity>\n\t);\n}\n\nclass ErrorBoundary extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.state = {\n\t\t\terror: null,\n\t\t};\n\t}\n\n\tcomponentDidCatch( error ) {\n\t\tlogException( error, {\n\t\t\tcontext: {\n\t\t\t\tcomponent_stack: error.componentStack,\n\t\t\t},\n\t\t\tisHandled: true,\n\t\t\thandledBy: 'Editor-level Error Boundary',\n\t\t} );\n\t}\n\n\tstatic getDerivedStateFromError( error ) {\n\t\treturn { error };\n\t}\n\n\trender() {\n\t\tconst { error } = this.state;\n\t\tif ( ! error ) {\n\t\t\treturn this.props.children;\n\t\t}\n\n\t\tconst { getStylesFromColorScheme } = this.props;\n\n\t\tconst iconContainerStyle = getStylesFromColorScheme(\n\t\t\tstyles[ 'error-boundary__icon-container' ],\n\t\t\tstyles[ 'error-boundary__icon-container--dark' ]\n\t\t);\n\n\t\tconst titleStyle = getStylesFromColorScheme(\n\t\t\tstyles[ 'error-boundary__title' ],\n\t\t\tstyles[ 'error-boundary__title--dark' ]\n\t\t);\n\n\t\tconst messageStyle = getStylesFromColorScheme(\n\t\t\tstyles[ 'error-boundary__message' ],\n\t\t\tstyles[ 'error-boundary__message--dark' ]\n\t\t);\n\n\t\treturn (\n\t\t\t<SafeAreaView>\n\t\t\t\t<ScrollView\n\t\t\t\t\tstyle={ styles[ 'error-boundary__scroll' ] }\n\t\t\t\t\tcontentContainerStyle={\n\t\t\t\t\t\tstyles[ 'error-boundary__scroll-container' ]\n\t\t\t\t\t}\n\t\t\t\t>\n\t\t\t\t\t<View style={ styles[ 'error-boundary__container' ] }>\n\t\t\t\t\t\t<View style={ iconContainerStyle }>\n\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\ticon={ warning }\n\t\t\t\t\t\t\t\t{ ...styles[ 'error-boundary__icon' ] }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</View>\n\t\t\t\t\t\t<Text style={ titleStyle }>\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'The editor has encountered an unexpected error'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t<Text style={ messageStyle }>\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'You can copy your post text in case your content is impacted. Copy error details to debug and share with support.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t<View\n\t\t\t\t\t\t\tstyle={\n\t\t\t\t\t\t\t\tstyles[ 'error-boundary__actions-container' ]\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<CopyButton\n\t\t\t\t\t\t\t\tlabel={ __( 'Copy post text' ) }\n\t\t\t\t\t\t\t\taccessibilityLabel={ __(\n\t\t\t\t\t\t\t\t\t'Button to copy post text'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\taccessibilityHint={ __(\n\t\t\t\t\t\t\t\t\t'Tap here to copy post text'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\ttext={ getContent }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<CopyButton\n\t\t\t\t\t\t\t\tlabel={ __( 'Copy error details' ) }\n\t\t\t\t\t\t\t\taccessibilityLabel={ __(\n\t\t\t\t\t\t\t\t\t'Button to copy error details'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\taccessibilityHint={ __(\n\t\t\t\t\t\t\t\t\t'Tap here to copy error details'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\ttext={ error.stack }\n\t\t\t\t\t\t\t\tsecondary\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</View>\n\t\t\t\t\t</View>\n\t\t\t\t</ScrollView>\n\t\t\t</SafeAreaView>\n\t\t);\n\t}\n}\n\nexport default withPreferredColorScheme( ErrorBoundary );\n"],"mappings":";;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,2BAAA,GAAAH,OAAA;AAKA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,KAAA,GAAAN,OAAA;AACA,IAAAO,kBAAA,GAAAP,OAAA;AACA,IAAAQ,QAAA,GAAAR,OAAA;AAIA,IAAAS,MAAA,GAAAT,OAAA;AACA,IAAAU,WAAA,GAAAV,OAAA;AAKA,IAAAW,MAAA,GAAAX,OAAA;AACA,IAAAY,MAAA,GAAAV,sBAAA,CAAAF,OAAA;AAAkC,IAAAa,WAAA,GAAAb,OAAA;AAzBlC;AACA;AACA;;AAKA;AACA;AACA;;AAYA;AACA;AACA;;AAIA,SAASc,UAAUA,CAAA,EAAG;EACrB,IAAI;IACH;IACA;IACA;IACA;IACA;IACA;IACA,OAAO,IAAAC,YAAM,EAAEC,YAAY,CAAC,CAACC,oBAAoB,CAAC,CAAC;EACpD,CAAC,CAAC,OAAQC,KAAK,EAAG,CAAC;AACpB;AAEA,SAASC,UAAUA,CAAE;EACpBC,IAAI;EACJC,KAAK;EACLC,kBAAkB;EAClBC,iBAAiB;EACjBC,SAAS,GAAG;AACb,CAAC,EAAG;EACH,MAAMC,cAAc,GAAG,IAAAC,qCAA4B,EAClDC,cAAM,CAAE,wBAAwB,CAAE,EAClCA,cAAM,CAAE,8BAA8B,CACvC,CAAC;EAED,MAAMC,uBAAuB,GAAG,IAAAF,qCAA4B,EAC3DC,c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
+ {"version":3,"names":["_reactNative","require","_clipboard","_interopRequireDefault","_reactNativeSafeAreaContext","_element","_i18n","_data","_reactNativeBridge","_compose","_icons","_components","_store","_style","_jsxRuntime","getContent","select","editorStore","getEditedPostContent","error","CopyButton","text","label","accessibilityLabel","accessibilityHint","secondary","containerStyle","usePreferredColorSchemeStyle","styles","containerSecondaryStyle","textStyle","textSecondaryStyle","jsx","TouchableOpacity","activeOpacity","style","accessibilityRole","onPress","Clipboard","setString","children","Text","ErrorBoundary","Component","constructor","arguments","state","componentDidCatch","logException","context","component_stack","componentStack","isHandled","handledBy","getDerivedStateFromError","render","props","getStylesFromColorScheme","iconContainerStyle","titleStyle","messageStyle","SafeAreaView","ScrollView","contentContainerStyle","jsxs","View","Icon","icon","cautionFilled","__","stack","_default","exports","default","withPreferredColorScheme"],"sources":["@wordpress/editor/src/components/error-boundary/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { ScrollView, Text, TouchableOpacity, View } from 'react-native';\nimport Clipboard from '@react-native-clipboard/clipboard';\nimport { SafeAreaView } from 'react-native-safe-area-context';\n\n/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { select } from '@wordpress/data';\nimport { logException } from '@wordpress/react-native-bridge';\nimport {\n\tusePreferredColorSchemeStyle,\n\twithPreferredColorScheme,\n} from '@wordpress/compose';\nimport { cautionFilled } from '@wordpress/icons';\nimport { Icon } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport styles from './style.scss';\n\nfunction getContent() {\n\ttry {\n\t\t// While `select` in a component is generally discouraged, it is\n\t\t// used here because it (a) reduces the chance of data loss in the\n\t\t// case of additional errors by performing a direct retrieval and\n\t\t// (b) avoids the performance cost associated with unnecessary\n\t\t// content serialization throughout the lifetime of a non-erroring\n\t\t// application.\n\t\treturn select( editorStore ).getEditedPostContent();\n\t} catch ( error ) {}\n}\n\nfunction CopyButton( {\n\ttext,\n\tlabel,\n\taccessibilityLabel,\n\taccessibilityHint,\n\tsecondary = false,\n} ) {\n\tconst containerStyle = usePreferredColorSchemeStyle(\n\t\tstyles[ 'copy-button__container' ],\n\t\tstyles[ 'copy-button__container--dark' ]\n\t);\n\n\tconst containerSecondaryStyle = usePreferredColorSchemeStyle(\n\t\tstyles[ 'copy-button__container--secondary' ],\n\t\tstyles[ 'copy-button__container--secondary-dark' ]\n\t);\n\n\tconst textStyle = usePreferredColorSchemeStyle(\n\t\tstyles[ 'copy-button__text' ],\n\t\tstyles[ 'copy-button__text--dark' ]\n\t);\n\n\tconst textSecondaryStyle = usePreferredColorSchemeStyle(\n\t\tstyles[ 'copy-button__text--secondary' ],\n\t\tstyles[ 'copy-button__text--secondary-dark' ]\n\t);\n\n\treturn (\n\t\t<TouchableOpacity\n\t\t\tactiveOpacity={ 0.5 }\n\t\t\taccessibilityLabel={ accessibilityLabel }\n\t\t\tstyle={ [ containerStyle, secondary && containerSecondaryStyle ] }\n\t\t\taccessibilityRole=\"button\"\n\t\t\taccessibilityHint={ accessibilityHint }\n\t\t\tonPress={ () => {\n\t\t\t\tClipboard.setString(\n\t\t\t\t\ttypeof text === 'function' ? text() : text || ''\n\t\t\t\t);\n\t\t\t} }\n\t\t>\n\t\t\t<Text style={ [ textStyle, secondary && textSecondaryStyle ] }>\n\t\t\t\t{ label }\n\t\t\t</Text>\n\t\t</TouchableOpacity>\n\t);\n}\n\nclass ErrorBoundary extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.state = {\n\t\t\terror: null,\n\t\t};\n\t}\n\n\tcomponentDidCatch( error ) {\n\t\tlogException( error, {\n\t\t\tcontext: {\n\t\t\t\tcomponent_stack: error.componentStack,\n\t\t\t},\n\t\t\tisHandled: true,\n\t\t\thandledBy: 'Editor-level Error Boundary',\n\t\t} );\n\t}\n\n\tstatic getDerivedStateFromError( error ) {\n\t\treturn { error };\n\t}\n\n\trender() {\n\t\tconst { error } = this.state;\n\t\tif ( ! error ) {\n\t\t\treturn this.props.children;\n\t\t}\n\n\t\tconst { getStylesFromColorScheme } = this.props;\n\n\t\tconst iconContainerStyle = getStylesFromColorScheme(\n\t\t\tstyles[ 'error-boundary__icon-container' ],\n\t\t\tstyles[ 'error-boundary__icon-container--dark' ]\n\t\t);\n\n\t\tconst titleStyle = getStylesFromColorScheme(\n\t\t\tstyles[ 'error-boundary__title' ],\n\t\t\tstyles[ 'error-boundary__title--dark' ]\n\t\t);\n\n\t\tconst messageStyle = getStylesFromColorScheme(\n\t\t\tstyles[ 'error-boundary__message' ],\n\t\t\tstyles[ 'error-boundary__message--dark' ]\n\t\t);\n\n\t\treturn (\n\t\t\t<SafeAreaView>\n\t\t\t\t<ScrollView\n\t\t\t\t\tstyle={ styles[ 'error-boundary__scroll' ] }\n\t\t\t\t\tcontentContainerStyle={\n\t\t\t\t\t\tstyles[ 'error-boundary__scroll-container' ]\n\t\t\t\t\t}\n\t\t\t\t>\n\t\t\t\t\t<View style={ styles[ 'error-boundary__container' ] }>\n\t\t\t\t\t\t<View style={ iconContainerStyle }>\n\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\ticon={ cautionFilled }\n\t\t\t\t\t\t\t\t{ ...styles[ 'error-boundary__icon' ] }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</View>\n\t\t\t\t\t\t<Text style={ titleStyle }>\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'The editor has encountered an unexpected error'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t<Text style={ messageStyle }>\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'You can copy your post text in case your content is impacted. Copy error details to debug and share with support.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t<View\n\t\t\t\t\t\t\tstyle={\n\t\t\t\t\t\t\t\tstyles[ 'error-boundary__actions-container' ]\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<CopyButton\n\t\t\t\t\t\t\t\tlabel={ __( 'Copy post text' ) }\n\t\t\t\t\t\t\t\taccessibilityLabel={ __(\n\t\t\t\t\t\t\t\t\t'Button to copy post text'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\taccessibilityHint={ __(\n\t\t\t\t\t\t\t\t\t'Tap here to copy post text'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\ttext={ getContent }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<CopyButton\n\t\t\t\t\t\t\t\tlabel={ __( 'Copy error details' ) }\n\t\t\t\t\t\t\t\taccessibilityLabel={ __(\n\t\t\t\t\t\t\t\t\t'Button to copy error details'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\taccessibilityHint={ __(\n\t\t\t\t\t\t\t\t\t'Tap here to copy error details'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\ttext={ error.stack }\n\t\t\t\t\t\t\t\tsecondary\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</View>\n\t\t\t\t\t</View>\n\t\t\t\t</ScrollView>\n\t\t\t</SafeAreaView>\n\t\t);\n\t}\n}\n\nexport default withPreferredColorScheme( ErrorBoundary );\n"],"mappings":";;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,2BAAA,GAAAH,OAAA;AAKA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,KAAA,GAAAN,OAAA;AACA,IAAAO,kBAAA,GAAAP,OAAA;AACA,IAAAQ,QAAA,GAAAR,OAAA;AAIA,IAAAS,MAAA,GAAAT,OAAA;AACA,IAAAU,WAAA,GAAAV,OAAA;AAKA,IAAAW,MAAA,GAAAX,OAAA;AACA,IAAAY,MAAA,GAAAV,sBAAA,CAAAF,OAAA;AA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EACtB,0BACD,CAAG;cACH7C,iBAAiB,EAAG,IAAA6C,QAAE,EACrB,4BACD,CAAG;cACHhD,IAAI,EAAGN;YAAY,CACnB,CAAC,eACF,IAAAD,WAAA,CAAAkB,GAAA,EAACZ,UAAU;cACVE,KAAK,EAAG,IAAA+C,QAAE,EAAE,oBAAqB,CAAG;cACpC9C,kBAAkB,EAAG,IAAA8C,QAAE,EACtB,8BACD,CAAG;cACH7C,iBAAiB,EAAG,IAAA6C,QAAE,EACrB,gCACD,CAAG;cACHhD,IAAI,EAAGF,KAAK,CAACmD,KAAO;cACpB7C,SAAS;YAAA,CACT,CAAC;UAAA,CACG,CAAC;QAAA,CACF;MAAC,CACI;IAAC,CACA,CAAC;EAEjB;AACD;AAAC,IAAA8C,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEc,IAAAC,iCAAwB,EAAEhC,aAAc,CAAC","ignoreList":[]}
@@ -1,3 +1,4 @@
1
+ /* wp:polyfill */
1
2
  "use strict";
2
3
 
3
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_components","_i18n","_keyboardShortcuts","_data","_interface","_config","_shortcut","_dynamicShortcut","_jsxRuntime","KEYBOARD_SHORTCUT_HELP_MODAL_NAME","ShortcutList","shortcuts","jsx","className","role","children","map","shortcut","index","default","name","ShortcutSection","title","jsxs","clsx","ShortcutCategorySection","categoryName","additionalShortcuts","categoryShortcuts","useSelect","select","keyboardShortcutsStore","getCategoryShortcuts","concat","KeyboardShortcutHelpModal","isModalActive","interfaceStore","openModal","closeModal","useDispatch","toggleModal","useShortcut","Modal","__","closeButtonLabel","onRequestClose","keyCombination","character","description","ariaLabel","textFormattingShortcuts","_default","exports"],"sources":["@wordpress/editor/src/components/keyboard-shortcut-help-modal/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { Modal } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tuseShortcut,\n\tstore as keyboardShortcutsStore,\n} from '@wordpress/keyboard-shortcuts';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { store as interfaceStore } from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport { textFormattingShortcuts } from './config';\nimport Shortcut from './shortcut';\nimport DynamicShortcut from './dynamic-shortcut';\n\nconst KEYBOARD_SHORTCUT_HELP_MODAL_NAME = 'editor/keyboard-shortcut-help';\n\nconst ShortcutList = ( { shortcuts } ) => (\n\t/*\n\t * Disable reason: The `list` ARIA role is redundant but\n\t * Safari+VoiceOver won't announce the list otherwise.\n\t */\n\t/* eslint-disable jsx-a11y/no-redundant-roles */\n\t<ul\n\t\tclassName=\"editor-keyboard-shortcut-help-modal__shortcut-list\"\n\t\trole=\"list\"\n\t>\n\t\t{ shortcuts.map( ( shortcut, index ) => (\n\t\t\t<li\n\t\t\t\tclassName=\"editor-keyboard-shortcut-help-modal__shortcut\"\n\t\t\t\tkey={ index }\n\t\t\t>\n\t\t\t\t{ typeof shortcut === 'string' ? (\n\t\t\t\t\t<DynamicShortcut name={ shortcut } />\n\t\t\t\t) : (\n\t\t\t\t\t<Shortcut { ...shortcut } />\n\t\t\t\t) }\n\t\t\t</li>\n\t\t) ) }\n\t</ul>\n\t/* eslint-enable jsx-a11y/no-redundant-roles */\n);\n\nconst ShortcutSection = ( { title, shortcuts, className } ) => (\n\t<section\n\t\tclassName={ clsx(\n\t\t\t'editor-keyboard-shortcut-help-modal__section',\n\t\t\tclassName\n\t\t) }\n\t>\n\t\t{ !! title && (\n\t\t\t<h2 className=\"editor-keyboard-shortcut-help-modal__section-title\">\n\t\t\t\t{ title }\n\t\t\t</h2>\n\t\t) }\n\t\t<ShortcutList shortcuts={ shortcuts } />\n\t</section>\n);\n\nconst ShortcutCategorySection = ( {\n\ttitle,\n\tcategoryName,\n\tadditionalShortcuts = [],\n} ) => {\n\tconst categoryShortcuts = useSelect(\n\t\t( select ) => {\n\t\t\treturn select( keyboardShortcutsStore ).getCategoryShortcuts(\n\t\t\t\tcategoryName\n\t\t\t);\n\t\t},\n\t\t[ categoryName ]\n\t);\n\n\treturn (\n\t\t<ShortcutSection\n\t\t\ttitle={ title }\n\t\t\tshortcuts={ categoryShortcuts.concat( additionalShortcuts ) }\n\t\t/>\n\t);\n};\n\nfunction KeyboardShortcutHelpModal() {\n\tconst isModalActive = useSelect(\n\t\t( select ) =>\n\t\t\tselect( interfaceStore ).isModalActive(\n\t\t\t\tKEYBOARD_SHORTCUT_HELP_MODAL_NAME\n\t\t\t),\n\t\t[]\n\t);\n\tconst { openModal, closeModal } = useDispatch( interfaceStore );\n\tconst toggleModal = () => {\n\t\tif ( isModalActive ) {\n\t\t\tcloseModal();\n\t\t} else {\n\t\t\topenModal( KEYBOARD_SHORTCUT_HELP_MODAL_NAME );\n\t\t}\n\t};\n\tuseShortcut( 'core/editor/keyboard-shortcuts', toggleModal );\n\n\tif ( ! isModalActive ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Modal\n\t\t\tclassName=\"editor-keyboard-shortcut-help-modal\"\n\t\t\ttitle={ __( 'Keyboard shortcuts' ) }\n\t\t\tcloseButtonLabel={ __( 'Close' ) }\n\t\t\tonRequestClose={ toggleModal }\n\t\t>\n\t\t\t<ShortcutSection\n\t\t\t\tclassName=\"editor-keyboard-shortcut-help-modal__main-shortcuts\"\n\t\t\t\tshortcuts={ [ 'core/editor/keyboard-shortcuts' ] }\n\t\t\t/>\n\t\t\t<ShortcutCategorySection\n\t\t\t\ttitle={ __( 'Global shortcuts' ) }\n\t\t\t\tcategoryName=\"global\"\n\t\t\t/>\n\n\t\t\t<ShortcutCategorySection\n\t\t\t\ttitle={ __( 'Selection shortcuts' ) }\n\t\t\t\tcategoryName=\"selection\"\n\t\t\t/>\n\n\t\t\t<ShortcutCategorySection\n\t\t\t\ttitle={ __( 'Block shortcuts' ) }\n\t\t\t\tcategoryName=\"block\"\n\t\t\t\tadditionalShortcuts={ [\n\t\t\t\t\t{\n\t\t\t\t\t\tkeyCombination: { character: '/' },\n\t\t\t\t\t\tdescription: __(\n\t\t\t\t\t\t\t'Change the block type after adding a new paragraph.'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t/* translators: The forward-slash character. e.g. '/'. */\n\t\t\t\t\t\tariaLabel: __( 'Forward-slash' ),\n\t\t\t\t\t},\n\t\t\t\t] }\n\t\t\t/>\n\t\t\t<ShortcutSection\n\t\t\t\ttitle={ __( 'Text formatting' ) }\n\t\t\t\tshortcuts={ textFormattingShortcuts }\n\t\t\t/>\n\t\t\t<ShortcutCategorySection\n\t\t\t\ttitle={ __( 'List View shortcuts' ) }\n\t\t\t\tcategoryName=\"list-view\"\n\t\t\t/>\n\t\t</Modal>\n\t);\n}\n\nexport default KeyboardShortcutHelpModal;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,kBAAA,GAAAH,OAAA;AAIA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AAKA,IAAAM,OAAA,GAAAN,OAAA;AACA,IAAAO,SAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,gBAAA,GAAAT,sBAAA,CAAAC,OAAA;AAAiD,IAAAS,WAAA,GAAAT,OAAA;AAtBjD;AACA;AACA;;AAGA;AACA;AACA;;AAUA;AACA;AACA;;AAKA,MAAMU,iCAAiC,GAAG,+BAA+B;AAEzE,MAAMC,YAAY,GAAGA,CAAE;EAAEC;AAAU,CAAC;AAAA;AACnC;AACD;AACA;AACA;AACC;AACA,IAAAH,WAAA,CAAAI,GAAA;EACCC,SAAS,EAAC,oDAAoD;EAC9DC,IAAI,EAAC,MAAM;EAAAC,QAAA,EAETJ,SAAS,CAACK,GAAG,CAAE,CAAEC,QAAQ,EAAEC,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MACjCjB,YAAY,EAAC,OAAO;MACpBC,mBAAmB,EAAG,CACrB;QACCmB,cAAc,EAAE;UAAEC,SAAS,EAAE;QAAI,CAAC;QAClCC,WAAW,EAAE,IAAAL,QAAE,EACd,qDACD,CAAC;QACD;QACAM,SAAS,EAAE,IAAAN,QAAE,EAAE,eAAgB;MAChC,CAAC;IACC,CACH,CAAC,eACF,IAAAnC,WAAA,CAAAI,GAAA,EAACS,eAAe;MACfC,KAAK,EAAG,IAAAqB,QAAE,EAAE,iBAAkB,CAAG;MACjChC,SAAS,EAAGuC;IAAyB,CACrC,CAAC,eACF,IAAA1C,WAAA,CAAAI,GAAA,EAACa,uBAAuB;MACvBH,KAAK,EAAG,IAAAqB,QAAE,EAAE,qBAAsB,CAAG;MACrCjB,YAAY,EAAC;IAAW,CACxB,CAAC;EAAA,CACI,CAAC;AAEV;AAAC,IAAAyB,QAAA,GAAAC,OAAA,CAAAjC,OAAA,GAEce,yBAAyB","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_components","_i18n","_keyboardShortcuts","_data","_interface","_config","_shortcut","_dynamicShortcut","_jsxRuntime","KEYBOARD_SHORTCUT_HELP_MODAL_NAME","ShortcutList","shortcuts","jsx","className","role","children","map","shortcut","index","default","name","ShortcutSection","title","jsxs","clsx","ShortcutCategorySection","categoryName","additionalShortcuts","categoryShortcuts","useSelect","select","keyboardShortcutsStore","getCategoryShortcuts","concat","KeyboardShortcutHelpModal","isModalActive","interfaceStore","openModal","closeModal","useDispatch","toggleModal","useShortcut","Modal","__","closeButtonLabel","onRequestClose","keyCombination","character","description","ariaLabel","textFormattingShortcuts","_default","exports"],"sources":["@wordpress/editor/src/components/keyboard-shortcut-help-modal/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { Modal } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tuseShortcut,\n\tstore as keyboardShortcutsStore,\n} from '@wordpress/keyboard-shortcuts';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { store as interfaceStore } from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport { textFormattingShortcuts } from './config';\nimport Shortcut from './shortcut';\nimport DynamicShortcut from './dynamic-shortcut';\n\nconst KEYBOARD_SHORTCUT_HELP_MODAL_NAME = 'editor/keyboard-shortcut-help';\n\nconst ShortcutList = ( { shortcuts } ) => (\n\t/*\n\t * Disable reason: The `list` ARIA role is redundant but\n\t * Safari+VoiceOver won't announce the list otherwise.\n\t */\n\t/* eslint-disable jsx-a11y/no-redundant-roles */\n\t<ul\n\t\tclassName=\"editor-keyboard-shortcut-help-modal__shortcut-list\"\n\t\trole=\"list\"\n\t>\n\t\t{ shortcuts.map( ( shortcut, index ) => (\n\t\t\t<li\n\t\t\t\tclassName=\"editor-keyboard-shortcut-help-modal__shortcut\"\n\t\t\t\tkey={ index }\n\t\t\t>\n\t\t\t\t{ typeof shortcut === 'string' ? (\n\t\t\t\t\t<DynamicShortcut name={ shortcut } />\n\t\t\t\t) : (\n\t\t\t\t\t<Shortcut { ...shortcut } />\n\t\t\t\t) }\n\t\t\t</li>\n\t\t) ) }\n\t</ul>\n\t/* eslint-enable jsx-a11y/no-redundant-roles */\n);\n\nconst ShortcutSection = ( { title, shortcuts, className } ) => (\n\t<section\n\t\tclassName={ clsx(\n\t\t\t'editor-keyboard-shortcut-help-modal__section',\n\t\t\tclassName\n\t\t) }\n\t>\n\t\t{ !! title && (\n\t\t\t<h2 className=\"editor-keyboard-shortcut-help-modal__section-title\">\n\t\t\t\t{ title }\n\t\t\t</h2>\n\t\t) }\n\t\t<ShortcutList shortcuts={ shortcuts } />\n\t</section>\n);\n\nconst ShortcutCategorySection = ( {\n\ttitle,\n\tcategoryName,\n\tadditionalShortcuts = [],\n} ) => {\n\tconst categoryShortcuts = useSelect(\n\t\t( select ) => {\n\t\t\treturn select( keyboardShortcutsStore ).getCategoryShortcuts(\n\t\t\t\tcategoryName\n\t\t\t);\n\t\t},\n\t\t[ categoryName ]\n\t);\n\n\treturn (\n\t\t<ShortcutSection\n\t\t\ttitle={ title }\n\t\t\tshortcuts={ categoryShortcuts.concat( additionalShortcuts ) }\n\t\t/>\n\t);\n};\n\nfunction KeyboardShortcutHelpModal() {\n\tconst isModalActive = useSelect(\n\t\t( select ) =>\n\t\t\tselect( interfaceStore ).isModalActive(\n\t\t\t\tKEYBOARD_SHORTCUT_HELP_MODAL_NAME\n\t\t\t),\n\t\t[]\n\t);\n\tconst { openModal, closeModal } = useDispatch( interfaceStore );\n\tconst toggleModal = () => {\n\t\tif ( isModalActive ) {\n\t\t\tcloseModal();\n\t\t} else {\n\t\t\topenModal( KEYBOARD_SHORTCUT_HELP_MODAL_NAME );\n\t\t}\n\t};\n\tuseShortcut( 'core/editor/keyboard-shortcuts', toggleModal );\n\n\tif ( ! isModalActive ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Modal\n\t\t\tclassName=\"editor-keyboard-shortcut-help-modal\"\n\t\t\ttitle={ __( 'Keyboard shortcuts' ) }\n\t\t\tcloseButtonLabel={ __( 'Close' ) }\n\t\t\tonRequestClose={ toggleModal }\n\t\t>\n\t\t\t<ShortcutSection\n\t\t\t\tclassName=\"editor-keyboard-shortcut-help-modal__main-shortcuts\"\n\t\t\t\tshortcuts={ [ 'core/editor/keyboard-shortcuts' ] }\n\t\t\t/>\n\t\t\t<ShortcutCategorySection\n\t\t\t\ttitle={ __( 'Global shortcuts' ) }\n\t\t\t\tcategoryName=\"global\"\n\t\t\t/>\n\n\t\t\t<ShortcutCategorySection\n\t\t\t\ttitle={ __( 'Selection shortcuts' ) }\n\t\t\t\tcategoryName=\"selection\"\n\t\t\t/>\n\n\t\t\t<ShortcutCategorySection\n\t\t\t\ttitle={ __( 'Block shortcuts' ) }\n\t\t\t\tcategoryName=\"block\"\n\t\t\t\tadditionalShortcuts={ [\n\t\t\t\t\t{\n\t\t\t\t\t\tkeyCombination: { character: '/' },\n\t\t\t\t\t\tdescription: __(\n\t\t\t\t\t\t\t'Change the block type after adding a new paragraph.'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t/* translators: The forward-slash character. e.g. '/'. */\n\t\t\t\t\t\tariaLabel: __( 'Forward-slash' ),\n\t\t\t\t\t},\n\t\t\t\t] }\n\t\t\t/>\n\t\t\t<ShortcutSection\n\t\t\t\ttitle={ __( 'Text formatting' ) }\n\t\t\t\tshortcuts={ textFormattingShortcuts }\n\t\t\t/>\n\t\t\t<ShortcutCategorySection\n\t\t\t\ttitle={ __( 'List View shortcuts' ) }\n\t\t\t\tcategoryName=\"list-view\"\n\t\t\t/>\n\t\t</Modal>\n\t);\n}\n\nexport default KeyboardShortcutHelpModal;\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,kBAAA,GAAAH,OAAA;AAIA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AAKA,IAAAM,OAAA,GAAAN,OAAA;AACA,IAAAO,SAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,gBAAA,GAAAT,sBAAA,CAAAC,OAAA;AAAiD,IAAAS,WAAA,GAAAT,OAAA;AAtBjD;AACA;AACA;;AAGA;AACA;AACA;;AAUA;AACA;AACA;;AAKA,MAAMU,iCAAiC,GAAG,+BAA+B;AAEzE,MAAMC,YAAY,GAAGA,CAAE;EAAEC;AAAU,CAAC;AAAA;AACnC;AACD;AACA;AACA;AACC;AACA,IAAAH,WAAA,CAAAI,GAAA;EACCC,SAAS,EAAC,oDAAoD;EAC9DC,IAAI,EAAC,MAAM;EAAAC,QAAA,EAETJ,SAAS,CAACK,GAAG,CAAE,CAAEC,QAAQ,EAAEC,KAAK,kBACjC,IAAAV,WAAA,CAAAI,GAAA;IACCC,SAAS,EAAC,+CAA+C;IAA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AE;UAAEC,SAAS,EAAE;QAAI,CAAC;QAClCC,WAAW,EAAE,IAAAL,QAAE,EACd,qDACD,CAAC;QACD;QACAM,SAAS,EAAE,IAAAN,QAAE,EAAE,eAAgB;MAChC,CAAC;IACC,CACH,CAAC,eACF,IAAAnC,WAAA,CAAAI,GAAA,EAACS,eAAe;MACfC,KAAK,EAAG,IAAAqB,QAAE,EAAE,iBAAkB,CAAG;MACjChC,SAAS,EAAGuC;IAAyB,CACrC,CAAC,eACF,IAAA1C,WAAA,CAAAI,GAAA,EAACa,uBAAuB;MACvBH,KAAK,EAAG,IAAAqB,QAAE,EAAE,qBAAsB,CAAG;MACrCjB,YAAY,EAAC;IAAW,CACxB,CAAC;EAAA,CACI,CAAC;AAEV;AAAC,IAAAyB,QAAA,GAAAC,OAAA,CAAAjC,OAAA,GAEce,yBAAyB","ignoreList":[]}
@@ -1,3 +1,4 @@
1
+ /* wp:polyfill */
1
2
  "use strict";
2
3
 
3
4
  Object.defineProperty(exports, "__esModule", {
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_keycodes","_jsxRuntime","KeyCombination","keyCombination","forceAriaLabel","shortcut","modifier","displayShortcutList","character","ariaLabel","shortcutAriaLabel","jsx","className","children","Array","isArray","map","index","Fragment","Shortcut","description","aliases","jsxs","alias","_default","exports","default"],"sources":["@wordpress/editor/src/components/keyboard-shortcut-help-modal/shortcut.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Fragment } from '@wordpress/element';\nimport { displayShortcutList, shortcutAriaLabel } from '@wordpress/keycodes';\n\nfunction KeyCombination( { keyCombination, forceAriaLabel } ) {\n\tconst shortcut = keyCombination.modifier\n\t\t? displayShortcutList[ keyCombination.modifier ](\n\t\t\t\tkeyCombination.character\n\t\t )\n\t\t: keyCombination.character;\n\tconst ariaLabel = keyCombination.modifier\n\t\t? shortcutAriaLabel[ keyCombination.modifier ](\n\t\t\t\tkeyCombination.character\n\t\t )\n\t\t: keyCombination.character;\n\n\treturn (\n\t\t<kbd\n\t\t\tclassName=\"editor-keyboard-shortcut-help-modal__shortcut-key-combination\"\n\t\t\taria-label={ forceAriaLabel || ariaLabel }\n\t\t>\n\t\t\t{ ( Array.isArray( shortcut ) ? shortcut : [ shortcut ] ).map(\n\t\t\t\t( character, index ) => {\n\t\t\t\t\tif ( character === '+' ) {\n\t\t\t\t\t\treturn <Fragment key={ index }>{ character }</Fragment>;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<kbd\n\t\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\t\tclassName=\"editor-keyboard-shortcut-help-modal__shortcut-key\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ character }\n\t\t\t\t\t\t</kbd>\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t) }\n\t\t</kbd>\n\t);\n}\n\nfunction Shortcut( { description, keyCombination, aliases = [], ariaLabel } ) {\n\treturn (\n\t\t<>\n\t\t\t<div className=\"editor-keyboard-shortcut-help-modal__shortcut-description\">\n\t\t\t\t{ description }\n\t\t\t</div>\n\t\t\t<div className=\"editor-keyboard-shortcut-help-modal__shortcut-term\">\n\t\t\t\t<KeyCombination\n\t\t\t\t\tkeyCombination={ keyCombination }\n\t\t\t\t\tforceAriaLabel={ ariaLabel }\n\t\t\t\t/>\n\t\t\t\t{ aliases.map( ( alias, index ) => (\n\t\t\t\t\t<KeyCombination\n\t\t\t\t\t\tkeyCombination={ alias }\n\t\t\t\t\t\tforceAriaLabel={ ariaLabel }\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default Shortcut;\n"],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AAA6E,IAAAE,WAAA,GAAAF,OAAA;AAJ7E;AACA;AACA;;AAIA,SAASG,cAAcA,CAAE;EAAEC,cAAc;EAAEC;AAAe,CAA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BAClE,IAAAZ,WAAA,CAAAU,GAAA,EAACT,cAAc;QACdC,cAAc,EAAGA,cAAgB;QACjCC,cAAc,EAAGK;MAAW,CAC5B,CAAC,EACAY,OAAO,CAACL,GAAG,CAAE,CAAEO,KAAK,EAAEN,KAAK,kBAC5B,IAAAhB,WAAA,CAAAU,GAAA,EAACT,cAAc;QACdC,cAAc,EAAGoB,KAAO;QACxBnB,cAAc,EAAGK;MAAW,GACtBQ,KACN,CACA,CAAC;IAAA,CACC,CAAC;EAAA,CACL,CAAC;AAEL;AAAC,IAAAO,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEcP,QAAQ","ignoreList":[]}
1
+ {"version":3,"names":["_element","require","_keycodes","_jsxRuntime","KeyCombination","keyCombination","forceAriaLabel","shortcut","modifier","displayShortcutList","character","ariaLabel","shortcutAriaLabel","jsx","className","children","Array","isArray","map","index","Fragment","Shortcut","description","aliases","jsxs","alias","_default","exports","default"],"sources":["@wordpress/editor/src/components/keyboard-shortcut-help-modal/shortcut.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Fragment } from '@wordpress/element';\nimport { displayShortcutList, shortcutAriaLabel } from '@wordpress/keycodes';\n\nfunction KeyCombination( { keyCombination, forceAriaLabel } ) {\n\tconst shortcut = keyCombination.modifier\n\t\t? displayShortcutList[ keyCombination.modifier ](\n\t\t\t\tkeyCombination.character\n\t\t )\n\t\t: keyCombination.character;\n\tconst ariaLabel = keyCombination.modifier\n\t\t? shortcutAriaLabel[ keyCombination.modifier ](\n\t\t\t\tkeyCombination.character\n\t\t )\n\t\t: keyCombination.character;\n\n\treturn (\n\t\t<kbd\n\t\t\tclassName=\"editor-keyboard-shortcut-help-modal__shortcut-key-combination\"\n\t\t\taria-label={ forceAriaLabel || ariaLabel }\n\t\t>\n\t\t\t{ ( Array.isArray( shortcut ) ? shortcut : [ shortcut ] ).map(\n\t\t\t\t( character, index ) => {\n\t\t\t\t\tif ( character === '+' ) {\n\t\t\t\t\t\treturn <Fragment key={ index }>{ character }</Fragment>;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<kbd\n\t\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\t\tclassName=\"editor-keyboard-shortcut-help-modal__shortcut-key\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ character }\n\t\t\t\t\t\t</kbd>\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t) }\n\t\t</kbd>\n\t);\n}\n\nfunction Shortcut( { description, keyCombination, aliases = [], ariaLabel } ) {\n\treturn (\n\t\t<>\n\t\t\t<div className=\"editor-keyboard-shortcut-help-modal__shortcut-description\">\n\t\t\t\t{ description }\n\t\t\t</div>\n\t\t\t<div className=\"editor-keyboard-shortcut-help-modal__shortcut-term\">\n\t\t\t\t<KeyCombination\n\t\t\t\t\tkeyCombination={ keyCombination }\n\t\t\t\t\tforceAriaLabel={ ariaLabel }\n\t\t\t\t/>\n\t\t\t\t{ aliases.map( ( alias, index ) => (\n\t\t\t\t\t<KeyCombination\n\t\t\t\t\t\tkeyCombination={ alias }\n\t\t\t\t\t\tforceAriaLabel={ ariaLabel }\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default Shortcut;\n"],"mappings":";;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AAA6E,IAAAE,WAAA,GAAAF,OAAA;AAJ7E;AACA;AACA;;AAIA,SAASG,cAAcA,CAAE;EAAEC,cAAc;EAAEC;AAAe,CAAC,EAAG;EAC7D,MAAMC,QAAQ,GAAGF,cAAc,CAACG,QAAQ,GACrCC,6BAAmB,CAAEJ,cAAc,CAACG,QAAQ,CAAE,CAC9CH,cAAc,CAACK,SACf,CAAC,GACDL,cAAc,CAACK,SAAS;EAC3B,MAAMC,SAAS,GAAGN,cAAc,CAACG,QAAQ,GACtCI,2BAAiB,CAAEP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AAGoB,KAAO;QACxBnB,cAAc,EAAGK;MAAW,GACtBQ,KACN,CACA,CAAC;IAAA,CACC,CAAC;EAAA,CACL,CAAC;AAEL;AAAC,IAAAO,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEcP,QAAQ","ignoreList":[]}
@@ -1,3 +1,4 @@
1
+ /* wp:polyfill */
1
2
  "use strict";
2
3
 
3
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1 +1 @@
1
- {"version":3,"names":["_blockEditor","require","_compose","_data","_dom","_element","_i18n","_keyboardShortcuts","_keycodes","_listViewOutline","_interopRequireDefault","_lockUnlock","_store","_jsxRuntime","TabbedSidebar","unlock","blockEditorPrivateApis","ListViewSidebar","setIsListViewOpened","useDispatch","editorStore","getListViewToggleRef","useSelect","focusOnMountRef","useFocusOnMount","closeListView","useCallback","current","focus","closeOnEscape","event","keyCode","ESCAPE","defaultPrevented","preventDefault","dropZoneElement","setDropZoneElement","useState","tab","setTab","sidebarRef","useRef","tabsRef","listViewRef","listViewContainerRef","useMergeRefs","handleSidebarFocus","currentTab","tabPanelFocus","tabbable","find","listViewApplicationFocus","listViewFocusArea","contains","handleToggleListViewShortcut","ownerDocument","activeElement","useShortcut","jsx","className","onKeyDown","ref","children","tabs","name","title","_x","panel","__experimentalListView","panelRef","default","onClose","onSelect","tabName","defaultTabId","closeButtonLabel","__"],"sources":["@wordpress/editor/src/components/list-view-sidebar/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalListView as ListView,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport { useFocusOnMount, useMergeRefs } from '@wordpress/compose';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { focus } from '@wordpress/dom';\nimport { useCallback, useRef, useState } from '@wordpress/element';\nimport { __, _x } from '@wordpress/i18n';\nimport { useShortcut } from '@wordpress/keyboard-shortcuts';\nimport { ESCAPE } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport ListViewOutline from './list-view-outline';\nimport { unlock } from '../../lock-unlock';\nimport { store as editorStore } from '../../store';\n\nconst { TabbedSidebar } = unlock( blockEditorPrivateApis );\n\nexport default function ListViewSidebar() {\n\tconst { setIsListViewOpened } = useDispatch( editorStore );\n\tconst { getListViewToggleRef } = unlock( useSelect( editorStore ) );\n\n\t// This hook handles focus when the sidebar first renders.\n\tconst focusOnMountRef = useFocusOnMount( 'firstElement' );\n\n\t// When closing the list view, focus should return to the toggle button.\n\tconst closeListView = useCallback( () => {\n\t\tsetIsListViewOpened( false );\n\t\tgetListViewToggleRef().current?.focus();\n\t}, [ getListViewToggleRef, setIsListViewOpened ] );\n\n\tconst closeOnEscape = useCallback(\n\t\t( event ) => {\n\t\t\tif ( event.keyCode === ESCAPE && ! event.defaultPrevented ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tcloseListView();\n\t\t\t}\n\t\t},\n\t\t[ closeListView ]\n\t);\n\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the dropZoneElement updates.\n\tconst [ dropZoneElement, setDropZoneElement ] = useState( null );\n\t// Tracks our current tab.\n\tconst [ tab, setTab ] = useState( 'list-view' );\n\n\t// This ref refers to the sidebar as a whole.\n\tconst sidebarRef = useRef();\n\t// This ref refers to the tab panel.\n\tconst tabsRef = useRef();\n\t// This ref refers to the list view application area.\n\tconst listViewRef = useRef();\n\n\t// Must merge the refs together so focus can be handled properly in the next function.\n\tconst listViewContainerRef = useMergeRefs( [\n\t\tfocusOnMountRef,\n\t\tlistViewRef,\n\t\tsetDropZoneElement,\n\t] );\n\n\t/*\n\t * Callback function to handle list view or outline focus.\n\t *\n\t * @param {string} currentTab The current tab. Either list view or outline.\n\t *\n\t * @return void\n\t */\n\tfunction handleSidebarFocus( currentTab ) {\n\t\t// Tab panel focus.\n\t\tconst tabPanelFocus = focus.tabbable.find( tabsRef.current )[ 0 ];\n\t\t// List view tab is selected.\n\t\tif ( currentTab === 'list-view' ) {\n\t\t\t// Either focus the list view or the tab panel. Must have a fallback because the list view does not render when there are no blocks.\n\t\t\tconst listViewApplicationFocus = focus.tabbable.find(\n\t\t\t\tlistViewRef.current\n\t\t\t)[ 0 ];\n\t\t\tconst listViewFocusArea = sidebarRef.current.contains(\n\t\t\t\tlistViewApplicationFocus\n\t\t\t)\n\t\t\t\t? listViewApplicationFocus\n\t\t\t\t: tabPanelFocus;\n\t\t\tlistViewFocusArea.focus();\n\t\t\t// Outline tab is selected.\n\t\t} else {\n\t\t\ttabPanelFocus.focus();\n\t\t}\n\t}\n\n\tconst handleToggleListViewShortcut = useCallback( () => {\n\t\t// If the sidebar has focus, it is safe to close.\n\t\tif (\n\t\t\tsidebarRef.current.contains(\n\t\t\t\tsidebarRef.current.ownerDocument.activeElement\n\t\t\t)\n\t\t) {\n\t\t\tcloseListView();\n\t\t} else {\n\t\t\t// If the list view or outline does not have focus, focus should be moved to it.\n\t\t\thandleSidebarFocus( tab );\n\t\t}\n\t}, [ closeListView, tab ] );\n\n\t// This only fires when the sidebar is open because of the conditional rendering.\n\t// It is the same shortcut to open but that is defined as a global shortcut and only fires when the sidebar is closed.\n\tuseShortcut( 'core/editor/toggle-list-view', handleToggleListViewShortcut );\n\n\treturn (\n\t\t// eslint-disable-next-line jsx-a11y/no-static-element-interactions\n\t\t<div\n\t\t\tclassName=\"editor-list-view-sidebar\"\n\t\t\tonKeyDown={ closeOnEscape }\n\t\t\tref={ sidebarRef }\n\t\t>\n\t\t\t<TabbedSidebar\n\t\t\t\ttabs={ [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'list-view',\n\t\t\t\t\t\ttitle: _x( 'List View', 'Post overview' ),\n\t\t\t\t\t\tpanel: (\n\t\t\t\t\t\t\t<div className=\"editor-list-view-sidebar__list-view-container\">\n\t\t\t\t\t\t\t\t<div className=\"editor-list-view-sidebar__list-view-panel-content\">\n\t\t\t\t\t\t\t\t\t<ListView\n\t\t\t\t\t\t\t\t\t\tdropZoneElement={ dropZoneElement }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t),\n\t\t\t\t\t\tpanelRef: listViewContainerRef,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'outline',\n\t\t\t\t\t\ttitle: _x( 'Outline', 'Post overview' ),\n\t\t\t\t\t\tpanel: (\n\t\t\t\t\t\t\t<div className=\"editor-list-view-sidebar__list-view-container\">\n\t\t\t\t\t\t\t\t<ListViewOutline />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t),\n\t\t\t\t\t},\n\t\t\t\t] }\n\t\t\t\tonClose={ closeListView }\n\t\t\t\tonSelect={ ( tabName ) => setTab( tabName ) }\n\t\t\t\tdefaultTabId=\"list-view\"\n\t\t\t\tref={ tabsRef }\n\t\t\t\tcloseButtonLabel={ __( 'Close' ) }\n\t\t\t/>\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAIA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,IAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,kBAAA,GAAAN,OAAA;AACA,IAAAO,SAAA,GAAAP,OAAA;AAKA,IAAAQ,gBAAA,GAAAC,sBAAA,CAAAT,OAAA;AACA,IAAAU,WAAA,GAAAV,OAAA;AACA,IAAAW,MAAA,GAAAX,OAAA;AAAmD,IAAAY,WAAA,GAAAZ,OAAA;AApBnD;AACA;AACA;;AAaA;AACA;AACA;;AAKA,MAAM;EAAEa;AAAc,CAAC,GAAG,IAAAC,kBAAM,EAAEC,wBAAuB,CAAC;AAE3C,SAASC,eAAeA,CAAA,EAAG;EACzC,MAAM;IAAEC;EAAoB,CAAC,GAAG,IAAAC,iBAAW,EAAEC,YAAY,CAAC;EAC1D,MA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AAAjD,WAAA,CAAA6C,GAAA;cAAKC,SAAS,EAAC,mDAAmD;cAAAG,QAAA,eACjE,IAAAjD,WAAA,CAAA6C,GAAA,EAAC1D,YAAA,CAAAoE,sBAAQ;gBACRjC,eAAe,EAAGA;cAAiB,CACnC;YAAC,CACE;UAAC,CACF,CACL;UACDkC,QAAQ,EAAEzB;QACX,CAAC,EACD;UACCoB,IAAI,EAAE,SAAS;UACfC,KAAK,EAAE,IAAAC,QAAE,EAAE,SAAS,EAAE,eAAgB,CAAC;UACvCC,KAAK,eACJ,IAAAtD,WAAA,CAAA6C,GAAA;YAAKC,SAAS,EAAC,+CAA+C;YAAAG,QAAA,eAC7D,IAAAjD,WAAA,CAAA6C,GAAA,EAACjD,gBAAA,CAAA6D,OAAe,IAAE;UAAC,CACf;QAEP,CAAC,CACC;QACHC,OAAO,EAAG9C,aAAe;QACzB+C,QAAQ,EAAKC,OAAO,IAAMlC,MAAM,CAAEkC,OAAQ,CAAG;QAC7CC,YAAY,EAAC,WAAW;QACxBb,GAAG,EAAGnB,OAAS;QACfiC,gBAAgB,EAAG,IAAAC,QAAE,EAAE,OAAQ;MAAG,CAClC;IAAC,CACE;EAAC;AAER","ignoreList":[]}
1
+ {"version":3,"names":["_blockEditor","require","_compose","_data","_dom","_element","_i18n","_keyboardShortcuts","_keycodes","_listViewOutline","_interopRequireDefault","_lockUnlock","_store","_jsxRuntime","TabbedSidebar","unlock","blockEditorPrivateApis","ListViewSidebar","setIsListViewOpened","useDispatch","editorStore","getListViewToggleRef","useSelect","focusOnMountRef","useFocusOnMount","closeListView","useCallback","current","focus","closeOnEscape","event","keyCode","ESCAPE","defaultPrevented","preventDefault","dropZoneElement","setDropZoneElement","useState","tab","setTab","sidebarRef","useRef","tabsRef","listViewRef","listViewContainerRef","useMergeRefs","handleSidebarFocus","currentTab","tabPanelFocus","tabbable","find","listViewApplicationFocus","listViewFocusArea","contains","handleToggleListViewShortcut","ownerDocument","activeElement","useShortcut","jsx","className","onKeyDown","ref","children","tabs","name","title","_x","panel","__experimentalListView","panelRef","default","onClose","onSelect","tabName","defaultTabId","closeButtonLabel","__"],"sources":["@wordpress/editor/src/components/list-view-sidebar/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalListView as ListView,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport { useFocusOnMount, useMergeRefs } from '@wordpress/compose';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { focus } from '@wordpress/dom';\nimport { useCallback, useRef, useState } from '@wordpress/element';\nimport { __, _x } from '@wordpress/i18n';\nimport { useShortcut } from '@wordpress/keyboard-shortcuts';\nimport { ESCAPE } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport ListViewOutline from './list-view-outline';\nimport { unlock } from '../../lock-unlock';\nimport { store as editorStore } from '../../store';\n\nconst { TabbedSidebar } = unlock( blockEditorPrivateApis );\n\nexport default function ListViewSidebar() {\n\tconst { setIsListViewOpened } = useDispatch( editorStore );\n\tconst { getListViewToggleRef } = unlock( useSelect( editorStore ) );\n\n\t// This hook handles focus when the sidebar first renders.\n\tconst focusOnMountRef = useFocusOnMount( 'firstElement' );\n\n\t// When closing the list view, focus should return to the toggle button.\n\tconst closeListView = useCallback( () => {\n\t\tsetIsListViewOpened( false );\n\t\tgetListViewToggleRef().current?.focus();\n\t}, [ getListViewToggleRef, setIsListViewOpened ] );\n\n\tconst closeOnEscape = useCallback(\n\t\t( event ) => {\n\t\t\tif ( event.keyCode === ESCAPE && ! event.defaultPrevented ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tcloseListView();\n\t\t\t}\n\t\t},\n\t\t[ closeListView ]\n\t);\n\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the dropZoneElement updates.\n\tconst [ dropZoneElement, setDropZoneElement ] = useState( null );\n\t// Tracks our current tab.\n\tconst [ tab, setTab ] = useState( 'list-view' );\n\n\t// This ref refers to the sidebar as a whole.\n\tconst sidebarRef = useRef();\n\t// This ref refers to the tab panel.\n\tconst tabsRef = useRef();\n\t// This ref refers to the list view application area.\n\tconst listViewRef = useRef();\n\n\t// Must merge the refs together so focus can be handled properly in the next function.\n\tconst listViewContainerRef = useMergeRefs( [\n\t\tfocusOnMountRef,\n\t\tlistViewRef,\n\t\tsetDropZoneElement,\n\t] );\n\n\t/*\n\t * Callback function to handle list view or outline focus.\n\t *\n\t * @param {string} currentTab The current tab. Either list view or outline.\n\t *\n\t * @return void\n\t */\n\tfunction handleSidebarFocus( currentTab ) {\n\t\t// Tab panel focus.\n\t\tconst tabPanelFocus = focus.tabbable.find( tabsRef.current )[ 0 ];\n\t\t// List view tab is selected.\n\t\tif ( currentTab === 'list-view' ) {\n\t\t\t// Either focus the list view or the tab panel. Must have a fallback because the list view does not render when there are no blocks.\n\t\t\tconst listViewApplicationFocus = focus.tabbable.find(\n\t\t\t\tlistViewRef.current\n\t\t\t)[ 0 ];\n\t\t\tconst listViewFocusArea = sidebarRef.current.contains(\n\t\t\t\tlistViewApplicationFocus\n\t\t\t)\n\t\t\t\t? listViewApplicationFocus\n\t\t\t\t: tabPanelFocus;\n\t\t\tlistViewFocusArea.focus();\n\t\t\t// Outline tab is selected.\n\t\t} else {\n\t\t\ttabPanelFocus.focus();\n\t\t}\n\t}\n\n\tconst handleToggleListViewShortcut = useCallback( () => {\n\t\t// If the sidebar has focus, it is safe to close.\n\t\tif (\n\t\t\tsidebarRef.current.contains(\n\t\t\t\tsidebarRef.current.ownerDocument.activeElement\n\t\t\t)\n\t\t) {\n\t\t\tcloseListView();\n\t\t} else {\n\t\t\t// If the list view or outline does not have focus, focus should be moved to it.\n\t\t\thandleSidebarFocus( tab );\n\t\t}\n\t}, [ closeListView, tab ] );\n\n\t// This only fires when the sidebar is open because of the conditional rendering.\n\t// It is the same shortcut to open but that is defined as a global shortcut and only fires when the sidebar is closed.\n\tuseShortcut( 'core/editor/toggle-list-view', handleToggleListViewShortcut );\n\n\treturn (\n\t\t// eslint-disable-next-line jsx-a11y/no-static-element-interactions\n\t\t<div\n\t\t\tclassName=\"editor-list-view-sidebar\"\n\t\t\tonKeyDown={ closeOnEscape }\n\t\t\tref={ sidebarRef }\n\t\t>\n\t\t\t<TabbedSidebar\n\t\t\t\ttabs={ [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'list-view',\n\t\t\t\t\t\ttitle: _x( 'List View', 'Post overview' ),\n\t\t\t\t\t\tpanel: (\n\t\t\t\t\t\t\t<div className=\"editor-list-view-sidebar__list-view-container\">\n\t\t\t\t\t\t\t\t<div className=\"editor-list-view-sidebar__list-view-panel-content\">\n\t\t\t\t\t\t\t\t\t<ListView\n\t\t\t\t\t\t\t\t\t\tdropZoneElement={ dropZoneElement }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t),\n\t\t\t\t\t\tpanelRef: listViewContainerRef,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'outline',\n\t\t\t\t\t\ttitle: _x( 'Outline', 'Post overview' ),\n\t\t\t\t\t\tpanel: (\n\t\t\t\t\t\t\t<div className=\"editor-list-view-sidebar__list-view-container\">\n\t\t\t\t\t\t\t\t<ListViewOutline />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t),\n\t\t\t\t\t},\n\t\t\t\t] }\n\t\t\t\tonClose={ closeListView }\n\t\t\t\tonSelect={ ( tabName ) => setTab( tabName ) }\n\t\t\t\tdefaultTabId=\"list-view\"\n\t\t\t\tref={ tabsRef }\n\t\t\t\tcloseButtonLabel={ __( 'Close' ) }\n\t\t\t/>\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAIA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,IAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAA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p:polyfill */
1
2
  "use strict";
2
3
 
3
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_compose","_data","_i18n","_blocks","_notices","_autosaveMonitor","_interopRequireDefault","_localAutosave","_store","_jsxRuntime","requestIdleCallback","window","requestAnimationFrame","hasStorageSupport","hasSessionStorageSupport","undefined","sessionStorage","setItem","removeItem","useAutosaveNotice","postId","isEditedPostNew","hasRemoteAutosave","useSelect","select","editorStore","getCurrentPostId","getEditorSettings","autosave","getEditedPostAttribute","createWarningNotice","removeNotice","useDispatch","noticesStore","editPost","resetEditorBlocks","useEffect","localAutosave","localAutosaveGet","JSON","parse","post_title","title","content","excerpt","edits","hasDifference","Object","keys","some","key","localAutosaveClear","id","__","actions","label","onClick","editsContent","editsWithoutContent","useAutosavePurge","isDirty","isAutosaving","didError","isEditedPostDirty","isAutosavingPost","didPostSaveRequestFail","lastIsDirtyRef","useRef","lastIsAutosavingRef","current","wasEditedPostNew","usePrevious","prevPostId","LocalAutosaveMonitor","deferredAutosave","useCallback","local","localAutosaveInterval","jsx","default","interval","_default","exports","ifCondition"],"sources":["@wordpress/editor/src/components/local-autosave-monitor/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useCallback, useEffect, useRef } from '@wordpress/element';\nimport { ifCondition, usePrevious } from '@wordpress/compose';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { parse } from '@wordpress/blocks';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport AutosaveMonitor from '../autosave-monitor';\nimport {\n\tlocalAutosaveGet,\n\tlocalAutosaveClear,\n} from '../../store/local-autosave';\nimport { store as editorStore } from '../../store';\n\nconst requestIdleCallback = window.requestIdleCallback\n\t? window.requestIdleCallback\n\t: window.requestAnimationFrame;\n\nlet hasStorageSupport;\n\n/**\n * Function which returns true if the current environment supports browser\n * sessionStorage, or false otherwise. The result of this function is cached and\n * reused in subsequent invocations.\n */\nconst hasSessionStorageSupport = () => {\n\tif ( hasStorageSupport !== undefined ) {\n\t\treturn hasStorageSupport;\n\t}\n\n\ttry {\n\t\t// Private Browsing in Safari 10 and earlier will throw an error when\n\t\t// attempting to set into sessionStorage. The test here is intentional in\n\t\t// causing a thrown error as condition bailing from local autosave.\n\t\twindow.sessionStorage.setItem( '__wpEditorTestSessionStorage', '' );\n\t\twindow.sessionStorage.removeItem( '__wpEditorTestSessionStorage' );\n\t\thasStorageSupport = true;\n\t} catch {\n\t\thasStorageSupport = false;\n\t}\n\n\treturn hasStorageSupport;\n};\n\n/**\n * Custom hook which manages the creation of a notice prompting the user to\n * restore a local autosave, if one exists.\n */\nfunction useAutosaveNotice() {\n\tconst { postId, isEditedPostNew, hasRemoteAutosave } = useSelect(\n\t\t( select ) => ( {\n\t\t\tpostId: select( editorStore ).getCurrentPostId(),\n\t\t\tisEditedPostNew: select( editorStore ).isEditedPostNew(),\n\t\t\thasRemoteAutosave:\n\t\t\t\t!! select( editorStore ).getEditorSettings().autosave,\n\t\t} ),\n\t\t[]\n\t);\n\tconst { getEditedPostAttribute } = useSelect( editorStore );\n\n\tconst { createWarningNotice, removeNotice } = useDispatch( noticesStore );\n\tconst { editPost, resetEditorBlocks } = useDispatch( editorStore );\n\n\tuseEffect( () => {\n\t\tlet localAutosave = localAutosaveGet( postId, isEditedPostNew );\n\t\tif ( ! localAutosave ) {\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tlocalAutosave = JSON.parse( localAutosave );\n\t\t} catch {\n\t\t\t// Not usable if it can't be parsed.\n\t\t\treturn;\n\t\t}\n\n\t\tconst { post_title: title, content, excerpt } = localAutosave;\n\t\tconst edits = { title, content, excerpt };\n\n\t\t{\n\t\t\t// Only display a notice if there is a difference between what has been\n\t\t\t// saved and that which is stored in sessionStorage.\n\t\t\tconst hasDifference = Object.keys( edits ).some( ( key ) => {\n\t\t\t\treturn edits[ key ] !== getEditedPostAttribute( key );\n\t\t\t} );\n\n\t\t\tif ( ! hasDifference ) {\n\t\t\t\t// If there is no difference, it can be safely ejected from storage.\n\t\t\t\tlocalAutosaveClear( postId, isEditedPostNew );\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tif ( hasRemoteAutosave ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst id = 'wpEditorAutosaveRestore';\n\n\t\tcreateWarningNotice(\n\t\t\t__(\n\t\t\t\t'The backup of this post in your browser is different from the version below.'\n\t\t\t),\n\t\t\t{\n\t\t\t\tid,\n\t\t\t\tactions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: __( 'Restore the backup' ),\n\t\t\t\t\t\tonClick() {\n\t\t\t\t\t\t\tconst {\n\t\t\t\t\t\t\t\tcontent: editsContent,\n\t\t\t\t\t\t\t\t...editsWithoutContent\n\t\t\t\t\t\t\t} = edits;\n\t\t\t\t\t\t\teditPost( editsWithoutContent );\n\t\t\t\t\t\t\tresetEditorBlocks( parse( edits.content ) );\n\t\t\t\t\t\t\tremoveNotice( id );\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t}\n\t\t);\n\t}, [ isEditedPostNew, postId ] );\n}\n\n/**\n * Custom hook which ejects a local autosave after a successful save occurs.\n */\nfunction useAutosavePurge() {\n\tconst { postId, isEditedPostNew, isDirty, isAutosaving, didError } =\n\t\tuseSelect(\n\t\t\t( select ) => ( {\n\t\t\t\tpostId: select( editorStore ).getCurrentPostId(),\n\t\t\t\tisEditedPostNew: select( editorStore ).isEditedPostNew(),\n\t\t\t\tisDirty: select( editorStore ).isEditedPostDirty(),\n\t\t\t\tisAutosaving: select( editorStore ).isAutosavingPost(),\n\t\t\t\tdidError: select( editorStore ).didPostSaveRequestFail(),\n\t\t\t} ),\n\t\t\t[]\n\t\t);\n\n\tconst lastIsDirtyRef = useRef( isDirty );\n\tconst lastIsAutosavingRef = useRef( isAutosaving );\n\n\tuseEffect( () => {\n\t\tif (\n\t\t\t! didError &&\n\t\t\t( ( lastIsAutosavingRef.current && ! isAutosaving ) ||\n\t\t\t\t( lastIsDirtyRef.current && ! isDirty ) )\n\t\t) {\n\t\t\tlocalAutosaveClear( postId, isEditedPostNew );\n\t\t}\n\n\t\tlastIsDirtyRef.current = isDirty;\n\t\tlastIsAutosavingRef.current = isAutosaving;\n\t}, [ isDirty, isAutosaving, didError ] );\n\n\t// Once the isEditedPostNew changes from true to false, let's clear the auto-draft autosave.\n\tconst wasEditedPostNew = usePrevious( isEditedPostNew );\n\tconst prevPostId = usePrevious( postId );\n\tuseEffect( () => {\n\t\tif ( prevPostId === postId && wasEditedPostNew && ! isEditedPostNew ) {\n\t\t\tlocalAutosaveClear( postId, true );\n\t\t}\n\t}, [ isEditedPostNew, postId ] );\n}\n\nfunction LocalAutosaveMonitor() {\n\tconst { autosave } = useDispatch( editorStore );\n\tconst deferredAutosave = useCallback( () => {\n\t\trequestIdleCallback( () => autosave( { local: true } ) );\n\t}, [] );\n\tuseAutosaveNotice();\n\tuseAutosavePurge();\n\n\tconst localAutosaveInterval = useSelect(\n\t\t( select ) =>\n\t\t\tselect( editorStore ).getEditorSettings().localAutosaveInterval,\n\t\t[]\n\t);\n\n\treturn (\n\t\t<AutosaveMonitor\n\t\t\tinterval={ localAutosaveInterval }\n\t\t\tautosave={ deferredAutosave }\n\t\t/>\n\t);\n}\n\n/**\n * Monitors local autosaves of a post in the editor.\n * It uses several hooks and functions to manage autosave behavior:\n * - `useAutosaveNotice` hook: Manages the creation of a notice prompting the user to restore a local autosave, if one exists.\n * - `useAutosavePurge` hook: Ejects a local autosave after a successful save occurs.\n * - `hasSessionStorageSupport` function: Checks if the current environment supports browser sessionStorage.\n * - `LocalAutosaveMonitor` component: Uses the `AutosaveMonitor` component to perform autosaves at a specified interval.\n *\n * The module also checks for sessionStorage support and conditionally exports the `LocalAutosaveMonitor` component based on that.\n *\n * @module LocalAutosaveMonitor\n */\nexport default ifCondition( hasSessionStorageSupport )( Loc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;IAClCjD,QAAQ,EAAG8C;EAAkB,CAC7B,CAAC;AAEJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAXA,IAAAO,QAAA,GAAAC,OAAA,CAAAH,OAAA,GAYe,IAAAI,oBAAW,EAAErE,wBAAyB,CAAC,CAAE2D,oBAAqB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_element","require","_compose","_data","_i18n","_blocks","_notices","_autosaveMonitor","_interopRequireDefault","_localAutosave","_store","_jsxRuntime","requestIdleCallback","window","requestAnimationFrame","hasStorageSupport","hasSessionStorageSupport","undefined","sessionStorage","setItem","removeItem","useAutosaveNotice","postId","isEditedPostNew","hasRemoteAutosave","useSelect","select","editorStore","getCurrentPostId","getEditorSettings","autosave","getEditedPostAttribute","createWarningNotice","removeNotice","useDispatch","noticesStore","editPost","resetEditorBlocks","useEffect","localAutosave","localAutosaveGet","JSON","parse","post_title","title","content","excerpt","edits","hasDifference","Object","keys","some","key","localAutosaveClear","id","__","actions","label","onClick","editsContent","editsWithoutContent","useAutosavePurge","isDirty","isAutosaving","didError","isEditedPostDirty","isAutosavingPost","didPostSaveRequestFail","lastIsDirtyRef","useRef","lastIsAutosavingRef","current","wasEditedPostNew","usePrevious","prevPostId","LocalAutosaveMonitor","deferredAutosave","useCallback","local","localAutosaveInterval","jsx","default","interval","_default","exports","ifCondition"],"sources":["@wordpress/editor/src/components/local-autosave-monitor/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useCallback, useEffect, useRef } from '@wordpress/element';\nimport { ifCondition, usePrevious } from '@wordpress/compose';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { parse } from '@wordpress/blocks';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport AutosaveMonitor from '../autosave-monitor';\nimport {\n\tlocalAutosaveGet,\n\tlocalAutosaveClear,\n} from '../../store/local-autosave';\nimport { store as editorStore } from '../../store';\n\nconst requestIdleCallback = window.requestIdleCallback\n\t? window.requestIdleCallback\n\t: window.requestAnimationFrame;\n\nlet hasStorageSupport;\n\n/**\n * Function which returns true if the current environment supports browser\n * sessionStorage, or false otherwise. The result of this function is cached and\n * reused in subsequent invocations.\n */\nconst hasSessionStorageSupport = () => {\n\tif ( hasStorageSupport !== undefined ) {\n\t\treturn hasStorageSupport;\n\t}\n\n\ttry {\n\t\t// Private Browsing in Safari 10 and earlier will throw an error when\n\t\t// attempting to set into sessionStorage. The test here is intentional in\n\t\t// causing a thrown error as condition bailing from local autosave.\n\t\twindow.sessionStorage.setItem( '__wpEditorTestSessionStorage', '' );\n\t\twindow.sessionStorage.removeItem( '__wpEditorTestSessionStorage' );\n\t\thasStorageSupport = true;\n\t} catch {\n\t\thasStorageSupport = false;\n\t}\n\n\treturn hasStorageSupport;\n};\n\n/**\n * Custom hook which manages the creation of a notice prompting the user to\n * restore a local autosave, if one exists.\n */\nfunction useAutosaveNotice() {\n\tconst { postId, isEditedPostNew, hasRemoteAutosave } = useSelect(\n\t\t( select ) => ( {\n\t\t\tpostId: select( editorStore ).getCurrentPostId(),\n\t\t\tisEditedPostNew: select( editorStore ).isEditedPostNew(),\n\t\t\thasRemoteAutosave:\n\t\t\t\t!! select( editorStore ).getEditorSettings().autosave,\n\t\t} ),\n\t\t[]\n\t);\n\tconst { getEditedPostAttribute } = useSelect( editorStore );\n\n\tconst { createWarningNotice, removeNotice } = useDispatch( noticesStore );\n\tconst { editPost, resetEditorBlocks } = useDispatch( editorStore );\n\n\tuseEffect( () => {\n\t\tlet localAutosave = localAutosaveGet( postId, isEditedPostNew );\n\t\tif ( ! localAutosave ) {\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tlocalAutosave = JSON.parse( localAutosave );\n\t\t} catch {\n\t\t\t// Not usable if it can't be parsed.\n\t\t\treturn;\n\t\t}\n\n\t\tconst { post_title: title, content, excerpt } = localAutosave;\n\t\tconst edits = { title, content, excerpt };\n\n\t\t{\n\t\t\t// Only display a notice if there is a difference between what has been\n\t\t\t// saved and that which is stored in sessionStorage.\n\t\t\tconst hasDifference = Object.keys( edits ).some( ( key ) => {\n\t\t\t\treturn edits[ key ] !== getEditedPostAttribute( key );\n\t\t\t} );\n\n\t\t\tif ( ! hasDifference ) {\n\t\t\t\t// If there is no difference, it can be safely ejected from storage.\n\t\t\t\tlocalAutosaveClear( postId, isEditedPostNew );\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tif ( hasRemoteAutosave ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst id = 'wpEditorAutosaveRestore';\n\n\t\tcreateWarningNotice(\n\t\t\t__(\n\t\t\t\t'The backup of this post in your browser is different from the version below.'\n\t\t\t),\n\t\t\t{\n\t\t\t\tid,\n\t\t\t\tactions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: __( 'Restore the backup' ),\n\t\t\t\t\t\tonClick() {\n\t\t\t\t\t\t\tconst {\n\t\t\t\t\t\t\t\tcontent: editsContent,\n\t\t\t\t\t\t\t\t...editsWithoutContent\n\t\t\t\t\t\t\t} = edits;\n\t\t\t\t\t\t\teditPost( editsWithoutContent );\n\t\t\t\t\t\t\tresetEditorBlocks( parse( edits.content ) );\n\t\t\t\t\t\t\tremoveNotice( id );\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t}\n\t\t);\n\t}, [ isEditedPostNew, postId ] );\n}\n\n/**\n * Custom hook which ejects a local autosave after a successful save occurs.\n */\nfunction useAutosavePurge() {\n\tconst { postId, isEditedPostNew, isDirty, isAutosaving, didError } =\n\t\tuseSelect(\n\t\t\t( select ) => ( {\n\t\t\t\tpostId: select( editorStore ).getCurrentPostId(),\n\t\t\t\tisEditedPostNew: select( editorStore ).isEditedPostNew(),\n\t\t\t\tisDirty: select( editorStore ).isEditedPostDirty(),\n\t\t\t\tisAutosaving: select( editorStore ).isAutosavingPost(),\n\t\t\t\tdidError: select( editorStore ).didPostSaveRequestFail(),\n\t\t\t} ),\n\t\t\t[]\n\t\t);\n\n\tconst lastIsDirtyRef = useRef( isDirty );\n\tconst lastIsAutosavingRef = useRef( isAutosaving );\n\n\tuseEffect( () => {\n\t\tif (\n\t\t\t! didError &&\n\t\t\t( ( lastIsAutosavingRef.current && ! isAutosaving ) ||\n\t\t\t\t( lastIsDirtyRef.current && ! isDirty ) )\n\t\t) {\n\t\t\tlocalAutosaveClear( postId, isEditedPostNew );\n\t\t}\n\n\t\tlastIsDirtyRef.current = isDirty;\n\t\tlastIsAutosavingRef.current = isAutosaving;\n\t}, [ isDirty, isAutosaving, didError ] );\n\n\t// Once the isEditedPostNew changes from true to false, let's clear the auto-draft autosave.\n\tconst wasEditedPostNew = usePrevious( isEditedPostNew );\n\tconst prevPostId = usePrevious( postId );\n\tuseEffect( () => {\n\t\tif ( prevPostId === postId && wasEditedPostNew && ! isEditedPostNew ) {\n\t\t\tlocalAutosaveClear( postId, true );\n\t\t}\n\t}, [ isEditedPostNew, postId ] );\n}\n\nfunction LocalAutosaveMonitor() {\n\tconst { autosave } = useDispatch( editorStore );\n\tconst deferredAutosave = useCallback( () => {\n\t\trequestIdleCallback( () => autosave( { local: true } ) );\n\t}, [] );\n\tuseAutosaveNotice();\n\tuseAutosavePurge();\n\n\tconst localAutosaveInterval = useSelect(\n\t\t( select ) =>\n\t\t\tselect( editorStore ).getEditorSettings().localAutosaveInterval,\n\t\t[]\n\t);\n\n\treturn (\n\t\t<AutosaveMonitor\n\t\t\tinterval={ localAutosaveInterval }\n\t\t\tautosave={ deferredAutosave }\n\t\t/>\n\t);\n}\n\n/**\n * Monitors local autosaves of a post in the editor.\n * It uses several hooks and functions to manage autosave behavior:\n * - `useAutosaveNotice` hook: Manages the creation of a notice prompting the user to restore a local autosave, if one exists.\n * - `useAutosavePurge` hook: Ejects a local autosave after a successful save occurs.\n * - `hasSessionStorageSupport` function: Checks if the current environment supports browser sessionStorage.\n * - `LocalAutosaveMonitor` component: Uses the `AutosaveMonitor` component to perform autosaves at a specified interval.\n *\n * The module also checks for sessionStorage support and conditionally exports the `LocalAutosaveMonitor` component based on that.\n *\n * @module LocalAutosaveMonitor\n */\nexport default ifCondition( hasSessionStorageSupport )( LocalAutosaveMonitor );\n"],"mappings":";;;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AAKA,IAAAM,gBAAA,GAAAC,sBAAA,CAAAP,OAAA;AACA,IAAAQ,cAAA,GAAAR,OAAA;AAIA,IAAAS,MAAA,GAAAT,OAAA;AAAmD,IAAAU,WAAA,GAAAV,OAAA;AAlBnD;AACA;AACA;;AAQA;AACA;AACA;;AAQA,MAAMW,mBAAmB,GAAGC,MAAM,CAACD,mBAAmB,GACnDC,MAAM,CAACD,mBAAmB,GAC1BC,MAAM,CAACC,qBAAqB;AAE/B,IAAIC,iBAAiB;;AAErB;AACA;AACA;AACA;AACA;AACA,MAAMC,wBAAwB,GAAGA,CAAA,KAAM;EACtC,IAAKD,iBAAiB,KAAKE,SAAS,EAAG;IACtC,OAAOF,iBAAiB;EACzB;EAEA,IAAI;IACH;IACA;IACA;IACAF,MAAM,CAACK,cAAc,CAACC,OAAO,CAAE,8BAA8B,EAAE,EAAG,CAAC;IACnEN,MAAM,CAACK,cAAc,CAACE,UAAU,CAAE,8BAA+B,CAAC;IAClEL,iBAAiB,GAAG,IAAI;EACzB,CAAC,CAAC,MAAM;IACPA,iBAAiB,GAAG,KAAK;EAC1B;EAEA,OAAOA,iBAAiB;AACzB,CAAC;;AAED;AACA;AACA;AACA;AACA,SAASM,iBAAiBA,CAAA,EAAG;EAC5B,MAAM;IAAEC,MAAM;IAAEC,eAAe;IAAEC;EAAkB,CAAC,GAAG,IAAAC,eAAS,EAC7DC,MAAM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AAiB,CAAC,CAAC,CAACkD,qBAAqB,EAChE,EACD,CAAC;EAED,oBACC,IAAApE,WAAA,CAAAqE,GAAA,EAACzE,gBAAA,CAAA0E,OAAe;IACfC,QAAQ,EAAGH,qBAAuB;IAClCjD,QAAQ,EAAG8C;EAAkB,CAC7B,CAAC;AAEJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAXA,IAAAO,QAAA,GAAAC,OAAA,CAAAH,OAAA,GAYe,IAAAI,oBAAW,EAAErE,wBAAyB,CAAC,CAAE2D,oBAAqB,CAAC","ignoreList":[]}
@@ -1,3 +1,4 @@
1
+ /* wp:polyfill */
1
2
  "use strict";
2
3
 
3
4
  Object.defineProperty(exports, "__esModule", {
@@ -1 +1 @@
1
- {"version":3,"names":["_i18n","require","_components","_data","_keyboardShortcuts","_store","_jsxRuntime","MODES","value","label","__","ModeSwitcher","shortcut","isRichEditingEnabled","isCodeEditingEnabled","mode","useSelect","select","keyboardShortcutsStore","getShortcutRepresentation","editorStore","getEditorSettings","richEditingEnabled","codeEditingEnabled","getEditorMode","switchEditorMode","useDispatch","selectedMode","choices","map","choice","disabled","info","jsx","MenuGroup","children","MenuItemsChoice","onSelect","_default","exports","default"],"sources":["@wordpress/editor/src/components/mode-switcher/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { MenuItemsChoice, MenuGroup } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Set of available mode options.\n *\n * @type {Array}\n */\nconst MODES = [\n\t{\n\t\tvalue: 'visual',\n\t\tlabel: __( 'Visual editor' ),\n\t},\n\t{\n\t\tvalue: 'text',\n\t\tlabel: __( 'Code editor' ),\n\t},\n];\n\nfunction ModeSwitcher() {\n\tconst { shortcut, isRichEditingEnabled, isCodeEditingEnabled, mode } =\n\t\tuseSelect(\n\t\t\t( select ) => ( {\n\t\t\t\tshortcut: select(\n\t\t\t\t\tkeyboardShortcutsStore\n\t\t\t\t).getShortcutRepresentation( 'core/editor/toggle-mode' ),\n\t\t\t\tisRichEditingEnabled:\n\t\t\t\t\tselect( editorStore ).getEditorSettings()\n\t\t\t\t\t\t.richEditingEnabled,\n\t\t\t\tisCodeEditingEnabled:\n\t\t\t\t\tselect( editorStore ).getEditorSettings()\n\t\t\t\t\t\t.codeEditingEnabled,\n\t\t\t\tmode: select( editorStore ).getEditorMode(),\n\t\t\t} ),\n\t\t\t[]\n\t\t);\n\tconst { switchEditorMode } = useDispatch( editorStore );\n\n\tlet selectedMode = mode;\n\tif ( ! isRichEditingEnabled && mode === 'visual' ) {\n\t\tselectedMode = 'text';\n\t}\n\tif ( ! isCodeEditingEnabled && mode === 'text' ) {\n\t\tselectedMode = 'visual';\n\t}\n\n\tconst choices = MODES.map( ( choice ) => {\n\t\tif ( ! isCodeEditingEnabled && choice.value === 'text' ) {\n\t\t\tchoice = {\n\t\t\t\t...choice,\n\t\t\t\tdisabled: true,\n\t\t\t};\n\t\t}\n\t\tif ( ! isRichEditingEnabled && choice.value === 'visual' ) {\n\t\t\tchoice = {\n\t\t\t\t...choice,\n\t\t\t\tdisabled: true,\n\t\t\t\tinfo: __(\n\t\t\t\t\t'You can enable the visual editor in your profile settings.'\n\t\t\t\t),\n\t\t\t};\n\t\t}\n\t\tif ( choice.value !== selectedMode && ! choice.disabled ) {\n\t\t\treturn { ...choice, shortcut };\n\t\t}\n\t\treturn choice;\n\t} );\n\n\treturn (\n\t\t<MenuGroup label={ __( 'Editor' ) }>\n\t\t\t<MenuItemsChoice\n\t\t\t\tchoices={ choices }\n\t\t\t\tvalue={ selectedMode }\n\t\t\t\tonSelect={ switchEditorMode }\n\t\t\t/>\n\t\t</MenuGroup>\n\t);\n}\n\nexport default ModeSwitcher;\n"],"mappings":";;;;;;AAGA,IAAAA,KAA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EAEA,MAAMC,OAAO,GAAGrB,KAAK,CAACsB,GAAG,CAAIC,MAAM,IAAM;IACxC,IAAK,CAAEhB,oBAAoB,IAAIgB,MAAM,CAACtB,KAAK,KAAK,MAAM,EAAG;MACxDsB,MAAM,GAAG;QACR,GAAGA,MAAM;QACTC,QAAQ,EAAE;MACX,CAAC;IACF;IACA,IAAK,CAAElB,oBAAoB,IAAIiB,MAAM,CAACtB,KAAK,KAAK,QAAQ,EAAG;MAC1DsB,MAAM,GAAG;QACR,GAAGA,MAAM;QACTC,QAAQ,EAAE,IAAI;QACdC,IAAI,EAAE,IAAAtB,QAAE,EACP,4DACD;MACD,CAAC;IACF;IACA,IAAKoB,MAAM,CAACtB,KAAK,KAAKmB,YAAY,IAAI,CAAEG,MAAM,CAACC,QAAQ,EAAG;MACzD,OAAO;QAAE,GAAGD,MAAM;QAAElB;MAAS,CAAC;IAC/B;IACA,OAAOkB,MAAM;EACd,CAAE,CAAC;EAEH,oBACC,IAAAxB,WAAA,CAAA2B,GAAA,EAAC/B,WAAA,CAAAgC,SAAS;IAACzB,KAAK,EAAG,IAAAC,QAAE,EAAE,QAAS,CAAG;IAAAyB,QAAA,eAClC,IAAA7B,WAAA,CAAA2B,GAAA,EAAC/B,WAAA,CAAAkC,eAAe;MACfR,OAAO,EAAGA,OAAS;MACnBpB,KAAK,EAAGmB,YAAc;MACtBU,QAAQ,EAAGZ;IAAkB,CAC7B;EAAC,CACQ,CAAC;AAEd;AAAC,IAAAa,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEc7B,YAAY","ignoreList":[]}
1
+ {"version":3,"names":["_i18n","require","_components","_data","_keyboardShortcuts","_store","_jsxRuntime","MODES","value","label","__","ModeSwitcher","shortcut","isRichEditingEnabled","isCodeEditingEnabled","mode","useSelect","select","keyboardShortcutsStore","getShortcutRepresentation","editorStore","getEditorSettings","richEditingEnabled","codeEditingEnabled","getEditorMode","switchEditorMode","useDispatch","selectedMode","choices","map","choice","disabled","info","jsx","MenuGroup","children","MenuItemsChoice","onSelect","_default","exports","default"],"sources":["@wordpress/editor/src/components/mode-switcher/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { MenuItemsChoice, MenuGroup } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Set of available mode options.\n *\n * @type {Array}\n */\nconst MODES = [\n\t{\n\t\tvalue: 'visual',\n\t\tlabel: __( 'Visual editor' ),\n\t},\n\t{\n\t\tvalue: 'text',\n\t\tlabel: __( 'Code editor' ),\n\t},\n];\n\nfunction ModeSwitcher() {\n\tconst { shortcut, isRichEditingEnabled, isCodeEditingEnabled, mode } =\n\t\tuseSelect(\n\t\t\t( select ) => ( {\n\t\t\t\tshortcut: select(\n\t\t\t\t\tkeyboardShortcutsStore\n\t\t\t\t).getShortcutRepresentation( 'core/editor/toggle-mode' ),\n\t\t\t\tisRichEditingEnabled:\n\t\t\t\t\tselect( editorStore ).getEditorSettings()\n\t\t\t\t\t\t.richEditingEnabled,\n\t\t\t\tisCodeEditingEnabled:\n\t\t\t\t\tselect( editorStore ).getEditorSettings()\n\t\t\t\t\t\t.codeEditingEnabled,\n\t\t\t\tmode: select( editorStore ).getEditorMode(),\n\t\t\t} ),\n\t\t\t[]\n\t\t);\n\tconst { switchEditorMode } = useDispatch( editorStore );\n\n\tlet selectedMode = mode;\n\tif ( ! isRichEditingEnabled && mode === 'visual' ) {\n\t\tselectedMode = 'text';\n\t}\n\tif ( ! isCodeEditingEnabled && mode === 'text' ) {\n\t\tselectedMode = 'visual';\n\t}\n\n\tconst choices = MODES.map( ( choice ) => {\n\t\tif ( ! isCodeEditingEnabled && choice.value === 'text' ) {\n\t\t\tchoice = {\n\t\t\t\t...choice,\n\t\t\t\tdisabled: true,\n\t\t\t};\n\t\t}\n\t\tif ( ! isRichEditingEnabled && choice.value === 'visual' ) {\n\t\t\tchoice = {\n\t\t\t\t...choice,\n\t\t\t\tdisabled: true,\n\t\t\t\tinfo: __(\n\t\t\t\t\t'You can enable the visual editor in your profile settings.'\n\t\t\t\t),\n\t\t\t};\n\t\t}\n\t\tif ( choice.value !== selectedMode && ! choice.disabled ) {\n\t\t\treturn { ...choice, shortcut };\n\t\t}\n\t\treturn choice;\n\t} );\n\n\treturn (\n\t\t<MenuGroup label={ __( 'Editor' ) }>\n\t\t\t<MenuItemsChoice\n\t\t\t\tchoices={ choices }\n\t\t\t\tvalue={ selectedMode }\n\t\t\t\tonSelect={ switchEditorMode }\n\t\t\t/>\n\t\t</MenuGroup>\n\t);\n}\n\nexport default ModeSwitcher;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,kBAAA,GAAAH,OAAA;AAKA,IAAAI,MAAA,GAAAJ,OAAA;AAAmD,IAAAK,WAAA,GAAAL,OAAA;AAXnD;AACA;AACA;;AAMA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA,GACA,MAAMM,KAAK,GAAG,CACb;EACCC,KAAK,EAAE,QAAQ;EACfC,KAAK,EAAE,IAAAC,QAAE,EAAE,eAAgB;AAC5B,CAAC,EACD;EACCF,KAAK,EAAE,MAAM;EACbC,KAAK,EAAE,IAAAC,QAAE,EAAE,aAAc;AAC1B,CAAC,CACD;AAED,SAASC,YAAYA,CAAA,EAAG;EACvB,MAAM;IAAEC,QAAQ;IAAEC,oBAAoB;IAAEC,oBAAoB;IAAEC;EAAK,CAAC,GACnE,IAAAC,eAAS,EACNC,MAAM,KAAQ;IACfL,QAAQ,EAAEK,MAAM,CACfC,wBACD,CAAC,CAACC,yBAAyB,CAAE,yBAA0B,CAAC;IACxDN,oBAAoB,EACnBI,MAAM,CAAEG,YAAY,CAAC,CAACC,iBAAiB,CAAC,CA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7B,WAAA,CAAA2B,GAAA,EAAC/B,WAAA,CAAAkC,eAAe;MACfR,OAAO,EAAGA,OAAS;MACnBpB,KAAK,EAAGmB,YAAc;MACtBU,QAAQ,EAAGZ;IAAkB,CAC7B;EAAC,CACQ,CAAC;AAEd;AAAC,IAAAa,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEc7B,YAAY","ignoreList":[]}
@@ -96,7 +96,6 @@ function MoreMenu() {
96
96
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_modeSwitcher.default, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_interface.ActionItem.Slot, {
97
97
  name: "core/plugin-more-menu",
98
98
  label: (0, _i18n.__)('Plugins'),
99
- as: _components.MenuGroup,
100
99
  fillProps: {
101
100
  onClick: onClose
102
101
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_i18n","require","_data","_keycodes","_icons","_components","_preferences","_interface","_copyContentMenuItem","_interopRequireDefault","_modeSwitcher","_toolsMoreMenuGroup","_viewMoreMenuGroup","_store","_jsxRuntime","MoreMenu","openModal","useDispatch","interfaceStore","set","setPreference","preferencesStore","toggleDistractionFree","editorStore","showIconLabels","useSelect","select","get","turnOffDistractionFree","jsx","Fragment","children","DropdownMenu","icon","moreVertical","label","__","popoverProps","placement","className","toggleProps","showTooltip","variant","tooltipPosition","size","onClose","jsxs","MenuGroup","_x","PreferenceToggleMenuItem","scope","name","onToggle","info","messageActivated","messageDeactivated","handleToggling","createNotice","shortcut","displayShortcut","primaryShift","default","Slot","fillProps","ActionItem","as","onClick","MenuItem","access","external","href","target","rel","VisuallyHidden"],"sources":["@wordpress/editor/src/components/more-menu/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { displayShortcut } from '@wordpress/keycodes';\nimport { external, moreVertical } from '@wordpress/icons';\nimport {\n\tMenuGroup,\n\tMenuItem,\n\tVisuallyHidden,\n\tDropdownMenu,\n} from '@wordpress/components';\nimport {\n\tPreferenceToggleMenuItem,\n\tstore as preferencesStore,\n} from '@wordpress/preferences';\nimport { store as interfaceStore, ActionItem } from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport CopyContentMenuItem from './copy-content-menu-item';\nimport ModeSwitcher from '../mode-switcher';\nimport ToolsMoreMenuGroup from './tools-more-menu-group';\nimport ViewMoreMenuGroup from './view-more-menu-group';\nimport { store as editorStore } from '../../store';\n\nexport default function MoreMenu() {\n\tconst { openModal } = useDispatch( interfaceStore );\n\tconst { set: setPreference } = useDispatch( preferencesStore );\n\tconst { toggleDistractionFree } = useDispatch( editorStore );\n\tconst showIconLabels = useSelect(\n\t\t( select ) =>\n\t\t\tselect( preferencesStore ).get( 'core', 'showIconLabels' ),\n\t\t[]\n\t);\n\n\tconst turnOffDistractionFree = () => {\n\t\tsetPreference( 'core', 'distractionFree', false );\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<DropdownMenu\n\t\t\t\ticon={ moreVertical }\n\t\t\t\tlabel={ __( 'Options' ) }\n\t\t\t\tpopoverProps={ {\n\t\t\t\t\tplacement: 'bottom-end',\n\t\t\t\t\tclassName: 'more-menu-dropdown__content',\n\t\t\t\t} }\n\t\t\t\ttoggleProps={ {\n\t\t\t\t\tshowTooltip: ! showIconLabels,\n\t\t\t\t\t...( showIconLabels && { variant: 'tertiary' } ),\n\t\t\t\t\ttooltipPosition: 'bottom',\n\t\t\t\t\tsize: 'compact',\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t{ ( { onClose } ) => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<MenuGroup label={ _x( 'View', 'noun' ) }>\n\t\t\t\t\t\t\t<PreferenceToggleMenuItem\n\t\t\t\t\t\t\t\tscope=\"core\"\n\t\t\t\t\t\t\t\tname=\"fixedToolbar\"\n\t\t\t\t\t\t\t\tonToggle={ turnOffDistractionFree }\n\t\t\t\t\t\t\t\tlabel={ __( 'Top toolbar' ) }\n\t\t\t\t\t\t\t\tinfo={ __(\n\t\t\t\t\t\t\t\t\t'Access all block and document tools in a single place'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tmessageActivated={ __(\n\t\t\t\t\t\t\t\t\t'Top toolbar activated.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tmessageDeactivated={ __(\n\t\t\t\t\t\t\t\t\t'Top toolbar deactivated.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<PreferenceToggleMenuItem\n\t\t\t\t\t\t\t\tscope=\"core\"\n\t\t\t\t\t\t\t\tname=\"distractionFree\"\n\t\t\t\t\t\t\t\tlabel={ __( 'Distraction free' ) }\n\t\t\t\t\t\t\t\tinfo={ __( 'Write with calmness' ) }\n\t\t\t\t\t\t\t\thandleToggling={ false }\n\t\t\t\t\t\t\t\tonToggle={ () =>\n\t\t\t\t\t\t\t\t\ttoggleDistractionFree( {\n\t\t\t\t\t\t\t\t\t\tcreateNotice: false,\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\tmessageActivated={ __(\n\t\t\t\t\t\t\t\t\t'Distraction free mode activated.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tmessageDeactivated={ __(\n\t\t\t\t\t\t\t\t\t'Distraction free mode deactivated.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tshortcut={ displayShortcut.primaryShift(\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/>\n\t\t\t\t\t\t\t<PreferenceToggleMenuItem\n\t\t\t\t\t\t\t\tscope=\"core\"\n\t\t\t\t\t\t\t\tname=\"focusMode\"\n\t\t\t\t\t\t\t\tlabel={ __( 'Spotlight mode' ) }\n\t\t\t\t\t\t\t\tinfo={ __( 'Focus on one block at a time' ) }\n\t\t\t\t\t\t\t\tmessageActivated={ __(\n\t\t\t\t\t\t\t\t\t'Spotlight mode activated.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tmessageDeactivated={ __(\n\t\t\t\t\t\t\t\t\t'Spotlight mode deactivated.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<ViewMoreMenuGroup.Slot fillProps={ { onClose } } />\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t<ModeSwitcher />\n\t\t\t\t\t\t<ActionItem.Slot\n\t\t\t\t\t\t\tname=\"core/plugin-more-menu\"\n\t\t\t\t\t\t\tlabel={ __( 'Plugins' ) }\n\t\t\t\t\t\t\tas={ MenuGroup }\n\t\t\t\t\t\t\tfillProps={ { onClick: onClose } }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<MenuGroup label={ __( 'Tools' ) }>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\t\topenModal( 'editor/keyboard-shortcut-help' )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tshortcut={ displayShortcut.access( 'h' ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Keyboard shortcuts' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t<CopyContentMenuItem />\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\ticon={ external }\n\t\t\t\t\t\t\t\thref={ __(\n\t\t\t\t\t\t\t\t\t'https://wordpress.org/documentation/article/wordpress-block-editor/'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Help' ) }\n\t\t\t\t\t\t\t\t<VisuallyHidden as=\"span\">\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t/* translators: accessibility text */\n\t\t\t\t\t\t\t\t\t\t__( '(opens in a new tab)' )\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t<ToolsMoreMenuGroup.Slot\n\t\t\t\t\t\t\t\tfillProps={ { onClose } }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\t\topenModal( 'editor/preferences' )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Preferences' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</DropdownMenu>\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AAMA,IAAAK,YAAA,GAAAL,OAAA;AAIA,IAAAM,UAAA,GAAAN,OAAA;AAKA,IAAAO,oBAAA,GAAAC,sBAAA,CAAAR,OAAA;AACA,IAAAS,aAAA,GAAAD,sBAAA,CAAAR,OAAA;AACA,IAAAU,mBAAA,GAAAF,sBAAA,CAAAR,OAAA;AACA,IAAAW,kBAAA,GAAAH,sBAAA,CAAAR,OAAA;AACA,IAAAY,MAAA,GAAAZ,OAAA;AAAmD,IAAAa,WAAA,GAAAb,OAAA;AA1BnD;AACA;AACA;;AAiBA;AACA;AACA;;AAOe,SAASc,QAAQA,CAAA,EAAG;EAClC,MAAM;IAAEC;EAAU,CAAC,GAAG,IAAAC,iBAAW,EAAEC,gBAAe,CAAC;EAC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,CAAC,eACX,IAAAtB,WAAA,CAAAe,GAAA,EAAClB,mBAAA,CAAAkD,OAAkB,CAACC,IAAI;YACvBC,SAAS,EAAG;cAAElB;YAAQ;UAAG,CACzB,CAAC;QAAA,CACQ,CAAC,eACZ,IAAA/B,WAAA,CAAAe,GAAA,EAACxB,WAAA,CAAA0C,SAAS;UAAAhB,QAAA,eACT,IAAAjB,WAAA,CAAAe,GAAA,EAACxB,WAAA,CAAA8D,QAAQ;YACRD,OAAO,EAAGA,CAAA,KACTlD,SAAS,CAAE,oBAAqB,CAChC;YAAAe,QAAA,EAEC,IAAAK,QAAE,EAAE,aAAc;UAAC,CACZ;QAAC,CACD,CAAC;MAAA,CACX;IACF,CACY;EAAC,CACd,CAAC;AAEL","ignoreList":[]}
1
+ {"version":3,"names":["_i18n","require","_data","_keycodes","_icons","_components","_preferences","_interface","_copyContentMenuItem","_interopRequireDefault","_modeSwitcher","_toolsMoreMenuGroup","_viewMoreMenuGroup","_store","_jsxRuntime","MoreMenu","openModal","useDispatch","interfaceStore","set","setPreference","preferencesStore","toggleDistractionFree","editorStore","showIconLabels","useSelect","select","get","turnOffDistractionFree","jsx","Fragment","children","DropdownMenu","icon","moreVertical","label","__","popoverProps","placement","className","toggleProps","showTooltip","variant","tooltipPosition","size","onClose","jsxs","MenuGroup","_x","PreferenceToggleMenuItem","scope","name","onToggle","info","messageActivated","messageDeactivated","handleToggling","createNotice","shortcut","displayShortcut","primaryShift","default","Slot","fillProps","ActionItem","onClick","MenuItem","access","external","href","target","rel","VisuallyHidden","as"],"sources":["@wordpress/editor/src/components/more-menu/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { displayShortcut } from '@wordpress/keycodes';\nimport { external, moreVertical } from '@wordpress/icons';\nimport {\n\tMenuGroup,\n\tMenuItem,\n\tVisuallyHidden,\n\tDropdownMenu,\n} from '@wordpress/components';\nimport {\n\tPreferenceToggleMenuItem,\n\tstore as preferencesStore,\n} from '@wordpress/preferences';\nimport { store as interfaceStore, ActionItem } from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport CopyContentMenuItem from './copy-content-menu-item';\nimport ModeSwitcher from '../mode-switcher';\nimport ToolsMoreMenuGroup from './tools-more-menu-group';\nimport ViewMoreMenuGroup from './view-more-menu-group';\nimport { store as editorStore } from '../../store';\n\nexport default function MoreMenu() {\n\tconst { openModal } = useDispatch( interfaceStore );\n\tconst { set: setPreference } = useDispatch( preferencesStore );\n\tconst { toggleDistractionFree } = useDispatch( editorStore );\n\tconst showIconLabels = useSelect(\n\t\t( select ) =>\n\t\t\tselect( preferencesStore ).get( 'core', 'showIconLabels' ),\n\t\t[]\n\t);\n\n\tconst turnOffDistractionFree = () => {\n\t\tsetPreference( 'core', 'distractionFree', false );\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<DropdownMenu\n\t\t\t\ticon={ moreVertical }\n\t\t\t\tlabel={ __( 'Options' ) }\n\t\t\t\tpopoverProps={ {\n\t\t\t\t\tplacement: 'bottom-end',\n\t\t\t\t\tclassName: 'more-menu-dropdown__content',\n\t\t\t\t} }\n\t\t\t\ttoggleProps={ {\n\t\t\t\t\tshowTooltip: ! showIconLabels,\n\t\t\t\t\t...( showIconLabels && { variant: 'tertiary' } ),\n\t\t\t\t\ttooltipPosition: 'bottom',\n\t\t\t\t\tsize: 'compact',\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t{ ( { onClose } ) => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<MenuGroup label={ _x( 'View', 'noun' ) }>\n\t\t\t\t\t\t\t<PreferenceToggleMenuItem\n\t\t\t\t\t\t\t\tscope=\"core\"\n\t\t\t\t\t\t\t\tname=\"fixedToolbar\"\n\t\t\t\t\t\t\t\tonToggle={ turnOffDistractionFree }\n\t\t\t\t\t\t\t\tlabel={ __( 'Top toolbar' ) }\n\t\t\t\t\t\t\t\tinfo={ __(\n\t\t\t\t\t\t\t\t\t'Access all block and document tools in a single place'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tmessageActivated={ __(\n\t\t\t\t\t\t\t\t\t'Top toolbar activated.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tmessageDeactivated={ __(\n\t\t\t\t\t\t\t\t\t'Top toolbar deactivated.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<PreferenceToggleMenuItem\n\t\t\t\t\t\t\t\tscope=\"core\"\n\t\t\t\t\t\t\t\tname=\"distractionFree\"\n\t\t\t\t\t\t\t\tlabel={ __( 'Distraction free' ) }\n\t\t\t\t\t\t\t\tinfo={ __( 'Write with calmness' ) }\n\t\t\t\t\t\t\t\thandleToggling={ false }\n\t\t\t\t\t\t\t\tonToggle={ () =>\n\t\t\t\t\t\t\t\t\ttoggleDistractionFree( {\n\t\t\t\t\t\t\t\t\t\tcreateNotice: false,\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\tmessageActivated={ __(\n\t\t\t\t\t\t\t\t\t'Distraction free mode activated.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tmessageDeactivated={ __(\n\t\t\t\t\t\t\t\t\t'Distraction free mode deactivated.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tshortcut={ displayShortcut.primaryShift(\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/>\n\t\t\t\t\t\t\t<PreferenceToggleMenuItem\n\t\t\t\t\t\t\t\tscope=\"core\"\n\t\t\t\t\t\t\t\tname=\"focusMode\"\n\t\t\t\t\t\t\t\tlabel={ __( 'Spotlight mode' ) }\n\t\t\t\t\t\t\t\tinfo={ __( 'Focus on one block at a time' ) }\n\t\t\t\t\t\t\t\tmessageActivated={ __(\n\t\t\t\t\t\t\t\t\t'Spotlight mode activated.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tmessageDeactivated={ __(\n\t\t\t\t\t\t\t\t\t'Spotlight mode deactivated.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<ViewMoreMenuGroup.Slot fillProps={ { onClose } } />\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t<ModeSwitcher />\n\t\t\t\t\t\t<ActionItem.Slot\n\t\t\t\t\t\t\tname=\"core/plugin-more-menu\"\n\t\t\t\t\t\t\tlabel={ __( 'Plugins' ) }\n\t\t\t\t\t\t\tfillProps={ { onClick: onClose } }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<MenuGroup label={ __( 'Tools' ) }>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\t\topenModal( 'editor/keyboard-shortcut-help' )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tshortcut={ displayShortcut.access( 'h' ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Keyboard shortcuts' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t<CopyContentMenuItem />\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\ticon={ external }\n\t\t\t\t\t\t\t\thref={ __(\n\t\t\t\t\t\t\t\t\t'https://wordpress.org/documentation/article/wordpress-block-editor/'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Help' ) }\n\t\t\t\t\t\t\t\t<VisuallyHidden as=\"span\">\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t/* translators: accessibility text */\n\t\t\t\t\t\t\t\t\t\t__( '(opens in a new tab)' )\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t<ToolsMoreMenuGroup.Slot\n\t\t\t\t\t\t\t\tfillProps={ { onClose } }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\t\topenModal( 'editor/preferences' )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Preferences' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</DropdownMenu>\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AAMA,IAAAK,YAAA,GAAAL,OAAA;AAIA,IAAAM,UAAA,GAAAN,OAAA;AAKA,IAAAO,oBAAA,GAAAC,sBAAA,CAAAR,OAAA;AACA,IAAAS,aAAA,GAAAD,sBAAA,CAAAR,OAAA;AACA,IAAAU,mBAAA,GAAAF,sBAAA,CAAAR,OAAA;AACA,IAAAW,kBAAA,GAAAH,sBAAA,CAAAR,OAAA;AACA,IAAAY,MAAA,GAAAZ,OAAA;AAAmD,IAAAa,WAAA,GAAAb,OAAA;AA1BnD;AACA;AACA;;AAiBA;AACA;AACA;;AAOe,SAASc,QAAQA,CAAA,EAAG;EAClC,MAAM;IAAEC;EAAU,CAAC,GAAG,IAAAC,iBAAW,EAAEC,gBAAe,CAAC;EACnD,MAAM;IAAEC,GAAG,EAAEC;EAAc,CAAC,GAAG,IAAAH,iBAAW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SAAS,EAAG;cAAElB;YAAQ;UAAG,CACzB,CAAC;QAAA,CACQ,CAAC,eACZ,IAAA/B,WAAA,CAAAe,GAAA,EAACxB,WAAA,CAAA0C,SAAS;UAAAhB,QAAA,eACT,IAAAjB,WAAA,CAAAe,GAAA,EAACxB,WAAA,CAAA6D,QAAQ;YACRD,OAAO,EAAGA,CAAA,KACTjD,SAAS,CAAE,oBAAqB,CAChC;YAAAe,QAAA,EAEC,IAAAK,QAAE,EAAE,aAAc;UAAC,CACZ;QAAC,CACD,CAAC;MAAA,CACX;IACF,CACY;EAAC,CACd,CAAC;AAEL","ignoreList":[]}
@@ -1,3 +1,4 @@
1
+ /* wp:polyfill */
1
2
  "use strict";
2
3
 
3
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");