@wordpress/edit-post 7.32.0 → 7.33.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 (261) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/README.md +4 -196
  3. package/build/components/browser-url/index.js.map +1 -1
  4. package/build/components/editor-initialization/index.js +0 -1
  5. package/build/components/editor-initialization/index.js.map +1 -1
  6. package/build/components/editor-initialization/listener-hooks.js +1 -38
  7. package/build/components/editor-initialization/listener-hooks.js.map +1 -1
  8. package/build/components/header/fullscreen-mode-close/index.js.map +1 -1
  9. package/build/components/header/header-toolbar/index.native.js.map +1 -1
  10. package/build/components/header/index.js +4 -4
  11. package/build/components/header/index.js.map +1 -1
  12. package/build/components/header/index.native.js +1 -1
  13. package/build/components/header/index.native.js.map +1 -1
  14. package/build/components/header/main-dashboard-button/index.js.map +1 -1
  15. package/build/components/header/more-menu/index.js +7 -6
  16. package/build/components/header/more-menu/index.js.map +1 -1
  17. package/build/components/header/post-publish-button-or-toggle.js +9 -6
  18. package/build/components/header/post-publish-button-or-toggle.js.map +1 -1
  19. package/build/components/header/preferences-menu-item/index.js +12 -4
  20. package/build/components/header/preferences-menu-item/index.js.map +1 -1
  21. package/build/components/header/tools-more-menu-group/index.js.map +1 -1
  22. package/build/components/header/writing-menu/index.js.map +1 -1
  23. package/build/components/init-pattern-modal/index.js.map +1 -1
  24. package/build/components/keyboard-shortcuts/index.js +1 -36
  25. package/build/components/keyboard-shortcuts/index.js.map +1 -1
  26. package/build/components/layout/actions-panel.js.map +1 -1
  27. package/build/components/layout/index.js +12 -20
  28. package/build/components/layout/index.js.map +1 -1
  29. package/build/components/layout/index.native.js.map +1 -1
  30. package/build/components/meta-boxes/index.js.map +1 -1
  31. package/build/components/meta-boxes/meta-box-visibility.js.map +1 -1
  32. package/build/components/meta-boxes/meta-boxes-area/index.js.map +1 -1
  33. package/build/components/preferences-modal/enable-custom-fields.js.map +1 -1
  34. package/build/components/preferences-modal/enable-panel.js.map +1 -1
  35. package/build/components/preferences-modal/enable-publish-sidebar.js.map +1 -1
  36. package/build/components/preferences-modal/index.js +1 -21
  37. package/build/components/preferences-modal/index.js.map +1 -1
  38. package/build/components/preferences-modal/meta-boxes-section.js.map +1 -1
  39. package/build/components/sidebar/plugin-post-publish-panel/index.js.map +1 -1
  40. package/build/components/sidebar/plugin-pre-publish-panel/index.js.map +1 -1
  41. package/build/components/sidebar/post-format/index.js.map +1 -1
  42. package/build/components/sidebar/post-pending-status/index.js.map +1 -1
  43. package/build/components/sidebar/post-slug/index.js.map +1 -1
  44. package/build/components/sidebar/post-status/index.js +9 -9
  45. package/build/components/sidebar/post-status/index.js.map +1 -1
  46. package/build/components/sidebar/post-sticky/index.js.map +1 -1
  47. package/build/components/sidebar/post-trash/index.js.map +1 -1
  48. package/build/components/sidebar/post-visibility/index.js.map +1 -1
  49. package/build/components/sidebar/settings-header/index.js.map +1 -1
  50. package/build/components/sidebar/settings-sidebar/index.js +37 -40
  51. package/build/components/sidebar/settings-sidebar/index.js.map +1 -1
  52. package/build/components/text-editor/index.js.map +1 -1
  53. package/build/components/visual-editor/block-inspector-button.js +1 -1
  54. package/build/components/visual-editor/block-inspector-button.js.map +1 -1
  55. package/build/components/visual-editor/header.native.js.map +1 -1
  56. package/build/components/visual-editor/index.js +4 -1
  57. package/build/components/visual-editor/index.js.map +1 -1
  58. package/build/components/visual-editor/index.native.js.map +1 -1
  59. package/build/components/visual-editor/use-padding-appender.js +62 -0
  60. package/build/components/visual-editor/use-padding-appender.js.map +1 -0
  61. package/build/components/welcome-guide/default.js.map +1 -1
  62. package/build/components/welcome-guide/image.js.map +1 -1
  63. package/build/components/welcome-guide/index.js.map +1 -1
  64. package/build/components/welcome-guide/template.js.map +1 -1
  65. package/build/editor.js +2 -2
  66. package/build/editor.js.map +1 -1
  67. package/build/editor.native.js.map +1 -1
  68. package/build/hooks/commands/use-common-commands.js +5 -22
  69. package/build/hooks/commands/use-common-commands.js.map +1 -1
  70. package/build/hooks/components/index.js.map +1 -1
  71. package/build/hooks/index.js.map +1 -1
  72. package/build/hooks/use-navigate-to-entity-record.js.map +1 -1
  73. package/build/hooks/validate-multiple-use/index.js.map +1 -1
  74. package/build/index.js +4 -8
  75. package/build/index.js.map +1 -1
  76. package/build/index.native.js.map +1 -1
  77. package/build/lock-unlock.js.map +1 -1
  78. package/build/plugins/copy-content-menu-item/index.js.map +1 -1
  79. package/build/plugins/index.js.map +1 -1
  80. package/build/plugins/keyboard-shortcuts-help-menu-item/index.js +7 -4
  81. package/build/plugins/keyboard-shortcuts-help-menu-item/index.js.map +1 -1
  82. package/build/plugins/welcome-guide-menu-item/index.js.map +1 -1
  83. package/build/store/actions.js +10 -8
  84. package/build/store/actions.js.map +1 -1
  85. package/build/store/constants.js.map +1 -1
  86. package/build/store/index.js +1 -1
  87. package/build/store/index.js.map +1 -1
  88. package/build/store/reducer.js.map +1 -1
  89. package/build/store/selectors.js +34 -19
  90. package/build/store/selectors.js.map +1 -1
  91. package/build/utils/meta-boxes.js.map +1 -1
  92. package/build-module/components/browser-url/index.js.map +1 -1
  93. package/build-module/components/editor-initialization/index.js +1 -2
  94. package/build-module/components/editor-initialization/index.js.map +1 -1
  95. package/build-module/components/editor-initialization/listener-hooks.js +2 -38
  96. package/build-module/components/editor-initialization/listener-hooks.js.map +1 -1
  97. package/build-module/components/header/fullscreen-mode-close/index.js.map +1 -1
  98. package/build-module/components/header/header-toolbar/index.native.js.map +1 -1
  99. package/build-module/components/header/index.js +3 -3
  100. package/build-module/components/header/index.js.map +1 -1
  101. package/build-module/components/header/index.native.js +1 -1
  102. package/build-module/components/header/index.native.js.map +1 -1
  103. package/build-module/components/header/main-dashboard-button/index.js.map +1 -1
  104. package/build-module/components/header/more-menu/index.js +5 -4
  105. package/build-module/components/header/more-menu/index.js.map +1 -1
  106. package/build-module/components/header/post-publish-button-or-toggle.js +9 -6
  107. package/build-module/components/header/post-publish-button-or-toggle.js.map +1 -1
  108. package/build-module/components/header/preferences-menu-item/index.js +11 -3
  109. package/build-module/components/header/preferences-menu-item/index.js.map +1 -1
  110. package/build-module/components/header/tools-more-menu-group/index.js.map +1 -1
  111. package/build-module/components/header/writing-menu/index.js.map +1 -1
  112. package/build-module/components/init-pattern-modal/index.js.map +1 -1
  113. package/build-module/components/keyboard-shortcuts/index.js +1 -36
  114. package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
  115. package/build-module/components/layout/actions-panel.js.map +1 -1
  116. package/build-module/components/layout/index.js +11 -19
  117. package/build-module/components/layout/index.js.map +1 -1
  118. package/build-module/components/layout/index.native.js.map +1 -1
  119. package/build-module/components/meta-boxes/index.js.map +1 -1
  120. package/build-module/components/meta-boxes/meta-box-visibility.js.map +1 -1
  121. package/build-module/components/meta-boxes/meta-boxes-area/index.js.map +1 -1
  122. package/build-module/components/preferences-modal/enable-custom-fields.js.map +1 -1
  123. package/build-module/components/preferences-modal/enable-panel.js.map +1 -1
  124. package/build-module/components/preferences-modal/enable-publish-sidebar.js.map +1 -1
  125. package/build-module/components/preferences-modal/index.js +1 -20
  126. package/build-module/components/preferences-modal/index.js.map +1 -1
  127. package/build-module/components/preferences-modal/meta-boxes-section.js.map +1 -1
  128. package/build-module/components/sidebar/plugin-post-publish-panel/index.js.map +1 -1
  129. package/build-module/components/sidebar/plugin-pre-publish-panel/index.js.map +1 -1
  130. package/build-module/components/sidebar/post-format/index.js.map +1 -1
  131. package/build-module/components/sidebar/post-pending-status/index.js.map +1 -1
  132. package/build-module/components/sidebar/post-slug/index.js.map +1 -1
  133. package/build-module/components/sidebar/post-status/index.js +9 -10
  134. package/build-module/components/sidebar/post-status/index.js.map +1 -1
  135. package/build-module/components/sidebar/post-sticky/index.js.map +1 -1
  136. package/build-module/components/sidebar/post-trash/index.js.map +1 -1
  137. package/build-module/components/sidebar/post-visibility/index.js.map +1 -1
  138. package/build-module/components/sidebar/settings-header/index.js.map +1 -1
  139. package/build-module/components/sidebar/settings-sidebar/index.js +38 -41
  140. package/build-module/components/sidebar/settings-sidebar/index.js.map +1 -1
  141. package/build-module/components/text-editor/index.js.map +1 -1
  142. package/build-module/components/visual-editor/block-inspector-button.js +1 -1
  143. package/build-module/components/visual-editor/block-inspector-button.js.map +1 -1
  144. package/build-module/components/visual-editor/header.native.js.map +1 -1
  145. package/build-module/components/visual-editor/index.js +4 -1
  146. package/build-module/components/visual-editor/index.js.map +1 -1
  147. package/build-module/components/visual-editor/index.native.js.map +1 -1
  148. package/build-module/components/visual-editor/use-padding-appender.js +55 -0
  149. package/build-module/components/visual-editor/use-padding-appender.js.map +1 -0
  150. package/build-module/components/welcome-guide/default.js.map +1 -1
  151. package/build-module/components/welcome-guide/image.js.map +1 -1
  152. package/build-module/components/welcome-guide/index.js.map +1 -1
  153. package/build-module/components/welcome-guide/template.js.map +1 -1
  154. package/build-module/editor.js +2 -2
  155. package/build-module/editor.js.map +1 -1
  156. package/build-module/editor.native.js.map +1 -1
  157. package/build-module/hooks/commands/use-common-commands.js +7 -24
  158. package/build-module/hooks/commands/use-common-commands.js.map +1 -1
  159. package/build-module/hooks/components/index.js.map +1 -1
  160. package/build-module/hooks/index.js.map +1 -1
  161. package/build-module/hooks/use-navigate-to-entity-record.js.map +1 -1
  162. package/build-module/hooks/validate-multiple-use/index.js.map +1 -1
  163. package/build-module/index.js +5 -5
  164. package/build-module/index.js.map +1 -1
  165. package/build-module/index.native.js.map +1 -1
  166. package/build-module/lock-unlock.js.map +1 -1
  167. package/build-module/plugins/copy-content-menu-item/index.js.map +1 -1
  168. package/build-module/plugins/index.js.map +1 -1
  169. package/build-module/plugins/keyboard-shortcuts-help-menu-item/index.js +6 -3
  170. package/build-module/plugins/keyboard-shortcuts-help-menu-item/index.js.map +1 -1
  171. package/build-module/plugins/welcome-guide-menu-item/index.js.map +1 -1
  172. package/build-module/store/actions.js +8 -7
  173. package/build-module/store/actions.js.map +1 -1
  174. package/build-module/store/constants.js.map +1 -1
  175. package/build-module/store/index.js.map +1 -1
  176. package/build-module/store/reducer.js.map +1 -1
  177. package/build-module/store/selectors.js +33 -18
  178. package/build-module/store/selectors.js.map +1 -1
  179. package/build-module/utils/meta-boxes.js.map +1 -1
  180. package/build-style/classic-rtl.css +2 -2
  181. package/build-style/classic.css +2 -2
  182. package/build-style/style-rtl.css +12 -448
  183. package/build-style/style.css +12 -448
  184. package/package.json +32 -34
  185. package/src/classic.scss +1 -1
  186. package/src/components/editor-initialization/index.js +1 -5
  187. package/src/components/editor-initialization/listener-hooks.js +1 -40
  188. package/src/components/editor-initialization/test/listener-hooks.js +1 -96
  189. package/src/components/header/index.js +2 -3
  190. package/src/components/header/index.native.js +1 -1
  191. package/src/components/header/more-menu/index.js +3 -4
  192. package/src/components/header/post-publish-button-or-toggle.js +8 -3
  193. package/src/components/header/preferences-menu-item/index.js +9 -3
  194. package/src/components/header/style.scss +5 -3
  195. package/src/components/header/test/index.js +13 -1
  196. package/src/components/keyboard-shortcuts/index.js +3 -44
  197. package/src/components/layout/index.js +14 -41
  198. package/src/components/preferences-modal/index.js +1 -24
  199. package/src/components/sidebar/post-status/index.js +6 -9
  200. package/src/components/sidebar/settings-sidebar/index.js +62 -58
  201. package/src/components/visual-editor/block-inspector-button.js +1 -1
  202. package/src/components/visual-editor/index.js +4 -0
  203. package/src/components/visual-editor/use-padding-appender.js +66 -0
  204. package/src/editor.js +2 -2
  205. package/src/hooks/commands/use-common-commands.js +11 -26
  206. package/src/index.js +8 -4
  207. package/src/plugins/keyboard-shortcuts-help-menu-item/index.js +5 -3
  208. package/src/store/actions.js +10 -12
  209. package/src/store/selectors.js +41 -33
  210. package/src/store/test/actions.js +11 -10
  211. package/src/style.scss +1 -19
  212. package/build/components/header/plugin-more-menu-item/index.js +0 -78
  213. package/build/components/header/plugin-more-menu-item/index.js.map +0 -1
  214. package/build/components/header/plugin-sidebar-more-menu-item/index.js +0 -71
  215. package/build/components/header/plugin-sidebar-more-menu-item/index.js.map +0 -1
  216. package/build/components/keyboard-shortcut-help-modal/config.js +0 -78
  217. package/build/components/keyboard-shortcut-help-modal/config.js.map +0 -1
  218. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +0 -49
  219. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +0 -1
  220. package/build/components/keyboard-shortcut-help-modal/index.js +0 -132
  221. package/build/components/keyboard-shortcut-help-modal/index.js.map +0 -1
  222. package/build/components/keyboard-shortcut-help-modal/shortcut.js +0 -55
  223. package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +0 -1
  224. package/build/components/sidebar/plugin-post-status-info/index.js +0 -73
  225. package/build/components/sidebar/plugin-post-status-info/index.js.map +0 -1
  226. package/build/components/sidebar/plugin-sidebar/index.js +0 -104
  227. package/build/components/sidebar/plugin-sidebar/index.js.map +0 -1
  228. package/build/components/start-page-options/index.js +0 -107
  229. package/build/components/start-page-options/index.js.map +0 -1
  230. package/build-module/components/header/plugin-more-menu-item/index.js +0 -73
  231. package/build-module/components/header/plugin-more-menu-item/index.js.map +0 -1
  232. package/build-module/components/header/plugin-sidebar-more-menu-item/index.js +0 -65
  233. package/build-module/components/header/plugin-sidebar-more-menu-item/index.js.map +0 -1
  234. package/build-module/components/keyboard-shortcut-help-modal/config.js +0 -71
  235. package/build-module/components/keyboard-shortcut-help-modal/config.js.map +0 -1
  236. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +0 -41
  237. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +0 -1
  238. package/build-module/components/keyboard-shortcut-help-modal/index.js +0 -122
  239. package/build-module/components/keyboard-shortcut-help-modal/index.js.map +0 -1
  240. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +0 -48
  241. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +0 -1
  242. package/build-module/components/sidebar/plugin-post-status-info/index.js +0 -66
  243. package/build-module/components/sidebar/plugin-post-status-info/index.js.map +0 -1
  244. package/build-module/components/sidebar/plugin-sidebar/index.js +0 -98
  245. package/build-module/components/sidebar/plugin-sidebar/index.js.map +0 -1
  246. package/build-module/components/start-page-options/index.js +0 -100
  247. package/build-module/components/start-page-options/index.js.map +0 -1
  248. package/src/components/header/plugin-more-menu-item/index.js +0 -73
  249. package/src/components/header/plugin-sidebar-more-menu-item/index.js +0 -64
  250. package/src/components/keyboard-shortcut-help-modal/config.js +0 -53
  251. package/src/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +0 -43
  252. package/src/components/keyboard-shortcut-help-modal/index.js +0 -163
  253. package/src/components/keyboard-shortcut-help-modal/shortcut.js +0 -67
  254. package/src/components/keyboard-shortcut-help-modal/style.scss +0 -61
  255. package/src/components/keyboard-shortcut-help-modal/test/index.js +0 -36
  256. package/src/components/sidebar/plugin-post-status-info/index.js +0 -63
  257. package/src/components/sidebar/plugin-post-status-info/test/__snapshots__/index.js.snap +0 -11
  258. package/src/components/sidebar/plugin-post-status-info/test/index.js +0 -29
  259. package/src/components/sidebar/plugin-sidebar/index.js +0 -94
  260. package/src/components/start-page-options/index.js +0 -108
  261. package/src/components/start-page-options/style.scss +0 -26
