@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
package/CHANGELOG.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 7.33.0 (2024-04-19)
6
+
5
7
  ## 7.32.0 (2024-04-03)
6
8
 
7
9
  ## 7.31.0 (2024-03-21)
package/README.md CHANGED
@@ -49,60 +49,7 @@ Undocumented declaration.
49
49
 
50
50
  ### PluginMoreMenuItem
51
51
 
52
- 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. The text within the component appears as the menu item label.
53
-
54
- _Usage_
55
-
56
- ```js
57
- // Using ES5 syntax
58
- var __ = wp.i18n.__;
59
- var PluginMoreMenuItem = wp.editPost.PluginMoreMenuItem;
60
- var moreIcon = React.createElement( 'svg' ); //... svg element.
61
-
62
- function onButtonClick() {
63
- alert( 'Button clicked.' );
64
- }
65
-
66
- function MyButtonMoreMenuItem() {
67
- return React.createElement(
68
- PluginMoreMenuItem,
69
- {
70
- icon: moreIcon,
71
- onClick: onButtonClick,
72
- },
73
- __( 'My button title' )
74
- );
75
- }
76
- ```
77
-
78
- ```jsx
79
- // Using ESNext syntax
80
- import { __ } from '@wordpress/i18n';
81
- import { PluginMoreMenuItem } from '@wordpress/edit-post';
82
- import { more } from '@wordpress/icons';
83
-
84
- function onButtonClick() {
85
- alert( 'Button clicked.' );
86
- }
87
-
88
- const MyButtonMoreMenuItem = () => (
89
- <PluginMoreMenuItem icon={ more } onClick={ onButtonClick }>
90
- { __( 'My button title' ) }
91
- </PluginMoreMenuItem>
92
- );
93
- ```
94
-
95
- _Parameters_
96
-
97
- - _props_ `Object`: Component properties.
98
- - _props.href_ `[string]`: 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.
99
- - _props.icon_ `[WPBlockTypeIconRender]`: 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.
100
- - _props.onClick_ `[Function]`: The callback function to be executed when the user clicks the menu item.
101
- - _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.
102
-
103
- _Returns_
104
-
105
- - `Component`: The component to be rendered.
52
+ Undocumented declaration.
106
53
 
107
54
  ### PluginPostPublishPanel
108
55
 
@@ -125,47 +72,7 @@ _Returns_
125
72
 
126
73
  ### PluginPostStatusInfo
127
74
 
128
- Renders a row in the Summary panel of the Document sidebar. It should be noted that this is named and implemented around the function it serves and not its location, which may change in future iterations.
129
-
130
- _Usage_
131
-
132
- ```js
133
- // Using ES5 syntax
134
- var __ = wp.i18n.__;
135
- var PluginPostStatusInfo = wp.editPost.PluginPostStatusInfo;
136
-
137
- function MyPluginPostStatusInfo() {
138
- return React.createElement(
139
- PluginPostStatusInfo,
140
- {
141
- className: 'my-plugin-post-status-info',
142
- },
143
- __( 'My post status info' )
144
- );
145
- }
146
- ```
147
-
148
- ```jsx
149
- // Using ESNext syntax
150
- import { __ } from '@wordpress/i18n';
151
- import { PluginPostStatusInfo } from '@wordpress/edit-post';
152
-
153
- const MyPluginPostStatusInfo = () => (
154
- <PluginPostStatusInfo className="my-plugin-post-status-info">
155
- { __( 'My post status info' ) }
156
- </PluginPostStatusInfo>
157
- );
158
- ```
159
-
160
- _Parameters_
161
-
162
- - _props_ `Object`: Component properties.
163
- - _props.className_ `[string]`: An optional class name added to the row.
164
- - _props.children_ `Element`: Children to be rendered.
165
-
166
- _Returns_
167
-
168
- - `Component`: The component to be rendered.
75
+ Undocumented declaration.
169
76
 
170
77
  ### PluginPrePublishPanel
171
78
 
@@ -188,110 +95,11 @@ _Returns_
188
95
 
189
96
  ### PluginSidebar
190
97
 
191
- Renders a sidebar when activated. The contents within the `PluginSidebar` will appear as content within the sidebar. It also automatically renders a corresponding `PluginSidebarMenuItem` component when `isPinnable` flag is set to `true`. If you wish to display the sidebar, you can with use the `PluginSidebarMoreMenuItem` component or the `wp.data.dispatch` API:
192
-
193
- ```js
194
- wp.data
195
- .dispatch( 'core/edit-post' )
196
- .openGeneralSidebar( 'plugin-name/sidebar-name' );
197
- ```
198
-
199
- _Related_
200
-
201
- - PluginSidebarMoreMenuItem
202
-
203
- _Usage_
204
-
205
- ```js
206
- // Using ES5 syntax
207
- var __ = wp.i18n.__;
208
- var el = React.createElement;
209
- var PanelBody = wp.components.PanelBody;
210
- var PluginSidebar = wp.editPost.PluginSidebar;
211
- var moreIcon = React.createElement( 'svg' ); //... svg element.
212
-
213
- function MyPluginSidebar() {
214
- return el(
215
- PluginSidebar,
216
- {
217
- name: 'my-sidebar',
218
- title: 'My sidebar title',
219
- icon: moreIcon,
220
- },
221
- el( PanelBody, {}, __( 'My sidebar content' ) )
222
- );
223
- }
224
- ```
225
-
226
- ```jsx
227
- // Using ESNext syntax
228
- import { __ } from '@wordpress/i18n';
229
- import { PanelBody } from '@wordpress/components';
230
- import { PluginSidebar } from '@wordpress/edit-post';
231
- import { more } from '@wordpress/icons';
232
-
233
- const MyPluginSidebar = () => (
234
- <PluginSidebar name="my-sidebar" title="My sidebar title" icon={ more }>
235
- <PanelBody>{ __( 'My sidebar content' ) }</PanelBody>
236
- </PluginSidebar>
237
- );
238
- ```
239
-
240
- _Parameters_
241
-
242
- - _props_ `Object`: Element props.
243
- - _props.name_ `string`: A string identifying the sidebar. Must be unique for every sidebar registered within the scope of your plugin.
244
- - _props.className_ `[string]`: An optional class name added to the sidebar body.
245
- - _props.title_ `string`: Title displayed at the top of the sidebar.
246
- - _props.isPinnable_ `[boolean]`: Whether to allow to pin sidebar to the toolbar. When set to `true` it also automatically renders a corresponding menu item.
247
- - _props.icon_ `[WPBlockTypeIconRender]`: 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.
98
+ Undocumented declaration.
248
99
 
249
100
  ### PluginSidebarMoreMenuItem
250
101
 
251
- Renders a menu item in `Plugins` group in `More Menu` drop down, and can be used to activate the corresponding `PluginSidebar` component. The text within the component appears as the menu item label.
252
-
253
- _Usage_
254
-
255
- ```js
256
- // Using ES5 syntax
257
- var __ = wp.i18n.__;
258
- var PluginSidebarMoreMenuItem = wp.editPost.PluginSidebarMoreMenuItem;
259
- var moreIcon = React.createElement( 'svg' ); //... svg element.
260
-
261
- function MySidebarMoreMenuItem() {
262
- return React.createElement(
263
- PluginSidebarMoreMenuItem,
264
- {
265
- target: 'my-sidebar',
266
- icon: moreIcon,
267
- },
268
- __( 'My sidebar title' )
269
- );
270
- }
271
- ```
272
-
273
- ```jsx
274
- // Using ESNext syntax
275
- import { __ } from '@wordpress/i18n';
276
- import { PluginSidebarMoreMenuItem } from '@wordpress/edit-post';
277
- import { more } from '@wordpress/icons';
278
-
279
- const MySidebarMoreMenuItem = () => (
280
- <PluginSidebarMoreMenuItem target="my-sidebar" icon={ more }>
281
- { __( 'My sidebar title' ) }
282
- </PluginSidebarMoreMenuItem>
283
- );
284
- ```
285
-
286
- _Parameters_
287
-
288
- - _props_ `Object`: Component props.
289
- - _props.target_ `string`: 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.
290
- - _props.icon_ `[WPBlockTypeIconRender]`: 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.
291
-
292
- _Returns_
293
-
294
- - `Component`: The component to be rendered.
102
+ Undocumented declaration.
295
103
 
296
104
  ### reinitializeEditor
