@wordpress/edit-post 7.35.0 → 8.0.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.
- package/CHANGELOG.md +7 -0
- package/build/commands/use-commands.js +56 -0
- package/build/commands/use-commands.js.map +1 -0
- package/build/components/{header/fullscreen-mode-close/index.js → back-button/fullscreen-mode-close.js} +16 -14
- package/build/components/back-button/fullscreen-mode-close.js.map +1 -0
- package/build/components/back-button/index.js +57 -0
- package/build/components/back-button/index.js.map +1 -0
- package/build/components/header/header-toolbar/index.native.js +63 -62
- package/build/components/header/header-toolbar/index.native.js.map +1 -1
- package/build/components/header/index.native.js +2 -2
- package/build/components/header/index.native.js.map +1 -1
- package/build/components/init-pattern-modal/index.js +50 -43
- package/build/components/init-pattern-modal/index.js.map +1 -1
- package/build/components/layout/index.js +92 -146
- package/build/components/layout/index.js.map +1 -1
- package/build/components/layout/index.native.js +28 -21
- package/build/components/layout/index.native.js.map +1 -1
- package/build/components/layout/use-padding-appender.js.map +1 -0
- package/build/components/layout/use-should-iframe.js +46 -0
- package/build/components/layout/use-should-iframe.js.map +1 -0
- package/build/components/meta-boxes/index.js +10 -9
- package/build/components/meta-boxes/index.js.map +1 -1
- package/build/components/meta-boxes/meta-boxes-area/index.js +11 -11
- package/build/components/meta-boxes/meta-boxes-area/index.js.map +1 -1
- package/build/components/more-menu/index.js +49 -0
- package/build/components/more-menu/index.js.map +1 -0
- package/build/components/{header/more-menu → more-menu}/manage-patterns-menu-item.js +5 -4
- package/build/components/more-menu/manage-patterns-menu-item.js.map +1 -0
- package/build/components/{header/more-menu → more-menu}/welcome-guide-menu-item.js +2 -2
- package/build/components/more-menu/welcome-guide-menu-item.js.map +1 -0
- package/build/components/preferences-modal/enable-custom-fields.js +23 -18
- package/build/components/preferences-modal/enable-custom-fields.js.map +1 -1
- package/build/components/preferences-modal/index.js +4 -4
- package/build/components/preferences-modal/index.js.map +1 -1
- package/build/components/preferences-modal/meta-boxes-section.js +13 -13
- package/build/components/preferences-modal/meta-boxes-section.js.map +1 -1
- package/build/components/visual-editor/header.native.js +11 -10
- package/build/components/visual-editor/header.native.js.map +1 -1
- package/build/components/visual-editor/index.native.js +3 -3
- package/build/components/visual-editor/index.native.js.map +1 -1
- package/build/components/welcome-guide/default.js +50 -33
- package/build/components/welcome-guide/default.js.map +1 -1
- package/build/components/welcome-guide/image.js +13 -12
- package/build/components/welcome-guide/image.js.map +1 -1
- package/build/components/welcome-guide/index.js +2 -2
- package/build/components/welcome-guide/index.js.map +1 -1
- package/build/components/welcome-guide/template.js +12 -8
- package/build/components/welcome-guide/template.js.map +1 -1
- package/build/deprecated.js +9 -9
- package/build/deprecated.js.map +1 -1
- package/build/editor.js +16 -11
- package/build/editor.js.map +1 -1
- package/build/editor.native.js +18 -12
- package/build/editor.native.js.map +1 -1
- package/build/index.js +12 -13
- package/build/index.js.map +1 -1
- package/build/index.native.js +2 -2
- package/build/index.native.js.map +1 -1
- package/build/store/selectors.js +1 -1
- package/build/store/selectors.js.map +1 -1
- package/build-module/commands/use-commands.js +49 -0
- package/build-module/commands/use-commands.js.map +1 -0
- package/build-module/components/{header/fullscreen-mode-close/index.js → back-button/fullscreen-mode-close.js} +16 -14
- package/build-module/components/back-button/fullscreen-mode-close.js.map +1 -0
- package/build-module/components/back-button/index.js +49 -0
- package/build-module/components/back-button/index.js.map +1 -0
- package/build-module/components/header/header-toolbar/index.native.js +64 -62
- package/build-module/components/header/header-toolbar/index.native.js.map +1 -1
- package/build-module/components/header/index.native.js +2 -2
- package/build-module/components/header/index.native.js.map +1 -1
- package/build-module/components/init-pattern-modal/index.js +52 -43
- package/build-module/components/init-pattern-modal/index.js.map +1 -1
- package/build-module/components/layout/index.js +97 -149
- package/build-module/components/layout/index.js.map +1 -1
- package/build-module/components/layout/index.native.js +30 -21
- package/build-module/components/layout/index.native.js.map +1 -1
- package/build-module/components/layout/use-padding-appender.js.map +1 -0
- package/build-module/components/layout/use-should-iframe.js +39 -0
- package/build-module/components/layout/use-should-iframe.js.map +1 -0
- package/build-module/components/meta-boxes/index.js +12 -9
- package/build-module/components/meta-boxes/index.js.map +1 -1
- package/build-module/components/meta-boxes/meta-boxes-area/index.js +11 -9
- package/build-module/components/meta-boxes/meta-boxes-area/index.js.map +1 -1
- package/build-module/components/more-menu/index.js +43 -0
- package/build-module/components/more-menu/index.js.map +1 -0
- package/build-module/components/{header/more-menu → more-menu}/manage-patterns-menu-item.js +5 -4
- package/build-module/components/more-menu/manage-patterns-menu-item.js.map +1 -0
- package/build-module/components/{header/more-menu → more-menu}/welcome-guide-menu-item.js +2 -2
- package/build-module/components/more-menu/welcome-guide-menu-item.js.map +1 -0
- package/build-module/components/preferences-modal/enable-custom-fields.js +25 -18
- package/build-module/components/preferences-modal/enable-custom-fields.js.map +1 -1
- package/build-module/components/preferences-modal/index.js +4 -4
- package/build-module/components/preferences-modal/index.js.map +1 -1
- package/build-module/components/preferences-modal/meta-boxes-section.js +14 -13
- package/build-module/components/preferences-modal/meta-boxes-section.js.map +1 -1
- package/build-module/components/visual-editor/header.native.js +11 -10
- package/build-module/components/visual-editor/header.native.js.map +1 -1
- package/build-module/components/visual-editor/index.native.js +3 -3
- package/build-module/components/visual-editor/index.native.js.map +1 -1
- package/build-module/components/welcome-guide/default.js +52 -33
- package/build-module/components/welcome-guide/default.js.map +1 -1
- package/build-module/components/welcome-guide/image.js +14 -12
- package/build-module/components/welcome-guide/image.js.map +1 -1
- package/build-module/components/welcome-guide/index.js +2 -2
- package/build-module/components/welcome-guide/index.js.map +1 -1
- package/build-module/components/welcome-guide/template.js +14 -8
- package/build-module/components/welcome-guide/template.js.map +1 -1
- package/build-module/deprecated.js +9 -9
- package/build-module/deprecated.js.map +1 -1
- package/build-module/editor.js +17 -11
- package/build-module/editor.js.map +1 -1
- package/build-module/editor.native.js +18 -12
- package/build-module/editor.native.js.map +1 -1
- package/build-module/index.js +10 -7
- package/build-module/index.js.map +1 -1
- package/build-module/index.native.js +2 -2
- package/build-module/index.native.js.map +1 -1
- package/build-module/store/selectors.js +1 -1
- package/build-module/store/selectors.js.map +1 -1
- package/build-style/style-rtl.css +27 -128
- package/build-style/style.css +27 -128
- package/package.json +32 -32
- package/src/commands/use-commands.js +48 -0
- package/src/components/{header/fullscreen-mode-close/index.js → back-button/fullscreen-mode-close.js} +1 -1
- package/src/components/back-button/index.js +34 -0
- package/src/components/{header/fullscreen-mode-close → back-button}/style.scss +16 -2
- package/src/components/{header/fullscreen-mode-close/test/index.js → back-button/test/fullscreen-mode-close.js} +1 -1
- package/src/components/layout/index.js +85 -194
- package/src/components/layout/style.scss +9 -17
- package/src/components/layout/use-should-iframe.js +40 -0
- package/src/components/{header/more-menu → more-menu}/index.js +2 -2
- package/src/index.js +11 -6
- package/src/store/selectors.js +8 -5
- package/src/style.scss +2 -5
- package/src/test/__snapshots__/editor.native.js.snap +72 -0
- package/src/test/editor.native.js +77 -0
- package/build/components/header/fullscreen-mode-close/index.js.map +0 -1
- package/build/components/header/index.js +0 -69
- package/build/components/header/index.js.map +0 -1
- package/build/components/header/main-dashboard-button/index.js +0 -33
- package/build/components/header/main-dashboard-button/index.js.map +0 -1
- package/build/components/header/more-menu/index.js +0 -43
- package/build/components/header/more-menu/index.js.map +0 -1
- package/build/components/header/more-menu/manage-patterns-menu-item.js.map +0 -1
- package/build/components/header/more-menu/welcome-guide-menu-item.js.map +0 -1
- package/build/components/text-editor/index.js +0 -61
- package/build/components/text-editor/index.js.map +0 -1
- package/build/components/visual-editor/block-inspector-button.js +0 -55
- package/build/components/visual-editor/block-inspector-button.js.map +0 -1
- package/build/components/visual-editor/index.js +0 -98
- package/build/components/visual-editor/index.js.map +0 -1
- package/build/components/visual-editor/use-padding-appender.js.map +0 -1
- package/build/hooks/commands/use-common-commands.js +0 -119
- package/build/hooks/commands/use-common-commands.js.map +0 -1
- package/build/hooks/components/index.js +0 -11
- package/build/hooks/components/index.js.map +0 -1
- package/build/hooks/index.js +0 -5
- package/build/hooks/index.js.map +0 -1
- package/build/hooks/validate-multiple-use/index.js +0 -134
- package/build/hooks/validate-multiple-use/index.js.map +0 -1
- package/build-module/components/header/fullscreen-mode-close/index.js.map +0 -1
- package/build-module/components/header/index.js +0 -61
- package/build-module/components/header/index.js.map +0 -1
- package/build-module/components/header/main-dashboard-button/index.js +0 -26
- package/build-module/components/header/main-dashboard-button/index.js.map +0 -1
- package/build-module/components/header/more-menu/index.js +0 -35
- package/build-module/components/header/more-menu/index.js.map +0 -1
- package/build-module/components/header/more-menu/manage-patterns-menu-item.js.map +0 -1
- package/build-module/components/header/more-menu/welcome-guide-menu-item.js.map +0 -1
- package/build-module/components/text-editor/index.js +0 -54
- package/build-module/components/text-editor/index.js.map +0 -1
- package/build-module/components/visual-editor/block-inspector-button.js +0 -47
- package/build-module/components/visual-editor/block-inspector-button.js.map +0 -1
- package/build-module/components/visual-editor/index.js +0 -90
- package/build-module/components/visual-editor/index.js.map +0 -1
- package/build-module/components/visual-editor/use-padding-appender.js.map +0 -1
- package/build-module/hooks/commands/use-common-commands.js +0 -112
- package/build-module/hooks/commands/use-common-commands.js.map +0 -1
- package/build-module/hooks/components/index.js +0 -8
- package/build-module/hooks/components/index.js.map +0 -1
- package/build-module/hooks/index.js +0 -6
- package/build-module/hooks/index.js.map +0 -1
- package/build-module/hooks/validate-multiple-use/index.js +0 -132
- package/build-module/hooks/validate-multiple-use/index.js.map +0 -1
- package/src/components/header/index.js +0 -53
- package/src/components/header/main-dashboard-button/index.js +0 -28
- package/src/components/header/style.scss +0 -14
- package/src/components/text-editor/index.js +0 -63
- package/src/components/text-editor/style.scss +0 -71
- package/src/components/visual-editor/block-inspector-button.js +0 -59
- package/src/components/visual-editor/index.js +0 -108
- package/src/components/visual-editor/style.scss +0 -53
- package/src/hooks/commands/use-common-commands.js +0 -126
- package/src/hooks/components/index.js +0 -13
- package/src/hooks/index.js +0 -5
- package/src/hooks/validate-multiple-use/index.js +0 -163
- /package/build/components/{visual-editor → layout}/use-padding-appender.js +0 -0
- /package/build-module/components/{visual-editor → layout}/use-padding-appender.js +0 -0
- /package/src/components/{header/fullscreen-mode-close/test/__snapshots__/index.js.snap → back-button/test/__snapshots__/fullscreen-mode-close.js.snap} +0 -0
- /package/src/components/{visual-editor → layout}/use-padding-appender.js +0 -0
- /package/src/components/{header/more-menu → more-menu}/manage-patterns-menu-item.js +0 -0
- /package/src/components/{header/more-menu → more-menu}/welcome-guide-menu-item.js +0 -0
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
fireEvent,
|
|
8
8
|
getBlock,
|
|
9
9
|
getEditorHtml,
|
|
10
|
+
getEditorTitle,
|
|
10
11
|
initializeEditor,
|
|
11
12
|
screen,
|
|
12
13
|
setupCoreBlocks,
|
|
@@ -20,6 +21,7 @@ import {
|
|
|
20
21
|
requestMediaImport,
|
|
21
22
|
subscribeMediaAppend,
|
|
22
23
|
subscribeParentToggleHTMLMode,
|
|
24
|
+
subscribeToContentUpdate,
|
|
23
25
|
} from '@wordpress/react-native-bridge';
|
|
24
26
|
|
|
25
27
|
setupCoreBlocks();
|
|
@@ -34,6 +36,11 @@ subscribeMediaAppend.mockImplementation( ( callback ) => {
|
|
|
34
36
|
mediaAppendCallback = callback;
|
|
35
37
|
} );
|
|
36
38
|
|
|
39
|
+
let onContentUpdateCallback;
|
|
40
|
+
subscribeToContentUpdate.mockImplementation( ( callback ) => {
|
|
41
|
+
onContentUpdateCallback = callback;
|
|
42
|
+
} );
|
|
43
|
+
|
|
37
44
|
const MEDIA = [
|
|
38
45
|
{
|
|
39
46
|
localId: 1,
|
|
@@ -149,4 +156,74 @@ describe( 'Editor', () => {
|
|
|
149
156
|
screen.queryAllByLabelText( 'Open Settings' );
|
|
150
157
|
expect( openBlockSettingsButton.length ).toBe( 0 );
|
|
151
158
|
} );
|
|
159
|
+
|
|
160
|
+
describe( 'on content update', () => {
|
|
161
|
+
const MARKDOWN = `# Sample Document\nLorem ipsum dolor sit amet, consectetur adipiscing
|
|
162
|
+
elit.\n## Overview\n- Lorem ipsum dolor sit amet\n- Consectetur adipiscing
|
|
163
|
+
elit\n- Integer nec odio\n## Details\n1. Sed cursus ante dapibus diam\n2.
|
|
164
|
+
Nulla quis sem at nibh elementum imperdiet\n3. Duis sagittis ipsum\n
|
|
165
|
+
## Mixed Lists\n- Key Points:\n 1. Lorem ipsum dolor sit amet\n 2.
|
|
166
|
+
Consectetur adipiscing elit\n 3. Integer nec odio\n- Additional Info:\n -
|
|
167
|
+
Sed cursus ante dapibus diam\n - Nulla quis sem at nibh elementum imperdiet\n`;
|
|
168
|
+
|
|
169
|
+
it( 'parses markdown into blocks', async () => {
|
|
170
|
+
// Arrange
|
|
171
|
+
await initializeEditor( {
|
|
172
|
+
initialTitle: null,
|
|
173
|
+
} );
|
|
174
|
+
|
|
175
|
+
// Act
|
|
176
|
+
act( () => {
|
|
177
|
+
onContentUpdateCallback( {
|
|
178
|
+
content: MARKDOWN,
|
|
179
|
+
} );
|
|
180
|
+
} );
|
|
181
|
+
|
|
182
|
+
// Assert
|
|
183
|
+
// Needed to for the "Processed HTML piece" log.
|
|
184
|
+
expect( console ).toHaveLogged();
|
|
185
|
+
expect( getEditorTitle() ).toBe( 'Sample Document' );
|
|
186
|
+
expect( getEditorHtml() ).toMatchSnapshot();
|
|
187
|
+
} );
|
|
188
|
+
|
|
189
|
+
it( 'parses a markdown heading into a title', async () => {
|
|
190
|
+
// Arrange
|
|
191
|
+
await initializeEditor( {
|
|
192
|
+
initialTitle: null,
|
|
193
|
+
} );
|
|
194
|
+
|
|
195
|
+
// Act
|
|
196
|
+
act( () => {
|
|
197
|
+
onContentUpdateCallback( {
|
|
198
|
+
content: `# Sample Document`,
|
|
199
|
+
} );
|
|
200
|
+
} );
|
|
201
|
+
|
|
202
|
+
// Assert
|
|
203
|
+
// Needed to for the "Processed HTML piece" log.
|
|
204
|
+
expect( console ).toHaveLogged();
|
|
205
|
+
expect( getEditorTitle() ).toBe( 'Sample Document' );
|
|
206
|
+
expect( getEditorHtml() ).toBe( '' );
|
|
207
|
+
} );
|
|
208
|
+
|
|
209
|
+
it( 'parses standard text into blocks', async () => {
|
|
210
|
+
// Arrange
|
|
211
|
+
await initializeEditor( {
|
|
212
|
+
initialTitle: null,
|
|
213
|
+
} );
|
|
214
|
+
|
|
215
|
+
// Act
|
|
216
|
+
act( () => {
|
|
217
|
+
onContentUpdateCallback( {
|
|
218
|
+
content: `Lorem ipsum dolor sit amet`,
|
|
219
|
+
} );
|
|
220
|
+
} );
|
|
221
|
+
|
|
222
|
+
// Assert
|
|
223
|
+
// Needed to for the "Processed HTML piece" log.
|
|
224
|
+
expect( console ).toHaveLogged();
|
|
225
|
+
expect( getEditorTitle() ).toBe( 'Lorem ipsum dolor sit amet' );
|
|
226
|
+
expect( getEditorHtml() ).toBe( '' );
|
|
227
|
+
} );
|
|
228
|
+
} );
|
|
152
229
|
} );
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_clsx","_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","clsx","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 clsx from 'clsx';\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 = clsx( {\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,KAAA,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,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time/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
var _react = require("react");
|
|
9
|
-
var _editor = require("@wordpress/editor");
|
|
10
|
-
var _data = require("@wordpress/data");
|
|
11
|
-
var _components = require("@wordpress/components");
|
|
12
|
-
var _fullscreenModeClose = _interopRequireDefault(require("./fullscreen-mode-close"));
|
|
13
|
-
var _moreMenu = _interopRequireDefault(require("./more-menu"));
|
|
14
|
-
var _mainDashboardButton = _interopRequireDefault(require("./main-dashboard-button"));
|
|
15
|
-
var _store = require("../../store");
|
|
16
|
-
var _lockUnlock = require("../../lock-unlock");
|
|
17
|
-
/**
|
|
18
|
-
* WordPress dependencies
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Internal dependencies
|
|
23
|
-
*/
|
|
24
|
-
|
|
25
|
-
const {
|
|
26
|
-
Header: EditorHeader
|
|
27
|
-
} = (0, _lockUnlock.unlock)(_editor.privateApis);
|
|
28
|
-
const slideX = {
|
|
29
|
-
hidden: {
|
|
30
|
-
x: '-100%'
|
|
31
|
-
},
|
|
32
|
-
distractionFreeInactive: {
|
|
33
|
-
x: 0
|
|
34
|
-
},
|
|
35
|
-
hover: {
|
|
36
|
-
x: 0,
|
|
37
|
-
transition: {
|
|
38
|
-
type: 'tween',
|
|
39
|
-
delay: 0.2
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
function Header({
|
|
44
|
-
setEntitiesSavedStatesCallback,
|
|
45
|
-
initialPost
|
|
46
|
-
}) {
|
|
47
|
-
const {
|
|
48
|
-
hasActiveMetaboxes
|
|
49
|
-
} = (0, _data.useSelect)(select => {
|
|
50
|
-
return {
|
|
51
|
-
hasActiveMetaboxes: select(_store.store).hasMetaBoxes()
|
|
52
|
-
};
|
|
53
|
-
}, []);
|
|
54
|
-
return (0, _react.createElement)(EditorHeader, {
|
|
55
|
-
forceIsDirty: hasActiveMetaboxes,
|
|
56
|
-
setEntitiesSavedStatesCallback: setEntitiesSavedStatesCallback
|
|
57
|
-
}, (0, _react.createElement)(_mainDashboardButton.default.Slot, null, (0, _react.createElement)(_components.__unstableMotion.div, {
|
|
58
|
-
variants: slideX,
|
|
59
|
-
transition: {
|
|
60
|
-
type: 'tween',
|
|
61
|
-
delay: 0.8
|
|
62
|
-
}
|
|
63
|
-
}, (0, _react.createElement)(_fullscreenModeClose.default, {
|
|
64
|
-
showTooltip: true,
|
|
65
|
-
initialPost: initialPost
|
|
66
|
-
}))), (0, _react.createElement)(_moreMenu.default, null));
|
|
67
|
-
}
|
|
68
|
-
var _default = exports.default = Header;
|
|
69
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_editor","require","_data","_components","_fullscreenModeClose","_interopRequireDefault","_moreMenu","_mainDashboardButton","_store","_lockUnlock","Header","EditorHeader","unlock","editorPrivateApis","slideX","hidden","x","distractionFreeInactive","hover","transition","type","delay","setEntitiesSavedStatesCallback","initialPost","hasActiveMetaboxes","useSelect","select","editPostStore","hasMetaBoxes","_react","createElement","forceIsDirty","default","Slot","__unstableMotion","div","variants","showTooltip","_default","exports"],"sources":["@wordpress/edit-post/src/components/header/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\nimport { useSelect } from '@wordpress/data';\nimport { __unstableMotion as motion } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport FullscreenModeClose from './fullscreen-mode-close';\nimport PostEditorMoreMenu from './more-menu';\nimport MainDashboardButton from './main-dashboard-button';\nimport { store as editPostStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst { Header: EditorHeader } = unlock( editorPrivateApis );\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 { hasActiveMetaboxes } = useSelect( ( select ) => {\n\t\treturn {\n\t\t\thasActiveMetaboxes: select( editPostStore ).hasMetaBoxes(),\n\t\t};\n\t}, [] );\n\n\treturn (\n\t\t<EditorHeader\n\t\t\tforceIsDirty={ hasActiveMetaboxes }\n\t\t\tsetEntitiesSavedStatesCallback={ setEntitiesSavedStatesCallback }\n\t\t>\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<PostEditorMoreMenu />\n\t\t</EditorHeader>\n\t);\n}\n\nexport default Header;\n"],"mappings":";;;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAKA,IAAAG,oBAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAD,sBAAA,CAAAJ,OAAA;AACA,IAAAM,oBAAA,GAAAF,sBAAA,CAAAJ,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,WAAA,GAAAR,OAAA;AAdA;AACA;AACA;;AAKA;AACA;AACA;;AAOA,MAAM;EAAES,MAAM,EAAEC;AAAa,CAAC,GAAG,IAAAC,kBAAM,EAAEC,mBAAkB,CAAC;AAE5D,MAAMC,MAAM,GAAG;EACdC,MAAM,EAAE;IAAEC,CAAC,EAAE;EAAQ,CAAC;EACtBC,uBAAuB,EAAE;IAAED,CAAC,EAAE;EAAE,CAAC;EACjCE,KAAK,EAAE;IAAEF,CAAC,EAAE,CAAC;IAAEG,UAAU,EAAE;MAAEC,IAAI,EAAE,OAAO;MAAEC,KAAK,EAAE;IAAI;EAAE;AAC1D,CAAC;AAED,SAASX,MAAMA,CAAE;EAAEY,8BAA8B;EAAEC;AAAY,CAAC,EAAG;EAClE,MAAM;IAAEC;EAAmB,CAAC,GAAG,IAAAC,eAAS,EAAIC,MAAM,IAAM;IACvD,OAAO;MACNF,kBAAkB,EAAEE,MAAM,CAAEC,YAAc,CAAC,CAACC,YAAY,CAAC;IAC1D,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EAEP,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACnB,YAAY;IACZoB,YAAY,EAAGP,kBAAoB;IACnCF,8BAA8B,EAAGA;EAAgC,GAEjE,IAAAO,MAAA,CAAAC,aAAA,EAACvB,oBAAA,CAAAyB,OAAmB,CAACC,IAAI,QACxB,IAAAJ,MAAA,CAAAC,aAAA,EAAC3B,WAAA,CAAA+B,gBAAM,CAACC,GAAG;IACVC,QAAQ,EAAGtB,MAAQ;IACnBK,UAAU,EAAG;MAAEC,IAAI,EAAE,OAAO;MAAEC,KAAK,EAAE;IAAI;EAAG,GAE5C,IAAAQ,MAAA,CAAAC,aAAA,EAAC1B,oBAAA,CAAA4B,OAAmB;IACnBK,WAAW;IACXd,WAAW,EAAGA;EAAa,CAC3B,CACU,CACa,CAAC,EAC3B,IAAAM,MAAA,CAAAC,aAAA,EAACxB,SAAA,CAAA0B,OAAkB,MAAE,CACR,CAAC;AAEjB;AAAC,IAAAM,QAAA,GAAAC,OAAA,CAAAP,OAAA,GAEctB,MAAM","ignoreList":[]}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _react = require("react");
|
|
8
|
-
var _components = require("@wordpress/components");
|
|
9
|
-
/**
|
|
10
|
-
* WordPress dependencies
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
const slotName = '__experimentalMainDashboardButton';
|
|
14
|
-
const {
|
|
15
|
-
Fill,
|
|
16
|
-
Slot: MainDashboardButtonSlot
|
|
17
|
-
} = (0, _components.createSlotFill)(slotName);
|
|
18
|
-
const MainDashboardButton = Fill;
|
|
19
|
-
const Slot = ({
|
|
20
|
-
children
|
|
21
|
-
}) => {
|
|
22
|
-
const fills = (0, _components.__experimentalUseSlotFills)(slotName);
|
|
23
|
-
const hasFills = Boolean(fills && fills.length);
|
|
24
|
-
if (!hasFills) {
|
|
25
|
-
return children;
|
|
26
|
-
}
|
|
27
|
-
return (0, _react.createElement)(MainDashboardButtonSlot, {
|
|
28
|
-
bubblesVirtually: true
|
|
29
|
-
});
|
|
30
|
-
};
|
|
31
|
-
MainDashboardButton.Slot = Slot;
|
|
32
|
-
var _default = exports.default = MainDashboardButton;
|
|
33
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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":[]}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
var _react = require("react");
|
|
9
|
-
var _i18n = require("@wordpress/i18n");
|
|
10
|
-
var _compose = require("@wordpress/compose");
|
|
11
|
-
var _editor = require("@wordpress/editor");
|
|
12
|
-
var _preferences = require("@wordpress/preferences");
|
|
13
|
-
var _keycodes = require("@wordpress/keycodes");
|
|
14
|
-
var _lockUnlock = require("../../../lock-unlock");
|
|
15
|
-
var _managePatternsMenuItem = _interopRequireDefault(require("./manage-patterns-menu-item"));
|
|
16
|
-
var _welcomeGuideMenuItem = _interopRequireDefault(require("./welcome-guide-menu-item"));
|
|
17
|
-
var _preferencesModal = _interopRequireDefault(require("../../preferences-modal"));
|
|
18
|
-
/**
|
|
19
|
-
* WordPress dependencies
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Internal dependencies
|
|
24
|
-
*/
|
|
25
|
-
|
|
26
|
-
const {
|
|
27
|
-
ToolsMoreMenuGroup,
|
|
28
|
-
ViewMoreMenuGroup
|
|
29
|
-
} = (0, _lockUnlock.unlock)(_editor.privateApis);
|
|
30
|
-
const MoreMenu = () => {
|
|
31
|
-
const isLargeViewport = (0, _compose.useViewportMatch)('large');
|
|
32
|
-
return (0, _react.createElement)(_react.Fragment, null, isLargeViewport && (0, _react.createElement)(ViewMoreMenuGroup, null, (0, _react.createElement)(_preferences.PreferenceToggleMenuItem, {
|
|
33
|
-
scope: "core/edit-post",
|
|
34
|
-
name: "fullscreenMode",
|
|
35
|
-
label: (0, _i18n.__)('Fullscreen mode'),
|
|
36
|
-
info: (0, _i18n.__)('Show and hide the admin user interface'),
|
|
37
|
-
messageActivated: (0, _i18n.__)('Fullscreen mode activated'),
|
|
38
|
-
messageDeactivated: (0, _i18n.__)('Fullscreen mode deactivated'),
|
|
39
|
-
shortcut: _keycodes.displayShortcut.secondary('f')
|
|
40
|
-
})), (0, _react.createElement)(ToolsMoreMenuGroup, null, (0, _react.createElement)(_managePatternsMenuItem.default, null), (0, _react.createElement)(_welcomeGuideMenuItem.default, null)), (0, _react.createElement)(_preferencesModal.default, null));
|
|
41
|
-
};
|
|
42
|
-
var _default = exports.default = MoreMenu;
|
|
43
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_i18n","require","_compose","_editor","_preferences","_keycodes","_lockUnlock","_managePatternsMenuItem","_interopRequireDefault","_welcomeGuideMenuItem","_preferencesModal","ToolsMoreMenuGroup","ViewMoreMenuGroup","unlock","editorPrivateApis","MoreMenu","isLargeViewport","useViewportMatch","_react","createElement","Fragment","PreferenceToggleMenuItem","scope","name","label","__","info","messageActivated","messageDeactivated","shortcut","displayShortcut","secondary","default","_default","exports"],"sources":["@wordpress/edit-post/src/components/header/more-menu/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\nimport { PreferenceToggleMenuItem } from '@wordpress/preferences';\nimport { displayShortcut } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../../lock-unlock';\nimport ManagePatternsMenuItem from './manage-patterns-menu-item';\nimport WelcomeGuideMenuItem from './welcome-guide-menu-item';\nimport EditPostPreferencesModal from '../../preferences-modal';\n\nconst { ToolsMoreMenuGroup, ViewMoreMenuGroup } = unlock( editorPrivateApis );\n\nconst MoreMenu = () => {\n\tconst isLargeViewport = useViewportMatch( 'large' );\n\n\treturn (\n\t\t<>\n\t\t\t{ isLargeViewport && (\n\t\t\t\t<ViewMoreMenuGroup>\n\t\t\t\t\t<PreferenceToggleMenuItem\n\t\t\t\t\t\tscope=\"core/edit-post\"\n\t\t\t\t\t\tname=\"fullscreenMode\"\n\t\t\t\t\t\tlabel={ __( 'Fullscreen mode' ) }\n\t\t\t\t\t\tinfo={ __( 'Show and hide the admin user interface' ) }\n\t\t\t\t\t\tmessageActivated={ __( 'Fullscreen mode activated' ) }\n\t\t\t\t\t\tmessageDeactivated={ __(\n\t\t\t\t\t\t\t'Fullscreen mode deactivated'\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tshortcut={ displayShortcut.secondary( 'f' ) }\n\t\t\t\t\t/>\n\t\t\t\t</ViewMoreMenuGroup>\n\t\t\t) }\n\t\t\t<ToolsMoreMenuGroup>\n\t\t\t\t<ManagePatternsMenuItem />\n\t\t\t\t<WelcomeGuideMenuItem />\n\t\t\t</ToolsMoreMenuGroup>\n\t\t\t<EditPostPreferencesModal />\n\t\t</>\n\t);\n};\n\n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MAAE,CAAC,EAC1B,IAAAd,MAAA,CAAAC,aAAA,EAACV,qBAAA,CAAAuB,OAAoB,MAAE,CACJ,CAAC,EACrB,IAAAd,MAAA,CAAAC,aAAA,EAACT,iBAAA,CAAAsB,OAAwB,MAAE,CAC1B,CAAC;AAEL,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAF,OAAA,GAEajB,QAAQ","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_components","require","_coreData","_data","_i18n","_url","ManagePatternsMenuItem","url","useSelect","select","canUser","coreStore","defaultUrl","addQueryArgs","post_type","patternsUrl","path","_react","createElement","MenuItem","role","href","__","_default","exports","default"],"sources":["@wordpress/edit-post/src/components/header/more-menu/manage-patterns-menu-item.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { MenuItem } from '@wordpress/components';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { addQueryArgs } from '@wordpress/url';\n\nfunction ManagePatternsMenuItem() {\n\tconst url = useSelect( ( select ) => {\n\t\tconst { canUser } = select( coreStore );\n\t\tconst defaultUrl = addQueryArgs( 'edit.php', {\n\t\t\tpost_type: 'wp_block',\n\t\t} );\n\t\tconst patternsUrl = addQueryArgs( 'site-editor.php', {\n\t\t\tpath: '/patterns',\n\t\t} );\n\n\t\t// The site editor and templates both check whether the user has\n\t\t// edit_theme_options capabilities. We can leverage that here and not\n\t\t// display the manage patterns link if the user can't access it.\n\t\treturn canUser( 'create', 'templates' ) ? patternsUrl : defaultUrl;\n\t}, [] );\n\n\treturn (\n\t\t<MenuItem role=\"menuitem\" href={ url }>\n\t\t\t{ __( 'Manage patterns' ) }\n\t\t</MenuItem>\n\t);\n}\n\nexport default ManagePatternsMenuItem;\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,IAAA,GAAAJ,OAAA;AAPA;AACA;AACA;;AAOA,SAASK,sBAAsBA,CAAA,EAAG;EACjC,MAAMC,GAAG,GAAG,IAAAC,eAAS,EAAIC,MAAM,IAAM;IACpC,MAAM;MAAEC;IAAQ,CAAC,GAAGD,MAAM,CAAEE,eAAU,CAAC;IACvC,MAAMC,UAAU,GAAG,IAAAC,iBAAY,EAAE,UAAU,EAAE;MAC5CC,SAAS,EAAE;IACZ,CAAE,CAAC;IACH,MAAMC,WAAW,GAAG,IAAAF,iBAAY,EAAE,iBAAiB,EAAE;MACpDG,IAAI,EAAE;IACP,CAAE,CAAC;;IAEH;IACA;IACA;IACA,OAAON,OAAO,CAAE,QAAQ,EAAE,WAAY,CAAC,GAAGK,WAAW,GAAGH,UAAU;EACnE,CAAC,EAAE,EAAG,CAAC;EAEP,OACC,IAAAK,MAAA,CAAAC,aAAA,EAAClB,WAAA,CAAAmB,QAAQ;IAACC,IAAI,EAAC,UAAU;IAACC,IAAI,EAAGd;EAAK,GACnC,IAAAe,QAAE,EAAE,iBAAkB,CACf,CAAC;AAEb;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEcnB,sBAAsB","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_data","require","_preferences","_i18n","_editor","WelcomeGuideMenuItem","isEditingTemplate","useSelect","select","editorStore","getCurrentPostType","_react","createElement","PreferenceToggleMenuItem","scope","name","label","__"],"sources":["@wordpress/edit-post/src/components/header/more-menu/welcome-guide-menu-item.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { PreferenceToggleMenuItem } from '@wordpress/preferences';\nimport { __ } from '@wordpress/i18n';\nimport { store as editorStore } from '@wordpress/editor';\n\nexport default function WelcomeGuideMenuItem() {\n\tconst isEditingTemplate = useSelect(\n\t\t( select ) =>\n\t\t\tselect( editorStore ).getCurrentPostType() === 'wp_template',\n\t\t[]\n\t);\n\n\treturn (\n\t\t<PreferenceToggleMenuItem\n\t\t\tscope=\"core/edit-post\"\n\t\t\tname={ isEditingTemplate ? 'welcomeGuideTemplate' : 'welcomeGuide' }\n\t\t\tlabel={ __( 'Welcome Guide' ) }\n\t\t/>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AANA;AACA;AACA;;AAMe,SAASI,oBAAoBA,CAAA,EAAG;EAC9C,MAAMC,iBAAiB,GAAG,IAAAC,eAAS,EAChCC,MAAM,IACPA,MAAM,CAAEC,aAAY,CAAC,CAACC,kBAAkB,CAAC,CAAC,KAAK,aAAa,EAC7D,EACD,CAAC;EAED,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACV,YAAA,CAAAW,wBAAwB;IACxBC,KAAK,EAAC,gBAAgB;IACtBC,IAAI,EAAGT,iBAAiB,GAAG,sBAAsB,GAAG,cAAgB;IACpEU,KAAK,EAAG,IAAAC,QAAE,EAAE,eAAgB;EAAG,CAC/B,CAAC;AAEJ","ignoreList":[]}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = TextEditor;
|
|
7
|
-
var _react = require("react");
|
|
8
|
-
var _editor = require("@wordpress/editor");
|
|
9
|
-
var _components = require("@wordpress/components");
|
|
10
|
-
var _data = require("@wordpress/data");
|
|
11
|
-
var _i18n = require("@wordpress/i18n");
|
|
12
|
-
var _keycodes = require("@wordpress/keycodes");
|
|
13
|
-
var _element = require("@wordpress/element");
|
|
14
|
-
var _store = require("../../store");
|
|
15
|
-
/**
|
|
16
|
-
* WordPress dependencies
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Internal dependencies
|
|
21
|
-
*/
|
|
22
|
-
|
|
23
|
-
function TextEditor() {
|
|
24
|
-
const isRichEditingEnabled = (0, _data.useSelect)(select => {
|
|
25
|
-
return select(_editor.store).getEditorSettings().richEditingEnabled;
|
|
26
|
-
}, []);
|
|
27
|
-
const {
|
|
28
|
-
switchEditorMode
|
|
29
|
-
} = (0, _data.useDispatch)(_editor.store);
|
|
30
|
-
const {
|
|
31
|
-
isWelcomeGuideVisible
|
|
32
|
-
} = (0, _data.useSelect)(select => {
|
|
33
|
-
const {
|
|
34
|
-
isFeatureActive
|
|
35
|
-
} = select(_store.store);
|
|
36
|
-
return {
|
|
37
|
-
isWelcomeGuideVisible: isFeatureActive('welcomeGuide')
|
|
38
|
-
};
|
|
39
|
-
}, []);
|
|
40
|
-
const titleRef = (0, _element.useRef)();
|
|
41
|
-
(0, _element.useEffect)(() => {
|
|
42
|
-
if (isWelcomeGuideVisible) {
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
titleRef?.current?.focus();
|
|
46
|
-
}, [isWelcomeGuideVisible]);
|
|
47
|
-
return (0, _react.createElement)("div", {
|
|
48
|
-
className: "edit-post-text-editor"
|
|
49
|
-
}, isRichEditingEnabled && (0, _react.createElement)("div", {
|
|
50
|
-
className: "edit-post-text-editor__toolbar"
|
|
51
|
-
}, (0, _react.createElement)("h2", null, (0, _i18n.__)('Editing code')), (0, _react.createElement)(_components.Button, {
|
|
52
|
-
variant: "tertiary",
|
|
53
|
-
onClick: () => switchEditorMode('visual'),
|
|
54
|
-
shortcut: _keycodes.displayShortcut.secondary('m')
|
|
55
|
-
}, (0, _i18n.__)('Exit code editor'))), (0, _react.createElement)("div", {
|
|
56
|
-
className: "edit-post-text-editor__body"
|
|
57
|
-
}, (0, _react.createElement)(_editor.PostTitleRaw, {
|
|
58
|
-
ref: titleRef
|
|
59
|
-
}), (0, _react.createElement)(_editor.PostTextEditor, null)));
|
|
60
|
-
}
|
|
61
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_editor","require","_components","_data","_i18n","_keycodes","_element","_store","TextEditor","isRichEditingEnabled","useSelect","select","editorStore","getEditorSettings","richEditingEnabled","switchEditorMode","useDispatch","isWelcomeGuideVisible","isFeatureActive","editPostStore","titleRef","useRef","useEffect","current","focus","_react","createElement","className","__","Button","variant","onClick","shortcut","displayShortcut","secondary","PostTitleRaw","ref","PostTextEditor"],"sources":["@wordpress/edit-post/src/components/text-editor/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tPostTextEditor,\n\tPostTitleRaw,\n\tstore as editorStore,\n} from '@wordpress/editor';\nimport { Button } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { displayShortcut } from '@wordpress/keycodes';\nimport { useEffect, useRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { store as editPostStore } from '../../store';\n\nexport default function TextEditor() {\n\tconst isRichEditingEnabled = useSelect( ( select ) => {\n\t\treturn select( editorStore ).getEditorSettings().richEditingEnabled;\n\t}, [] );\n\tconst { switchEditorMode } = useDispatch( editorStore );\n\n\tconst { isWelcomeGuideVisible } = useSelect( ( select ) => {\n\t\tconst { isFeatureActive } = select( editPostStore );\n\n\t\treturn {\n\t\t\tisWelcomeGuideVisible: isFeatureActive( 'welcomeGuide' ),\n\t\t};\n\t}, [] );\n\n\tconst titleRef = useRef();\n\n\tuseEffect( () => {\n\t\tif ( isWelcomeGuideVisible ) {\n\t\t\treturn;\n\t\t}\n\t\ttitleRef?.current?.focus();\n\t}, [ isWelcomeGuideVisible ] );\n\n\treturn (\n\t\t<div className=\"edit-post-text-editor\">\n\t\t\t{ isRichEditingEnabled && (\n\t\t\t\t<div className=\"edit-post-text-editor__toolbar\">\n\t\t\t\t\t<h2>{ __( 'Editing code' ) }</h2>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tonClick={ () => switchEditorMode( 'visual' ) }\n\t\t\t\t\t\tshortcut={ displayShortcut.secondary( 'm' ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Exit code editor' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t<div className=\"edit-post-text-editor__body\">\n\t\t\t\t<PostTitleRaw ref={ titleRef } />\n\t\t\t\t<PostTextEditor />\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AAKA,IAAAM,MAAA,GAAAN,OAAA;AAjBA;AACA;AACA;;AAYA;AACA;AACA;;AAGe,SAASO,UAAUA,CAAA,EAAG;EACpC,MAAMC,oBAAoB,GAAG,IAAAC,eAAS,EAAIC,MAAM,IAAM;IACrD,OAAOA,MAAM,CAAEC,aAAY,CAAC,CAACC,iBAAiB,CAAC,CAAC,CAACC,kBAAkB;EACpE,CAAC,EAAE,EAAG,CAAC;EACP,MAAM;IAAEC;EAAiB,CAAC,GAAG,IAAAC,iBAAW,EAAEJ,aAAY,CAAC;EAEvD,MAAM;IAAEK;EAAsB,CAAC,GAAG,IAAAP,eAAS,EAAIC,MAAM,IAAM;IAC1D,MAAM;MAAEO;IAAgB,CAAC,GAAGP,MAAM,CAAEQ,YAAc,CAAC;IAEnD,OAAO;MACNF,qBAAqB,EAAEC,eAAe,CAAE,cAAe;IACxD,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EAEP,MAAME,QAAQ,GAAG,IAAAC,eAAM,EAAC,CAAC;EAEzB,IAAAC,kBAAS,EAAE,MAAM;IAChB,IAAKL,qBAAqB,EAAG;MAC5B;IACD;IACAG,QAAQ,EAAEG,OAAO,EAAEC,KAAK,CAAC,CAAC;EAC3B,CAAC,EAAE,CAAEP,qBAAqB,CAAG,CAAC;EAE9B,OACC,IAAAQ,MAAA,CAAAC,aAAA;IAAKC,SAAS,EAAC;EAAuB,GACnClB,oBAAoB,IACrB,IAAAgB,MAAA,CAAAC,aAAA;IAAKC,SAAS,EAAC;EAAgC,GAC9C,IAAAF,MAAA,CAAAC,aAAA,cAAM,IAAAE,QAAE,EAAE,cAAe,CAAO,CAAC,EACjC,IAAAH,MAAA,CAAAC,aAAA,EAACxB,WAAA,CAAA2B,MAAM;IACNC,OAAO,EAAC,UAAU;IAClBC,OAAO,EAAGA,CAAA,KAAMhB,gBAAgB,CAAE,QAAS,CAAG;IAC9CiB,QAAQ,EAAGC,yBAAe,CAACC,SAAS,CAAE,GAAI;EAAG,GAE3C,IAAAN,QAAE,EAAE,kBAAmB,CAClB,CACJ,CACL,EACD,IAAAH,MAAA,CAAAC,aAAA;IAAKC,SAAS,EAAC;EAA6B,GAC3C,IAAAF,MAAA,CAAAC,aAAA,EAAC1B,OAAA,CAAAmC,YAAY;IAACC,GAAG,EAAGhB;EAAU,CAAE,CAAC,EACjC,IAAAK,MAAA,CAAAC,aAAA,EAAC1B,OAAA,CAAAqC,cAAc,MAAE,CACb,CACD,CAAC;AAER","ignoreList":[]}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.BlockInspectorButton = BlockInspectorButton;
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
var _react = require("react");
|
|
9
|
-
var _i18n = require("@wordpress/i18n");
|
|
10
|
-
var _components = require("@wordpress/components");
|
|
11
|
-
var _data = require("@wordpress/data");
|
|
12
|
-
var _a11y = require("@wordpress/a11y");
|
|
13
|
-
var _keyboardShortcuts = require("@wordpress/keyboard-shortcuts");
|
|
14
|
-
var _store = require("../../store");
|
|
15
|
-
/**
|
|
16
|
-
* WordPress dependencies
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Internal dependencies
|
|
21
|
-
*/
|
|
22
|
-
|
|
23
|
-
const noop = () => {};
|
|
24
|
-
function BlockInspectorButton({
|
|
25
|
-
onClick = noop,
|
|
26
|
-
small = false
|
|
27
|
-
}) {
|
|
28
|
-
const {
|
|
29
|
-
shortcut,
|
|
30
|
-
areAdvancedSettingsOpened
|
|
31
|
-
} = (0, _data.useSelect)(select => ({
|
|
32
|
-
shortcut: select(_keyboardShortcuts.store).getShortcutRepresentation('core/editor/toggle-sidebar'),
|
|
33
|
-
areAdvancedSettingsOpened: select(_store.store).getActiveGeneralSidebarName() === 'edit-post/block'
|
|
34
|
-
}), []);
|
|
35
|
-
const {
|
|
36
|
-
openGeneralSidebar,
|
|
37
|
-
closeGeneralSidebar
|
|
38
|
-
} = (0, _data.useDispatch)(_store.store);
|
|
39
|
-
const label = areAdvancedSettingsOpened ? (0, _i18n.__)('Hide more settings') : (0, _i18n.__)('Show more settings');
|
|
40
|
-
return (0, _react.createElement)(_components.MenuItem, {
|
|
41
|
-
onClick: () => {
|
|
42
|
-
if (areAdvancedSettingsOpened) {
|
|
43
|
-
closeGeneralSidebar();
|
|
44
|
-
(0, _a11y.speak)((0, _i18n.__)('Block settings closed'));
|
|
45
|
-
} else {
|
|
46
|
-
openGeneralSidebar('edit-post/block');
|
|
47
|
-
(0, _a11y.speak)((0, _i18n.__)('Additional settings are now available in the Editor block settings sidebar'));
|
|
48
|
-
}
|
|
49
|
-
onClick();
|
|
50
|
-
},
|
|
51
|
-
shortcut: shortcut
|
|
52
|
-
}, !small && label);
|
|
53
|
-
}
|
|
54
|
-
var _default = exports.default = BlockInspectorButton;
|
|
55
|
-
//# sourceMappingURL=block-inspector-button.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_i18n","require","_components","_data","_a11y","_keyboardShortcuts","_store","noop","BlockInspectorButton","onClick","small","shortcut","areAdvancedSettingsOpened","useSelect","select","keyboardShortcutsStore","getShortcutRepresentation","editPostStore","getActiveGeneralSidebarName","openGeneralSidebar","closeGeneralSidebar","useDispatch","label","__","_react","createElement","MenuItem","speak","_default","exports","default"],"sources":["@wordpress/edit-post/src/components/visual-editor/block-inspector-button.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { MenuItem } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { speak } from '@wordpress/a11y';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\n\n/**\n * Internal dependencies\n */\nimport { store as editPostStore } from '../../store';\n\nconst noop = () => {};\n\nexport function BlockInspectorButton( { onClick = noop, small = false } ) {\n\tconst { shortcut, areAdvancedSettingsOpened } = useSelect(\n\t\t( select ) => ( {\n\t\t\tshortcut: select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getShortcutRepresentation( 'core/editor/toggle-sidebar' ),\n\t\t\tareAdvancedSettingsOpened:\n\t\t\t\tselect( editPostStore ).getActiveGeneralSidebarName() ===\n\t\t\t\t'edit-post/block',\n\t\t} ),\n\t\t[]\n\t);\n\tconst { openGeneralSidebar, closeGeneralSidebar } =\n\t\tuseDispatch( editPostStore );\n\n\tconst label = areAdvancedSettingsOpened\n\t\t? __( 'Hide more settings' )\n\t\t: __( 'Show more settings' );\n\n\treturn (\n\t\t<MenuItem\n\t\t\tonClick={ () => {\n\t\t\t\tif ( areAdvancedSettingsOpened ) {\n\t\t\t\t\tcloseGeneralSidebar();\n\t\t\t\t\tspeak( __( 'Block settings closed' ) );\n\t\t\t\t} else {\n\t\t\t\t\topenGeneralSidebar( 'edit-post/block' );\n\t\t\t\t\tspeak(\n\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t'Additional settings are now available in the Editor block settings sidebar'\n\t\t\t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EAAE,uBAAwB,CAAE,CAAC;MACvC,CAAC,MAAM;QACNJ,kBAAkB,CAAE,iBAAkB,CAAC;QACvC,IAAAQ,WAAK,EACJ,IAAAJ,QAAE,EACD,4EACD,CACD,CAAC;MACF;MACAd,OAAO,CAAC,CAAC;IACV,CAAG;IACHE,QAAQ,EAAGA;EAAU,GAEnB,CAAED,KAAK,IAAIY,KACJ,CAAC;AAEb;AAAC,IAAAM,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEctB,oBAAoB","ignoreList":[]}
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = VisualEditor;
|
|
8
|
-
var _react = require("react");
|
|
9
|
-
var _clsx = _interopRequireDefault(require("clsx"));
|
|
10
|
-
var _editor = require("@wordpress/editor");
|
|
11
|
-
var _element = require("@wordpress/element");
|
|
12
|
-
var _data = require("@wordpress/data");
|
|
13
|
-
var _blocks = require("@wordpress/blocks");
|
|
14
|
-
var _blockEditor = require("@wordpress/block-editor");
|
|
15
|
-
var _store = require("../../store");
|
|
16
|
-
var _lockUnlock = require("../../lock-unlock");
|
|
17
|
-
var _usePaddingAppender = require("./use-padding-appender");
|
|
18
|
-
/**
|
|
19
|
-
* External dependencies
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* WordPress dependencies
|
|
24
|
-
*/
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Internal dependencies
|
|
28
|
-
*/
|
|
29
|
-
|
|
30
|
-
const {
|
|
31
|
-
EditorCanvas
|
|
32
|
-
} = (0, _lockUnlock.unlock)(_editor.privateApis);
|
|
33
|
-
const isGutenbergPlugin = process.env.IS_GUTENBERG_PLUGIN ? true : false;
|
|
34
|
-
function VisualEditor({
|
|
35
|
-
styles
|
|
36
|
-
}) {
|
|
37
|
-
const {
|
|
38
|
-
isWelcomeGuideVisible,
|
|
39
|
-
renderingMode,
|
|
40
|
-
isBlockBasedTheme,
|
|
41
|
-
hasV3BlocksOnly,
|
|
42
|
-
isEditingTemplate,
|
|
43
|
-
isZoomedOutView
|
|
44
|
-
} = (0, _data.useSelect)(select => {
|
|
45
|
-
const {
|
|
46
|
-
isFeatureActive
|
|
47
|
-
} = select(_store.store);
|
|
48
|
-
const {
|
|
49
|
-
getEditorSettings,
|
|
50
|
-
getRenderingMode
|
|
51
|
-
} = select(_editor.store);
|
|
52
|
-
const {
|
|
53
|
-
getBlockTypes
|
|
54
|
-
} = select(_blocks.store);
|
|
55
|
-
const {
|
|
56
|
-
__unstableGetEditorMode
|
|
57
|
-
} = select(_blockEditor.store);
|
|
58
|
-
const editorSettings = getEditorSettings();
|
|
59
|
-
return {
|
|
60
|
-
isWelcomeGuideVisible: isFeatureActive('welcomeGuide'),
|
|
61
|
-
renderingMode: getRenderingMode(),
|
|
62
|
-
isBlockBasedTheme: editorSettings.__unstableIsBlockBasedTheme,
|
|
63
|
-
hasV3BlocksOnly: getBlockTypes().every(type => {
|
|
64
|
-
return type.apiVersion >= 3;
|
|
65
|
-
}),
|
|
66
|
-
isEditingTemplate: select(_editor.store).getCurrentPostType() === 'wp_template',
|
|
67
|
-
isZoomedOutView: __unstableGetEditorMode() === 'zoom-out'
|
|
68
|
-
};
|
|
69
|
-
}, []);
|
|
70
|
-
const hasMetaBoxes = (0, _data.useSelect)(select => select(_store.store).hasMetaBoxes(), []);
|
|
71
|
-
const paddingAppenderRef = (0, _usePaddingAppender.usePaddingAppender)();
|
|
72
|
-
let paddingBottom;
|
|
73
|
-
|
|
74
|
-
// Add a constant padding for the typewritter effect. When typing at the
|
|
75
|
-
// bottom, there needs to be room to scroll up.
|
|
76
|
-
if (!isZoomedOutView && !hasMetaBoxes && renderingMode === 'post-only') {
|
|
77
|
-
paddingBottom = '40vh';
|
|
78
|
-
}
|
|
79
|
-
styles = (0, _element.useMemo)(() => [...styles, {
|
|
80
|
-
// We should move this in to future to the body.
|
|
81
|
-
css: paddingBottom ? `body{padding-bottom:${paddingBottom}}` : ''
|
|
82
|
-
}], [styles, paddingBottom]);
|
|
83
|
-
const isToBeIframed = (hasV3BlocksOnly || isGutenbergPlugin && isBlockBasedTheme) && !hasMetaBoxes || isEditingTemplate;
|
|
84
|
-
return (0, _react.createElement)("div", {
|
|
85
|
-
className: (0, _clsx.default)('edit-post-visual-editor', {
|
|
86
|
-
'has-inline-canvas': !isToBeIframed
|
|
87
|
-
})
|
|
88
|
-
}, (0, _react.createElement)(EditorCanvas, {
|
|
89
|
-
disableIframe: !isToBeIframed,
|
|
90
|
-
styles: styles
|
|
91
|
-
// We should auto-focus the canvas (title) on load.
|
|
92
|
-
// eslint-disable-next-line jsx-a11y/no-autofocus
|
|
93
|
-
,
|
|
94
|
-
autoFocus: !isWelcomeGuideVisible,
|
|
95
|
-
contentRef: paddingAppenderRef
|
|
96
|
-
}));
|
|
97
|
-
}
|
|
98
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_clsx","_interopRequireDefault","require","_editor","_element","_data","_blocks","_blockEditor","_store","_lockUnlock","_usePaddingAppender","EditorCanvas","unlock","editorPrivateApis","isGutenbergPlugin","process","env","IS_GUTENBERG_PLUGIN","VisualEditor","styles","isWelcomeGuideVisible","renderingMode","isBlockBasedTheme","hasV3BlocksOnly","isEditingTemplate","isZoomedOutView","useSelect","select","isFeatureActive","editPostStore","getEditorSettings","getRenderingMode","editorStore","getBlockTypes","blocksStore","__unstableGetEditorMode","blockEditorStore","editorSettings","__unstableIsBlockBasedTheme","every","type","apiVersion","getCurrentPostType","hasMetaBoxes","paddingAppenderRef","usePaddingAppender","paddingBottom","useMemo","css","isToBeIframed","_react","createElement","className","clsx","disableIframe","autoFocus","contentRef"],"sources":["@wordpress/edit-post/src/components/visual-editor/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\nimport { useMemo } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { store as blocksStore } from '@wordpress/blocks';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { store as editPostStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport { usePaddingAppender } from './use-padding-appender';\n\nconst { EditorCanvas } = unlock( editorPrivateApis );\n\nconst isGutenbergPlugin = process.env.IS_GUTENBERG_PLUGIN ? true : false;\n\nexport default function VisualEditor( { styles } ) {\n\tconst {\n\t\tisWelcomeGuideVisible,\n\t\trenderingMode,\n\t\tisBlockBasedTheme,\n\t\thasV3BlocksOnly,\n\t\tisEditingTemplate,\n\t\tisZoomedOutView,\n\t} = useSelect( ( select ) => {\n\t\tconst { isFeatureActive } = select( editPostStore );\n\t\tconst { getEditorSettings, getRenderingMode } = select( editorStore );\n\t\tconst { getBlockTypes } = select( blocksStore );\n\t\tconst { __unstableGetEditorMode } = select( blockEditorStore );\n\t\tconst editorSettings = getEditorSettings();\n\t\treturn {\n\t\t\tisWelcomeGuideVisible: isFeatureActive( 'welcomeGuide' ),\n\t\t\trenderingMode: getRenderingMode(),\n\t\t\tisBlockBasedTheme: editorSettings.__unstableIsBlockBasedTheme,\n\t\t\thasV3BlocksOnly: getBlockTypes().every( ( type ) => {\n\t\t\t\treturn type.apiVersion >= 3;\n\t\t\t} ),\n\t\t\tisEditingTemplate:\n\t\t\t\tselect( editorStore ).getCurrentPostType() === 'wp_template',\n\t\t\tisZoomedOutView: __unstableGetEditorMode() === 'zoom-out',\n\t\t};\n\t}, [] );\n\tconst hasMetaBoxes = useSelect(\n\t\t( select ) => select( editPostStore ).hasMetaBoxes(),\n\t\t[]\n\t);\n\n\tconst paddingAppenderRef = usePaddingAppender();\n\n\tlet paddingBottom;\n\n\t// Add a constant padding for the typewritter effect. When typing at the\n\t// bottom, there needs to be room to scroll up.\n\tif (\n\t\t! isZoomedOutView &&\n\t\t! hasMetaBoxes &&\n\t\trenderingMode === 'post-only'\n\t) {\n\t\tpaddingBottom = '40vh';\n\t}\n\n\tstyles = useMemo(\n\t\t() => [\n\t\t\t...styles,\n\t\t\t{\n\t\t\t\t// We should move this in to future to the body.\n\t\t\t\tcss: paddingBottom\n\t\t\t\t\t? `body{padding-bottom:${ paddingBottom }}`\n\t\t\t\t\t: '',\n\t\t\t},\n\t\t],\n\t\t[ styles, paddingBottom ]\n\t);\n\n\tconst isToBeIframed =\n\t\t( ( hasV3BlocksOnly || ( isGutenbergPlugin && isBlockBasedTheme ) ) &&\n\t\t\t! hasMetaBoxes ) ||\n\t\tisEditingTemplate;\n\n\treturn (\n\t\t<div\n\t\t\tclassName={ clsx( 'edit-post-visual-editor', {\n\t\t\t\t'has-inline-canvas': ! isToBeIframed,\n\t\t\t} ) }\n\t\t>\n\t\t\t<EditorCanvas\n\t\t\t\tdisableIframe={ ! isToBeIframed }\n\t\t\t\tstyles={ styles }\n\t\t\t\t// We should auto-focus the canvas (title) on load.\n\t\t\t\t// eslint-disable-next-line jsx-a11y/no-autofocus\n\t\t\t\tautoFocus={ ! isWelcomeGuideVisible }\n\t\t\t\tcontentRef={ paddingAppenderRef }\n\t\t\t/>\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,OAAA,GAAAD,OAAA;AAIA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAL,OAAA;AAKA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,WAAA,GAAAP,OAAA;AACA,IAAAQ,mBAAA,GAAAR,OAAA;AAtBA;AACA;AACA;;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CAAEE,YAAc,CAAC,CAACc,YAAY,CAAC,CAAC,EACpD,EACD,CAAC;EAED,MAAMC,kBAAkB,GAAG,IAAAC,sCAAkB,EAAC,CAAC;EAE/C,IAAIC,aAAa;;EAEjB;EACA;EACA,IACC,CAAErB,eAAe,IACjB,CAAEkB,YAAY,IACdtB,aAAa,KAAK,WAAW,EAC5B;IACDyB,aAAa,GAAG,MAAM;EACvB;EAEA3B,MAAM,GAAG,IAAA4B,gBAAO,EACf,MAAM,CACL,GAAG5B,MAAM,EACT;IACC;IACA6B,GAAG,EAAEF,aAAa,GACd,uBAAuBA,aAAe,GAAE,GACzC;EACJ,CAAC,CACD,EACD,CAAE3B,MAAM,EAAE2B,aAAa,CACxB,CAAC;EAED,MAAMG,aAAa,GAChB,CAAE1B,eAAe,IAAMT,iBAAiB,IAAIQ,iBAAmB,KAChE,CAAEqB,YAAY,IACfnB,iBAAiB;EAElB,OACC,IAAA0B,MAAA,CAAAC,aAAA;IACCC,SAAS,EAAG,IAAAC,aAAI,EAAE,yBAAyB,EAAE;MAC5C,mBAAmB,EAAE,CAAEJ;IACxB,CAAE;EAAG,GAEL,IAAAC,MAAA,CAAAC,aAAA,EAACxC,YAAY;IACZ2C,aAAa,EAAG,CAAEL,aAAe;IACjC9B,MAAM,EAAGA;IACT;IACA;IAAA;IACAoC,SAAS,EAAG,CAAEnC,qBAAuB;IACrCoC,UAAU,EAAGZ;EAAoB,CACjC,CACG,CAAC;AAER","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_data","require","_compose","_blockEditor","_blocks","usePaddingAppender","registry","useRegistry","useRefEffect","node","onMouseDown","event","target","ownerDocument","defaultView","paddingBottom","parseInt","getComputedStyle","lastChild","lastElementChild","lastChildRect","getBoundingClientRect","clientY","bottom","preventDefault","blockOrder","select","blockEditorStore","getBlockOrder","lastBlockClientId","length","lastBlock","getBlock","selectBlock","insertDefaultBlock","dispatch","isUnmodifiedDefaultBlock","addEventListener","removeEventListener"],"sources":["@wordpress/edit-post/src/components/visual-editor/use-padding-appender.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useRegistry } from '@wordpress/data';\nimport { useRefEffect } from '@wordpress/compose';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { isUnmodifiedDefaultBlock } from '@wordpress/blocks';\n\nexport function usePaddingAppender() {\n\tconst registry = useRegistry();\n\treturn useRefEffect(\n\t\t( node ) => {\n\t\t\tfunction onMouseDown( event ) {\n\t\t\t\tif ( event.target !== node ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst { ownerDocument } = node;\n\t\t\t\tconst { defaultView } = ownerDocument;\n\n\t\t\t\tconst paddingBottom = defaultView.parseInt(\n\t\t\t\t\tdefaultView.getComputedStyle( node ).paddingBottom,\n\t\t\t\t\t10\n\t\t\t\t);\n\n\t\t\t\tif ( ! paddingBottom ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Only handle clicks under the last child.\n\t\t\t\tconst lastChild = node.lastElementChild;\n\t\t\t\tif ( ! lastChild ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst lastChildRect = lastChild.getBoundingClientRect();\n\t\t\t\tif ( event.clientY < lastChildRect.bottom ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tevent.preventDefault();\n\n\t\t\t\tconst blockOrder = registry\n\t\t\t\t\t.select( blockEditorStore )\n\t\t\t\t\t.getBlockOrder( '' );\n\t\t\t\tconst lastBlockClientId = blockOrder[ blockOrder.length - 1 ];\n\n\t\t\t\t// Do nothing when only default block appender is present.\n\t\t\t\tif ( ! lastBlockClientId ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst lastBlock = registry\n\t\t\t\t\t.select( blockEditorStore )\n\t\t\t\t\t.getBlock( lastBlockClientId );\n\t\t\t\tconst { selectBlock, insertDefaultBlock } =\n\t\t\t\t\tregistry.dispatch( blockEditorStore );\n\n\t\t\t\tif ( isUnmodifiedDefaultBlock( lastBlock ) ) {\n\t\t\t\t\tselectBlock( lastBlockClientId );\n\t\t\t\t} else {\n\t\t\t\t\tinsertDefaultBlock();\n\t\t\t\t}\n\t\t\t}\n\t\t\tnode.addEventListener( 'mousedown', onMouseDown );\n\t\t\treturn () => {\n\t\t\t\tnode.removeEventListener( 'mousedown', onMouseDown );\n\t\t\t};\n\t\t},\n\t\t[ registry ]\n\t);\n}\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AANA;AACA;AACA;;AAMO,SAASI,kBAAkBA,CAAA,EAAG;EACpC,MAAMC,QAAQ,GAAG,IAAAC,iBAAW,EAAC,CAAC;EAC9B,OAAO,IAAAC,qBAAY,EAChBC,IAAI,IAAM;IACX,SAASC,WAAWA,CAAEC,KAAK,EAAG;MAC7B,IAAKA,KAAK,CAACC,MAAM,KAAKH,IAAI,EAAG;QAC5B;MACD;MAEA,MAAM;QAAEI;MAAc,CAAC,GAAGJ,IAAI;MAC9B,MAAM;QAAEK;MAAY,CAAC,GAAGD,aAAa;MAErC,MAAME,aAAa,GAAGD,WAAW,CAACE,QAAQ,CACzCF,WAAW,CAACG,gBAAgB,CAAER,IAAK,CAAC,CAACM,aAAa,EAClD,EACD,CAAC;MAED,IAAK,CAAEA,aAAa,EAAG;QACtB;MACD;;MAEA;MACA,MAAMG,SAAS,GAAGT,IAAI,CAACU,gBAAgB;MACvC,IAAK,CAAED,SAAS,EAAG;QAClB;MACD;MAEA,MAAME,aAAa,GAAGF,SAAS,CAACG,qBAAqB,CAAC,CAAC;MACvD,IAAKV,KAAK,CAACW,OAAO,GAAGF,aAAa,CAACG,MAAM,EAAG;QAC3C;MACD;MAEAZ,KAAK,CAACa,cAAc,CAAC,CAAC;MAEtB,MAAMC,UAAU,GAAGnB,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