@@ -1,73 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _react = require("react");
8
- var _components = require("@wordpress/components");
9
- /**
10
- * Defines as extensibility slot for the Summary panel.
11
- */
12
-
13
- /**
14
- * WordPress dependencies
15
- */
16
-
17
- const {
18
- Fill,
19
- Slot
20
- } = (0, _components.createSlotFill)('PluginPostStatusInfo');
21
-
22
- /**
23
- * Renders a row in the Summary panel of the Document sidebar.
24
- * It should be noted that this is named and implemented around the function it serves
25
- * and not its location, which may change in future iterations.
26
- *
27
- * @param {Object} props Component properties.
28
- * @param {string} [props.className] An optional class name added to the row.
29
- * @param {Element} props.children Children to be rendered.
30
- *
31
- * @example
32
- * ```js
33
- * // Using ES5 syntax
34
- * var __ = wp.i18n.__;
35
- * var PluginPostStatusInfo = wp.editPost.PluginPostStatusInfo;
36
- *
37
- * function MyPluginPostStatusInfo() {
38
- * return React.createElement(
39
- * PluginPostStatusInfo,
40
- * {
41
- * className: 'my-plugin-post-status-info',
42
- * },
43
- * __( 'My post status info' )
44
- * )
45
- * }
46
- * ```
47
- *
48
- * @example
49
- * ```jsx
50
- * // Using ESNext syntax
51
- * import { __ } from '@wordpress/i18n';
52
- * import { PluginPostStatusInfo } from '@wordpress/edit-post';
53
- *
54
- * const MyPluginPostStatusInfo = () => (
55
- * <PluginPostStatusInfo
56
- * className="my-plugin-post-status-info"
57
- * >
58
- * { __( 'My post status info' ) }
59
- * </PluginPostStatusInfo>
60
- * );
61
- * ```
62
- *
63
- * @return {Component} The component to be rendered.
64
- */
65
- const PluginPostStatusInfo = ({
66
- children,
67
- className
68
- }) => (0, _react.createElement)(Fill, null, (0, _react.createElement)(_components.PanelRow, {
69
- className: className
70
- }, children));
71
- PluginPostStatusInfo.Slot = Slot;
72
- var _default = exports.default = PluginPostStatusInfo;
73
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_components","require","Fill","Slot","createSlotFill","PluginPostStatusInfo","children","className","_react","createElement","PanelRow","_default","exports","default"],"sources":["@wordpress/edit-post/src/components/sidebar/plugin-post-status-info/index.js"],"sourcesContent":["/**\n * Defines as extensibility slot for the Summary panel.\n */\n\n/**\n * WordPress dependencies\n */\nimport { createSlotFill, PanelRow } from '@wordpress/components';\n\nconst { Fill, Slot } = createSlotFill( 'PluginPostStatusInfo' );\n\n/**\n * Renders a row in the Summary panel of the Document sidebar.\n * It should be noted that this is named and implemented around the function it serves\n * and not its location, which may change in future iterations.\n *\n * @param {Object} props Component properties.\n * @param {string} [props.className] An optional class name added to the row.\n * @param {Element} props.children Children to be rendered.\n *\n * @example\n * ```js\n * // Using ES5 syntax\n * var __ = wp.i18n.__;\n * var PluginPostStatusInfo = wp.editPost.PluginPostStatusInfo;\n *\n * function MyPluginPostStatusInfo() {\n * \treturn React.createElement(\n * \t\tPluginPostStatusInfo,\n * \t\t{\n * \t\t\tclassName: 'my-plugin-post-status-info',\n * \t\t},\n * \t\t__( 'My post status info' )\n * \t)\n * }\n * ```\n *\n * @example\n * ```jsx\n * // Using ESNext syntax\n * import { __ } from '@wordpress/i18n';\n * import { PluginPostStatusInfo } from '@wordpress/edit-post';\n *\n * const MyPluginPostStatusInfo = () => (\n * \t<PluginPostStatusInfo\n * \t\tclassName=\"my-plugin-post-status-info\"\n * \t>\n * \t\t{ __( 'My post status info' ) }\n * \t</PluginPostStatusInfo>\n * );\n * ```\n *\n * @return {Component} The component to be rendered.\n */\nconst PluginPostStatusInfo = ( { children, className } ) => (\n\t<Fill>\n\t\t<PanelRow className={ className }>{ children }</PanelRow>\n\t</Fill>\n);\n\nPluginPostStatusInfo.Slot = Slot;\n\nexport default PluginPostStatusInfo;\n"],"mappings":";;;;;;;AAOA,IAAAA,WAAA,GAAAC,OAAA;AAPA;AACA;AACA;;AAEA;AACA;AACA;;AAGA,MAAM;EAAEC,IAAI;EAAEC;AAAK,CAAC,GAAG,IAAAC,0BAAc,EAAE,sBAAuB,CAAC;;AAE/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,oBAAoB,GAAGA,CAAE;EAAEC,QAAQ;EAAEC;AAAU,CAAC,KACrD,IAAAC,MAAA,CAAAC,aAAA,EAACP,IAAI,QACJ,IAAAM,MAAA,CAAAC,aAAA,EAACT,WAAA,CAAAU,QAAQ;EAACH,SAAS,EAAGA;AAAW,GAAGD,QAAoB,CACnD,CACN;AAEDD,oBAAoB,CAACF,IAAI,GAAGA,IAAI;AAAC,IAAAQ,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAElBR,oBAAoB"}
@@ -1,104 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = PluginSidebarEditPost;
7
- var _react = require("react");
8
- var _interface = require("@wordpress/interface");
9
- var _data = require("@wordpress/data");
10
- var _i18n = require("@wordpress/i18n");
11
- var _keyboardShortcuts = require("@wordpress/keyboard-shortcuts");
12
- var _editor = require("@wordpress/editor");
13
- /**
14
- * WordPress dependencies
15
- */
16
-
17
- /**
18
- * Renders a sidebar when activated. The contents within the `PluginSidebar` will appear as content within the sidebar.
19
- * It also automatically renders a corresponding `PluginSidebarMenuItem` component when `isPinnable` flag is set to `true`.
20
- * If you wish to display the sidebar, you can with use the `PluginSidebarMoreMenuItem` component or the `wp.data.dispatch` API:
21
- *
22
- * ```js
23
- * wp.data.dispatch( 'core/edit-post' ).openGeneralSidebar( 'plugin-name/sidebar-name' );
24
- * ```
25
- *
26
- * @see PluginSidebarMoreMenuItem
27
- *
28
- * @param {Object} props Element props.
29
- * @param {string} props.name A string identifying the sidebar. Must be unique for every sidebar registered within the scope of your plugin.
30
- * @param {string} [props.className] An optional class name added to the sidebar body.
31
- * @param {string} props.title Title displayed at the top of the sidebar.
32
- * @param {boolean} [props.isPinnable=true] Whether to allow to pin sidebar to the toolbar. When set to `true` it also automatically renders a corresponding menu item.
33
- * @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered when the sidebar is pinned to toolbar.
34
- *
35
- * @example
36
- * ```js
37
- * // Using ES5 syntax
38
- * var __ = wp.i18n.__;
39
- * var el = React.createElement;
40
- * var PanelBody = wp.components.PanelBody;
41
- * var PluginSidebar = wp.editPost.PluginSidebar;
42
- * var moreIcon = React.createElement( 'svg' ); //... svg element.
43
- *
44
- * function MyPluginSidebar() {
45
- * return el(
46
- * PluginSidebar,
47
- * {
48
- * name: 'my-sidebar',
49
- * title: 'My sidebar title',
50
- * icon: moreIcon,
51
- * },
52
- * el(
53
- * PanelBody,
54
- * {},
55
- * __( 'My sidebar content' )
56
- * )
57
- * );
58
- * }
59
- * ```
60
- *
61
- * @example
62
- * ```jsx
63
- * // Using ESNext syntax
64
- * import { __ } from '@wordpress/i18n';
65
- * import { PanelBody } from '@wordpress/components';
66
- * import { PluginSidebar } from '@wordpress/edit-post';
67
- * import { more } from '@wordpress/icons';
68
- *
69
- * const MyPluginSidebar = () => (
70
- * <PluginSidebar
71
- * name="my-sidebar"
72
- * title="My sidebar title"
73
- * icon={ more }
74
- * >
75
- * <PanelBody>
76
- * { __( 'My sidebar content' ) }
77
- * </PanelBody>
78
- * </PluginSidebar>
79
- * );
80
- * ```
81
- */
82
- function PluginSidebarEditPost({
83
- className,
84
- ...props
85
- }) {
86
- const {
87
- postTitle,
88
- shortcut
89
- } = (0, _data.useSelect)(select => {
90
- return {
91
- postTitle: select(_editor.store).getEditedPostAttribute('title'),
92
- shortcut: select(_keyboardShortcuts.store).getShortcutRepresentation('core/edit-post/toggle-sidebar')
93
- };
94
- }, []);
95
- return (0, _react.createElement)(_interface.ComplementaryArea, {
96
- panelClassName: className,
97
- className: "edit-post-sidebar",
98
- smallScreenTitle: postTitle || (0, _i18n.__)('(no title)'),
99
- scope: "core/edit-post",
100
- toggleShortcut: shortcut,
101
- ...props
102
- });
103
- }
104
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_interface","require","_data","_i18n","_keyboardShortcuts","_editor","PluginSidebarEditPost","className","props","postTitle","shortcut","useSelect","select","editorStore","getEditedPostAttribute","keyboardShortcutsStore","getShortcutRepresentation","_react","createElement","ComplementaryArea","panelClassName","smallScreenTitle","__","scope","toggleShortcut"],"sources":["@wordpress/edit-post/src/components/sidebar/plugin-sidebar/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { ComplementaryArea } from '@wordpress/interface';\nimport { useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport { store as editorStore } from '@wordpress/editor';\n\n/**\n * Renders a sidebar when activated. The contents within the `PluginSidebar` will appear as content within the sidebar.\n * It also automatically renders a corresponding `PluginSidebarMenuItem` component when `isPinnable` flag is set to `true`.\n * If you wish to display the sidebar, you can with use the `PluginSidebarMoreMenuItem` component or the `wp.data.dispatch` API:\n *\n * ```js\n * wp.data.dispatch( 'core/edit-post' ).openGeneralSidebar( 'plugin-name/sidebar-name' );\n * ```\n *\n * @see PluginSidebarMoreMenuItem\n *\n * @param {Object} props Element props.\n * @param {string} props.name A string identifying the sidebar. Must be unique for every sidebar registered within the scope of your plugin.\n * @param {string} [props.className] An optional class name added to the sidebar body.\n * @param {string} props.title Title displayed at the top of the sidebar.\n * @param {boolean} [props.isPinnable=true] Whether to allow to pin sidebar to the toolbar. When set to `true` it also automatically renders a corresponding menu item.\n * @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered when the sidebar is pinned to toolbar.\n *\n * @example\n * ```js\n * // Using ES5 syntax\n * var __ = wp.i18n.__;\n * var el = React.createElement;\n * var PanelBody = wp.components.PanelBody;\n * var PluginSidebar = wp.editPost.PluginSidebar;\n * var moreIcon = React.createElement( 'svg' ); //... svg element.\n *\n * function MyPluginSidebar() {\n * \treturn el(\n * \t\t\tPluginSidebar,\n * \t\t\t{\n * \t\t\t\tname: 'my-sidebar',\n * \t\t\t\ttitle: 'My sidebar title',\n * \t\t\t\ticon: moreIcon,\n * \t\t\t},\n * \t\t\tel(\n * \t\t\t\tPanelBody,\n * \t\t\t\t{},\n * \t\t\t\t__( 'My sidebar content' )\n * \t\t\t)\n * \t);\n * }\n * ```\n *\n * @example\n * ```jsx\n * // Using ESNext syntax\n * import { __ } from '@wordpress/i18n';\n * import { PanelBody } from '@wordpress/components';\n * import { PluginSidebar } from '@wordpress/edit-post';\n * import { more } from '@wordpress/icons';\n *\n * const MyPluginSidebar = () => (\n * \t<PluginSidebar\n * \t\tname=\"my-sidebar\"\n * \t\ttitle=\"My sidebar title\"\n * \t\ticon={ more }\n * \t>\n * \t\t<PanelBody>\n * \t\t\t{ __( 'My sidebar content' ) }\n * \t\t</PanelBody>\n * \t</PluginSidebar>\n * );\n * ```\n */\nexport default function PluginSidebarEditPost( { className, ...props } ) {\n\tconst { postTitle, shortcut } = useSelect( ( select ) => {\n\t\treturn {\n\t\t\tpostTitle: select( editorStore ).getEditedPostAttribute( 'title' ),\n\t\t\tshortcut: select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getShortcutRepresentation( 'core/edit-post/toggle-sidebar' ),\n\t\t};\n\t}, [] );\n\treturn (\n\t\t<ComplementaryArea\n\t\t\tpanelClassName={ className }\n\t\t\tclassName=\"edit-post-sidebar\"\n\t\t\tsmallScreenTitle={ postTitle || __( '(no title)' ) }\n\t\t\tscope=\"core/edit-post\"\n\t\t\ttoggleShortcut={ shortcut }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,kBAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AAPA;AACA;AACA;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASK,qBAAqBA,CAAE;EAAEC,SAAS;EAAE,GAAGC;AAAM,CAAC,EAAG;EACxE,MAAM;IAAEC,SAAS;IAAEC;EAAS,CAAC,GAAG,IAAAC,eAAS,EAAIC,MAAM,IAAM;IACxD,OAAO;MACNH,SAAS,EAAEG,MAAM,CAAEC,aAAY,CAAC,CAACC,sBAAsB,CAAE,OAAQ,CAAC;MAClEJ,QAAQ,EAAEE,MAAM,CACfG,wBACD,CAAC,CAACC,yBAAyB,CAAE,+BAAgC;IAC9D,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EACP,OACC,IAAAC,MAAA,CAAAC,aAAA,EAAClB,UAAA,CAAAmB,iBAAiB;IACjBC,cAAc,EAAGb,SAAW;IAC5BA,SAAS,EAAC,mBAAmB;IAC7Bc,gBAAgB,EAAGZ,SAAS,IAAI,IAAAa,QAAE,EAAE,YAAa,CAAG;IACpDC,KAAK,EAAC,gBAAgB;IACtBC,cAAc,EAAGd,QAAU;IAAA,GACtBF;EAAK,CACV,CAAC;AAEJ"}
@@ -1,107 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = StartPageOptions;
7
- var _react = require("react");
8
- var _components = require("@wordpress/components");
9
- var _i18n = require("@wordpress/i18n");
10
- var _element = require("@wordpress/element");
11
- var _blockEditor = require("@wordpress/block-editor");
12
- var _data = require("@wordpress/data");
13
- var _compose = require("@wordpress/compose");
14
- var _editor = require("@wordpress/editor");
15
- var _store = require("../../store");
16
- /**
17
- * WordPress dependencies
18
- */
19
-
20
- /**
21
- * Internal dependencies
22
- */
23
-
24
- function useStartPatterns() {
25
- // A pattern is a start pattern if it includes 'core/post-content' in its blockTypes,
26
- // and it has no postTypes declared and the current post type is page or if
27
- // the current post type is part of the postTypes declared.
28
- const {
29
- blockPatternsWithPostContentBlockType,
30
- postType
31
- } = (0, _data.useSelect)(select => {
32
- const {
33
- getPatternsByBlockTypes
34
- } = select(_blockEditor.store);
35
- const {
36
- getCurrentPostType
37
- } = select(_editor.store);
38
- return {
39
- blockPatternsWithPostContentBlockType: getPatternsByBlockTypes('core/post-content'),
40
- postType: getCurrentPostType()
41
- };
42
- }, []);
43
- return (0, _element.useMemo)(() => {
44
- // filter patterns without postTypes declared if the current postType is page
45
- // or patterns that declare the current postType in its post type array.
46
- return blockPatternsWithPostContentBlockType.filter(pattern => {
47
- return postType === 'page' && !pattern.postTypes || Array.isArray(pattern.postTypes) && pattern.postTypes.includes(postType);
48
- });
49
- }, [postType, blockPatternsWithPostContentBlockType]);
50
- }
51
- function PatternSelection({
52
- blockPatterns,
53
- onChoosePattern
54
- }) {
55
- const shownBlockPatterns = (0, _compose.useAsyncList)(blockPatterns);
56
- const {
57
- resetEditorBlocks
58
- } = (0, _data.useDispatch)(_editor.store);
59
- return (0, _react.createElement)(_blockEditor.__experimentalBlockPatternsList, {
60
- blockPatterns: blockPatterns,
61
- shownPatterns: shownBlockPatterns,
62
- onClickPattern: (_pattern, blocks) => {
63
- resetEditorBlocks(blocks);
64
- onChoosePattern();
65
- }
66
- });
67
- }
68
- function StartPageOptionsModal({
69
- onClose
70
- }) {
71
- const startPatterns = useStartPatterns();
72
- const hasStartPattern = startPatterns.length > 0;
73
- if (!hasStartPattern) {
74
- return null;
75
- }
76
- return (0, _react.createElement)(_components.Modal, {
77
- className: "edit-post-start-page-options__modal",
78
- title: (0, _i18n.__)('Choose a pattern'),
79
- isFullScreen: true,
80
- onRequestClose: onClose
81
- }, (0, _react.createElement)("div", {
82
- className: "edit-post-start-page-options__modal-content"
83
- }, (0, _react.createElement)(PatternSelection, {
84
- blockPatterns: startPatterns,
85
- onChoosePattern: onClose
86
- })));
87
- }
88
- function StartPageOptions() {
89
- const [isClosed, setIsClosed] = (0, _element.useState)(false);
90
- const shouldEnableModal = (0, _data.useSelect)(select => {
91
- const {
92
- isCleanNewPost,
93
- getRenderingMode
94
- } = select(_editor.store);
95
- const {
96
- isFeatureActive
97
- } = select(_store.store);
98
- return getRenderingMode() === 'post-only' && !isFeatureActive('welcomeGuide') && isCleanNewPost();
99
- }, []);
100
- if (!shouldEnableModal || isClosed) {
101
- return null;
102
- }
103
- return (0, _react.createElement)(StartPageOptionsModal, {
104
- onClose: () => setIsClosed(true)
105
- });
106
- }
107
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_components","require","_i18n","_element","_blockEditor","_data","_compose","_editor","_store","useStartPatterns","blockPatternsWithPostContentBlockType","postType","useSelect","select","getPatternsByBlockTypes","blockEditorStore","getCurrentPostType","editorStore","useMemo","filter","pattern","postTypes","Array","isArray","includes","PatternSelection","blockPatterns","onChoosePattern","shownBlockPatterns","useAsyncList","resetEditorBlocks","useDispatch","_react","createElement","__experimentalBlockPatternsList","shownPatterns","onClickPattern","_pattern","blocks","StartPageOptionsModal","onClose","startPatterns","hasStartPattern","length","Modal","className","title","__","isFullScreen","onRequestClose","StartPageOptions","isClosed","setIsClosed","useState","shouldEnableModal","isCleanNewPost","getRenderingMode","isFeatureActive","editPostStore"],"sources":["@wordpress/edit-post/src/components/start-page-options/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Modal } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useState, useMemo } from '@wordpress/element';\nimport {\n\tstore as blockEditorStore,\n\t__experimentalBlockPatternsList as BlockPatternsList,\n} from '@wordpress/block-editor';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useAsyncList } from '@wordpress/compose';\nimport { store as editorStore } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { store as editPostStore } from '../../store';\n\nfunction useStartPatterns() {\n\t// A pattern is a start pattern if it includes 'core/post-content' in its blockTypes,\n\t// and it has no postTypes declared and the current post type is page or if\n\t// the current post type is part of the postTypes declared.\n\tconst { blockPatternsWithPostContentBlockType, postType } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getPatternsByBlockTypes } = select( blockEditorStore );\n\t\t\tconst { getCurrentPostType } = select( editorStore );\n\t\t\treturn {\n\t\t\t\tblockPatternsWithPostContentBlockType:\n\t\t\t\t\tgetPatternsByBlockTypes( 'core/post-content' ),\n\t\t\t\tpostType: getCurrentPostType(),\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\treturn useMemo( () => {\n\t\t// filter patterns without postTypes declared if the current postType is page\n\t\t// or patterns that declare the current postType in its post type array.\n\t\treturn blockPatternsWithPostContentBlockType.filter( ( pattern ) => {\n\t\t\treturn (\n\t\t\t\t( postType === 'page' && ! pattern.postTypes ) ||\n\t\t\t\t( Array.isArray( pattern.postTypes ) &&\n\t\t\t\t\tpattern.postTypes.includes( postType ) )\n\t\t\t);\n\t\t} );\n\t}, [ postType, blockPatternsWithPostContentBlockType ] );\n}\n\nfunction PatternSelection( { blockPatterns, onChoosePattern } ) {\n\tconst shownBlockPatterns = useAsyncList( blockPatterns );\n\tconst { resetEditorBlocks } = useDispatch( editorStore );\n\treturn (\n\t\t<BlockPatternsList\n\t\t\tblockPatterns={ blockPatterns }\n\t\t\tshownPatterns={ shownBlockPatterns }\n\t\t\tonClickPattern={ ( _pattern, blocks ) => {\n\t\t\t\tresetEditorBlocks( blocks );\n\t\t\t\tonChoosePattern();\n\t\t\t} }\n\t\t/>\n\t);\n}\n\nfunction StartPageOptionsModal( { onClose } ) {\n\tconst startPatterns = useStartPatterns();\n\tconst hasStartPattern = startPatterns.length > 0;\n\n\tif ( ! hasStartPattern ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Modal\n\t\t\tclassName=\"edit-post-start-page-options__modal\"\n\t\t\ttitle={ __( 'Choose a pattern' ) }\n\t\t\tisFullScreen\n\t\t\tonRequestClose={ onClose }\n\t\t>\n\t\t\t<div className=\"edit-post-start-page-options__modal-content\">\n\t\t\t\t<PatternSelection\n\t\t\t\t\tblockPatterns={ startPatterns }\n\t\t\t\t\tonChoosePattern={ onClose }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</Modal>\n\t);\n}\n\nexport default function StartPageOptions() {\n\tconst [ isClosed, setIsClosed ] = useState( false );\n\tconst shouldEnableModal = useSelect( ( select ) => {\n\t\tconst { isCleanNewPost, getRenderingMode } = select( editorStore );\n\t\tconst { isFeatureActive } = select( editPostStore );\n\n\t\treturn (\n\t\t\tgetRenderingMode() === 'post-only' &&\n\t\t\t! isFeatureActive( 'welcomeGuide' ) &&\n\t\t\tisCleanNewPost()\n\t\t);\n\t}, [] );\n\n\tif ( ! shouldEnableModal || isClosed ) {\n\t\treturn null;\n\t}\n\n\treturn <StartPageOptionsModal onClose={ () => setIsClosed( true ) } />;\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAIA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AAKA,IAAAO,MAAA,GAAAP,OAAA;AAjBA;AACA;AACA;;AAYA;AACA;AACA;;AAGA,SAASQ,gBAAgBA,CAAA,EAAG;EAC3B;EACA;EACA;EACA,MAAM;IAAEC,qCAAqC;IAAEC;EAAS,CAAC,GAAG,IAAAC,eAAS,EAClEC,MAAM,IAAM;IACb,MAAM;MAAEC;IAAwB,CAAC,GAAGD,MAAM,CAAEE,kBAAiB,CAAC;IAC9D,MAAM;MAAEC;IAAmB,CAAC,GAAGH,MAAM,CAAEI,aAAY,CAAC;IACpD,OAAO;MACNP,qCAAqC,EACpCI,uBAAuB,CAAE,mBAAoB,CAAC;MAC/CH,QAAQ,EAAEK,kBAAkB,CAAC;IAC9B,CAAC;EACF,CAAC,EACD,EACD,CAAC;EAED,OAAO,IAAAE,gBAAO,EAAE,MAAM;IACrB;IACA;IACA,OAAOR,qCAAqC,CAACS,MAAM,CAAIC,OAAO,IAAM;MACnE,OACGT,QAAQ,KAAK,MAAM,IAAI,CAAES,OAAO,CAACC,SAAS,IAC1CC,KAAK,CAACC,OAAO,CAAEH,OAAO,CAACC,SAAU,CAAC,IACnCD,OAAO,CAACC,SAAS,CAACG,QAAQ,CAAEb,QAAS,CAAG;IAE3C,CAAE,CAAC;EACJ,CAAC,EAAE,CAAEA,QAAQ,EAAED,qCAAqC,CAAG,CAAC;AACzD;AAEA,SAASe,gBAAgBA,CAAE;EAAEC,aAAa;EAAEC;AAAgB,CAAC,EAAG;EAC/D,MAAMC,kBAAkB,GAAG,IAAAC,qBAAY,EAAEH,aAAc,CAAC;EACxD,MAAM;IAAEI;EAAkB,CAAC,GAAG,IAAAC,iBAAW,EAAEd,aAAY,CAAC;EACxD,OACC,IAAAe,MAAA,CAAAC,aAAA,EAAC7B,YAAA,CAAA8B,+BAAiB;IACjBR,aAAa,EAAGA,aAAe;IAC/BS,aAAa,EAAGP,kBAAoB;IACpCQ,cAAc,EAAGA,CAAEC,QAAQ,EAAEC,MAAM,KAAM;MACxCR,iBAAiB,CAAEQ,MAAO,CAAC;MAC3BX,eAAe,CAAC,CAAC;IAClB;EAAG,CACH,CAAC;AAEJ;AAEA,SAASY,qBAAqBA,CAAE;EAAEC;AAAQ,CAAC,EAAG;EAC7C,MAAMC,aAAa,GAAGhC,gBAAgB,CAAC,CAAC;EACxC,MAAMiC,eAAe,GAAGD,aAAa,CAACE,MAAM,GAAG,CAAC;EAEhD,IAAK,CAAED,eAAe,EAAG;IACxB,OAAO,IAAI;EACZ;EAEA,OACC,IAAAV,MAAA,CAAAC,aAAA,EAACjC,WAAA,CAAA4C,KAAK;IACLC,SAAS,EAAC,qCAAqC;IAC/CC,KAAK,EAAG,IAAAC,QAAE,EAAE,kBAAmB,CAAG;IAClCC,YAAY;IACZC,cAAc,EAAGT;EAAS,GAE1B,IAAAR,MAAA,CAAAC,aAAA;IAAKY,SAAS,EAAC;EAA6C,GAC3D,IAAAb,MAAA,CAAAC,aAAA,EAACR,gBAAgB;IAChBC,aAAa,EAAGe,aAAe;IAC/Bd,eAAe,EAAGa;EAAS,CAC3B,CACG,CACC,CAAC;AAEV;AAEe,SAASU,gBAAgBA,CAAA,EAAG;EAC1C,MAAM,CAAEC,QAAQ,EAAEC,WAAW,CAAE,GAAG,IAAAC,iBAAQ,EAAE,KAAM,CAAC;EACnD,MAAMC,iBAAiB,GAAG,IAAA1C,eAAS,EAAIC,MAAM,IAAM;IAClD,MAAM;MAAE0C,cAAc;MAAEC;IAAiB,CAAC,GAAG3C,MAAM,CAAEI,aAAY,CAAC;IAClE,MAAM;MAAEwC;IAAgB,CAAC,GAAG5C,MAAM,CAAE6C,YAAc,CAAC;IAEnD,OACCF,gBAAgB,CAAC,CAAC,KAAK,WAAW,IAClC,CAAEC,eAAe,CAAE,cAAe,CAAC,IACnCF,cAAc,CAAC,CAAC;EAElB,CAAC,EAAE,EAAG,CAAC;EAEP,IAAK,CAAED,iBAAiB,IAAIH,QAAQ,EAAG;IACtC,OAAO,IAAI;EACZ;EAEA,OAAO,IAAAnB,MAAA,CAAAC,aAAA,EAACM,qBAAqB;IAACC,OAAO,EAAGA,CAAA,KAAMY,WAAW,CAAE,IAAK;EAAG,CAAE,CAAC;AACvE"}
@@ -1,73 +0,0 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
- import { ActionItem } from '@wordpress/interface';
5
- import { compose } from '@wordpress/compose';
6
- import { MenuItem } from '@wordpress/components';
7
- import { withPluginContext } from '@wordpress/plugins';
8
-
9
- /**
10
- * Renders a menu item in `Plugins` group in `More Menu` drop down, and can be used to as a button or link depending on the props provided.
11
- * The text within the component appears as the menu item label.
12
- *
13
- * @param {Object} props Component properties.
14
- * @param {string} [props.href] When `href` is provided then the menu item is represented as an anchor rather than button. It corresponds to the `href` attribute of the anchor.
15
- * @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered to the left of the menu item label.
16
- * @param {Function} [props.onClick=noop] The callback function to be executed when the user clicks the menu item.
17
- * @param {...*} [props.other] Any additional props are passed through to the underlying [MenuItem](https://github.com/WordPress/gutenberg/tree/HEAD/packages/components/src/menu-item/README.md) component.
18
- *
19
- * @example
20
- * ```js
21
- * // Using ES5 syntax
22
- * var __ = wp.i18n.__;
23
- * var PluginMoreMenuItem = wp.editPost.PluginMoreMenuItem;
24
- * var moreIcon = React.createElement( 'svg' ); //... svg element.
25
- *
26
- * function onButtonClick() {
27
- * alert( 'Button clicked.' );
28
- * }
29
- *
30
- * function MyButtonMoreMenuItem() {
31
- * return React.createElement(
32
- * PluginMoreMenuItem,
33
- * {
34
- * icon: moreIcon,
35
- * onClick: onButtonClick,
36
- * },
37
- * __( 'My button title' )
38
- * );
39
- * }
40
- * ```
41
- *
42
- * @example
43
- * ```jsx
44
- * // Using ESNext syntax
45
- * import { __ } from '@wordpress/i18n';
46
- * import { PluginMoreMenuItem } from '@wordpress/edit-post';
47
- * import { more } from '@wordpress/icons';
48
- *
49
- * function onButtonClick() {
50
- * alert( 'Button clicked.' );
51
- * }
52
- *
53
- * const MyButtonMoreMenuItem = () => (
54
- * <PluginMoreMenuItem
55
- * icon={ more }
56
- * onClick={ onButtonClick }
57
- * >
58
- * { __( 'My button title' ) }
59
- * </PluginMoreMenuItem>
60
- * );
61
- * ```
62
- *
63
- * @return {Component} The component to be rendered.
64
- */
65
- export default compose(withPluginContext((context, ownProps) => {
66
- var _ownProps$as;
67
- return {
68
- as: (_ownProps$as = ownProps.as) !== null && _ownProps$as !== void 0 ? _ownProps$as : MenuItem,
69
- icon: ownProps.icon || context.icon,
70
- name: 'core/edit-post/plugin-more-menu'
71
- };
72
- }))(ActionItem);
73
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["ActionItem","compose","MenuItem","withPluginContext","context","ownProps","_ownProps$as","as","icon","name"],"sources":["@wordpress/edit-post/src/components/header/plugin-more-menu-item/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { ActionItem } from '@wordpress/interface';\nimport { compose } from '@wordpress/compose';\nimport { MenuItem } from '@wordpress/components';\nimport { withPluginContext } from '@wordpress/plugins';\n\n/**\n * Renders a menu item in `Plugins` group in `More Menu` drop down, and can be used to as a button or link depending on the props provided.\n * The text within the component appears as the menu item label.\n *\n * @param {Object} props Component properties.\n * @param {string} [props.href] When `href` is provided then the menu item is represented as an anchor rather than button. It corresponds to the `href` attribute of the anchor.\n * @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered to the left of the menu item label.\n * @param {Function} [props.onClick=noop] The callback function to be executed when the user clicks the menu item.\n * @param {...*} [props.other] Any additional props are passed through to the underlying [MenuItem](https://github.com/WordPress/gutenberg/tree/HEAD/packages/components/src/menu-item/README.md) component.\n *\n * @example\n * ```js\n * // Using ES5 syntax\n * var __ = wp.i18n.__;\n * var PluginMoreMenuItem = wp.editPost.PluginMoreMenuItem;\n * var moreIcon = React.createElement( 'svg' ); //... svg element.\n *\n * function onButtonClick() {\n * \talert( 'Button clicked.' );\n * }\n *\n * function MyButtonMoreMenuItem() {\n * \treturn React.createElement(\n * \t\tPluginMoreMenuItem,\n * \t\t{\n * \t\t\ticon: moreIcon,\n * \t\t\tonClick: onButtonClick,\n * \t\t},\n * \t\t__( 'My button title' )\n * \t);\n * }\n * ```\n *\n * @example\n * ```jsx\n * // Using ESNext syntax\n * import { __ } from '@wordpress/i18n';\n * import { PluginMoreMenuItem } from '@wordpress/edit-post';\n * import { more } from '@wordpress/icons';\n *\n * function onButtonClick() {\n * \talert( 'Button clicked.' );\n * }\n *\n * const MyButtonMoreMenuItem = () => (\n * \t<PluginMoreMenuItem\n * \t\ticon={ more }\n * \t\tonClick={ onButtonClick }\n * \t>\n * \t\t{ __( 'My button title' ) }\n * \t</PluginMoreMenuItem>\n * );\n * ```\n *\n * @return {Component} The component to be rendered.\n */\nexport default compose(\n\twithPluginContext( ( context, ownProps ) => {\n\t\treturn {\n\t\t\tas: ownProps.as ?? MenuItem,\n\t\t\ticon: ownProps.icon || context.icon,\n\t\t\tname: 'core/edit-post/plugin-more-menu',\n\t\t};\n\t} )\n)( ActionItem );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,UAAU,QAAQ,sBAAsB;AACjD,SAASC,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,QAAQ,QAAQ,uBAAuB;AAChD,SAASC,iBAAiB,QAAQ,oBAAoB;;AAEtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAeF,OAAO,CACrBE,iBAAiB,CAAE,CAAEC,OAAO,EAAEC,QAAQ,KAAM;EAAA,IAAAC,YAAA;EAC3C,OAAO;IACNC,EAAE,GAAAD,YAAA,GAAED,QAAQ,CAACE,EAAE,cAAAD,YAAA,cAAAA,YAAA,GAAIJ,QAAQ;IAC3BM,IAAI,EAAEH,QAAQ,CAACG,IAAI,IAAIJ,OAAO,CAACI,IAAI;IACnCC,IAAI,EAAE;EACP,CAAC;AACF,CAAE,CACH,CAAC,CAAET,UAAW,CAAC"}
@@ -1,65 +0,0 @@
1
- import { createElement } from "react";
2
- /**
3
- * WordPress dependencies
4
- */
5
- import { ComplementaryAreaMoreMenuItem } from '@wordpress/interface';
6
-
7
- /**
8
- * Renders a menu item in `Plugins` group in `More Menu` drop down,
9
- * and can be used to activate the corresponding `PluginSidebar` component.
10
- * The text within the component appears as the menu item label.
11
- *
12
- * @param {Object} props Component props.
13
- * @param {string} props.target A string identifying the target sidebar you wish to be activated by this menu item. Must be the same as the `name` prop you have given to that sidebar.
14
- * @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered to the left of the menu item label.
15
- *
16
- * @example
17
- * ```js
18
- * // Using ES5 syntax
19
- * var __ = wp.i18n.__;
20
- * var PluginSidebarMoreMenuItem = wp.editPost.PluginSidebarMoreMenuItem;
21
- * var moreIcon = React.createElement( 'svg' ); //... svg element.
22
- *
23
- * function MySidebarMoreMenuItem() {
24
- * return React.createElement(
25
- * PluginSidebarMoreMenuItem,
26
- * {
27
- * target: 'my-sidebar',
28
- * icon: moreIcon,
29
- * },
30
- * __( 'My sidebar title' )
31
- * )
32
- * }
33
- * ```
34
- *
35
- * @example
36
- * ```jsx
37
- * // Using ESNext syntax
38
- * import { __ } from '@wordpress/i18n';
39
- * import { PluginSidebarMoreMenuItem } from '@wordpress/edit-post';
40
- * import { more } from '@wordpress/icons';
41
- *
42
- * const MySidebarMoreMenuItem = () => (
43
- * <PluginSidebarMoreMenuItem
44
- * target="my-sidebar"
45
- * icon={ more }
46
- * >
47
- * { __( 'My sidebar title' ) }
48
- * </PluginSidebarMoreMenuItem>
49
- * );
50
- * ```
51
- *
52
- * @return {Component} The component to be rendered.
53
- */
54
-
55
- export default function PluginSidebarMoreMenuItem(props) {
56
- return createElement(ComplementaryAreaMoreMenuItem
57
- // Menu item is marked with unstable prop for backward compatibility.
58
- // @see https://github.com/WordPress/gutenberg/issues/14457
59
- , {
60
- __unstableExplicitMenuItem: true,
61
- scope: "core/edit-post",
62
- ...props
63
- });
64
- }
65
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["ComplementaryAreaMoreMenuItem","PluginSidebarMoreMenuItem","props","createElement","__unstableExplicitMenuItem","scope"],"sources":["@wordpress/edit-post/src/components/header/plugin-sidebar-more-menu-item/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { ComplementaryAreaMoreMenuItem } from '@wordpress/interface';\n\n/**\n * Renders a menu item in `Plugins` group in `More Menu` drop down,\n * and can be used to activate the corresponding `PluginSidebar` component.\n * The text within the component appears as the menu item label.\n *\n * @param {Object} props Component props.\n * @param {string} props.target A string identifying the target sidebar you wish to be activated by this menu item. Must be the same as the `name` prop you have given to that sidebar.\n * @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered to the left of the menu item label.\n *\n * @example\n * ```js\n * // Using ES5 syntax\n * var __ = wp.i18n.__;\n * var PluginSidebarMoreMenuItem = wp.editPost.PluginSidebarMoreMenuItem;\n * var moreIcon = React.createElement( 'svg' ); //... svg element.\n *\n * function MySidebarMoreMenuItem() {\n * \treturn React.createElement(\n * \t\tPluginSidebarMoreMenuItem,\n * \t\t{\n * \t\t\ttarget: 'my-sidebar',\n * \t\t\ticon: moreIcon,\n * \t\t},\n * \t\t__( 'My sidebar title' )\n * \t)\n * }\n * ```\n *\n * @example\n * ```jsx\n * // Using ESNext syntax\n * import { __ } from '@wordpress/i18n';\n * import { PluginSidebarMoreMenuItem } from '@wordpress/edit-post';\n * import { more } from '@wordpress/icons';\n *\n * const MySidebarMoreMenuItem = () => (\n * \t<PluginSidebarMoreMenuItem\n * \t\ttarget=\"my-sidebar\"\n * \t\ticon={ more }\n * \t>\n * \t\t{ __( 'My sidebar title' ) }\n * \t</PluginSidebarMoreMenuItem>\n * );\n * ```\n *\n * @return {Component} The component to be rendered.\n */\n\nexport default function PluginSidebarMoreMenuItem( props ) {\n\treturn (\n\t\t<ComplementaryAreaMoreMenuItem\n\t\t\t// Menu item is marked with unstable prop for backward compatibility.\n\t\t\t// @see https://github.com/WordPress/gutenberg/issues/14457\n\t\t\t__unstableExplicitMenuItem\n\t\t\tscope=\"core/edit-post\"\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,6BAA6B,QAAQ,sBAAsB;;AAEpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,eAAe,SAASC,yBAAyBA,CAAEC,KAAK,EAAG;EAC1D,OACCC,aAAA,CAACH;EACA;EACA;EAAA;IACAI,0BAA0B;IAC1BC,KAAK,EAAC,gBAAgB;IAAA,GACjBH;EAAK,CACV,CAAC;AAEJ"}
@@ -1,71 +0,0 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
- import { __ } from '@wordpress/i18n';
5
- export const textFormattingShortcuts = [{
6
- keyCombination: {
7
- modifier: 'primary',
8
- character: 'b'
9
- },
10
- description: __('Make the selected text bold.')
11
- }, {
12
- keyCombination: {
13
- modifier: 'primary',
14
- character: 'i'
15
- },
16
- description: __('Make the selected text italic.')
17
- }, {
18
- keyCombination: {
19
- modifier: 'primary',
20
- character: 'k'
21
- },
22
- description: __('Convert the selected text into a link.')
23
- }, {
24
- keyCombination: {
25
- modifier: 'primaryShift',
26
- character: 'k'
27
- },
28
- description: __('Remove a link.')
29
- }, {
30
- keyCombination: {
31
- character: '[['
32
- },
33
- description: __('Insert a link to a post or page.')
34
- }, {
35
- keyCombination: {
36
- modifier: 'primary',
37
- character: 'u'
38
- },
39
- description: __('Underline the selected text.')
40
- }, {
41
- keyCombination: {
42
- modifier: 'access',
43
- character: 'd'
44
- },
45
- description: __('Strikethrough the selected text.')
46
- }, {
47
- keyCombination: {
48
- modifier: 'access',
49
- character: 'x'
50
- },
51
- description: __('Make the selected text inline code.')
52
- }, {
53
- keyCombination: {
54
- modifier: 'access',
55
- character: '0'
56
- },
57
- description: __('Convert the current heading to a paragraph.')
58
- }, {
59
- keyCombination: {
60
- modifier: 'access',
61
- character: '1-6'
62
- },
63
- description: __('Convert the current paragraph or heading to a heading of level 1 to 6.')
64
- }, {
65
- keyCombination: {
66
- modifier: 'primaryShift',
67
- character: '\u00a0'
68
- },
69
- description: __('Add non breaking space.')
70
- }];
71
- //# sourceMappingURL=config.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["__","textFormattingShortcuts","keyCombination","modifier","character","description"],"sources":["@wordpress/edit-post/src/components/keyboard-shortcut-help-modal/config.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\nexport const textFormattingShortcuts = [\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'b' },\n\t\tdescription: __( 'Make the selected text bold.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'i' },\n\t\tdescription: __( 'Make the selected text italic.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'k' },\n\t\tdescription: __( 'Convert the selected text into a link.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primaryShift', character: 'k' },\n\t\tdescription: __( 'Remove a link.' ),\n\t},\n\t{\n\t\tkeyCombination: { character: '[[' },\n\t\tdescription: __( 'Insert a link to a post or page.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'u' },\n\t\tdescription: __( 'Underline the selected text.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'access', character: 'd' },\n\t\tdescription: __( 'Strikethrough the selected text.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'access', character: 'x' },\n\t\tdescription: __( 'Make the selected text inline code.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'access', character: '0' },\n\t\tdescription: __( 'Convert the current heading to a paragraph.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'access', character: '1-6' },\n\t\tdescription: __(\n\t\t\t'Convert the current paragraph or heading to a heading of level 1 to 6.'\n\t\t),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primaryShift', character: '\\u00a0' },\n\t\tdescription: __( 'Add non breaking space.' ),\n\t},\n];\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AAEpC,OAAO,MAAMC,uBAAuB,GAAG,CACtC;EACCC,cAAc,EAAE;IAAEC,QAAQ,EAAE,SAAS;IAAEC,SAAS,EAAE;EAAI,CAAC;EACvDC,WAAW,EAAEL,EAAE,CAAE,8BAA+B;AACjD,CAAC,EACD;EACCE,cAAc,EAAE;IAAEC,QAAQ,EAAE,SAAS;IAAEC,SAAS,EAAE;EAAI,CAAC;EACvDC,WAAW,EAAEL,EAAE,CAAE,gCAAiC;AACnD,CAAC,EACD;EACCE,cAAc,EAAE;IAAEC,QAAQ,EAAE,SAAS;IAAEC,SAAS,EAAE;EAAI,CAAC;EACvDC,WAAW,EAAEL,EAAE,CAAE,wCAAyC;AAC3D,CAAC,EACD;EACCE,cAAc,EAAE;IAAEC,QAAQ,EAAE,cAAc;IAAEC,SAAS,EAAE;EAAI,CAAC;EAC5DC,WAAW,EAAEL,EAAE,CAAE,gBAAiB;AACnC,CAAC,EACD;EACCE,cAAc,EAAE;IAAEE,SAAS,EAAE;EAAK,CAAC;EACnCC,WAAW,EAAEL,EAAE,CAAE,kCAAmC;AACrD,CAAC,EACD;EACCE,cAAc,EAAE;IAAEC,QAAQ,EAAE,SAAS;IAAEC,SAAS,EAAE;EAAI,CAAC;EACvDC,WAAW,EAAEL,EAAE,CAAE,8BAA+B;AACjD,CAAC,EACD;EACCE,cAAc,EAAE;IAAEC,QAAQ,EAAE,QAAQ;IAAEC,SAAS,EAAE;EAAI,CAAC;EACtDC,WAAW,EAAEL,EAAE,CAAE,kCAAmC;AACrD,CAAC,EACD;EACCE,cAAc,EAAE;IAAEC,QAAQ,EAAE,QAAQ;IAAEC,SAAS,EAAE;EAAI,CAAC;EACtDC,WAAW,EAAEL,EAAE,CAAE,qCAAsC;AACxD,CAAC,EACD;EACCE,cAAc,EAAE;IAAEC,QAAQ,EAAE,QAAQ;IAAEC,SAAS,EAAE;EAAI,CAAC;EACtDC,WAAW,EAAEL,EAAE,CAAE,6CAA8C;AAChE,CAAC,EACD;EACCE,cAAc,EAAE;IAAEC,QAAQ,EAAE,QAAQ;IAAEC,SAAS,EAAE;EAAM,CAAC;EACxDC,WAAW,EAAEL,EAAE,CACd,wEACD;AACD,CAAC,EACD;EACCE,cAAc,EAAE;IAAEC,QAAQ,EAAE,cAAc;IAAEC,SAAS,EAAE;EAAS,CAAC;EACjEC,WAAW,EAAEL,EAAE,CAAE,yBAA0B;AAC5C,CAAC,CACD"}
@@ -1,41 +0,0 @@
1
- import { createElement } from "react";
2
- /**
3
- * WordPress dependencies
4
- */
5
- import { useSelect } from '@wordpress/data';
6
- import { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';
7
-
8
- /**
9
- * Internal dependencies
10
- */
11
- import Shortcut from './shortcut';
12
- function DynamicShortcut({
13
- name
14
- }) {
15
- const {
16
- keyCombination,
17
- description,
18
- aliases
19
- } = useSelect(select => {
20
- const {
21
- getShortcutKeyCombination,
22
- getShortcutDescription,
23
- getShortcutAliases
24
- } = select(keyboardShortcutsStore);
25
- return {
26
- keyCombination: getShortcutKeyCombination(name),
27
- aliases: getShortcutAliases(name),
28
- description: getShortcutDescription(name)
29
- };
30
- }, [name]);
31
- if (!keyCombination) {
32
- return null;
33
- }
34
- return createElement(Shortcut, {
35
- keyCombination: keyCombination,
36
- description: description,
37
- aliases: aliases
38
- });
39
- }
40
- export default DynamicShortcut;
41
- //# sourceMappingURL=dynamic-shortcut.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["useSelect","store","keyboardShortcutsStore","Shortcut","DynamicShortcut","name","keyCombination","description","aliases","select","getShortcutKeyCombination","getShortcutDescription","getShortcutAliases","createElement"],"sources":["@wordpress/edit-post/src/components/keyboard-shortcut-help-modal/dynamic-shortcut.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\n\n/**\n * Internal dependencies\n */\nimport Shortcut from './shortcut';\n\nfunction DynamicShortcut( { name } ) {\n\tconst { keyCombination, description, aliases } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetShortcutKeyCombination,\n\t\t\t\tgetShortcutDescription,\n\t\t\t\tgetShortcutAliases,\n\t\t\t} = select( keyboardShortcutsStore );\n\n\t\t\treturn {\n\t\t\t\tkeyCombination: getShortcutKeyCombination( name ),\n\t\t\t\taliases: getShortcutAliases( name ),\n\t\t\t\tdescription: getShortcutDescription( name ),\n\t\t\t};\n\t\t},\n\t\t[ name ]\n\t);\n\n\tif ( ! keyCombination ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Shortcut\n\t\t\tkeyCombination={ keyCombination }\n\t\t\tdescription={ description }\n\t\t\taliases={ aliases }\n\t\t/>\n\t);\n}\n\nexport default DynamicShortcut;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,KAAK,IAAIC,sBAAsB,QAAQ,+BAA+B;;AAE/E;AACA;AACA;AACA,OAAOC,QAAQ,MAAM,YAAY;AAEjC,SAASC,eAAeA,CAAE;EAAEC;AAAK,CAAC,EAAG;EACpC,MAAM;IAAEC,cAAc;IAAEC,WAAW;IAAEC;EAAQ,CAAC,GAAGR,SAAS,CACvDS,MAAM,IAAM;IACb,MAAM;MACLC,yBAAyB;MACzBC,sBAAsB;MACtBC;IACD,CAAC,GAAGH,MAAM,CAAEP,sBAAuB,CAAC;IAEpC,OAAO;MACNI,cAAc,EAAEI,yBAAyB,CAAEL,IAAK,CAAC;MACjDG,OAAO,EAAEI,kBAAkB,CAAEP,IAAK,CAAC;MACnCE,WAAW,EAAEI,sBAAsB,CAAEN,IAAK;IAC3C,CAAC;EACF,CAAC,EACD,CAAEA,IAAI,CACP,CAAC;EAED,IAAK,CAAEC,cAAc,EAAG;IACvB,OAAO,IAAI;EACZ;EAEA,OACCO,aAAA,CAACV,QAAQ;IACRG,cAAc,EAAGA,cAAgB;IACjCC,WAAW,EAAGA,WAAa;IAC3BC,OAAO,EAAGA;EAAS,CACnB,CAAC;AAEJ;AAEA,eAAeJ,eAAe"}