297
105
 
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_data","_url","_editor","getPostEditURL","postId","addQueryArgs","post","action","getPostTrashedURL","postType","trashed","post_type","ids","BrowserURL","Component","constructor","arguments","state","historyId","componentDidUpdate","prevProps","postStatus","isSavingPost","hasHistory","props","setTrashURL","setBrowserURL","window","location","href","history","replaceState","id","setState","render","exports","_default","default","withSelect","select","getCurrentPost","editorStore","status","type","isTemplate","includes","wp_id"],"sources":["@wordpress/edit-post/src/components/browser-url/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { withSelect } from '@wordpress/data';\nimport { addQueryArgs } from '@wordpress/url';\nimport { store as editorStore } from '@wordpress/editor';\n\n/**\n * Returns the Post's Edit URL.\n *\n * @param {number} postId Post ID.\n *\n * @return {string} Post edit URL.\n */\nexport function getPostEditURL( postId ) {\n\treturn addQueryArgs( 'post.php', { post: postId, action: 'edit' } );\n}\n\n/**\n * Returns the Post's Trashed URL.\n *\n * @param {number} postId Post ID.\n * @param {string} postType Post Type.\n *\n * @return {string} Post trashed URL.\n */\nexport function getPostTrashedURL( postId, postType ) {\n\treturn addQueryArgs( 'edit.php', {\n\t\ttrashed: 1,\n\t\tpost_type: postType,\n\t\tids: postId,\n\t} );\n}\n\nexport class BrowserURL extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.state = {\n\t\t\thistoryId: null,\n\t\t};\n\t}\n\n\tcomponentDidUpdate( prevProps ) {\n\t\tconst { postId, postStatus, postType, isSavingPost, hasHistory } =\n\t\t\tthis.props;\n\t\tconst { historyId } = this.state;\n\n\t\t// Posts are still dirty while saving so wait for saving to finish\n\t\t// to avoid the unsaved changes warning when trashing posts.\n\t\tif ( postStatus === 'trash' && ! isSavingPost ) {\n\t\t\tthis.setTrashURL( postId, postType );\n\t\t\treturn;\n\t\t}\n\n\t\tif (\n\t\t\t( postId !== prevProps.postId || postId !== historyId ) &&\n\t\t\tpostStatus !== 'auto-draft' &&\n\t\t\tpostId &&\n\t\t\t! hasHistory\n\t\t) {\n\t\t\tthis.setBrowserURL( postId );\n\t\t}\n\t}\n\n\t/**\n\t * Navigates the browser to the post trashed URL to show a notice about the trashed post.\n\t *\n\t * @param {number} postId Post ID.\n\t * @param {string} postType Post Type.\n\t */\n\tsetTrashURL( postId, postType ) {\n\t\twindow.location.href = getPostTrashedURL( postId, postType );\n\t}\n\n\t/**\n\t * Replaces the browser URL with a post editor link for the given post ID.\n\t *\n\t * Note it is important that, since this function may be called when the\n\t * editor first loads, the result generated `getPostEditURL` matches that\n\t * produced by the server. Otherwise, the URL will change unexpectedly.\n\t *\n\t * @param {number} postId Post ID for which to generate post editor URL.\n\t */\n\tsetBrowserURL( postId ) {\n\t\twindow.history.replaceState(\n\t\t\t{ id: postId },\n\t\t\t'Post ' + postId,\n\t\t\tgetPostEditURL( postId )\n\t\t);\n\n\t\tthis.setState( () => ( {\n\t\t\thistoryId: postId,\n\t\t} ) );\n\t}\n\n\trender() {\n\t\treturn null;\n\t}\n}\n\nexport default withSelect( ( select ) => {\n\tconst { getCurrentPost, isSavingPost } = select( editorStore );\n\tconst post = getCurrentPost();\n\tlet { id, status, type } = post;\n\tconst isTemplate = [ 'wp_template', 'wp_template_part' ].includes( type );\n\tif ( isTemplate ) {\n\t\tid = post.wp_id;\n\t}\n\n\treturn {\n\t\tpostId: id,\n\t\tpostStatus: status,\n\t\tpostType: type,\n\t\tisSavingPost: isSavingPost(),\n\t};\n} )( BrowserURL );\n"],"mapp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F,CAAE,CAAC,CAAET,UAAW,CAAC"}
1
+ {"version":3,"names":["_element","require","_data","_url","_editor","getPostEditURL","postId","addQueryArgs","post","action","getPostTrashedURL","postType","trashed","post_type","ids","BrowserURL","Component","constructor","arguments","state","historyId","componentDidUpdate","prevProps","postStatus","isSavingPost","hasHistory","props","setTrashURL","setBrowserURL","window","location","href","history","replaceState","id","setState","render","exports","_default","default","withSelect","select","getCurrentPost","editorStore","status","type","isTemplate","includes","wp_id"],"sources":["@wordpress/edit-post/src/components/browser-url/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { withSelect } from '@wordpress/data';\nimport { addQueryArgs } from '@wordpress/url';\nimport { store as editorStore } from '@wordpress/editor';\n\n/**\n * Returns the Post's Edit URL.\n *\n * @param {number} postId Post ID.\n *\n * @return {string} Post edit URL.\n */\nexport function getPostEditURL( postId ) {\n\treturn addQueryArgs( 'post.php', { post: postId, action: 'edit' } );\n}\n\n/**\n * Returns the Post's Trashed URL.\n *\n * @param {number} postId Post ID.\n * @param {string} postType Post Type.\n *\n * @return {string} Post trashed URL.\n */\nexport function getPostTrashedURL( postId, postType ) {\n\treturn addQueryArgs( 'edit.php', {\n\t\ttrashed: 1,\n\t\tpost_type: postType,\n\t\tids: postId,\n\t} );\n}\n\nexport class BrowserURL extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.state = {\n\t\t\thistoryId: null,\n\t\t};\n\t}\n\n\tcomponentDidUpdate( prevProps ) {\n\t\tconst { postId, postStatus, postType, isSavingPost, hasHistory } =\n\t\t\tthis.props;\n\t\tconst { historyId } = this.state;\n\n\t\t// Posts are still dirty while saving so wait for saving to finish\n\t\t// to avoid the unsaved changes warning when trashing posts.\n\t\tif ( postStatus === 'trash' && ! isSavingPost ) {\n\t\t\tthis.setTrashURL( postId, postType );\n\t\t\treturn;\n\t\t}\n\n\t\tif (\n\t\t\t( postId !== prevProps.postId || postId !== historyId ) &&\n\t\t\tpostStatus !== 'auto-draft' &&\n\t\t\tpostId &&\n\t\t\t! hasHistory\n\t\t) {\n\t\t\tthis.setBrowserURL( postId );\n\t\t}\n\t}\n\n\t/**\n\t * Navigates the browser to the post trashed URL to show a notice about the trashed post.\n\t *\n\t * @param {number} postId Post ID.\n\t * @param {string} postType Post Type.\n\t */\n\tsetTrashURL( postId, postType ) {\n\t\twindow.location.href = getPostTrashedURL( postId, postType );\n\t}\n\n\t/**\n\t * Replaces the browser URL with a post editor link for the given post ID.\n\t *\n\t * Note it is important that, since this function may be called when the\n\t * editor first loads, the result generated `getPostEditURL` matches that\n\t * produced by the server. Otherwise, the URL will change unexpectedly.\n\t *\n\t * @param {number} postId Post ID for which to generate post editor URL.\n\t */\n\tsetBrowserURL( postId ) {\n\t\twindow.history.replaceState(\n\t\t\t{ id: postId },\n\t\t\t'Post ' + postId,\n\t\t\tgetPostEditURL( postId )\n\t\t);\n\n\t\tthis.setState( () => ( {\n\t\t\thistoryId: postId,\n\t\t} ) );\n\t}\n\n\trender() {\n\t\treturn null;\n\t}\n}\n\nexport default withSelect( ( select ) => {\n\tconst { getCurrentPost, isSavingPost } = select( editorStore );\n\tconst post = getCurrentPost();\n\tlet { id, status, type } = post;\n\tconst isTemplate = [ 'wp_template', 'wp_template_part' ].includes( type );\n\tif ( isTemplate ) {\n\t\tid = post.wp_id;\n\t}\n\n\treturn {\n\t\tpostId: id,\n\t\tpostStatus: status,\n\t\tpostType: type,\n\t\tisSavingPost: isSavingPost(),\n\t};\n} )( BrowserURL );\n"],"mappings":";;;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,IAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AANA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASI,cAAcA,CAAEC,MAAM,EAAG;EACxC,OAAO,IAAAC,iBAAY,EAAE,UAAU,EAAE;IAAEC,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CiB,aAAaA,CAAEtB,MAAM,EAAG;IACvBuB,MAAM,CAACG,OAAO,CAACC,YAAY,CAC1B;MAAEC,EAAE,EAAE5B;IAAO,CAAC,EACd,OAAO,GAAGA,MAAM,EAChBD,cAAc,CAAEC,MAAO,CACxB,CAAC;IAED,IAAI,CAAC6B,QAAQ,CAAE,OAAQ;MACtBf,SAAS,EAAEd;IACZ,CAAC,CAAG,CAAC;EACN;EAEA8B,MAAMA,CAAA,EAAG;IACR,OAAO,IAAI;EACZ;AACD;AAACC,OAAA,CAAAtB,UAAA,GAAAA,UAAA;AAAA,IAAAuB,QAAA,GAAAD,OAAA,CAAAE,OAAA,GAEc,IAAAC,gBAAU,EAAIC,MAAM,IAAM;EACxC,MAAM;IAAEC,cAAc;IAAElB;EAAa,CAAC,GAAGiB,MAAM,CAAEE,aAAY,CAAC;EAC9D,MAAMnC,IAAI,GAAGkC,cAAc,CAAC,CAAC;EAC7B,IAAI;IAAER,EAAE;IAAEU,MAAM;IAAEC;EAAK,CAAC,GAAGrC,IAAI;EAC/B,MAAMsC,UAAU,GAAG,CAAE,aAAa,EAAE,kBAAkB,CAAE,CAACC,QAAQ,CAAEF,IAAK,CAAC;EACzE,IAAKC,UAAU,EAAG;IACjBZ,EAAE,GAAG1B,IAAI,CAACwC,KAAK;EAChB;EAEA,OAAO;IACN1C,MAAM,EAAE4B,EAAE;IACVX,UAAU,EAAEqB,MAAM;IAClBjC,QAAQ,EAAEkC,IAAI;IACdrB,YAAY,EAAEA,YAAY,CAAC;EAC5B,CAAC;AACF,CAAE,CAAC,CAAET,UAAW,CAAC","ignoreList":[]}
@@ -16,7 +16,6 @@ var _listenerHooks = require("./listener-hooks");
16
16
  * @return {null} This is a data component so does not render any ui.
17
17
  */
18
18
  function EditorInitialization() {
19
- (0, _listenerHooks.useBlockSelectionListener)();
20
19
  (0, _listenerHooks.useUpdatePostLinkListener)();
21
20
  return null;
22
21
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_listenerHooks","require","EditorInitialization","useBlockSelectionListener","useUpdatePostLinkListener"],"sources":["@wordpress/edit-post/src/components/editor-initialization/index.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport {\n\tuseBlockSelectionListener,\n\tuseUpdatePostLinkListener,\n} from './listener-hooks';\n\n/**\n * Data component used for initializing the editor and re-initializes\n * when postId changes or on unmount.\n *\n * @return {null} This is a data component so does not render any ui.\n */\nexport default function EditorInitialization() {\n\tuseBlockSelectionListener();\n\tuseUpdatePostLinkListener();\n\treturn null;\n}\n"],"mappings":";;;;;;AAGA,IAAAA,cAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACA;AACA;AACe,SAASC,oBAAoBA,CAAA,EAAG;EAC9C,IAAAC,wCAAyB,EAAC,CAAC;EAC3B,IAAAC,wCAAyB,EAAC,CAAC;EAC3B,OAAO,IAAI;AACZ"}
1
+ {"version":3,"names":["_listenerHooks","require","EditorInitialization","useUpdatePostLinkListener"],"sources":["@wordpress/edit-post/src/components/editor-initialization/index.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { useUpdatePostLinkListener } from './listener-hooks';\n\n/**\n * Data component used for initializing the editor and re-initializes\n * when postId changes or on unmount.\n *\n * @return {null} This is a data component so does not render any ui.\n */\nexport default function EditorInitialization() {\n\tuseUpdatePostLinkListener();\n\treturn null;\n}\n"],"mappings":";;;;;;AAGA,IAAAA,cAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACe,SAASC,oBAAoBA,CAAA,EAAG;EAC9C,IAAAC,wCAAyB,EAAC,CAAC;EAC3B,OAAO,IAAI;AACZ","ignoreList":[]}
@@ -3,12 +3,10 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.useUpdatePostLinkListener = exports.useBlockSelectionListener = void 0;
6
+ exports.useUpdatePostLinkListener = void 0;
7
7
  var _data = require("@wordpress/data");
8
8
  var _element = require("@wordpress/element");
9
- var _blockEditor = require("@wordpress/block-editor");
10
9
  var _editor = require("@wordpress/editor");
11
- var _preferences = require("@wordpress/preferences");
12
10
  var _constants = require("../../store/constants");
13
11
  /**
14
12
  * WordPress dependencies
@@ -18,45 +16,10 @@ var _constants = require("../../store/constants");
18
16
  * Internal dependencies
19
17
  */
20
18
 
21
- /**
22
- * This listener hook monitors for block selection and triggers the appropriate
23
- * sidebar state.
24
- */
25
- const useBlockSelectionListener = () => {
26
- const {
27
- hasBlockSelection,
28
- isEditorSidebarOpened,
29
- isDistractionFree
30
- } = (0, _data.useSelect)(select => {
31
- const {
32
- get
33
- } = select(_preferences.store);
34
- return {
35
- hasBlockSelection: !!select(_blockEditor.store).getBlockSelectionStart(),
36
- isEditorSidebarOpened: select(_constants.STORE_NAME).isEditorSidebarOpened(),
37
- isDistractionFree: get('core', 'distractionFree')
38
- };
39
- }, []);
40
- const {
41
- openGeneralSidebar
42
- } = (0, _data.useDispatch)(_constants.STORE_NAME);
43
- (0, _element.useEffect)(() => {
44
- if (!isEditorSidebarOpened || isDistractionFree) {
45
- return;
46
- }
47
- if (hasBlockSelection) {
48
- openGeneralSidebar('edit-post/block');
49
- } else {
50
- openGeneralSidebar('edit-post/document');
51
- }
52
- }, [hasBlockSelection, isDistractionFree, isEditorSidebarOpened, openGeneralSidebar]);
53
- };
54
-
55
19
  /**
56
20
  * This listener hook monitors any change in permalink and updates the view
57
21
  * post link in the admin bar.
58
22
  */
59
- exports.useBlockSelectionListener = useBlockSelectionListener;
60
23
  const useUpdatePostLinkListener = () => {
61
24
  const {
62
25
  newPermalink
@@ -1 +1 @@
1
- {"version":3,"names":["_data","require","_element","_blockEditor","_editor","_preferences","_constants","useBlockSelectionListener","hasBlockSelection","isEditorSidebarOpened","isDistractionFree","useSelect","select","get","preferencesStore","blockEditorStore","getBlockSelectionStart","STORE_NAME","openGeneralSidebar","useDispatch","useEffect","exports","useUpdatePostLinkListener","newPermalink","editorStore","getCurrentPost","link","nodeToUpdate","useRef","current","document","querySelector","VIEW_AS_PREVIEW_LINK_SELECTOR","VIEW_AS_LINK_SELECTOR","setAttribute"],"sources":["@wordpress/edit-post/src/components/editor-initialization/listener-hooks.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useEffect, useRef } from '@wordpress/element';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { store as editorStore } from '@wordpress/editor';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport {\n\tSTORE_NAME,\n\tVIEW_AS_LINK_SELECTOR,\n\tVIEW_AS_PREVIEW_LINK_SELECTOR,\n} from '../../store/constants';\n\n/**\n * This listener hook monitors for block selection and triggers the appropriate\n * sidebar state.\n */\nexport const useBlockSelectionListener = () => {\n\tconst { hasBlockSelection, isEditorSidebarOpened, isDistractionFree } =\n\t\tuseSelect( ( select ) => {\n\t\t\tconst { get } = select( preferencesStore );\n\t\t\treturn {\n\t\t\t\thasBlockSelection:\n\t\t\t\t\t!! select( blockEditorStore ).getBlockSelectionStart(),\n\t\t\t\tisEditorSidebarOpened:\n\t\t\t\t\tselect( STORE_NAME ).isEditorSidebarOpened(),\n\t\t\t\tisDistractionFree: get( 'core', 'distractionFree' ),\n\t\t\t};\n\t\t}, [] );\n\n\tconst { openGeneralSidebar } = useDispatch( STORE_NAME );\n\n\tuseEffect( () => {\n\t\tif ( ! isEditorSidebarOpened || isDistractionFree ) {\n\t\t\treturn;\n\t\t}\n\t\tif ( hasBlockSelection ) {\n\t\t\topenGeneralSidebar( 'edit-post/block' );\n\t\t} else {\n\t\t\topenGeneralSidebar( 'edit-post/document' );\n\t\t}\n\t}, [\n\t\thasBlockSelection,\n\t\tisDistractionFree,\n\t\tisEditorSidebarOpened,\n\t\topenGeneralSidebar,\n\t] );\n};\n\n/**\n * This listener hook monitors any change in permalink and updates the view\n * post link in the admin bar.\n */\nexport const useUpdatePostLinkListener = () => {\n\tconst { newPermalink } = useSelect(\n\t\t( select ) => ( {\n\t\t\tnewPermalink: select( editorStore ).getCurrentPost().link,\n\t\t} ),\n\t\t[]\n\t);\n\tconst nodeToUpdate = useRef();\n\n\tuseEffect( () => {\n\t\tnodeToUpdate.current =\n\t\t\tdocument.querySelector( VIEW_AS_PREVIEW_LINK_SELECTOR ) ||\n\t\t\tdocument.querySelector( VIEW_AS_LINK_SELECTOR );\n\t}, [] );\n\n\tuseEffect( () => {\n\t\tif ( ! newPermalink || ! nodeToUpdate.current ) {\n\t\t\treturn;\n\t\t}\n\t\tnodeToUpdate.current.setAttribute( 'href', newPermalink );\n\t}, [ newPermalink ] );\n};\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AAKA,IAAAK,UAAA,GAAAL,OAAA;AAZA;AACA;AACA;;AAOA;AACA;AACA;;AAOA;AACA;AACA;AACA;AACO,MAAMM,yBAAyB,GAAGA,CAAA,KAAM;EAC9C,MAAM;IAAEC,iBAAiB;IAAEC,qBAAqB;IAAEC;EAAkB,CAAC,GACpE,IAAAC,eAAS,EAAIC,MAAM,IAAM;IACxB,MAAM;MAAEC;IAAI,CAAC,GAAGD,MAAM,CAAEE,kBAAiB,CAAC;IAC1C,OAAO;MACNN,iBAAiB,EAChB,CAAC,CAAEI,MAAM,CAAEG,kBAAiB,CAAC,CAACC,sBAAsB,CAAC,CAAC;MACvDP,qBAAqB,EACpBG,MAAM,CAAEK,qBAAW,CAAC,CAACR,qBAAqB,CAAC,CAAC;MAC7CC,iBAAiB,EAAEG,GAAG,CAAE,MAAM,EAAE,iBAAkB;IACnD,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EAER,MAAM;IAAEK;EAAmB,CAAC,GAAG,IAAAC,iBAAW,EAAEF,qBAAW,CAAC;EAExD,IAAAG,kBAAS,EAAE,MAAM;IAChB,IAAK,CAAEX,qBAAqB,IAAIC,iBAAiB,EAAG;MACnD;IACD;IACA,IAAKF,iBAAiB,EAAG;MACxBU,kBAAkB,CAAE,iBAAkB,CAAC;IACxC,CAAC,MAAM;MACNA,kBAAkB,CAAE,oBAAqB,CAAC;IAC3C;EACD,CAAC,EAAE,CACFV,iBAAiB,EACjBE,iBAAiB,EACjBD,qBAAqB,EACrBS,kBAAkB,CACjB,CAAC;AACJ,CAAC;;AAED;AACA;AACA;AACA;AAHAG,OAAA,CAAAd,yBAAA,GAAAA,yBAAA;AAIO,MAAMe,yBAAyB,GAAGA,CAAA,KAAM;EAC9C,MAAM;IAAEC;EAAa,CAAC,GAAG,IAAAZ,eAAS,EAC/BC,MAAM,KAAQ;IACfW,YAAY,EAAEX,MAAM,CAAEY,aAAY,CAAC,CAACC,cAAc,CAAC,CAAC,CAACC;EACtD,CAAC,CAAE,EACH,EACD,CAAC;EACD,MAAMC,YAAY,GAAG,IAAAC,eAAM,EAAC,CAAC;EAE7B,IAAAR,kBAAS,EAAE,MAAM;IAChBO,YAAY,CAACE,OAAO,GACnBC,QAAQ,CAACC,aAAa,CAAEC,wCAA8B,CAAC,IACvDF,QAAQ,CAACC,aAAa,CAAEE,gCAAsB,CAAC;EACjD,CAAC,EAAE,EAAG,CAAC;EAEP,IAAAb,kBAAS,EAAE,MAAM;IAChB,IAAK,CAAEG,YAAY,IAAI,CAAEI,YAAY,CAACE,OAAO,EAAG;MAC/C;IACD;IACAF,YAAY,CAACE,OAAO,CAACK,YAAY,CAAE,MAAM,EAAEX,YAAa,CAAC;EAC1D,CAAC,EAAE,CAAEA,YAAY,CAAG,CAAC;AACtB,CAAC;AAACF,OAAA,CAAAC,yBAAA,GAAAA,yBAAA"}
1
+ {"version":3,"names":["_data","require","_element","_editor","_constants","useUpdatePostLinkListener","newPermalink","useSelect","select","editorStore","getCurrentPost","link","nodeToUpdate","useRef","useEffect","current","document","querySelector","VIEW_AS_PREVIEW_LINK_SELECTOR","VIEW_AS_LINK_SELECTOR","setAttribute","exports"],"sources":["@wordpress/edit-post/src/components/editor-initialization/listener-hooks.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { useEffect, useRef } from '@wordpress/element';\nimport { store as editorStore } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport {\n\tVIEW_AS_LINK_SELECTOR,\n\tVIEW_AS_PREVIEW_LINK_SELECTOR,\n} from '../../store/constants';\n\n/**\n * This listener hook monitors any change in permalink and updates the view\n * post link in the admin bar.\n */\nexport const useUpdatePostLinkListener = () => {\n\tconst { newPermalink } = useSelect(\n\t\t( select ) => ( {\n\t\t\tnewPermalink: select( editorStore ).getCurrentPost().link,\n\t\t} ),\n\t\t[]\n\t);\n\tconst nodeToUpdate = useRef();\n\n\tuseEffect( () => {\n\t\tnodeToUpdate.current =\n\t\t\tdocument.querySelector( VIEW_AS_PREVIEW_LINK_SELECTOR ) ||\n\t\t\tdocument.querySelector( VIEW_AS_LINK_SELECTOR );\n\t}, [] );\n\n\tuseEffect( () => {\n\t\tif ( ! newPermalink || ! nodeToUpdate.current ) {\n\t\t\treturn;\n\t\t}\n\t\tnodeToUpdate.current.setAttribute( 'href', newPermalink );\n\t}, [ newPermalink ] );\n};\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAKA,IAAAG,UAAA,GAAAH,OAAA;AAVA;AACA;AACA;;AAKA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACO,MAAMI,yBAAyB,GAAGA,CAAA,KAAM;EAC9C,MAAM;IAAEC;EAAa,CAAC,GAAG,IAAAC,eAAS,EAC/BC,MAAM,KAAQ;IACfF,YAAY,EAAEE,MAAM,CAAEC,aAAY,CAAC,CAACC,cAAc,CAAC,CAAC,CAACC;EACtD,CAAC,CAAE,EACH,EACD,CAAC;EACD,MAAMC,YAAY,GAAG,IAAAC,eAAM,EAAC,CAAC;EAE7B,IAAAC,kBAAS,EAAE,MAAM;IAChBF,YAAY,CAACG,OAAO,GACnBC,QAAQ,CAACC,aAAa,CAAEC,wCAA8B,CAAC,IACvDF,QAAQ,CAACC,aAAa,CAAEE,gCAAsB,CAAC;EACjD,CAAC,EAAE,EAAG,CAAC;EAEP,IAAAL,kBAAS,EAAE,MAAM;IAChB,IAAK,CAAER,YAAY,IAAI,CAAEM,YAAY,CAACG,OAAO,EAAG;MAC/C;IACD;IACAH,YAAY,CAACG,OAAO,CAACK,YAAY,CAAE,MAAM,EAAEd,YAAa,CAAC;EAC1D,CAAC,EAAE,CAAEA,YAAY,CAAG,CAAC;AACtB,CAAC;AAACe,OAAA,CAAAhB,yBAAA,GAAAA,yBAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_classnames","_interopRequireDefault","require","_data","_components","_i18n","_url","_icons","_editor","_coreData","_compose","_store","FullscreenModeClose","showTooltip","icon","href","initialPost","_postType$labels$view","isActive","isRequestingSiteIcon","postType","siteIconUrl","useSelect","select","getCurrentPostType","editorStore","isFeatureActive","editPostStore","getEntityRecord","getPostType","isResolving","coreStore","siteData","undefined","_postType","type","site_icon_url","disableMotion","useReducedMotion","buttonIcon","_react","createElement","Icon","size","wordpress","effect","expand","scale","transition","duration","__unstableMotion","img","variants","alt","__","className","src","classes","classnames","buttonHref","addQueryArgs","post_type","slug","buttonLabel","labels","view_items","div","whileHover","Button","label","_default","exports","default"],"sources":["@wordpress/edit-post/src/components/header/fullscreen-mode-close/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport {\n\tButton,\n\tIcon,\n\t__unstableMotion as motion,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { addQueryArgs } from '@wordpress/url';\nimport { wordpress } from '@wordpress/icons';\nimport { store as editorStore } from '@wordpress/editor';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useReducedMotion } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { store as editPostStore } from '../../../store';\n\nfunction FullscreenModeClose( { showTooltip, icon, href, initialPost } ) {\n\tconst { isActive, isRequestingSiteIcon, postType, siteIconUrl } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getCurrentPostType } = select( editorStore );\n\t\t\tconst { isFeatureActive } = select( editPostStore );\n\t\t\tconst { getEntityRecord, getPostType, isResolving } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst siteData =\n\t\t\t\tgetEntityRecord( 'root', '__unstableBase', undefined ) || {};\n\t\t\tconst _postType = initialPost?.type || getCurrentPostType();\n\t\t\treturn {\n\t\t\t\tisActive: isFeatureActive( 'fullscreenMode' ),\n\t\t\t\tisRequestingSiteIcon: isResolving( 'getEntityRecord', [\n\t\t\t\t\t'root',\n\t\t\t\t\t'__unstableBase',\n\t\t\t\t\tundefined,\n\t\t\t\t] ),\n\t\t\t\tpostType: getPostType( _postType ),\n\t\t\t\tsiteIconUrl: siteData.site_icon_url,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tconst disableMotion = useReducedMotion();\n\n\tif ( ! isActive || ! postType ) {\n\t\treturn null;\n\t}\n\n\tlet buttonIcon = <Icon size=\"36px\" icon={ wordpress } />;\n\n\tconst effect = {\n\t\texpand: {\n\t\t\tscale: 1.25,\n\t\t\ttransition: { type: 'tween', duration: '0.3' },\n\t\t},\n\t};\n\n\tif ( siteIconUrl ) {\n\t\tbuttonIcon = (\n\t\t\t<motion.img\n\t\t\t\tvariants={ ! disableMotion && effect }\n\t\t\t\talt={ __( 'Site Icon' ) }\n\t\t\t\tclassName=\"edit-post-fullscreen-mode-close_site-icon\"\n\t\t\t\tsrc={ siteIconUrl }\n\t\t\t/>\n\t\t);\n\t}\n\n\tif ( isRequestingSiteIcon ) {\n\t\tbuttonIcon = null;\n\t}\n\n\t// Override default icon if custom icon is provided via props.\n\tif ( icon ) {\n\t\tbuttonIcon = <Icon size=\"36px\" icon={ icon } />;\n\t}\n\n\tconst classes = classnames( {\n\t\t'edit-post-fullscreen-mode-close': true,\n\t\t'has-icon': siteIconUrl,\n\t} );\n\n\tconst buttonHref =\n\t\thref ??\n\t\taddQueryArgs( 'edit.php', {\n\t\t\tpost_type: postType.slug,\n\t\t} );\n\n\tconst buttonLabel = postType?.labels?.view_items ?? __( 'Back' );\n\n\treturn (\n\t\t<motion.div whileHover=\"expand\">\n\t\t\t<Button\n\t\t\t\tclassName={ classes }\n\t\t\t\thref={ buttonHref }\n\t\t\t\tlabel={ buttonLabel }\n\t\t\t\tshowTooltip={ showTooltip }\n\t\t\t>\n\t\t\t\t{ buttonIcon }\n\t\t\t</Button>\n\t\t</motion.div>\n\t);\n}\n\nexport default FullscreenModeClose;\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAKA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,IAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AACA,IAAAO,SAAA,GAAAP,OAAA;AACA,IAAAQ,QAAA,GAAAR,OAAA;AAKA,IAAAS,MAAA,GAAAT,OAAA;AAxBA;AACA;AACA;;AAGA;AACA;AACA;;AAcA;AACA;AACA;;AAGA,SAASU,mBAAmBA,CAAE;EAAEC,WAAW;EAAEC,IAAI;EAAEC,IAAI;EAAEC;AAAY,CAAC,EAAG;EAAA,IAAAC,qBAAA;EACxE,MAAM;IAAEC,QAAQ;IAAEC,oBAAoB;IAAEC,QAAQ;IAAEC;EAAY,CAAC,GAAG,IAAAC,eAAS,EACxEC,MAAM,IAAM;IACb,MAAM;MAAEC;IAAmB,CAAC,GAAGD,MAAM,CAAEE,aAAY,CAAC;IACpD,MAAM;MAAEC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;MACzBC,SAAS,EAAC,2CAA2C;MACrDC,GAAG,EAAGnC;IAAa,CACnB,CACD;EACF;EAEA,IAAKF,oBAAoB,EAAG;IAC3BoB,UAAU,GAAG,IAAI;EAClB;;EAEA;EACA,IAAKzB,IAAI,EAAG;IACXyB,UAAU,GAAG,IAAAC,MAAA,CAAAC,aAAA,EAACrC,WAAA,CAAAsC,IAAI;MAACC,IAAI,EAAC,MAAM;MAAC7B,IAAI,EAAGA;IAAM,CAAE,CAAC;EAChD;EAEA,MAAM2C,OAAO,GAAG,IAAAC,mBAAU,EAAE;IAC3B,iCAAiC,EAAE,IAAI;IACvC,UAAU,EAAErC;EACb,CAAE,CAAC;EAEH,MAAMsC,UAAU,GACf5C,IAAI,aAAJA,IAAI,cAAJA,IAAI,GACJ,IAAA6C,iBAAY,EAAE,UAAU,EAAE;IACzBC,SAAS,EAAEzC,QAAQ,CAAC0C;EACrB,CAAE,CAAC;EAEJ,MAAMC,WAAW,IAAA9C,qBAAA,GAAGG,QAAQ,EAAE4C,MAAM,EAAEC,UAAU,cAAAhD,qBAAA,cAAAA,qBAAA,GAAI,IAAAqC,QAAE,EAAE,MAAO,CAAC;EAEhE,OACC,IAAAd,MAAA,CAAAC,aAAA,EAACrC,WAAA,CAAA8C,gBAAM,CAACgB,GAAG;IAACC,UAAU,EAAC;EAAQ,GAC9B,IAAA3B,MAAA,CAAAC,aAAA,EAACrC,WAAA,CAAAgE,MAAM;IACNb,SAAS,EAAGE,OAAS;IACrB1C,IAAI,EAAG4C,UAAY;IACnBU,KAAK,EAAGN,WAAa;IACrBlD,WAAW,EAAGA;EAAa,GAEzB0B,UACK,CACG,CAAC;AAEf;AAAC,IAAA+B,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEc5D,mBAAmB"}
1
+ {"version":3,"names":["_classnames","_interopRequireDefault","require","_data","_components","_i18n","_url","_icons","_editor","_coreData","_compose","_store","FullscreenModeClose","showTooltip","icon","href","initialPost","_postType$labels$view","isActive","isRequestingSiteIcon","postType","siteIconUrl","useSelect","select","getCurrentPostType","editorStore","isFeatureActive","editPostStore","getEntityRecord","getPostType","isResolving","coreStore","siteData","undefined","_postType","type","site_icon_url","disableMotion","useReducedMotion","buttonIcon","_react","createElement","Icon","size","wordpress","effect","expand","scale","transition","duration","__unstableMotion","img","variants","alt","__","className","src","classes","classnames","buttonHref","addQueryArgs","post_type","slug","buttonLabel","labels","view_items","div","whileHover","Button","label","_default","exports","default"],"sources":["@wordpress/edit-post/src/components/header/fullscreen-mode-close/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport {\n\tButton,\n\tIcon,\n\t__unstableMotion as motion,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { addQueryArgs } from '@wordpress/url';\nimport { wordpress } from '@wordpress/icons';\nimport { store as editorStore } from '@wordpress/editor';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useReducedMotion } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { store as editPostStore } from '../../../store';\n\nfunction FullscreenModeClose( { showTooltip, icon, href, initialPost } ) {\n\tconst { isActive, isRequestingSiteIcon, postType, siteIconUrl } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getCurrentPostType } = select( editorStore );\n\t\t\tconst { isFeatureActive } = select( editPostStore );\n\t\t\tconst { getEntityRecord, getPostType, isResolving } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst siteData =\n\t\t\t\tgetEntityRecord( 'root', '__unstableBase', undefined ) || {};\n\t\t\tconst _postType = initialPost?.type || getCurrentPostType();\n\t\t\treturn {\n\t\t\t\tisActive: isFeatureActive( 'fullscreenMode' ),\n\t\t\t\tisRequestingSiteIcon: isResolving( 'getEntityRecord', [\n\t\t\t\t\t'root',\n\t\t\t\t\t'__unstableBase',\n\t\t\t\t\tundefined,\n\t\t\t\t] ),\n\t\t\t\tpostType: getPostType( _postType ),\n\t\t\t\tsiteIconUrl: siteData.site_icon_url,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tconst disableMotion = useReducedMotion();\n\n\tif ( ! isActive || ! postType ) {\n\t\treturn null;\n\t}\n\n\tlet buttonIcon = <Icon size=\"36px\" icon={ wordpress } />;\n\n\tconst effect = {\n\t\texpand: {\n\t\t\tscale: 1.25,\n\t\t\ttransition: { type: 'tween', duration: '0.3' },\n\t\t},\n\t};\n\n\tif ( siteIconUrl ) {\n\t\tbuttonIcon = (\n\t\t\t<motion.img\n\t\t\t\tvariants={ ! disableMotion && effect }\n\t\t\t\talt={ __( 'Site Icon' ) }\n\t\t\t\tclassName=\"edit-post-fullscreen-mode-close_site-icon\"\n\t\t\t\tsrc={ siteIconUrl }\n\t\t\t/>\n\t\t);\n\t}\n\n\tif ( isRequestingSiteIcon ) {\n\t\tbuttonIcon = null;\n\t}\n\n\t// Override default icon if custom icon is provided via props.\n\tif ( icon ) {\n\t\tbuttonIcon = <Icon size=\"36px\" icon={ icon } />;\n\t}\n\n\tconst classes = classnames( {\n\t\t'edit-post-fullscreen-mode-close': true,\n\t\t'has-icon': siteIconUrl,\n\t} );\n\n\tconst buttonHref =\n\t\thref ??\n\t\taddQueryArgs( 'edit.php', {\n\t\t\tpost_type: postType.slug,\n\t\t} );\n\n\tconst buttonLabel = postType?.labels?.view_items ?? __( 'Back' );\n\n\treturn (\n\t\t<motion.div whileHover=\"expand\">\n\t\t\t<Button\n\t\t\t\tclassName={ classes }\n\t\t\t\thref={ buttonHref }\n\t\t\t\tlabel={ buttonLabel }\n\t\t\t\tshowTooltip={ showTooltip }\n\t\t\t>\n\t\t\t\t{ buttonIcon }\n\t\t\t</Button>\n\t\t</motion.div>\n\t);\n}\n\nexport default FullscreenModeClose;\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAKA,IAAA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hD,qBAAA,cAAAA,qBAAA,GAAI,IAAAqC,QAAE,EAAE,MAAO,CAAC;EAEhE,OACC,IAAAd,MAAA,CAAAC,aAAA,EAACrC,WAAA,CAAA8C,gBAAM,CAACgB,GAAG;IAACC,UAAU,EAAC;EAAQ,GAC9B,IAAA3B,MAAA,CAAAC,aAAA,EAACrC,WAAA,CAAAgE,MAAM;IACNb,SAAS,EAAGE,OAAS;IACrB1C,IAAI,EAAG4C,UAAY;IACnBU,KAAK,EAAGN,WAAa;IACrBlD,WAAW,EAAGA;EAAa,GAEzB0B,UACK,CACG,CAAC;AAEf;AAAC,IAAA+B,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEc5D,mBAAmB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNative","require","_element","_compose","_data","_viewport","_i18n","_blockEditor","_components","_icons","_editor","_blocks","_reactNativeBridge","_style","_interopRequireDefault","_store","shadowStyle","shadowOffset","width","height","shadowOpacity","shadowRadius","elevation","HeaderToolbar","hasRedo","hasUndo","redo","undo","showInserter","showKeyboardHideButton","insertBlock","onHideKeyboard","isRTL","noContentSelected","anchorNodeRef","useRef","containerStyle","usePreferredColorSchemeStyle","styles","borderTopWidth","StyleSheet","hairlineWidth","useEffect","onUndoSubscription","subscribeOnUndoPressed","onRedoSubscription","subscribeOnRedoPressed","remove","toggleUndoButton","toggleRedoButton","scrollViewRef","scrollToStart","Platform","isAndroid","current","scrollToEnd","scrollTo","x","onInsertBlock","useCallback","blockType","createBlock","undefined","source","inserterMethod","renderMediaButtons","_react","createElement","ToolbarGroup","ToolbarButton","key","title","__","icon","imageIcon","onClick","testID","extraProps","hint","videoIcon","galleryIcon","audioIcon","toolbarAriaLabel","shadowColor","showKeyboardButtonStyles","color","View","ref","accessibilityLabel","style","ScrollView","onContentSizeChange","horizontal","showsHorizontalScrollIndicator","keyboardShouldPersistTaps","alwaysBounceHorizontal","contentContainerStyle","Inserter","disabled","BlockToolbar","passedStyle","keyboardClose","_default","exports","default","compose","withSelect","select","getBlockRootClientId","getBlockSelectionEnd","hasInserterItems","hasSelectedBlock","blockEditorStore","getEditorSettings","editorStore","isAnyBlockSelected","hasEditorRedo","hasEditorUndo","editPostStore","getEditorMode","richEditingEnabled","isTextModeEnabled","getSettings","withDispatch","dispatch","clearSelectedBlock","togglePostTitleSelection","withViewportMatch","isLargeViewport"],"sources":["@wordpress/edit-post/src/components/header/header-toolbar/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { ScrollView, StyleSheet, View } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { useCallback, useRef, useEffect, Platform } from '@wordpress/element';\nimport { compose, usePreferredColorSchemeStyle } from '@wordpress/compose';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { withViewportMatch } from '@wordpress/viewport';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tInserter,\n\tBlockToolbar,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { ToolbarGroup, ToolbarButton } from '@wordpress/components';\nimport {\n\tkeyboardClose,\n\taudio as audioIcon,\n\tmedia as imageIcon,\n\tvideo as videoIcon,\n\tgallery as galleryIcon,\n} from '@wordpress/icons';\nimport { store as editorStore } from '@wordpress/editor';\nimport { createBlock } from '@wordpress/blocks';\nimport {\n\ttoggleUndoButton,\n\ttoggleRedoButton,\n\tsubscribeOnUndoPressed,\n\tsubscribeOnRedoPressed,\n} from '@wordpress/react-native-bridge';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\nimport { store as editPostStore } from '../../../store';\n\nconst shadowStyle = {\n\tshadowOffset: { width: 2, height: 2 },\n\tshadowOpacity: 1,\n\tshadowRadius: 6,\n\televation: 18,\n};\n\nfunction HeaderToolbar( {\n\thasRedo,\n\thasUndo,\n\tredo,\n\tundo,\n\tshowInserter,\n\tshowKeyboardHideButton,\n\tinsertBlock,\n\tonHideKeyboard,\n\tisRTL,\n\tnoContentSelected,\n} ) {\n\tconst anchorNodeRef = useRef();\n\n\tconst containerStyle = [\n\t\tusePreferredColorSchemeStyle(\n\t\t\tstyles[ 'header-toolbar__container' ],\n\t\t\tstyles[ 'header-toolbar__container--dark' ]\n\t\t),\n\t\t{ borderTopWidth: StyleSheet.hairlineWidth },\n\t];\n\n\tuseEffect( () => {\n\t\tconst onUndoSubscription = subscribeOnUndoPressed( undo );\n\t\tconst onRedoSubscription = subscribeOnRedoPressed( redo );\n\n\t\treturn () => {\n\t\t\tonUndoSubscription?.remove();\n\t\t\tonRedoSubscription?.remove();\n\t\t};\n\t}, [ undo, redo ] );\n\n\tuseEffect( () => {\n\t\ttoggleUndoButton( ! hasUndo );\n\t}, [ hasUndo ] );\n\n\tuseEffect( () => {\n\t\ttoggleRedoButton( ! hasRedo );\n\t}, [ hasRedo ] );\n\n\tconst scrollViewRef = useRef( null );\n\tconst scrollToStart = () => {\n\t\t// scrollview doesn't seem to automatically adjust to RTL on Android so, scroll to end when Android\n\t\tif ( Platform.isAndroid && isRTL ) {\n\t\t\tscrollViewRef.current.scrollToEnd();\n\t\t} else {\n\t\t\tscrollViewRef.current.scrollTo( { x: 0 } );\n\t\t}\n\t};\n\n\tconst onInsertBlock = useCallback(\n\t\t( blockType ) => () => {\n\t\t\tinsertBlock( createBlock( blockType ), undefined, undefined, true, {\n\t\t\t\tsource: 'inserter_menu',\n\t\t\t\tinserterMethod: 'quick-inserter',\n\t\t\t} );\n\t\t},\n\t\t[ insertBlock ]\n\t);\n\n\tconst renderMediaButtons = (\n\t\t<ToolbarGroup>\n\t\t\t<ToolbarButton\n\t\t\t\tkey=\"imageButton\"\n\t\t\t\ttitle={ __( 'Image' ) }\n\t\t\t\ticon={ imageIcon }\n\t\t\t\tonClick={ onInsertBlock( 'core/image' ) }\n\t\t\t\ttestID=\"insert-image-button\"\n\t\t\t\textraProps={ {\n\t\t\t\t\thint: __( 'Insert Image Block' ),\n\t\t\t\t} }\n\t\t\t/>\n\t\t\t<ToolbarButton\n\t\t\t\tkey=\"videoButton\"\n\t\t\t\ttitle={ __( 'Video' ) }\n\t\t\t\ticon={ videoIcon }\n\t\t\t\tonClick={ onInsertBlock( 'core/video' ) }\n\t\t\t\ttestID=\"insert-video-button\"\n\t\t\t\textraProps={ {\n\t\t\t\t\thint: __( 'Insert Video Block' ),\n\t\t\t\t} }\n\t\t\t/>\n\t\t\t<ToolbarButton\n\t\t\t\tkey=\"galleryButton\"\n\t\t\t\ttitle={ __( 'Gallery' ) }\n\t\t\t\ticon={ galleryIcon }\n\t\t\t\tonClick={ onInsertBlock( 'core/gallery' ) }\n\t\t\t\ttestID=\"insert-gallery-button\"\n\t\t\t\textraProps={ {\n\t\t\t\t\thint: __( 'Insert Gallery Block' ),\n\t\t\t\t} }\n\t\t\t/>\n\t\t\t<ToolbarButton\n\t\t\t\tkey=\"audioButton\"\n\t\t\t\ttitle={ __( 'Audio' ) }\n\t\t\t\ticon={ audioIcon }\n\t\t\t\tonClick={ onInsertBlock( 'core/audio' ) }\n\t\t\t\ttestID=\"insert-audio-button\"\n\t\t\t\textraProps={ {\n\t\t\t\t\thint: __( 'Insert Audio Block' ),\n\t\t\t\t} }\n\t\t\t/>\n\t\t</ToolbarGroup>\n\t);\n\n\t/* translators: accessibility text for the editor toolbar */\n\tconst toolbarAriaLabel = __( 'Document tools' );\n\n\tconst shadowColor = usePreferredColorSchemeStyle(\n\t\tstyles[ 'header-toolbar__keyboard-hide-shadow--light' ],\n\t\tstyles[ 'header-toolbar__keyboard-hide-shadow--dark' ]\n\t);\n\tconst showKeyboardButtonStyles = [\n\t\tusePreferredColorSchemeStyle(\n\t\t\tstyles[ 'header-toolbar__keyboard-hide-container' ],\n\t\t\tstyles[ 'header-toolbar__keyboard-hide-container--dark' ]\n\t\t),\n\t\tshadowStyle,\n\t\t{\n\t\t\tshadowColor: Platform.isAndroid\n\t\t\t\t? styles[ 'header-toolbar__keyboard-hide-shadow--solid' ].color\n\t\t\t\t: shadowColor.color,\n\t\t},\n\t];\n\n\treturn (\n\t\t<View\n\t\t\tref={ anchorNodeRef }\n\t\t\ttestID={ toolbarAriaLabel }\n\t\t\taccessibilityLabel={ toolbarAriaLabel }\n\t\t\tstyle={ containerStyle }\n\t\t>\n\t\t\t<ScrollView\n\t\t\t\tref={ scrollViewRef }\n\t\t\t\tonContentSizeChange={ scrollToStart }\n\t\t\t\thorizontal\n\t\t\t\tshowsHorizontalScrollIndicator={ false }\n\t\t\t\tkeyboardShouldPersistTaps=\"always\"\n\t\t\t\talwaysBounceHorizontal={ false }\n\t\t\t\tcontentContainerStyle={\n\t\t\t\t\tstyles[ 'header-toolbar__scrollable-content' ]\n\t\t\t\t}\n\t\t\t>\n\t\t\t\t<Inserter disabled={ ! showInserter } />\n\n\t\t\t\t{ noContentSelected && renderMediaButtons }\n\t\t\t\t<BlockToolbar anchorNodeRef={ anchorNodeRef.current } />\n\t\t\t</ScrollView>\n\t\t\t{ showKeyboardHideButton && (\n\t\t\t\t<ToolbarGroup passedStyle={ showKeyboardButtonStyles }>\n\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\ttitle={ __( 'Hide keyboard' ) }\n\t\t\t\t\t\ticon={ keyboardClose }\n\t\t\t\t\t\tonClick={ onHideKeyboard }\n\t\t\t\t\t\textraProps={ {\n\t\t\t\t\t\t\thint: __( 'Tap to hide the keyboard' ),\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t</ToolbarGroup>\n\t\t\t) }\n\t\t</View>\n\t);\n}\n\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetBlockRootClientId,\n\t\t\tgetBlockSelectionEnd,\n\t\t\thasInserterItems,\n\t\t\thasSelectedBlock,\n\t\t} = select( blockEditorStore );\n\t\tconst { getEditorSettings } = select( editorStore );\n\t\tconst isAnyBlockSelected = hasSelectedBlock();\n\t\treturn {\n\t\t\thasRedo: select( editorStore ).hasEditorRedo(),\n\t\t\thasUndo: select( editorStore ).hasEditorUndo(),\n\t\t\t// This setting (richEditingEnabled) should not live in the block editor's setting.\n\t\t\tshowInserter:\n\t\t\t\tselect( editPostStore ).getEditorMode() === 'visual' &&\n\t\t\t\tgetEditorSettings().richEditingEnabled &&\n\t\t\t\thasInserterItems(\n\t\t\t\t\tgetBlockRootClientId( getBlockSelectionEnd() )\n\t\t\t\t),\n\t\t\tisTextModeEnabled:\n\t\t\t\tselect( editPostStore ).getEditorMode() === 'text',\n\t\t\tisRTL: select( blockEditorStore ).getSettings().isRTL,\n\t\t\tnoContentSelected: ! isAnyBlockSelected,\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch ) => {\n\t\tconst { clearSelectedBlock, insertBlock } =\n\t\t\tdispatch( blockEditorStore );\n\t\tconst { togglePostTitleSelection } = dispatch( editorStore );\n\n\t\treturn {\n\t\t\tredo: dispatch( editorStore ).redo,\n\t\t\tundo: dispatch( editorStore ).undo,\n\t\t\tonHideKeyboard() {\n\t\t\t\tclearSelectedBlock();\n\t\t\t\ttogglePostTitleSelection( false );\n\t\t\t},\n\t\t\tinsertBlock,\n\t\t};\n\t} ),\n\twithViewportMatch( { isLargeViewport: 'medium' } ),\n] )( HeaderToolbar );\n"],"mappings":";;;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AAKA,IAAAO,WAAA,GAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AAOA,IAAAS,OAAA,GAAAT,OAAA;AACA,IAAAU,OAAA,GAAAV,OAAA;AACA,IAAAW,kBAAA,GAAAX,OAAA;AAUA,IAAAY,MAAA,GAAAC,sBAAA,CAAAb,OAAA;AACA,IAAAc,MAAA,GAAAd,OAAA;AAvCA;AACA;AACA;;AAGA;AACA;AACA;;AA4BA;AACA;AACA;;AAIA,MAAMe,WA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,CAAC,CAAEzG,aAAc,CAAC"}
1
+ {"version":3,"names":["_reactNative","require","_element","_compose","_data","_viewport","_i18n","_blockEditor","_components","_icons","_editor","_blocks","_reactNativeBridge","_style","_interopRequireDefault","_store","shadowStyle","shadowOffset","width","height","shadowOpacity","shadowRadius","elevation","HeaderToolbar","hasRedo","hasUndo","redo","undo","showInserter","showKeyboardHideButton","insertBlock","onHideKeyboard","isRTL","noContentSelected","anchorNodeRef","useRef","containerStyle","usePreferredColorSchemeStyle","styles","borderTopWidth","StyleSheet","hairlineWidth","useEffect","onUndoSubscription","subscribeOnUndoPressed","onRedoSubscription","subscribeOnRedoPressed","remove","toggleUndoButton","toggleRedoButton","scrollViewRef","scrollToStart","Platform","isAndroid","current","scrollToEnd","scrollTo","x","onInsertBlock","useCallback","blockType","createBlock","undefined","source","inserterMethod","renderMediaButtons","_react","createElement","ToolbarGroup","ToolbarButton","key","title","__","icon","imageIcon","onClick","testID","extraProps","hint","videoIcon","galleryIcon","audioIcon","toolbarAriaLabel","shadowColor","showKeyboardButtonStyles","color","View","ref","accessibilityLabel","style","ScrollView","onContentSizeChange","horizontal","showsHorizontalScrollIndicator","keyboardShouldPersistTaps","alwaysBounceHorizontal","contentContainerStyle","Inserter","disabled","BlockToolbar","passedStyle","keyboardClose","_default","exports","default","compose","withSelect","select","getBlockRootClientId","getBlockSelectionEnd","hasInserterItems","hasSelectedBlock","blockEditorStore","getEditorSettings","editorStore","isAnyBlockSelected","hasEditorRedo","hasEditorUndo","editPostStore","getEditorMode","richEditingEnabled","isTextModeEnabled","getSettings","withDispatch","dispatch","clearSelectedBlock","togglePostTitleSelection","withViewportMatch","isLargeViewport"],"sources":["@wordpress/edit-post/src/components/header/header-toolbar/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { ScrollView, StyleSheet, View } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { useCallback, useRef, useEffect, Platform } from '@wordpress/element';\nimport { compose, usePreferredColorSchemeStyle } from '@wordpress/compose';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { withViewportMatch } from '@wordpress/viewport';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tInserter,\n\tBlockToolbar,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { ToolbarGroup, ToolbarButton } from '@wordpress/components';\nimport {\n\tkeyboardClose,\n\taudio as audioIcon,\n\tmedia as imageIcon,\n\tvideo as videoIcon,\n\tgallery as galleryIcon,\n} from '@wordpress/icons';\nimport { store as editorStore } from '@wordpress/editor';\nimport { createBlock } from '@wordpress/blocks';\nimport {\n\ttoggleUndoButton,\n\ttoggleRedoButton,\n\tsubscribeOnUndoPressed,\n\tsubscribeOnRedoPressed,\n} from '@wordpress/react-native-bridge';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\nimport { store as editPostStore } from '../../../store';\n\nconst shadowStyle = {\n\tshadowOffset: { width: 2, height: 2 },\n\tshadowOpacity: 1,\n\tshadowRadius: 6,\n\televation: 18,\n};\n\nfunction HeaderToolbar( {\n\thasRedo,\n\thasUndo,\n\tredo,\n\tundo,\n\tshowInserter,\n\tshowKeyboardHideButton,\n\tinsertBlock,\n\tonHideKeyboard,\n\tisRTL,\n\tnoContentSelected,\n} ) {\n\tconst anchorNodeRef = useRef();\n\n\tconst containerStyle = [\n\t\tusePreferredColorSchemeStyle(\n\t\t\tstyles[ 'header-toolbar__container' ],\n\t\t\tstyles[ 'header-toolbar__container--dark' ]\n\t\t),\n\t\t{ borderTopWidth: StyleSheet.hairlineWidth },\n\t];\n\n\tuseEffect( () => {\n\t\tconst onUndoSubscription = subscribeOnUndoPressed( undo );\n\t\tconst onRedoSubscription = subscribeOnRedoPressed( redo );\n\n\t\treturn () => {\n\t\t\tonUndoSubscription?.remove();\n\t\t\tonRedoSubscription?.remove();\n\t\t};\n\t}, [ undo, redo ] );\n\n\tuseEffect( () => {\n\t\ttoggleUndoButton( ! hasUndo );\n\t}, [ hasUndo ] );\n\n\tuseEffect( () => {\n\t\ttoggleRedoButton( ! hasRedo );\n\t}, [ hasRedo ] );\n\n\tconst scrollViewRef = useRef( null );\n\tconst scrollToStart = () => {\n\t\t// scrollview doesn't seem to automatically adjust to RTL on Android so, scroll to end when Android\n\t\tif ( Platform.isAndroid && isRTL ) {\n\t\t\tscrollViewRef.current.scrollToEnd();\n\t\t} else {\n\t\t\tscrollViewRef.current.scrollTo( { x: 0 } );\n\t\t}\n\t};\n\n\tconst onInsertBlock = useCallback(\n\t\t( blockType ) => () => {\n\t\t\tinsertBlock( createBlock( blockType ), undefined, undefined, true, {\n\t\t\t\tsource: 'inserter_menu',\n\t\t\t\tinserterMethod: 'quick-inserter',\n\t\t\t} );\n\t\t},\n\t\t[ insertBlock ]\n\t);\n\n\tconst renderMediaButtons = (\n\t\t<ToolbarGroup>\n\t\t\t<ToolbarButton\n\t\t\t\tkey=\"imageButton\"\n\t\t\t\ttitle={ __( 'Image' ) }\n\t\t\t\ticon={ imageIcon }\n\t\t\t\tonClick={ onInsertBlock( 'core/image' ) }\n\t\t\t\ttestID=\"insert-image-button\"\n\t\t\t\textraProps={ {\n\t\t\t\t\thint: __( 'Insert Image Block' ),\n\t\t\t\t} }\n\t\t\t/>\n\t\t\t<ToolbarButton\n\t\t\t\tkey=\"videoButton\"\n\t\t\t\ttitle={ __( 'Video' ) }\n\t\t\t\ticon={ videoIcon }\n\t\t\t\tonClick={ onInsertBlock( 'core/video' ) }\n\t\t\t\ttestID=\"insert-video-button\"\n\t\t\t\textraProps={ {\n\t\t\t\t\thint: __( 'Insert Video Block' ),\n\t\t\t\t} }\n\t\t\t/>\n\t\t\t<ToolbarButton\n\t\t\t\tkey=\"galleryButton\"\n\t\t\t\ttitle={ __( 'Gallery' ) }\n\t\t\t\ticon={ galleryIcon }\n\t\t\t\tonClick={ onInsertBlock( 'core/gallery' ) }\n\t\t\t\ttestID=\"insert-gallery-button\"\n\t\t\t\textraProps={ {\n\t\t\t\t\thint: __( 'Insert Gallery Block' ),\n\t\t\t\t} }\n\t\t\t/>\n\t\t\t<ToolbarButton\n\t\t\t\tkey=\"audioButton\"\n\t\t\t\ttitle={ __( 'Audio' ) }\n\t\t\t\ticon={ audioIcon }\n\t\t\t\tonClick={ onInsertBlock( 'core/audio' ) }\n\t\t\t\ttestID=\"insert-audio-button\"\n\t\t\t\textraProps={ {\n\t\t\t\t\thint: __( 'Insert Audio Block' ),\n\t\t\t\t} }\n\t\t\t/>\n\t\t</ToolbarGroup>\n\t);\n\n\t/* translators: accessibility text for the editor toolbar */\n\tconst toolbarAriaLabel = __( 'Document tools' );\n\n\tconst shadowColor = usePreferredColorSchemeStyle(\n\t\tstyles[ 'header-toolbar__keyboard-hide-shadow--light' ],\n\t\tstyles[ 'header-toolbar__keyboard-hide-shadow--dark' ]\n\t);\n\tconst showKeyboardButtonStyles = [\n\t\tusePreferredColorSchemeStyle(\n\t\t\tstyles[ 'header-toolbar__keyboard-hide-container' ],\n\t\t\tstyles[ 'header-toolbar__keyboard-hide-container--dark' ]\n\t\t),\n\t\tshadowStyle,\n\t\t{\n\t\t\tshadowColor: Platform.isAndroid\n\t\t\t\t? styles[ 'header-toolbar__keyboard-hide-shadow--solid' ].color\n\t\t\t\t: shadowColor.color,\n\t\t},\n\t];\n\n\treturn (\n\t\t<View\n\t\t\tref={ anchorNodeRef }\n\t\t\ttestID={ toolbarAriaLabel }\n\t\t\taccessibilityLabel={ toolbarAriaLabel }\n\t\t\tstyle={ containerStyle }\n\t\t>\n\t\t\t<ScrollView\n\t\t\t\tref={ scrollViewRef }\n\t\t\t\tonContentSizeChange={ scrollToStart }\n\t\t\t\thorizontal\n\t\t\t\tshowsHorizontalScrollIndicator={ false }\n\t\t\t\tkeyboardShouldPersistTaps=\"always\"\n\t\t\t\talwaysBounceHorizontal={ false }\n\t\t\t\tcontentContainerStyle={\n\t\t\t\t\tstyles[ 'header-toolbar__scrollable-content' ]\n\t\t\t\t}\n\t\t\t>\n\t\t\t\t<Inserter disabled={ ! showInserter } />\n\n\t\t\t\t{ noContentSelected && renderMediaButtons }\n\t\t\t\t<BlockToolbar anchorNodeRef={ anchorNodeRef.current } />\n\t\t\t</ScrollView>\n\t\t\t{ showKeyboardHideButton && (\n\t\t\t\t<ToolbarGroup passedStyle={ showKeyboardButtonStyles }>\n\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\ttitle={ __( 'Hide keyboard' ) }\n\t\t\t\t\t\ticon={ keyboardClose }\n\t\t\t\t\t\tonClick={ onHideKeyboard }\n\t\t\t\t\t\textraProps={ {\n\t\t\t\t\t\t\thint: __( 'Tap to hide the keyboard' ),\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t</ToolbarGroup>\n\t\t\t) }\n\t\t</View>\n\t);\n}\n\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetBlockRootClientId,\n\t\t\tgetBlockSelectionEnd,\n\t\t\thasInserterItems,\n\t\t\thasSelectedBlock,\n\t\t} = select( blockEditorStore );\n\t\tconst { getEditorSettings } = select( editorStore );\n\t\tconst isAnyBlockSelected = hasSelectedBlock();\n\t\treturn {\n\t\t\thasRedo: select( editorStore ).hasEditorRedo(),\n\t\t\thasUndo: select( editorStore ).hasEditorUndo(),\n\t\t\t// This setting (richEditingEnabled) should not live in the block editor's setting.\n\t\t\tshowInserter:\n\t\t\t\tselect( editPostStore ).getEditorMode() === 'visual' &&\n\t\t\t\tgetEditorSettings().richEditingEnabled &&\n\t\t\t\thasInserterItems(\n\t\t\t\t\tgetBlockRootClientId( getBlockSelectionEnd() )\n\t\t\t\t),\n\t\t\tisTextModeEnabled:\n\t\t\t\tselect( editPostStore ).getEditorMode() === 'text',\n\t\t\tisRTL: select( blockEditorStore ).getSettings().isRTL,\n\t\t\tnoContentSelected: ! isAnyBlockSelected,\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch ) => {\n\t\tconst { clearSelectedBlock, insertBlock } =\n\t\t\tdispatch( blockEditorStore );\n\t\tconst { togglePostTitleSelection } = dispatch( editorStore );\n\n\t\treturn {\n\t\t\tredo: dispatch( editorStore ).redo,\n\t\t\tundo: dispatch( editorStore ).undo,\n\t\t\tonHideKeyboard() {\n\t\t\t\tclearSelectedBlock();\n\t\t\t\ttogglePostTitleSelection( false );\n\t\t\t},\n\t\t\tinsertBlock,\n\t\t};\n\t} ),\n\twithViewportMatch( { isLargeViewport: 'medium' } ),\n] )( HeaderToolbar );\n"],"mappings":";;;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AAKA,IAAAO,WAAA,GAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AAOA,IAAAS,OAAA,GAAAT,OAAA;AACA,IAAAU,OAAA,GAAAV,OAAA;AACA,IAAAW,kBAAA,GAAAX,OAAA;AAUA,IAAAY,MAAA,GAAAC,sBAAA,CAAAb,OAAA;AACA,IAAAc,MAAA,GAAAd,OAAA;AAvCA;AACA;AACA;;AAGA;AACA;AACA;;AA4BA;AACA;AACA;;AAIA,MAAMe,WAAW,GAAG;EACnBC,YAAY,EAAE;IAAEC,KAAK,EAAE,CAAC;IAAEC,MAAM,EAAE;EAAE,CAAC;EACrCC,aAAa,EAAE,CAAC;EAChBC,YAAY,EAAE,CAAC;EACfC,SAAS,EAAE;AACZ,CAAC;AAED,SAASC,aAAaA,CAAE;EACvBC,OAAO;EACPC,OAAO;EACPC,IAAI;EACJC,IAAI;EACJC,YAAY;EACZC,sBAAsB;EACtBC,WAAW;EACXC,cAAc;EACdC,KAAK;EACLC;AACD,CAAC,EAAG;EACH,MAAMC,aAAa,GAAG,IAAAC,eAAM,EAAC,CAAC;EAE9B,MAAMC,cAAc,GAAG,CACtB,IAAAC,qCAA4B,EAC3BC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BAAoB,CAAC,CAAE,CAC9C,CAAC;IACFY,iBAAiB,EAChBd,MAAM,CAAEW,YAAc,CAAC,CAACC,aAAa,CAAC,CAAC,KAAK,MAAM;IACnDvF,KAAK,EAAE2E,MAAM,CAAEK,kBAAiB,CAAC,CAACU,WAAW,CAAC,CAAC,CAAC1F,KAAK;IACrDC,iBAAiB,EAAE,CAAEkF;EACtB,CAAC;AACF,CAAE,CAAC,EACH,IAAAQ,kBAAY,EAAIC,QAAQ,IAAM;EAC7B,MAAM;IAAEC,kBAAkB;IAAE/F;EAAY,CAAC,GACxC8F,QAAQ,CAAEZ,kBAAiB,CAAC;EAC7B,MAAM;IAAEc;EAAyB,CAAC,GAAGF,QAAQ,CAAEV,aAAY,CAAC;EAE5D,OAAO;IACNxF,IAAI,EAAEkG,QAAQ,CAAEV,aAAY,CAAC,CAACxF,IAAI;IAClCC,IAAI,EAAEiG,QAAQ,CAAEV,aAAY,CAAC,CAACvF,IAAI;IAClCI,cAAcA,CAAA,EAAG;MAChB8F,kBAAkB,CAAC,CAAC;MACpBC,wBAAwB,CAAE,KAAM,CAAC;IAClC,CAAC;IACDhG;EACD,CAAC;AACF,CAAE,CAAC,EACH,IAAAiG,2BAAiB,EAAE;EAAEC,eAAe,EAAE;AAAS,CAAE,CAAC,CACjD,CAAC,CAAEzG,aAAc,CAAC","ignoreList":[]}
@@ -13,7 +13,6 @@ var _element = require("@wordpress/element");
13
13
  var _data = require("@wordpress/data");
14
14
  var _i18n = require("@wordpress/i18n");
15
15
  var _icons = require("@wordpress/icons");
16
- var _interface = require("@wordpress/interface");
17
16
  var _compose = require("@wordpress/compose");
18
17
  var _components = require("@wordpress/components");
19
18
  var _preferences = require("@wordpress/preferences");
@@ -41,7 +40,8 @@ const {
41
40
  const {
42
41
  DocumentTools,
43
42
  PostViewLink,
44
- PreviewDropdown
43
+ PreviewDropdown,
44
+ PinnedItems
45
45
  } = (0, _lockUnlock.unlock)(_editor.privateApis);
46
46
  const slideY = {
47
47
  hidden: {
@@ -179,8 +179,8 @@ function Header({
179
179
  }), (0, _react.createElement)(PostViewLink, null), (0, _react.createElement)(_postPublishButtonOrToggle.default, {
180
180
  forceIsDirty: hasActiveMetaboxes,
181
181
  setEntitiesSavedStatesCallback: setEntitiesSavedStatesCallback
182
- }), (isWideViewport || !showIconLabels) && (0, _react.createElement)(_interface.PinnedItems.Slot, {
183
- scope: "core/edit-post"
182
+ }), (isWideViewport || !showIconLabels) && (0, _react.createElement)(PinnedItems.Slot, {
183
+ scope: "core"
184
184
  }), (0, _react.createElement)(_moreMenu.default, {
185
185
  showIconLabels: showIconLabels
186
186
  })));
@@ -1 +1 @@
1
- {"version":3,"names":["_classnames","_interopRequireDefault","require","_blockEditor","_editor","_element","_data","_i18n","_icons","_interface","_compose","_components","_preferences","_fullscreenModeClose","_moreMenu","_postPublishButtonOrToggle","_mainDashboardButton","_store","_lockUnlock","useShowBlockTools","unlock","blockEditorPrivateApis","DocumentTools","PostViewLink","PreviewDropdown","editorPrivateApis","slideY","hidden","y","distractionFreeInactive","hover","transition","type","delay","slideX","x","Header","setEntitiesSavedStatesCallback","initialPost","isWideViewport","useViewportMatch","isLargeViewport","blockToolbarRef","useRef","isTextEditor","blockSelectionStart","hasActiveMetaboxes","isPublishSidebarOpened","showIconLabels","hasHistory","useSelect","select","get","getPreference","preferencesStore","getEditorMode","editorStore","blockEditorStore","getBlockSelectionStart","editPostStore","hasMetaBoxes","getEditorSettings","onNavigateToPreviousEntityRecord","showFixedToolbar","showTopToolbar","isBlockToolsCollapsed","setIsBlockToolsCollapsed","useState","hasBlockSelection","useEffect","_react","createElement","className","default","Slot","__unstableMotion","div","variants","showTooltip","disableBlockTools","Fragment","classnames","BlockToolbar","hideDragHandle","Popover","ref","name","Button","icon","next","previous","onClick","collapsed","label","__","size","DocumentBar","PostSavedState","forceIsDirty","forceIsAutosaveable","PostPreviewButton","PinnedItems","scope","_default","exports"],"sources":["@wordpress/edit-post/src/components/header/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tBlockToolbar,\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport {\n\tPostSavedState,\n\tPostPreviewButton,\n\tstore as editorStore,\n\tDocumentBar,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\nimport { useEffect, useRef, useState } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { next, previous } from '@wordpress/icons';\nimport { PinnedItems } from '@wordpress/interface';\nimport { useViewportMatch } from '@wordpress/compose';\nimport {\n\tButton,\n\t__unstableMotion as motion,\n\tPopover,\n} from '@wordpress/components';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport FullscreenModeClose from './fullscreen-mode-close';\nimport MoreMenu from './more-menu';\nimport PostPublishButtonOrToggle from './post-publish-button-or-toggle';\nimport MainDashboardButton from './main-dashboard-button';\nimport { store as editPostStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst { useShowBlockTools } = unlock( blockEditorPrivateApis );\nconst { DocumentTools, PostViewLink, PreviewDropdown } =\n\tunlock( editorPrivateApis );\n\nconst slideY = {\n\thidden: { y: '-50px' },\n\tdistractionFreeInactive: { y: 0 },\n\thover: { y: 0, transition: { type: 'tween', delay: 0.2 } },\n};\n\nconst slideX = {\n\thidden: { x: '-100%' },\n\tdistractionFreeInactive: { x: 0 },\n\thover: { x: 0, transition: { type: 'tween', delay: 0.2 } },\n};\n\nfunction Header( { setEntitiesSavedStatesCallback, initialPost } ) {\n\tconst isWideViewport = useViewportMatch( 'large' );\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst blockToolbarRef = useRef();\n\tconst {\n\t\tisTextEditor,\n\t\tblockSelectionStart,\n\t\thasActiveMetaboxes,\n\t\tisPublishSidebarOpened,\n\t\tshowIconLabels,\n\t\thasHistory,\n\t} = useSelect( ( select ) => {\n\t\tconst { get: getPreference } = select( preferencesStore );\n\t\tconst { getEditorMode } = select( editorStore );\n\n\t\treturn {\n\t\t\tisTextEditor: getEditorMode() === 'text',\n\t\t\tblockSelectionStart:\n\t\t\t\tselect( blockEditorStore ).getBlockSelectionStart(),\n\t\t\thasActiveMetaboxes: select( editPostStore ).hasMetaBoxes(),\n\t\t\thasHistory:\n\t\t\t\t!! select( editorStore ).getEditorSettings()\n\t\t\t\t\t.onNavigateToPreviousEntityRecord,\n\t\t\tisPublishSidebarOpened:\n\t\t\t\tselect( editorStore ).isPublishSidebarOpened(),\n\t\t\tshowIconLabels: getPreference( 'core', 'showIconLabels' ),\n\t\t};\n\t}, [] );\n\n\tconst { showFixedToolbar } = useShowBlockTools();\n\tconst showTopToolbar = isLargeViewport && showFixedToolbar;\n\n\tconst [ isBlockToolsCollapsed, setIsBlockToolsCollapsed ] =\n\t\tuseState( true );\n\tconst hasBlockSelection = !! blockSelectionStart;\n\n\tuseEffect( () => {\n\t\t// If we have a new block selection, show the block tools\n\t\tif ( blockSelectionStart ) {\n\t\t\tsetIsBlockToolsCollapsed( false );\n\t\t}\n\t}, [ blockSelectionStart ] );\n\n\treturn (\n\t\t<div className=\"edit-post-header\">\n\t\t\t<MainDashboardButton.Slot>\n\t\t\t\t<motion.div\n\t\t\t\t\tvariants={ slideX }\n\t\t\t\t\ttransition={ { type: 'tween', delay: 0.8 } }\n\t\t\t\t>\n\t\t\t\t\t<FullscreenModeClose\n\t\t\t\t\t\tshowTooltip\n\t\t\t\t\t\tinitialPost={ initialPost }\n\t\t\t\t\t/>\n\t\t\t\t</motion.div>\n\t\t\t</MainDashboardButton.Slot>\n\t\t\t<motion.div\n\t\t\t\tvariants={ slideY }\n\t\t\t\ttransition={ { type: 'tween', delay: 0.8 } }\n\t\t\t\tclassName=\"edit-post-header__toolbar\"\n\t\t\t>\n\t\t\t\t<DocumentTools disableBlockTools={ isTextEditor } />\n\t\t\t\t{ showTopToolbar && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t\t'selected-block-tools-wrapper',\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t'is-collapsed':\n\t\t\t\t\t\t\t\t\t\tisBlockToolsCollapsed ||\n\t\t\t\t\t\t\t\t\t\t! hasBlockSelection,\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<BlockToolbar hideDragHandle />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<Popover.Slot\n\t\t\t\t\t\t\tref={ blockToolbarRef }\n\t\t\t\t\t\t\tname=\"block-toolbar\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tclassName=\"edit-post-header__block-tools-toggle\"\n\t\t\t\t\t\t\ticon={ isBlockToolsCollapsed ? next : previous }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tsetIsBlockToolsCollapsed(\n\t\t\t\t\t\t\t\t\t( collapsed ) => ! collapsed\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\tisBlockToolsCollapsed\n\t\t\t\t\t\t\t\t\t? __( 'Show block tools' )\n\t\t\t\t\t\t\t\t\t: __( 'Hide block tools' )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t\t<div\n\t\t\t\t\tclassName={ classnames( 'edit-post-header__center', {\n\t\t\t\t\t\t'is-collapsed':\n\t\t\t\t\t\t\thasHistory &&\n\t\t\t\t\t\t\t! isBlockToolsCollapsed &&\n\t\t\t\t\t\t\tshowTopToolbar,\n\t\t\t\t\t} ) }\n\t\t\t\t>\n\t\t\t\t\t{ hasHistory && <DocumentBar /> }\n\t\t\t\t</div>\n\t\t\t</motion.div>\n\t\t\t<motion.div\n\t\t\t\tvariants={ slideY }\n\t\t\t\ttransition={ { type: 'tween', delay: 0.8 } }\n\t\t\t\tclassName=\"edit-post-header__settings\"\n\t\t\t>\n\t\t\t\t{ ! isPublishSidebarOpened && (\n\t\t\t\t\t// This button isn't completely hidden by the publish sidebar.\n\t\t\t\t\t// We can't hide the whole toolbar when the publish sidebar is open because\n\t\t\t\t\t// we want to prevent mounting/unmounting the PostPublishButtonOrToggle DOM node.\n\t\t\t\t\t// We track that DOM node to return focus to the PostPublishButtonOrToggle\n\t\t\t\t\t// when the publish sidebar has been closed.\n\t\t\t\t\t<PostSavedState forceIsDirty={ hasActiveMetaboxes } />\n\t\t\t\t) }\n\t\t\t\t<PreviewDropdown forceIsAutosaveable={ hasActiveMetaboxes } />\n\t\t\t\t<PostPreviewButton\n\t\t\t\t\tclassName=\"edit-post-header__post-preview-button\"\n\t\t\t\t\tforceIsAutosaveable={ hasActiveMetaboxes }\n\t\t\t\t/>\n\t\t\t\t<PostViewLink />\n\t\t\t\t<PostPublishButtonOrToggle\n\t\t\t\t\tforceIsDirty={ hasActiveMetaboxes }\n\t\t\t\t\tsetEntitiesSavedStatesCallback={\n\t\t\t\t\t\tsetEntitiesSavedStatesCallback\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t\t{ ( isWideViewport || ! showIconLabels ) && (\n\t\t\t\t\t<PinnedItems.Slot scope=\"core/edit-post\" />\n\t\t\t\t) }\n\t\t\t\t<MoreMenu showIconLabels={ showIconLabels } />\n\t\t\t</motion.div>\n\t\t</div>\n\t);\n}\n\nexport default Header;\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,YAAA,GAAAD,OAAA;AAKA,IAAAE,OAAA,GAAAF,OAAA;AAOA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OA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AA,CAAAgG,iBAAiB;IACjB5B,SAAS,EAAC,uCAAuC;IACjD2B,mBAAmB,EAAGrD;EAAoB,CAC1C,CAAC,EACF,IAAAwB,MAAA,CAAAC,aAAA,EAAChD,YAAY,MAAE,CAAC,EAChB,IAAA+C,MAAA,CAAAC,aAAA,EAACxD,0BAAA,CAAA0D,OAAyB;IACzByB,YAAY,EAAGpD,kBAAoB;IACnCT,8BAA8B,EAC7BA;EACA,CACD,CAAC,EACA,CAAEE,cAAc,IAAI,CAAES,cAAc,KACrC,IAAAsB,MAAA,CAAAC,aAAA,EAAC9D,UAAA,CAAA4F,WAAW,CAAC3B,IAAI;IAAC4B,KAAK,EAAC;EAAgB,CAAE,CAC1C,EACD,IAAAhC,MAAA,CAAAC,aAAA,EAACzD,SAAA,CAAA2D,OAAQ;IAACzB,cAAc,EAAGA;EAAgB,CAAE,CAClC,CACR,CAAC;AAER;AAAC,IAAAuD,QAAA,GAAAC,OAAA,CAAA/B,OAAA,GAEcrC,MAAM"}
1
+ {"version":3,"names":["_classnames","_interopRequireDefault","require","_blockEditor","_editor","_element","_data","_i18n","_icons","_compose","_components","_preferences","_fullscreenModeClose","_moreMenu","_postPublishButtonOrToggle","_mainDashboardButton","_store","_lockUnlock","useShowBlockTools","unlock","blockEditorPrivateApis","DocumentTools","PostViewLink","PreviewDropdown","PinnedItems","editorPrivateApis","slideY","hidden","y","distractionFreeInactive","hover","transition","type","delay","slideX","x","Header","setEntitiesSavedStatesCallback","initialPost","isWideViewport","useViewportMatch","isLargeViewport","blockToolbarRef","useRef","isTextEditor","blockSelectionStart","hasActiveMetaboxes","isPublishSidebarOpened","showIconLabels","hasHistory","useSelect","select","get","getPreference","preferencesStore","getEditorMode","editorStore","blockEditorStore","getBlockSelectionStart","editPostStore","hasMetaBoxes","getEditorSettings","onNavigateToPreviousEntityRecord","showFixedToolbar","showTopToolbar","isBlockToolsCollapsed","setIsBlockToolsCollapsed","useState","hasBlockSelection","useEffect","_react","createElement","className","default","Slot","__unstableMotion","div","variants","showTooltip","disableBlockTools","Fragment","classnames","BlockToolbar","hideDragHandle","Popover","ref","name","Button","icon","next","previous","onClick","collapsed","label","__","size","DocumentBar","PostSavedState","forceIsDirty","forceIsAutosaveable","PostPreviewButton","scope","_default","exports"],"sources":["@wordpress/edit-post/src/components/header/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tBlockToolbar,\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport {\n\tPostSavedState,\n\tPostPreviewButton,\n\tstore as editorStore,\n\tDocumentBar,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\nimport { useEffect, useRef, useState } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { next, previous } from '@wordpress/icons';\nimport { useViewportMatch } from '@wordpress/compose';\nimport {\n\tButton,\n\t__unstableMotion as motion,\n\tPopover,\n} from '@wordpress/components';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport FullscreenModeClose from './fullscreen-mode-close';\nimport MoreMenu from './more-menu';\nimport PostPublishButtonOrToggle from './post-publish-button-or-toggle';\nimport MainDashboardButton from './main-dashboard-button';\nimport { store as editPostStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst { useShowBlockTools } = unlock( blockEditorPrivateApis );\nconst { DocumentTools, PostViewLink, PreviewDropdown, PinnedItems } =\n\tunlock( editorPrivateApis );\n\nconst slideY = {\n\thidden: { y: '-50px' },\n\tdistractionFreeInactive: { y: 0 },\n\thover: { y: 0, transition: { type: 'tween', delay: 0.2 } },\n};\n\nconst slideX = {\n\thidden: { x: '-100%' },\n\tdistractionFreeInactive: { x: 0 },\n\thover: { x: 0, transition: { type: 'tween', delay: 0.2 } },\n};\n\nfunction Header( { setEntitiesSavedStatesCallback, initialPost } ) {\n\tconst isWideViewport = useViewportMatch( 'large' );\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst blockToolbarRef = useRef();\n\tconst {\n\t\tisTextEditor,\n\t\tblockSelectionStart,\n\t\thasActiveMetaboxes,\n\t\tisPublishSidebarOpened,\n\t\tshowIconLabels,\n\t\thasHistory,\n\t} = useSelect( ( select ) => {\n\t\tconst { get: getPreference } = select( preferencesStore );\n\t\tconst { getEditorMode } = select( editorStore );\n\n\t\treturn {\n\t\t\tisTextEditor: getEditorMode() === 'text',\n\t\t\tblockSelectionStart:\n\t\t\t\tselect( blockEditorStore ).getBlockSelectionStart(),\n\t\t\thasActiveMetaboxes: select( editPostStore ).hasMetaBoxes(),\n\t\t\thasHistory:\n\t\t\t\t!! select( editorStore ).getEditorSettings()\n\t\t\t\t\t.onNavigateToPreviousEntityRecord,\n\t\t\tisPublishSidebarOpened:\n\t\t\t\tselect( editorStore ).isPublishSidebarOpened(),\n\t\t\tshowIconLabels: getPreference( 'core', 'showIconLabels' ),\n\t\t};\n\t}, [] );\n\n\tconst { showFixedToolbar } = useShowBlockTools();\n\tconst showTopToolbar = isLargeViewport && showFixedToolbar;\n\n\tconst [ isBlockToolsCollapsed, setIsBlockToolsCollapsed ] =\n\t\tuseState( true );\n\tconst hasBlockSelection = !! blockSelectionStart;\n\n\tuseEffect( () => {\n\t\t// If we have a new block selection, show the block tools\n\t\tif ( blockSelectionStart ) {\n\t\t\tsetIsBlockToolsCollapsed( false );\n\t\t}\n\t}, [ blockSelectionStart ] );\n\n\treturn (\n\t\t<div className=\"edit-post-header\">\n\t\t\t<MainDashboardButton.Slot>\n\t\t\t\t<motion.div\n\t\t\t\t\tvariants={ slideX }\n\t\t\t\t\ttransition={ { type: 'tween', delay: 0.8 } }\n\t\t\t\t>\n\t\t\t\t\t<FullscreenModeClose\n\t\t\t\t\t\tshowTooltip\n\t\t\t\t\t\tinitialPost={ initialPost }\n\t\t\t\t\t/>\n\t\t\t\t</motion.div>\n\t\t\t</MainDashboardButton.Slot>\n\t\t\t<motion.div\n\t\t\t\tvariants={ slideY }\n\t\t\t\ttransition={ { type: 'tween', delay: 0.8 } }\n\t\t\t\tclassName=\"edit-post-header__toolbar\"\n\t\t\t>\n\t\t\t\t<DocumentTools disableBlockTools={ isTextEditor } />\n\t\t\t\t{ showTopToolbar && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t\t'selected-block-tools-wrapper',\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t'is-collapsed':\n\t\t\t\t\t\t\t\t\t\tisBlockToolsCollapsed ||\n\t\t\t\t\t\t\t\t\t\t! hasBlockSelection,\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<BlockToolbar hideDragHandle />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<Popover.Slot\n\t\t\t\t\t\t\tref={ blockToolbarRef }\n\t\t\t\t\t\t\tname=\"block-toolbar\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tclassName=\"edit-post-header__block-tools-toggle\"\n\t\t\t\t\t\t\ticon={ isBlockToolsCollapsed ? next : previous }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tsetIsBlockToolsCollapsed(\n\t\t\t\t\t\t\t\t\t( collapsed ) => ! collapsed\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\tisBlockToolsCollapsed\n\t\t\t\t\t\t\t\t\t? __( 'Show block tools' )\n\t\t\t\t\t\t\t\t\t: __( 'Hide block tools' )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t\t<div\n\t\t\t\t\tclassName={ classnames( 'edit-post-header__center', {\n\t\t\t\t\t\t'is-collapsed':\n\t\t\t\t\t\t\thasHistory &&\n\t\t\t\t\t\t\t! isBlockToolsCollapsed &&\n\t\t\t\t\t\t\tshowTopToolbar,\n\t\t\t\t\t} ) }\n\t\t\t\t>\n\t\t\t\t\t{ hasHistory && <DocumentBar /> }\n\t\t\t\t</div>\n\t\t\t</motion.div>\n\t\t\t<motion.div\n\t\t\t\tvariants={ slideY }\n\t\t\t\ttransition={ { type: 'tween', delay: 0.8 } }\n\t\t\t\tclassName=\"edit-post-header__settings\"\n\t\t\t>\n\t\t\t\t{ ! isPublishSidebarOpened && (\n\t\t\t\t\t// This button isn't completely hidden by the publish sidebar.\n\t\t\t\t\t// We can't hide the whole toolbar when the publish sidebar is open because\n\t\t\t\t\t// we want to prevent mounting/unmounting the PostPublishButtonOrToggle DOM node.\n\t\t\t\t\t// We track that DOM node to return focus to the PostPublishButtonOrToggle\n\t\t\t\t\t// when the publish sidebar has been closed.\n\t\t\t\t\t<PostSavedState forceIsDirty={ hasActiveMetaboxes } />\n\t\t\t\t) }\n\t\t\t\t<PreviewDropdown forceIsAutosaveable={ hasActiveMetaboxes } />\n\t\t\t\t<PostPreviewButton\n\t\t\t\t\tclassName=\"edit-post-header__post-preview-button\"\n\t\t\t\t\tforceIsAutosaveable={ hasActiveMetaboxes }\n\t\t\t\t/>\n\t\t\t\t<PostViewLink />\n\t\t\t\t<PostPublishButtonOrToggle\n\t\t\t\t\tforceIsDirty={ hasActiveMetaboxes }\n\t\t\t\t\tsetEntitiesSavedStatesCallback={\n\t\t\t\t\t\tsetEntitiesSavedStatesCallback\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t\t{ ( isWideViewport || ! showIconLabels ) && (\n\t\t\t\t\t<PinnedItems.Slot scope=\"core\" />\n\t\t\t\t) }\n\t\t\t\t<MoreMenu showIconLabels={ showIconLabels } />\n\t\t\t</motion.div>\n\t\t</div>\n\t);\n}\n\nexport default Header;\n"],"mappings":";;;;;;;;AAGA,IAAAA,W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AAY,EAAGpD;EAAoB,CAAE,CACrD,EACD,IAAAwB,MAAA,CAAAC,aAAA,EAAChD,eAAe;IAAC4E,mBAAmB,EAAGrD;EAAoB,CAAE,CAAC,EAC9D,IAAAwB,MAAA,CAAAC,aAAA,EAACnE,OAAA,CAAAgG,iBAAiB;IACjB5B,SAAS,EAAC,uCAAuC;IACjD2B,mBAAmB,EAAGrD;EAAoB,CAC1C,CAAC,EACF,IAAAwB,MAAA,CAAAC,aAAA,EAACjD,YAAY,MAAE,CAAC,EAChB,IAAAgD,MAAA,CAAAC,aAAA,EAACzD,0BAAA,CAAA2D,OAAyB;IACzByB,YAAY,EAAGpD,kBAAoB;IACnCT,8BAA8B,EAC7BA;EACA,CACD,CAAC,EACA,CAAEE,cAAc,IAAI,CAAES,cAAc,KACrC,IAAAsB,MAAA,CAAAC,aAAA,EAAC/C,WAAW,CAACkD,IAAI;IAAC2B,KAAK,EAAC;EAAM,CAAE,CAChC,EACD,IAAA/B,MAAA,CAAAC,aAAA,EAAC1D,SAAA,CAAA4D,OAAQ;IAACzB,cAAc,EAAGA;EAAgB,CAAE,CAClC,CACR,CAAC;AAER;AAAC,IAAAsD,QAAA,GAAAC,OAAA,CAAA9B,OAAA,GAEcrC,MAAM","ignoreList":[]}
@@ -8,7 +8,7 @@ exports.default = void 0;
8
8
  var _react = require("react");
9
9
  var _reactNative = require("react-native");
10
10
  var _element = require("@wordpress/element");
11
- require("@wordpress/interface");
11
+ require("@wordpress/editor");
12
12
  var _headerToolbar = _interopRequireDefault(require("./header-toolbar"));
13
13
  /**
14
14
  * External dependencies
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNative","require","_element","_headerToolbar","_interopRequireDefault","Header","Component","constructor","arguments","keyboardDidShow","bind","keyboardDidHide","state","isKeyboardVisible","componentDidMount","keyboardShowSubscription","Keyboard","addListener","keyboardHideSubscription","componentWillUnmount","remove","setState","render","_react","createElement","default","showKeyboardHideButton","exports"],"sources":["@wordpress/edit-post/src/components/header/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { Keyboard } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport HeaderToolbar from './header-toolbar';\n\nexport default class Header extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.keyboardDidShow = this.keyboardDidShow.bind( this );\n\t\tthis.keyboardDidHide = this.keyboardDidHide.bind( this );\n\n\t\tthis.state = {\n\t\t\tisKeyboardVisible: false,\n\t\t};\n\t}\n\n\tcomponentDidMount() {\n\t\tthis.keyboardShowSubscription = Keyboard.addListener(\n\t\t\t'keyboardDidShow',\n\t\t\tthis.keyboardDidShow\n\t\t);\n\t\tthis.keyboardHideSubscription = Keyboard.addListener(\n\t\t\t'keyboardDidHide',\n\t\t\tthis.keyboardDidHide\n\t\t);\n\t}\n\n\tcomponentWillUnmount() {\n\t\tthis.keyboardShowSubscription.remove();\n\t\tthis.keyboardHideSubscription.remove();\n\t}\n\n\tkeyboardDidShow() {\n\t\tthis.setState( { isKeyboardVisible: true } );\n\t}\n\n\tkeyboardDidHide() {\n\t\tthis.setState( { isKeyboardVisible: false } );\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<HeaderToolbar\n\t\t\t\tshowKeyboardHideButton={ this.state.isKeyboardVisible }\n\t\t\t/>\n\t\t);\n\t}\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AACAA,OAAA;AAKA,IAAAE,cAAA,GAAAC,sBAAA,CAAAH,OAAA;AAdA;AACA;AACA;;AAGA;AACA;AACA;;AAIA;AACA;AACA;;AAGe,MAAMI,MAAM,SAASC,kBAAS,CAAC;EAC7CC,WAAWA,CAAA,EAAG;IACb,KAAK,CAAE,GAAGC,SAAU,CAAC;IAErB,IAAI,CAACC,eAAe,GAAG,IAAI,CAACA,eAAe,CAACC,IAAI,CAAE,IAAK,CAAC;IACxD,IAAI,CAACC,eAAe,GAAG,IAAI,CAACA,eAAe,CAACD,IAAI,CAAE,IAAK,CAAC;IAExD,IAAI,CAACE,KAAK,GAAG;MACZC,iBAAiB,EAAE;IACpB,CAAC;EACF;EAEAC,iBAAiBA,CAAA,EAAG;IACnB,IAAI,CAACC,wBAAwB,GAAGC,qBAAQ,CAACC,WAAW,CACnD,iBAAiB,EACjB,IAAI,CAACR,eACN,CAAC;IACD,IAAI,CAACS,wBAAwB,GAAGF,qBAAQ,CAACC,WAAW,CACnD,iBAAiB,EACjB,IAAI,CAACN,eACN,CAAC;EACF;EAEAQ,oBAAoBA,CAAA,EAAG;IACtB,IAAI,CAACJ,wBAAwB,CAACK,MAAM,CAAC,CAAC;IACtC,IAAI,CAACF,wBAAwB,CAACE,MAAM,CAAC,CAAC;EACvC;EAEAX,eAAeA,CAAA,EAAG;IACjB,IAAI,CAACY,QAAQ,CAAE;MAAER,iBAAiB,EAAE;IAAK,CAAE,CAAC;EAC7C;EAEAF,eAAeA,CAAA,EAAG;IACjB,IAAI,CAACU,QAAQ,CAAE;MAAER,iBAAiB,EAAE;IAAM,CAAE,CAAC;EAC9C;EAEAS,MAAMA,CAAA,EAAG;IACR,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACrB,cAAA,CAAAsB,OAAa;MACbC,sBAAsB,EAAG,IAAI,CAACd,KAAK,CAACC;IAAmB,CACvD,CAAC;EAEJ;AACD;AAACc,OAAA,CAAAF,OAAA,GAAApB,MAAA"}
1
+ {"version":3,"names":["_reactNative","require","_element","_headerToolbar","_interopRequireDefault","Header","Component","constructor","arguments","keyboardDidShow","bind","keyboardDidHide","state","isKeyboardVisible","componentDidMount","keyboardShowSubscription","Keyboard","addListener","keyboardHideSubscription","componentWillUnmount","remove","setState","render","_react","createElement","default","showKeyboardHideButton","exports"],"sources":["@wordpress/edit-post/src/components/header/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { Keyboard } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport HeaderToolbar from './header-toolbar';\n\nexport default class Header extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.keyboardDidShow = this.keyboardDidShow.bind( this );\n\t\tthis.keyboardDidHide = this.keyboardDidHide.bind( this );\n\n\t\tthis.state = {\n\t\t\tisKeyboardVisible: false,\n\t\t};\n\t}\n\n\tcomponentDidMount() {\n\t\tthis.keyboardShowSubscription = Keyboard.addListener(\n\t\t\t'keyboardDidShow',\n\t\t\tthis.keyboardDidShow\n\t\t);\n\t\tthis.keyboardHideSubscription = Keyboard.addListener(\n\t\t\t'keyboardDidHide',\n\t\t\tthis.keyboardDidHide\n\t\t);\n\t}\n\n\tcomponentWillUnmount() {\n\t\tthis.keyboardShowSubscription.remove();\n\t\tthis.keyboardHideSubscription.remove();\n\t}\n\n\tkeyboardDidShow() {\n\t\tthis.setState( { isKeyboardVisible: true } );\n\t}\n\n\tkeyboardDidHide() {\n\t\tthis.setState( { isKeyboardVisible: false } );\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<HeaderToolbar\n\t\t\t\tshowKeyboardHideButton={ this.state.isKeyboardVisible }\n\t\t\t/>\n\t\t);\n\t}\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AACAA,OAAA;AAKA,IAAAE,cAAA,GAAAC,sBAAA,CAAAH,OAAA;AAdA;AACA;AACA;;AAGA;AACA;AACA;;AAIA;AACA;AACA;;AAGe,MAAMI,MAAM,SAASC,kBAAS,CAAC;EAC7CC,WAAWA,CAAA,EAAG;IACb,KAAK,CAAE,GAAGC,SAAU,CAAC;IAErB,IAAI,CAACC,eAAe,GAAG,IAAI,CAACA,eAAe,CAACC,IAAI,CAAE,IAAK,CAAC;IACxD,IAAI,CAACC,eAAe,GAAG,IAAI,CAACA,eAAe,CAACD,IAAI,CAAE,IAAK,CAAC;IAExD,IAAI,CAACE,KAAK,GAAG;MACZC,iBAAiB,EAAE;IACpB,CAAC;EACF;EAEAC,iBAAiBA,CAAA,EAAG;IACnB,IAAI,CAACC,wBAAwB,GAAGC,qBAAQ,CAACC,WAAW,CACnD,iBAAiB,EACjB,IAAI,CAACR,eACN,CAAC;IACD,IAAI,CAACS,wBAAwB,GAAGF,qBAAQ,CAACC,WAAW,CACnD,iBAAiB,EACjB,IAAI,CAACN,eACN,CAAC;EACF;EAEAQ,oBAAoBA,CAAA,EAAG;IACtB,IAAI,CAACJ,wBAAwB,CAACK,MAAM,CAAC,CAAC;IACtC,IAAI,CAACF,wBAAwB,CAACE,MAAM,CAAC,CAAC;EACvC;EAEAX,eAAeA,CAAA,EAAG;IACjB,IAAI,CAACY,QAAQ,CAAE;MAAER,iBAAiB,EAAE;IAAK,CAAE,CAAC;EAC7C;EAEAF,eAAeA,CAAA,EAAG;IACjB,IAAI,CAACU,QAAQ,CAAE;MAAER,iBAAiB,EAAE;IAAM,CAAE,CAAC;EAC9C;EAEAS,MAAMA,CAAA,EAAG;IACR,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACrB,cAAA,CAAAsB,OAAa;MACbC,sBAAsB,EAAG,IAAI,CAACd,KAAK,CAACC;IAAmB,CACvD,CAAC;EAEJ;AACD;AAACc,OAAA,CAAAF,OAAA,GAAApB,MAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_components","require","slotName","Fill","Slot","MainDashboardButtonSlot","createSlotFill","MainDashboardButton","children","fills","useSlotFills","hasFills","Boolean","length","_react","createElement","bubblesVirtually","_default","exports","default"],"sources":["@wordpress/edit-post/src/components/header/main-dashboard-button/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalUseSlotFills as useSlotFills,\n\tcreateSlotFill,\n} from '@wordpress/components';\n\nconst slotName = '__experimentalMainDashboardButton';\n\nconst { Fill, Slot: MainDashboardButtonSlot } = createSlotFill( slotName );\n\nconst MainDashboardButton = Fill;\n\nconst Slot = ( { children } ) => {\n\tconst fills = useSlotFills( slotName );\n\tconst hasFills = Boolean( fills && fills.length );\n\n\tif ( ! hasFills ) {\n\t\treturn children;\n\t}\n\n\treturn <MainDashboardButtonSlot bubblesVirtually />;\n};\n\nMainDashboardButton.Slot = Slot;\n\nexport default MainDashboardButton;\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAMA,MAAMC,QAAQ,GAAG,mCAAmC;AAEpD,MAAM;EAAEC,IAAI;EAAEC,IAAI,EAAEC;AAAwB,CAAC,GAAG,IAAAC,0BAAc,EAAEJ,QAAS,CAAC;AAE1E,MAAMK,mBAAmB,GAAGJ,IAAI;AAEhC,MAAMC,IAAI,GAAGA,CAAE;EAAEI;AAAS,CAAC,KAAM;EAChC,MAAMC,KAAK,GAAG,IAAAC,sCAAY,EAAER,QAAS,CAAC;EACtC,MAAMS,QAAQ,GAAGC,OAAO,CAAEH,KAAK,IAAIA,KAAK,CAACI,MAAO,CAAC;EAEjD,IAAK,CAAEF,QAAQ,EAAG;IACjB,OAAOH,QAAQ;EAChB;EAEA,OAAO,IAAAM,MAAA,CAAAC,aAAA,EAACV,uBAAuB;IAACW,gBAAgB;EAAA,CAAE,CAAC;AACpD,CAAC;AAEDT,mBAAmB,CAACH,IAAI,GAAGA,IAAI;AAAC,IAAAa,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEjBZ,mBAAmB"}
1
+ {"version":3,"names":["_components","require","slotName","Fill","Slot","MainDashboardButtonSlot","createSlotFill","MainDashboardButton","children","fills","useSlotFills","hasFills","Boolean","length","_react","createElement","bubblesVirtually","_default","exports","default"],"sources":["@wordpress/edit-post/src/components/header/main-dashboard-button/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalUseSlotFills as useSlotFills,\n\tcreateSlotFill,\n} from '@wordpress/components';\n\nconst slotName = '__experimentalMainDashboardButton';\n\nconst { Fill, Slot: MainDashboardButtonSlot } = createSlotFill( slotName );\n\nconst MainDashboardButton = Fill;\n\nconst Slot = ( { children } ) => {\n\tconst fills = useSlotFills( slotName );\n\tconst hasFills = Boolean( fills && fills.length );\n\n\tif ( ! hasFills ) {\n\t\treturn children;\n\t}\n\n\treturn <MainDashboardButtonSlot bubblesVirtually />;\n};\n\nMainDashboardButton.Slot = Slot;\n\nexport default MainDashboardButton;\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAMA,MAAMC,QAAQ,GAAG,mCAAmC;AAEpD,MAAM;EAAEC,IAAI;EAAEC,IAAI,EAAEC;AAAwB,CAAC,GAAG,IAAAC,0BAAc,EAAEJ,QAAS,CAAC;AAE1E,MAAMK,mBAAmB,GAAGJ,IAAI;AAEhC,MAAMC,IAAI,GAAGA,CAAE;EAAEI;AAAS,CAAC,KAAM;EAChC,MAAMC,KAAK,GAAG,IAAAC,sCAAY,EAAER,QAAS,CAAC;EACtC,MAAMS,QAAQ,GAAGC,OAAO,CAAEH,KAAK,IAAIA,KAAK,CAACI,MAAO,CAAC;EAEjD,IAAK,CAAEF,QAAQ,EAAG;IACjB,OAAOH,QAAQ;EAChB;EAEA,OAAO,IAAAM,MAAA,CAAAC,aAAA,EAACV,uBAAuB;IAACW,gBAAgB;EAAA,CAAE,CAAC;AACpD,CAAC;AAEDT,mBAAmB,CAACH,IAAI,GAAGA,IAAI;AAAC,IAAAa,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEjBZ,mBAAmB","ignoreList":[]}