@wordpress/edit-post 8.8.8 → 8.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/build/components/back-button/fullscreen-mode-close.js +2 -4
- package/build/components/back-button/fullscreen-mode-close.js.map +1 -1
- package/build/components/init-pattern-modal/index.js +3 -12
- package/build/components/init-pattern-modal/index.js.map +1 -1
- package/build/components/layout/index.js +24 -30
- package/build/components/layout/index.js.map +1 -1
- package/build/components/layout/use-padding-appender.js +19 -16
- package/build/components/layout/use-padding-appender.js.map +1 -1
- package/build/components/meta-boxes/meta-box-visibility.js.map +1 -1
- package/build/components/meta-boxes/meta-boxes-area/index.js.map +1 -1
- package/build/components/preferences-modal/enable-custom-fields.js +2 -5
- package/build/components/preferences-modal/enable-custom-fields.js.map +1 -1
- package/build/components/preferences-modal/meta-boxes-section.js.map +1 -1
- package/build/deprecated.js.map +1 -1
- package/build/index.js +2 -4
- package/build/index.js.map +1 -1
- package/build/store/actions.js +1 -1
- package/build/store/actions.js.map +1 -1
- package/build/store/private-selectors.js.map +1 -1
- package/build/store/selectors.js +1 -1
- package/build/store/selectors.js.map +1 -1
- package/build/utils/meta-boxes.js.map +1 -1
- package/build-module/components/back-button/fullscreen-mode-close.js +2 -4
- package/build-module/components/back-button/fullscreen-mode-close.js.map +1 -1
- package/build-module/components/header/header-toolbar/index.native.js +1 -2
- package/build-module/components/header/header-toolbar/index.native.js.map +1 -1
- package/build-module/components/init-pattern-modal/index.js +5 -16
- package/build-module/components/init-pattern-modal/index.js.map +1 -1
- package/build-module/components/layout/index.js +25 -33
- package/build-module/components/layout/index.js.map +1 -1
- package/build-module/components/layout/index.native.js +1 -3
- package/build-module/components/layout/index.native.js.map +1 -1
- package/build-module/components/layout/use-padding-appender.js +20 -16
- package/build-module/components/layout/use-padding-appender.js.map +1 -1
- package/build-module/components/meta-boxes/index.js +1 -3
- package/build-module/components/meta-boxes/index.js.map +1 -1
- package/build-module/components/meta-boxes/meta-box-visibility.js.map +1 -1
- package/build-module/components/meta-boxes/meta-boxes-area/index.js +1 -2
- package/build-module/components/meta-boxes/meta-boxes-area/index.js.map +1 -1
- package/build-module/components/more-menu/index.js +1 -3
- package/build-module/components/more-menu/index.js.map +1 -1
- package/build-module/components/preferences-modal/enable-custom-fields.js +3 -8
- package/build-module/components/preferences-modal/enable-custom-fields.js.map +1 -1
- package/build-module/components/preferences-modal/meta-boxes-section.js +1 -2
- package/build-module/components/preferences-modal/meta-boxes-section.js.map +1 -1
- package/build-module/components/welcome-guide/default.js +1 -3
- package/build-module/components/welcome-guide/default.js.map +1 -1
- package/build-module/components/welcome-guide/image.js +1 -2
- package/build-module/components/welcome-guide/image.js.map +1 -1
- package/build-module/components/welcome-guide/template.js +1 -3
- package/build-module/components/welcome-guide/template.js.map +1 -1
- package/build-module/deprecated.js.map +1 -1
- package/build-module/index.js +2 -4
- package/build-module/index.js.map +1 -1
- package/build-module/store/actions.js +1 -1
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/private-selectors.js.map +1 -1
- package/build-module/store/selectors.js +1 -1
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/utils/meta-boxes.js.map +1 -1
- package/build-style/classic-rtl.css +10 -1
- package/build-style/classic.css +10 -1
- package/build-style/style-rtl.css +10 -1
- package/build-style/style.css +10 -1
- package/package.json +32 -32
- package/src/components/back-button/fullscreen-mode-close.js +1 -2
- package/src/components/back-button/test/__snapshots__/fullscreen-mode-close.js.snap +1 -1
- package/src/components/init-pattern-modal/index.js +5 -12
- package/src/components/layout/index.js +21 -32
- package/src/components/layout/use-padding-appender.js +21 -18
- package/src/components/preferences-modal/enable-custom-fields.js +1 -3
- package/src/components/preferences-modal/test/__snapshots__/enable-custom-fields.js.snap +2 -2
- package/src/index.js +0 -2
- package/src/store/actions.js +1 -1
- package/src/store/selectors.js +1 -1
|
@@ -23,8 +23,7 @@ import { toggleUndoButton, toggleRedoButton, subscribeOnUndoPressed, subscribeOn
|
|
|
23
23
|
*/
|
|
24
24
|
import styles from './style.scss';
|
|
25
25
|
import { store as editPostStore } from '../../../store';
|
|
26
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
27
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
26
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
28
27
|
const shadowStyle = {
|
|
29
28
|
shadowOffset: {
|
|
30
29
|
width: 2,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ScrollView","StyleSheet","View","useCallback","useRef","useEffect","Platform","compose","usePreferredColorSchemeStyle","withSelect","withDispatch","withViewportMatch","__","Inserter","BlockToolbar","store","blockEditorStore","ToolbarGroup","ToolbarButton","keyboardClose","audio","audioIcon","media","imageIcon","video","videoIcon","gallery","galleryIcon","editorStore","createBlock","toggleUndoButton","toggleRedoButton","subscribeOnUndoPressed","subscribeOnRedoPressed","styles","editPostStore","jsx","_jsx","jsxs","_jsxs","shadowStyle","shadowOffset","width","height","shadowOpacity","shadowRadius","elevation","HeaderToolbar","hasRedo","hasUndo","redo","undo","showInserter","showKeyboardHideButton","insertBlock","onHideKeyboard","isRTL","noContentSelected","anchorNodeRef","containerStyle","borderTopWidth","hairlineWidth","onUndoSubscription","onRedoSubscription","remove","scrollViewRef","scrollToStart","isAndroid","current","scrollToEnd","scrollTo","x","onInsertBlock","blockType","undefined","source","inserterMethod","renderMediaButtons","children","title","icon","onClick","testID","extraProps","hint","toolbarAriaLabel","shadowColor","showKeyboardButtonStyles","color","ref","accessibilityLabel","style","onContentSizeChange","horizontal","showsHorizontalScrollIndicator","keyboardShouldPersistTaps","alwaysBounceHorizontal","contentContainerStyle","disabled","passedStyle","select","getBlockRootClientId","getBlockSelectionEnd","hasInserterItems","hasSelectedBlock","getEditorSettings","isAnyBlockSelected","hasEditorRedo","hasEditorUndo","getEditorMode","richEditingEnabled","isTextModeEnabled","getSettings","dispatch","clearSelectedBlock","togglePostTitleSelection","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":"AAAA;AACA;AACA;AACA,SAASA,UAAU,EAAEC,UAAU,EAAEC,IAAI,QAAQ,cAAc;;AAE3D;AACA;AACA;AACA,SAASC,WAAW,EAAEC,MAAM,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,oBAAoB;AAC7E,SAASC,OAAO,EAAEC,4BAA4B,QAAQ,oBAAoB;AAC1E,SAASC,UAAU,EAAEC,YAAY,QAAQ,iBAAiB;AAC1D,SAASC,iBAAiB,QAAQ,qBAAqB;AACvD,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SACCC,QAAQ,EACRC,YAAY,EACZC,KAAK,IAAIC,gBAAgB,QACnB,yBAAyB;AAChC,SAASC,YAAY,EAAEC,aAAa,QAAQ,uBAAuB;AACnE,SACCC,aAAa,EACbC,KAAK,IAAIC,SAAS,EAClBC,KAAK,IAAIC,SAAS,EAClBC,KAAK,IAAIC,SAAS,EAClBC,OAAO,IAAIC,WAAW,QAChB,kBAAkB;AACzB,SAASZ,KAAK,IAAIa,WAAW,QAAQ,mBAAmB;AACxD,SAASC,WAAW,QAAQ,mBAAmB;AAC/C,SACCC,gBAAgB,EAChBC,gBAAgB,EAChBC,sBAAsB,EACtBC,sBAAsB,QAChB,gCA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AC,CAAC0E,aAAa,CAAC,CAAC,KAAK,QAAQ,IACpDJ,iBAAiB,CAAC,CAAC,CAACK,kBAAkB,IACtCP,gBAAgB,CACfF,oBAAoB,CAAEC,oBAAoB,CAAC,CAAE,CAC9C,CAAC;IACFS,iBAAiB,EAChBX,MAAM,CAAEjE,aAAc,CAAC,CAAC0E,aAAa,CAAC,CAAC,KAAK,MAAM;IACnDrD,KAAK,EAAE4C,MAAM,CAAEpF,gBAAiB,CAAC,CAACgG,WAAW,CAAC,CAAC,CAACxD,KAAK;IACrDC,iBAAiB,EAAE,CAAEiD;EACtB,CAAC;AACF,CAAE,CAAC,EACHhG,YAAY,CAAIuG,QAAQ,IAAM;EAC7B,MAAM;IAAEC,kBAAkB;IAAE5D;EAAY,CAAC,GACxC2D,QAAQ,CAAEjG,gBAAiB,CAAC;EAC7B,MAAM;IAAEmG;EAAyB,CAAC,GAAGF,QAAQ,CAAErF,WAAY,CAAC;EAE5D,OAAO;IACNsB,IAAI,EAAE+D,QAAQ,CAAErF,WAAY,CAAC,CAACsB,IAAI;IAClCC,IAAI,EAAE8D,QAAQ,CAAErF,WAAY,CAAC,CAACuB,IAAI;IAClCI,cAAcA,CAAA,EAAG;MAChB2D,kBAAkB,CAAC,CAAC;MACpBC,wBAAwB,CAAE,KAAM,CAAC;IAClC,CAAC;IACD7D;EACD,CAAC;AACF,CAAE,CAAC,EACH3C,iBAAiB,CAAE;EAAEyG,eAAe,EAAE;AAAS,CAAE,CAAC,CACjD,CAAC,CAAErE,aAAc,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["ScrollView","StyleSheet","View","useCallback","useRef","useEffect","Platform","compose","usePreferredColorSchemeStyle","withSelect","withDispatch","withViewportMatch","__","Inserter","BlockToolbar","store","blockEditorStore","ToolbarGroup","ToolbarButton","keyboardClose","audio","audioIcon","media","imageIcon","video","videoIcon","gallery","galleryIcon","editorStore","createBlock","toggleUndoButton","toggleRedoButton","subscribeOnUndoPressed","subscribeOnRedoPressed","styles","editPostStore","jsx","_jsx","jsxs","_jsxs","shadowStyle","shadowOffset","width","height","shadowOpacity","shadowRadius","elevation","HeaderToolbar","hasRedo","hasUndo","redo","undo","showInserter","showKeyboardHideButton","insertBlock","onHideKeyboard","isRTL","noContentSelected","anchorNodeRef","containerStyle","borderTopWidth","hairlineWidth","onUndoSubscription","onRedoSubscription","remove","scrollViewRef","scrollToStart","isAndroid","current","scrollToEnd","scrollTo","x","onInsertBlock","blockType","undefined","source","inserterMethod","renderMediaButtons","children","title","icon","onClick","testID","extraProps","hint","toolbarAriaLabel","shadowColor","showKeyboardButtonStyles","color","ref","accessibilityLabel","style","onContentSizeChange","horizontal","showsHorizontalScrollIndicator","keyboardShouldPersistTaps","alwaysBounceHorizontal","contentContainerStyle","disabled","passedStyle","select","getBlockRootClientId","getBlockSelectionEnd","hasInserterItems","hasSelectedBlock","getEditorSettings","isAnyBlockSelected","hasEditorRedo","hasEditorUndo","getEditorMode","richEditingEnabled","isTextModeEnabled","getSettings","dispatch","clearSelectedBlock","togglePostTitleSelection","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":"AAAA;AACA;AACA;AACA,SAASA,UAAU,EAAEC,UAAU,EAAEC,IAAI,QAAQ,cAAc;;AAE3D;AACA;AACA;AACA,SAASC,WA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,OAAO;IACNsB,IAAI,EAAE+D,QAAQ,CAAErF,WAAY,CAAC,CAACsB,IAAI;IAClCC,IAAI,EAAE8D,QAAQ,CAAErF,WAAY,CAAC,CAACuB,IAAI;IAClCI,cAAcA,CAAA,EAAG;MAChB2D,kBAAkB,CAAC,CAAC;MACpBC,wBAAwB,CAAE,KAAM,CAAC;IAClC,CAAC;IACD7D;EACD,CAAC;AACF,CAAE,CAAC,EACH3C,iBAAiB,CAAE;EAAEyG,eAAe,EAAE;AAAS,CAAE,CAAC,CACjD,CAAC,CAAErE,aAAc,CAAC","ignoreList":[]}
|
|
@@ -4,16 +4,13 @@
|
|
|
4
4
|
import { useSelect, useDispatch } from '@wordpress/data';
|
|
5
5
|
import { __, _x } from '@wordpress/i18n';
|
|
6
6
|
import { Modal, Button, __experimentalHStack as HStack, __experimentalVStack as VStack, ToggleControl, TextControl } from '@wordpress/components';
|
|
7
|
-
import {
|
|
7
|
+
import { useState } from '@wordpress/element';
|
|
8
8
|
import { store as editorStore } from '@wordpress/editor';
|
|
9
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
|
-
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
9
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
12
10
|
export default function InitPatternModal() {
|
|
13
11
|
const {
|
|
14
12
|
editPost
|
|
15
13
|
} = useDispatch(editorStore);
|
|
16
|
-
const [isModalOpen, setIsModalOpen] = useState(false);
|
|
17
14
|
const [syncType, setSyncType] = useState(undefined);
|
|
18
15
|
const [title, setTitle] = useState('');
|
|
19
16
|
const {
|
|
@@ -29,13 +26,7 @@ export default function InitPatternModal() {
|
|
|
29
26
|
isNewPost: isCleanNewPost()
|
|
30
27
|
};
|
|
31
28
|
}, []);
|
|
32
|
-
|
|
33
|
-
if (isNewPost && postType === 'wp_block') {
|
|
34
|
-
setIsModalOpen(true);
|
|
35
|
-
}
|
|
36
|
-
// We only want the modal to open when the page is first loaded.
|
|
37
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
38
|
-
}, []);
|
|
29
|
+
const [isModalOpen, setIsModalOpen] = useState(() => isNewPost && postType === 'wp_block');
|
|
39
30
|
if (postType !== 'wp_block' || !isNewPost) {
|
|
40
31
|
return null;
|
|
41
32
|
}
|
|
@@ -77,10 +68,8 @@ export default function InitPatternModal() {
|
|
|
77
68
|
}
|
|
78
69
|
}), /*#__PURE__*/_jsx(HStack, {
|
|
79
70
|
justify: "right",
|
|
80
|
-
children: /*#__PURE__*/_jsx(Button
|
|
81
|
-
|
|
82
|
-
, {
|
|
83
|
-
__next40pxDefaultSize: false,
|
|
71
|
+
children: /*#__PURE__*/_jsx(Button, {
|
|
72
|
+
__next40pxDefaultSize: true,
|
|
84
73
|
variant: "primary",
|
|
85
74
|
type: "submit",
|
|
86
75
|
disabled: !title,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useSelect","useDispatch","__","_x","Modal","Button","__experimentalHStack","HStack","__experimentalVStack","VStack","ToggleControl","TextControl","
|
|
1
|
+
{"version":3,"names":["useSelect","useDispatch","__","_x","Modal","Button","__experimentalHStack","HStack","__experimentalVStack","VStack","ToggleControl","TextControl","useState","store","editorStore","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","InitPatternModal","editPost","syncType","setSyncType","undefined","title","setTitle","postType","isNewPost","select","getEditedPostAttribute","isCleanNewPost","isModalOpen","setIsModalOpen","children","onRequestClose","overlayClassName","onSubmit","event","preventDefault","meta","wp_pattern_sync_status","spacing","label","value","onChange","placeholder","className","__nextHasNoMarginBottom","__next40pxDefaultSize","help","checked","justify","variant","type","disabled","accessibleWhenDisabled"],"sources":["@wordpress/edit-post/src/components/init-pattern-modal/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __, _x } from '@wordpress/i18n';\nimport {\n\tModal,\n\tButton,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\tToggleControl,\n\tTextControl,\n} from '@wordpress/components';\nimport { useState } from '@wordpress/element';\nimport { store as editorStore } from '@wordpress/editor';\n\nexport default function InitPatternModal() {\n\tconst { editPost } = useDispatch( editorStore );\n\tconst [ syncType, setSyncType ] = useState( undefined );\n\tconst [ title, setTitle ] = useState( '' );\n\n\tconst { postType, isNewPost } = useSelect( ( select ) => {\n\t\tconst { getEditedPostAttribute, isCleanNewPost } =\n\t\t\tselect( editorStore );\n\t\treturn {\n\t\t\tpostType: getEditedPostAttribute( 'type' ),\n\t\t\tisNewPost: isCleanNewPost(),\n\t\t};\n\t}, [] );\n\tconst [ isModalOpen, setIsModalOpen ] = useState(\n\t\t() => isNewPost && postType === 'wp_block'\n\t);\n\n\tif ( postType !== 'wp_block' || ! isNewPost ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t{ isModalOpen && (\n\t\t\t\t<Modal\n\t\t\t\t\ttitle={ __( 'Create pattern' ) }\n\t\t\t\t\tonRequestClose={ () => {\n\t\t\t\t\t\tsetIsModalOpen( false );\n\t\t\t\t\t} }\n\t\t\t\t\toverlayClassName=\"reusable-blocks-menu-items__convert-modal\"\n\t\t\t\t>\n\t\t\t\t\t<form\n\t\t\t\t\t\tonSubmit={ ( event ) => {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tsetIsModalOpen( false );\n\t\t\t\t\t\t\teditPost( {\n\t\t\t\t\t\t\t\ttitle,\n\t\t\t\t\t\t\t\tmeta: {\n\t\t\t\t\t\t\t\t\twp_pattern_sync_status: syncType,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t<VStack spacing=\"5\">\n\t\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\t\tlabel={ __( 'Name' ) }\n\t\t\t\t\t\t\t\tvalue={ title }\n\t\t\t\t\t\t\t\tonChange={ setTitle }\n\t\t\t\t\t\t\t\tplaceholder={ __( 'My pattern' ) }\n\t\t\t\t\t\t\t\tclassName=\"patterns-create-modal__name-input\"\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\tlabel={ _x( 'Synced', 'pattern (singular)' ) }\n\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t'Sync this pattern across multiple locations.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tchecked={ ! syncType }\n\t\t\t\t\t\t\t\tonChange={ () => {\n\t\t\t\t\t\t\t\t\tsetSyncType(\n\t\t\t\t\t\t\t\t\t\t! syncType ? 'unsynced' : undefined\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<HStack justify=\"right\">\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\t\t\tdisabled={ ! title }\n\t\t\t\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ __( 'Create' ) }\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</HStack>\n\t\t\t\t\t\t</VStack>\n\t\t\t\t\t</form>\n\t\t\t\t</Modal>\n\t\t\t) }\n\t\t</>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,EAAE,EAAEC,EAAE,QAAQ,iBAAiB;AACxC,SACCC,KAA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AAC,CACD;EACP,CACA,CAAC;AAEL","ignoreList":[]}
|
|
@@ -41,9 +41,7 @@ import useEditPostCommands from '../../commands/use-commands';
|
|
|
41
41
|
import { usePaddingAppender } from './use-padding-appender';
|
|
42
42
|
import { useShouldIframe } from './use-should-iframe';
|
|
43
43
|
import useNavigateToEntityRecord from '../../hooks/use-navigate-to-entity-record';
|
|
44
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
45
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
46
|
-
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
44
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
47
45
|
const {
|
|
48
46
|
getLayoutStyles
|
|
49
47
|
} = unlock(blockEditorPrivateApis);
|
|
@@ -62,30 +60,17 @@ const {
|
|
|
62
60
|
BlockKeyboardShortcuts
|
|
63
61
|
} = unlock(blockLibraryPrivateApis);
|
|
64
62
|
const DESIGN_POST_TYPES = ['wp_template', 'wp_template_part', 'wp_block', 'wp_navigation'];
|
|
65
|
-
function useEditorStyles() {
|
|
63
|
+
function useEditorStyles(...additionalStyles) {
|
|
66
64
|
const {
|
|
67
65
|
hasThemeStyleSupport,
|
|
68
|
-
editorSettings
|
|
69
|
-
isZoomedOutView,
|
|
70
|
-
renderingMode,
|
|
71
|
-
postType
|
|
66
|
+
editorSettings
|
|
72
67
|
} = useSelect(select => {
|
|
73
|
-
const {
|
|
74
|
-
__unstableGetEditorMode
|
|
75
|
-
} = select(blockEditorStore);
|
|
76
|
-
const {
|
|
77
|
-
getCurrentPostType,
|
|
78
|
-
getRenderingMode
|
|
79
|
-
} = select(editorStore);
|
|
80
|
-
const _postType = getCurrentPostType();
|
|
81
68
|
return {
|
|
82
69
|
hasThemeStyleSupport: select(editPostStore).isFeatureActive('themeStyles'),
|
|
83
|
-
editorSettings: select(editorStore).getEditorSettings()
|
|
84
|
-
isZoomedOutView: __unstableGetEditorMode() === 'zoom-out',
|
|
85
|
-
renderingMode: getRenderingMode(),
|
|
86
|
-
postType: _postType
|
|
70
|
+
editorSettings: select(editorStore).getEditorSettings()
|
|
87
71
|
};
|
|
88
72
|
}, []);
|
|
73
|
+
const addedStyles = additionalStyles.join('\n');
|
|
89
74
|
|
|
90
75
|
// Compute the default styles.
|
|
91
76
|
return useMemo(() => {
|
|
@@ -110,16 +95,13 @@ function useEditorStyles() {
|
|
|
110
95
|
});
|
|
111
96
|
}
|
|
112
97
|
const baseStyles = hasThemeStyles ? (_editorSettings$style3 = editorSettings.styles) !== null && _editorSettings$style3 !== void 0 ? _editorSettings$style3 : [] : defaultEditorStyles;
|
|
113
|
-
|
|
114
|
-
// Add a space for the typewriter effect. When typing in the last block,
|
|
115
|
-
// there needs to be room to scroll up.
|
|
116
|
-
if (!isZoomedOutView && renderingMode === 'post-only' && !DESIGN_POST_TYPES.includes(postType)) {
|
|
98
|
+
if (addedStyles) {
|
|
117
99
|
return [...baseStyles, {
|
|
118
|
-
css:
|
|
100
|
+
css: addedStyles
|
|
119
101
|
}];
|
|
120
102
|
}
|
|
121
103
|
return baseStyles;
|
|
122
|
-
}, [editorSettings.defaultEditorStyles, editorSettings.disableLayoutStyles, editorSettings.styles, hasThemeStyleSupport,
|
|
104
|
+
}, [editorSettings.defaultEditorStyles, editorSettings.disableLayoutStyles, editorSettings.styles, hasThemeStyleSupport, addedStyles]);
|
|
123
105
|
}
|
|
124
106
|
|
|
125
107
|
/**
|
|
@@ -332,7 +314,6 @@ function Layout({
|
|
|
332
314
|
}) {
|
|
333
315
|
useCommands();
|
|
334
316
|
useEditPostCommands();
|
|
335
|
-
const paddingAppenderRef = usePaddingAppender();
|
|
336
317
|
const shouldIframe = useShouldIframe();
|
|
337
318
|
const {
|
|
338
319
|
createErrorNotice
|
|
@@ -356,7 +337,8 @@ function Layout({
|
|
|
356
337
|
showMetaBoxes,
|
|
357
338
|
hasHistory,
|
|
358
339
|
isWelcomeGuideVisible,
|
|
359
|
-
templateId
|
|
340
|
+
templateId,
|
|
341
|
+
enablePaddingAppender
|
|
360
342
|
} = useSelect(select => {
|
|
361
343
|
var _getPostType$viewable;
|
|
362
344
|
const {
|
|
@@ -376,18 +358,28 @@ function Layout({
|
|
|
376
358
|
kind: 'postType',
|
|
377
359
|
name: 'wp_template'
|
|
378
360
|
});
|
|
361
|
+
const {
|
|
362
|
+
__unstableGetEditorMode
|
|
363
|
+
} = select(blockEditorStore);
|
|
364
|
+
const {
|
|
365
|
+
getEditorMode,
|
|
366
|
+
getRenderingMode
|
|
367
|
+
} = select(editorStore);
|
|
368
|
+
const isRenderingPostOnly = getRenderingMode() === 'post-only';
|
|
379
369
|
return {
|
|
380
|
-
mode:
|
|
370
|
+
mode: getEditorMode(),
|
|
381
371
|
isFullscreenActive: select(editPostStore).isFeatureActive('fullscreenMode'),
|
|
382
372
|
hasActiveMetaboxes: select(editPostStore).hasMetaBoxes(),
|
|
383
373
|
hasBlockSelected: !!select(blockEditorStore).getBlockSelectionStart(),
|
|
384
374
|
showIconLabels: get('core', 'showIconLabels'),
|
|
385
375
|
isDistractionFree: get('core', 'distractionFree'),
|
|
386
|
-
showMetaBoxes: !DESIGN_POST_TYPES.includes(currentPostType) &&
|
|
376
|
+
showMetaBoxes: !DESIGN_POST_TYPES.includes(currentPostType) && isRenderingPostOnly,
|
|
387
377
|
isWelcomeGuideVisible: isFeatureActive('welcomeGuide'),
|
|
388
|
-
templateId: supportsTemplateMode && isViewable && canViewTemplate && !isEditingTemplate ? getEditedPostTemplateId() : null
|
|
378
|
+
templateId: supportsTemplateMode && isViewable && canViewTemplate && !isEditingTemplate ? getEditedPostTemplateId() : null,
|
|
379
|
+
enablePaddingAppender: __unstableGetEditorMode() !== 'zoom-out' && isRenderingPostOnly && !DESIGN_POST_TYPES.includes(currentPostType)
|
|
389
380
|
};
|
|
390
381
|
}, [currentPostType, isEditingTemplate, settings.supportsTemplateMode]);
|
|
382
|
+
const [paddingAppenderRef, paddingStyle] = usePaddingAppender(enablePaddingAppender);
|
|
391
383
|
|
|
392
384
|
// Set the right context for the command palette
|
|
393
385
|
const commandContext = hasBlockSelected ? 'block-selection-edit' : 'entity-edit';
|
|
@@ -398,7 +390,7 @@ function Layout({
|
|
|
398
390
|
onNavigateToPreviousEntityRecord,
|
|
399
391
|
defaultRenderingMode: 'post-only'
|
|
400
392
|
}), [settings, onNavigateToEntityRecord, onNavigateToPreviousEntityRecord]);
|
|
401
|
-
const styles = useEditorStyles();
|
|
393
|
+
const styles = useEditorStyles(paddingStyle);
|
|
402
394
|
|
|
403
395
|
// We need to add the show-icon-labels class to the body element so it is applied to modals.
|
|
404
396
|
if (showIconLabels) {
|
|
@@ -411,7 +403,7 @@ function Layout({
|
|
|
411
403
|
'has-metaboxes': hasActiveMetaboxes
|
|
412
404
|
});
|
|
413
405
|
function onPluginAreaError(name) {
|
|
414
|
-
createErrorNotice(sprintf(
|
|
406
|
+
createErrorNotice(sprintf(/* translators: %s: plugin name */
|
|
415
407
|
__('The "%s" plugin has encountered an error and cannot be rendered.'), name));
|
|
416
408
|
}
|
|
417
409
|
const {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["clsx","AutosaveMonitor","LocalAutosaveMonitor","UnsavedChangesWarning","EditorKeyboardShortcutsRegister","EditorSnackbars","ErrorBoundary","PostLockedModal","store","editorStore","privateApis","editorPrivateApis","useSelect","useDispatch","blockEditorPrivateApis","blockEditorStore","PluginArea","__","sprintf","useCallback","useMemo","useId","useRef","useState","chevronDown","chevronUp","noticesStore","preferencesStore","CommandMenu","commandsPrivateApis","coreCommandsPrivateApis","blockLibraryPrivateApis","addQueryArgs","decodeEntities","coreStore","Icon","ResizableBox","SlotFillProvider","Tooltip","VisuallyHidden","__unstableUseNavigateRegions","useNavigateRegions","useMediaQuery","useRefEffect","useViewportMatch","BackButton","EditorInitialization","EditPostKeyboardShortcuts","InitPatternModal","BrowserURL","MetaBoxes","PostEditorMoreMenu","WelcomeGuide","editPostStore","unlock","useEditPostCommands","usePaddingAppender","useShouldIframe","useNavigateToEntityRecord","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","getLayoutStyles","useCommands","useCommandContext","Editor","FullscreenMode","NavigableRegion","BlockKeyboardShortcuts","DESIGN_POST_TYPES","useEditorStyles","hasThemeStyleSupport","editorSettings","isZoomedOutView","renderingMode","postType","select","__unstableGetEditorMode","getCurrentPostType","getRenderingMode","_postType","isFeatureActive","getEditorSettings","_editorSettings$style","_editorSettings$defau","_editorSettings$style2","_editorSettings$style3","presetStyles","styles","filter","style","__unstableType","defaultEditorStyles","hasThemeStyles","length","disableLayoutStyles","push","css","selector","hasBlockGapSupport","hasFallbackGapSupport","fallbackGapValue","baseStyles","includes","MetaBoxesMain","isLegacy","isOpen","openHeight","hasAnyVisible","get","isMetaBoxLocationVisible","set","setPreference","metaBoxesMainRef","isShort","min","max","setHeightConstraints","effectSizeConstraints","node","container","closest","noticeLists","querySelectorAll","resizeHandle","querySelector","deriveConstraints","fullHeight","offsetHeight","nextMax","element","nextMin","observer","window","ResizeObserver","observe","disconnect","separatorRef","separatorHelpId","isUntouched","setIsUntouched","applyHeight","candidateHeight","isPersistent","isInstant","nextHeight","Math","current","ariaValueNow","getAriaValueNow","updateSize","height","width","contents","className","hidden","children","location","isAutoHeight","undefined","usedMax","round","usedAriaValueNow","toggle","onSeparatorKeyDown","event","delta","ArrowUp","ArrowDown","key","pane","resizable","fromHeight","preventDefault","paneLabel","Pane","paneProps","as","ref","defaultSize","minHeight","maxHeight","enable","top","right","bottom","left","topLeft","topRight","bottomRight","bottomLeft","handleClasses","handleComponent","text","role","onKeyDown","id","onPointerDown","pointerId","target","setPointerCapture","onResizeStart","direction","elementRef","onResize","state","onResizeStop","onClick","icon","Layout","postId","initialPostId","initialPostType","settings","initialEdits","paddingAppenderRef","shouldIframe","createErrorNotice","currentPost","currentPostId","currentPostType","onNavigateToEntityRecord","onNavigateToPreviousEntityRecord","isEditingTemplate","mode","isFullscreenActive","hasActiveMetaboxes","hasBlockSelected","showIconLabels","isDistractionFree","showMetaBoxes","hasHistory","isWelcomeGuideVisible","templateId","_getPostType$viewable","getEditedPostTemplateId","canUser","getPostType","supportsTemplateMode","isViewable","viewable","canViewTemplate","kind","name","getEditorMode","hasMetaBoxes","getBlockSelectionStart","commandContext","defaultRenderingMode","document","body","classList","add","remove","navigateRegionsProps","onPluginAreaError","createSuccessNotice","onActionPerformed","actionId","items","href","trashed","post_type","type","ids","newItem","title","rendered","actions","label","post","action","initialPost","backButton","forceIsDirty","contentRef","disableIframe","autoFocus","extraSidebarPanels","extraContent","isActive","onError"],"sources":["@wordpress/edit-post/src/components/layout/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tAutosaveMonitor,\n\tLocalAutosaveMonitor,\n\tUnsavedChangesWarning,\n\tEditorKeyboardShortcutsRegister,\n\tEditorSnackbars,\n\tErrorBoundary,\n\tPostLockedModal,\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { PluginArea } from '@wordpress/plugins';\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\tuseCallback,\n\tuseMemo,\n\tuseId,\n\tuseRef,\n\tuseState,\n} from '@wordpress/element';\nimport { chevronDown, chevronUp } from '@wordpress/icons';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tCommandMenu,\n\tprivateApis as commandsPrivateApis,\n} from '@wordpress/commands';\nimport { privateApis as coreCommandsPrivateApis } from '@wordpress/core-commands';\nimport { privateApis as blockLibraryPrivateApis } from '@wordpress/block-library';\nimport { addQueryArgs } from '@wordpress/url';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { store as coreStore } from '@wordpress/core-data';\nimport {\n\tIcon,\n\tResizableBox,\n\tSlotFillProvider,\n\tTooltip,\n\tVisuallyHidden,\n\t__unstableUseNavigateRegions as useNavigateRegions,\n} from '@wordpress/components';\nimport {\n\tuseMediaQuery,\n\tuseRefEffect,\n\tuseViewportMatch,\n} from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BackButton from '../back-button';\nimport EditorInitialization from '../editor-initialization';\nimport EditPostKeyboardShortcuts from '../keyboard-shortcuts';\nimport InitPatternModal from '../init-pattern-modal';\nimport BrowserURL from '../browser-url';\nimport MetaBoxes from '../meta-boxes';\nimport PostEditorMoreMenu from '../more-menu';\nimport WelcomeGuide from '../welcome-guide';\nimport { store as editPostStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport useEditPostCommands from '../../commands/use-commands';\nimport { usePaddingAppender } from './use-padding-appender';\nimport { useShouldIframe } from './use-should-iframe';\nimport useNavigateToEntityRecord from '../../hooks/use-navigate-to-entity-record';\n\nconst { getLayoutStyles } = unlock( blockEditorPrivateApis );\nconst { useCommands } = unlock( coreCommandsPrivateApis );\nconst { useCommandContext } = unlock( commandsPrivateApis );\nconst { Editor, FullscreenMode, NavigableRegion } = unlock( editorPrivateApis );\nconst { BlockKeyboardShortcuts } = unlock( blockLibraryPrivateApis );\nconst DESIGN_POST_TYPES = [\n\t'wp_template',\n\t'wp_template_part',\n\t'wp_block',\n\t'wp_navigation',\n];\n\nfunction useEditorStyles() {\n\tconst {\n\t\thasThemeStyleSupport,\n\t\teditorSettings,\n\t\tisZoomedOutView,\n\t\trenderingMode,\n\t\tpostType,\n\t} = useSelect( ( select ) => {\n\t\tconst { __unstableGetEditorMode } = select( blockEditorStore );\n\t\tconst { getCurrentPostType, getRenderingMode } = select( editorStore );\n\t\tconst _postType = getCurrentPostType();\n\t\treturn {\n\t\t\thasThemeStyleSupport:\n\t\t\t\tselect( editPostStore ).isFeatureActive( 'themeStyles' ),\n\t\t\teditorSettings: select( editorStore ).getEditorSettings(),\n\t\t\tisZoomedOutView: __unstableGetEditorMode() === 'zoom-out',\n\t\t\trenderingMode: getRenderingMode(),\n\t\t\tpostType: _postType,\n\t\t};\n\t}, [] );\n\n\t// Compute the default styles.\n\treturn useMemo( () => {\n\t\tconst presetStyles =\n\t\t\teditorSettings.styles?.filter(\n\t\t\t\t( style ) =>\n\t\t\t\t\tstyle.__unstableType && style.__unstableType !== 'theme'\n\t\t\t) ?? [];\n\n\t\tconst defaultEditorStyles = [\n\t\t\t...( editorSettings?.defaultEditorStyles ?? [] ),\n\t\t\t...presetStyles,\n\t\t];\n\n\t\t// Has theme styles if the theme supports them and if some styles were not preset styles (in which case they're theme styles).\n\t\tconst hasThemeStyles =\n\t\t\thasThemeStyleSupport &&\n\t\t\tpresetStyles.length !== ( editorSettings.styles?.length ?? 0 );\n\n\t\t// If theme styles are not present or displayed, ensure that\n\t\t// base layout styles are still present in the editor.\n\t\tif ( ! editorSettings.disableLayoutStyles && ! hasThemeStyles ) {\n\t\t\tdefaultEditorStyles.push( {\n\t\t\t\tcss: getLayoutStyles( {\n\t\t\t\t\tstyle: {},\n\t\t\t\t\tselector: 'body',\n\t\t\t\t\thasBlockGapSupport: false,\n\t\t\t\t\thasFallbackGapSupport: true,\n\t\t\t\t\tfallbackGapValue: '0.5em',\n\t\t\t\t} ),\n\t\t\t} );\n\t\t}\n\n\t\tconst baseStyles = hasThemeStyles\n\t\t\t? editorSettings.styles ?? []\n\t\t\t: defaultEditorStyles;\n\n\t\t// Add a space for the typewriter effect. When typing in the last block,\n\t\t// there needs to be room to scroll up.\n\t\tif (\n\t\t\t! isZoomedOutView &&\n\t\t\trenderingMode === 'post-only' &&\n\t\t\t! DESIGN_POST_TYPES.includes( postType )\n\t\t) {\n\t\t\treturn [\n\t\t\t\t...baseStyles,\n\t\t\t\t{\n\t\t\t\t\tcss: ':root :where(.editor-styles-wrapper)::after {content: \"\"; display: block; height: 40vh;}',\n\t\t\t\t},\n\t\t\t];\n\t\t}\n\n\t\treturn baseStyles;\n\t}, [\n\t\teditorSettings.defaultEditorStyles,\n\t\teditorSettings.disableLayoutStyles,\n\t\teditorSettings.styles,\n\t\thasThemeStyleSupport,\n\t\tpostType,\n\t] );\n}\n\n/**\n * @param {Object} props\n * @param {boolean} props.isLegacy True when the editor canvas is not in an iframe.\n */\nfunction MetaBoxesMain( { isLegacy } ) {\n\tconst [ isOpen, openHeight, hasAnyVisible ] = useSelect( ( select ) => {\n\t\tconst { get } = select( preferencesStore );\n\t\tconst { isMetaBoxLocationVisible } = select( editPostStore );\n\t\treturn [\n\t\t\tget( 'core/edit-post', 'metaBoxesMainIsOpen' ),\n\t\t\tget( 'core/edit-post', 'metaBoxesMainOpenHeight' ),\n\t\t\tisMetaBoxLocationVisible( 'normal' ) ||\n\t\t\t\tisMetaBoxLocationVisible( 'advanced' ) ||\n\t\t\t\tisMetaBoxLocationVisible( 'side' ),\n\t\t];\n\t}, [] );\n\tconst { set: setPreference } = useDispatch( preferencesStore );\n\tconst metaBoxesMainRef = useRef();\n\tconst isShort = useMediaQuery( '(max-height: 549px)' );\n\n\tconst [ { min, max }, setHeightConstraints ] = useState( () => ( {} ) );\n\t// Keeps the resizable area’s size constraints updated taking into account\n\t// editor notices. The constraints are also used to derive the value for the\n\t// aria-valuenow attribute on the seperator.\n\tconst effectSizeConstraints = useRefEffect( ( node ) => {\n\t\tconst container = node.closest(\n\t\t\t'.interface-interface-skeleton__content'\n\t\t);\n\t\tconst noticeLists = container.querySelectorAll(\n\t\t\t':scope > .components-notice-list'\n\t\t);\n\t\tconst resizeHandle = container.querySelector(\n\t\t\t'.edit-post-meta-boxes-main__presenter'\n\t\t);\n\t\tconst deriveConstraints = () => {\n\t\t\tconst fullHeight = container.offsetHeight;\n\t\t\tlet nextMax = fullHeight;\n\t\t\tfor ( const element of noticeLists ) {\n\t\t\t\tnextMax -= element.offsetHeight;\n\t\t\t}\n\t\t\tconst nextMin = resizeHandle.offsetHeight;\n\t\t\tsetHeightConstraints( { min: nextMin, max: nextMax } );\n\t\t};\n\t\tconst observer = new window.ResizeObserver( deriveConstraints );\n\t\tobserver.observe( container );\n\t\tfor ( const element of noticeLists ) {\n\t\t\tobserver.observe( element );\n\t\t}\n\t\treturn () => observer.disconnect();\n\t}, [] );\n\n\tconst separatorRef = useRef();\n\tconst separatorHelpId = useId();\n\n\tconst [ isUntouched, setIsUntouched ] = useState( true );\n\tconst applyHeight = ( candidateHeight, isPersistent, isInstant ) => {\n\t\tconst nextHeight = Math.min( max, Math.max( min, candidateHeight ) );\n\t\tif ( isPersistent ) {\n\t\t\tsetPreference(\n\t\t\t\t'core/edit-post',\n\t\t\t\t'metaBoxesMainOpenHeight',\n\t\t\t\tnextHeight\n\t\t\t);\n\t\t} else {\n\t\t\tseparatorRef.current.ariaValueNow = getAriaValueNow( nextHeight );\n\t\t}\n\t\tif ( isInstant ) {\n\t\t\tmetaBoxesMainRef.current.updateSize( {\n\t\t\t\theight: nextHeight,\n\t\t\t\t// Oddly, when the event that triggered this was not from the mouse (e.g. keydown),\n\t\t\t\t// if `width` is left unspecified a subsequent drag gesture applies a fixed\n\t\t\t\t// width and the pane fails to widen/narrow with parent width changes from\n\t\t\t\t// sidebars opening/closing or window resizes.\n\t\t\t\twidth: 'auto',\n\t\t\t} );\n\t\t}\n\t};\n\n\tif ( ! hasAnyVisible ) {\n\t\treturn;\n\t}\n\n\tconst contents = (\n\t\t<div\n\t\t\tclassName={ clsx(\n\t\t\t\t// The class name 'edit-post-layout__metaboxes' is retained because some plugins use it.\n\t\t\t\t'edit-post-layout__metaboxes',\n\t\t\t\t! isLegacy && 'edit-post-meta-boxes-main__liner'\n\t\t\t) }\n\t\t\thidden={ ! isLegacy && isShort && ! isOpen }\n\t\t>\n\t\t\t<MetaBoxes location=\"normal\" />\n\t\t\t<MetaBoxes location=\"advanced\" />\n\t\t</div>\n\t);\n\n\tif ( isLegacy ) {\n\t\treturn contents;\n\t}\n\n\tconst isAutoHeight = openHeight === undefined;\n\tlet usedMax = '50%'; // Approximation before max has a value.\n\tif ( max !== undefined ) {\n\t\t// Halves the available max height until a user height is set.\n\t\tusedMax = isAutoHeight && isUntouched ? max / 2 : max;\n\t}\n\n\tconst getAriaValueNow = ( height ) =>\n\t\tMath.round( ( ( height - min ) / ( max - min ) ) * 100 );\n\tconst usedAriaValueNow =\n\t\tmax === undefined || isAutoHeight ? 50 : getAriaValueNow( openHeight );\n\n\tconst toggle = () =>\n\t\tsetPreference( 'core/edit-post', 'metaBoxesMainIsOpen', ! isOpen );\n\n\t// TODO: Support more/all keyboard interactions from the window splitter pattern:\n\t// https://www.w3.org/WAI/ARIA/apg/patterns/windowsplitter/\n\tconst onSeparatorKeyDown = ( event ) => {\n\t\tconst delta = { ArrowUp: 20, ArrowDown: -20 }[ event.key ];\n\t\tif ( delta ) {\n\t\t\tconst pane = metaBoxesMainRef.current.resizable;\n\t\t\tconst fromHeight = isAutoHeight ? pane.offsetHeight : openHeight;\n\t\t\tconst nextHeight = delta + fromHeight;\n\t\t\tapplyHeight( nextHeight, true, true );\n\t\t\tevent.preventDefault();\n\t\t}\n\t};\n\tconst className = 'edit-post-meta-boxes-main';\n\tconst paneLabel = __( 'Meta Boxes' );\n\tlet Pane, paneProps;\n\tif ( isShort ) {\n\t\tPane = NavigableRegion;\n\t\tpaneProps = {\n\t\t\tclassName: clsx( className, 'is-toggle-only' ),\n\t\t};\n\t} else {\n\t\tPane = ResizableBox;\n\t\tpaneProps = /** @type {Parameters<typeof ResizableBox>[0]} */ ( {\n\t\t\tas: NavigableRegion,\n\t\t\tref: metaBoxesMainRef,\n\t\t\tclassName: clsx( className, 'is-resizable' ),\n\t\t\tdefaultSize: { height: openHeight },\n\t\t\tminHeight: min,\n\t\t\tmaxHeight: usedMax,\n\t\t\tenable: {\n\t\t\t\ttop: true,\n\t\t\t\tright: false,\n\t\t\t\tbottom: false,\n\t\t\t\tleft: false,\n\t\t\t\ttopLeft: false,\n\t\t\t\ttopRight: false,\n\t\t\t\tbottomRight: false,\n\t\t\t\tbottomLeft: false,\n\t\t\t},\n\t\t\thandleClasses: { top: 'edit-post-meta-boxes-main__presenter' },\n\t\t\thandleComponent: {\n\t\t\t\ttop: (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<Tooltip text={ __( 'Drag to resize' ) }>\n\t\t\t\t\t\t\t<button // eslint-disable-line jsx-a11y/role-supports-aria-props\n\t\t\t\t\t\t\t\tref={ separatorRef }\n\t\t\t\t\t\t\t\trole=\"separator\" // eslint-disable-line jsx-a11y/no-interactive-element-to-noninteractive-role\n\t\t\t\t\t\t\t\taria-valuenow={ usedAriaValueNow }\n\t\t\t\t\t\t\t\taria-label={ __( 'Drag to resize' ) }\n\t\t\t\t\t\t\t\taria-describedby={ separatorHelpId }\n\t\t\t\t\t\t\t\tonKeyDown={ onSeparatorKeyDown }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t<VisuallyHidden id={ separatorHelpId }>\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'Use up and down arrow keys to resize the metabox pane.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t</>\n\t\t\t\t),\n\t\t\t},\n\t\t\t// Avoids hiccups while dragging over objects like iframes and ensures that\n\t\t\t// the event to end the drag is captured by the target (resize handle)\n\t\t\t// whether or not it’s under the pointer.\n\t\t\tonPointerDown: ( { pointerId, target } ) => {\n\t\t\t\ttarget.setPointerCapture( pointerId );\n\t\t\t},\n\t\t\tonResizeStart: ( event, direction, elementRef ) => {\n\t\t\t\tif ( isAutoHeight ) {\n\t\t\t\t\t// Sets the starting height to avoid visual jumps in height and\n\t\t\t\t\t// aria-valuenow being `NaN` for the first (few) resize events.\n\t\t\t\t\tapplyHeight( elementRef.offsetHeight, false, true );\n\t\t\t\t\tsetIsUntouched( false );\n\t\t\t\t}\n\t\t\t},\n\t\t\tonResize: () =>\n\t\t\t\tapplyHeight( metaBoxesMainRef.current.state.height ),\n\t\t\tonResizeStop: () =>\n\t\t\t\tapplyHeight( metaBoxesMainRef.current.state.height, true ),\n\t\t} );\n\t}\n\n\treturn (\n\t\t<Pane aria-label={ paneLabel } { ...paneProps }>\n\t\t\t{ isShort ? (\n\t\t\t\t<button\n\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\tclassName=\"edit-post-meta-boxes-main__presenter\"\n\t\t\t\t\tonClick={ toggle }\n\t\t\t\t>\n\t\t\t\t\t{ paneLabel }\n\t\t\t\t\t<Icon icon={ isOpen ? chevronUp : chevronDown } />\n\t\t\t\t</button>\n\t\t\t) : (\n\t\t\t\t<meta ref={ effectSizeConstraints } />\n\t\t\t) }\n\t\t\t{ contents }\n\t\t</Pane>\n\t);\n}\n\nfunction Layout( {\n\tpostId: initialPostId,\n\tpostType: initialPostType,\n\tsettings,\n\tinitialEdits,\n} ) {\n\tuseCommands();\n\tuseEditPostCommands();\n\tconst paddingAppenderRef = usePaddingAppender();\n\tconst shouldIframe = useShouldIframe();\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\tconst {\n\t\tcurrentPost: { postId: currentPostId, postType: currentPostType },\n\t\tonNavigateToEntityRecord,\n\t\tonNavigateToPreviousEntityRecord,\n\t} = useNavigateToEntityRecord(\n\t\tinitialPostId,\n\t\tinitialPostType,\n\t\t'post-only'\n\t);\n\tconst isEditingTemplate = currentPostType === 'wp_template';\n\tconst {\n\t\tmode,\n\t\tisFullscreenActive,\n\t\thasActiveMetaboxes,\n\t\thasBlockSelected,\n\t\tshowIconLabels,\n\t\tisDistractionFree,\n\t\tshowMetaBoxes,\n\t\thasHistory,\n\t\tisWelcomeGuideVisible,\n\t\ttemplateId,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst { get } = select( preferencesStore );\n\t\t\tconst { isFeatureActive, getEditedPostTemplateId } = unlock(\n\t\t\t\tselect( editPostStore )\n\t\t\t);\n\t\t\tconst { canUser, getPostType } = select( coreStore );\n\n\t\t\tconst supportsTemplateMode = settings.supportsTemplateMode;\n\t\t\tconst isViewable =\n\t\t\t\tgetPostType( currentPostType )?.viewable ?? false;\n\t\t\tconst canViewTemplate = canUser( 'read', {\n\t\t\t\tkind: 'postType',\n\t\t\t\tname: 'wp_template',\n\t\t\t} );\n\n\t\t\treturn {\n\t\t\t\tmode: select( editorStore ).getEditorMode(),\n\t\t\t\tisFullscreenActive:\n\t\t\t\t\tselect( editPostStore ).isFeatureActive( 'fullscreenMode' ),\n\t\t\t\thasActiveMetaboxes: select( editPostStore ).hasMetaBoxes(),\n\t\t\t\thasBlockSelected:\n\t\t\t\t\t!! select( blockEditorStore ).getBlockSelectionStart(),\n\t\t\t\tshowIconLabels: get( 'core', 'showIconLabels' ),\n\t\t\t\tisDistractionFree: get( 'core', 'distractionFree' ),\n\t\t\t\tshowMetaBoxes:\n\t\t\t\t\t! DESIGN_POST_TYPES.includes( currentPostType ) &&\n\t\t\t\t\tselect( editorStore ).getRenderingMode() === 'post-only',\n\t\t\t\tisWelcomeGuideVisible: isFeatureActive( 'welcomeGuide' ),\n\t\t\t\ttemplateId:\n\t\t\t\t\tsupportsTemplateMode &&\n\t\t\t\t\tisViewable &&\n\t\t\t\t\tcanViewTemplate &&\n\t\t\t\t\t! isEditingTemplate\n\t\t\t\t\t\t? getEditedPostTemplateId()\n\t\t\t\t\t\t: null,\n\t\t\t};\n\t\t},\n\t\t[ currentPostType, isEditingTemplate, settings.supportsTemplateMode ]\n\t);\n\n\t// Set the right context for the command palette\n\tconst commandContext = hasBlockSelected\n\t\t? 'block-selection-edit'\n\t\t: 'entity-edit';\n\tuseCommandContext( commandContext );\n\tconst editorSettings = useMemo(\n\t\t() => ( {\n\t\t\t...settings,\n\t\t\tonNavigateToEntityRecord,\n\t\t\tonNavigateToPreviousEntityRecord,\n\t\t\tdefaultRenderingMode: 'post-only',\n\t\t} ),\n\t\t[ settings, onNavigateToEntityRecord, onNavigateToPreviousEntityRecord ]\n\t);\n\tconst styles = useEditorStyles();\n\n\t// We need to add the show-icon-labels class to the body element so it is applied to modals.\n\tif ( showIconLabels ) {\n\t\tdocument.body.classList.add( 'show-icon-labels' );\n\t} else {\n\t\tdocument.body.classList.remove( 'show-icon-labels' );\n\t}\n\n\tconst navigateRegionsProps = useNavigateRegions();\n\n\tconst className = clsx( 'edit-post-layout', 'is-mode-' + mode, {\n\t\t'has-metaboxes': hasActiveMetaboxes,\n\t} );\n\n\tfunction onPluginAreaError( name ) {\n\t\tcreateErrorNotice(\n\t\t\tsprintf(\n\t\t\t\t/* translators: %s: plugin name */\n\t\t\t\t__(\n\t\t\t\t\t'The \"%s\" plugin has encountered an error and cannot be rendered.'\n\t\t\t\t),\n\t\t\t\tname\n\t\t\t)\n\t\t);\n\t}\n\n\tconst { createSuccessNotice } = useDispatch( noticesStore );\n\n\tconst onActionPerformed = useCallback(\n\t\t( actionId, items ) => {\n\t\t\tswitch ( actionId ) {\n\t\t\t\tcase 'move-to-trash':\n\t\t\t\t\t{\n\t\t\t\t\t\tdocument.location.href = addQueryArgs( 'edit.php', {\n\t\t\t\t\t\t\ttrashed: 1,\n\t\t\t\t\t\t\tpost_type: items[ 0 ].type,\n\t\t\t\t\t\t\tids: items[ 0 ].id,\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'duplicate-post':\n\t\t\t\t\t{\n\t\t\t\t\t\tconst newItem = items[ 0 ];\n\t\t\t\t\t\tconst title =\n\t\t\t\t\t\t\ttypeof newItem.title === 'string'\n\t\t\t\t\t\t\t\t? newItem.title\n\t\t\t\t\t\t\t\t: newItem.title?.rendered;\n\t\t\t\t\t\tcreateSuccessNotice(\n\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t// translators: %s: Title of the created post e.g: \"Post 1\".\n\t\t\t\t\t\t\t\t__( '\"%s\" successfully created.' ),\n\t\t\t\t\t\t\t\tdecodeEntities( title )\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t\t\t\tid: 'duplicate-post-action',\n\t\t\t\t\t\t\t\tactions: [\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tlabel: __( 'Edit' ),\n\t\t\t\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\t\t\t\tconst postId = newItem.id;\n\t\t\t\t\t\t\t\t\t\t\tdocument.location.href =\n\t\t\t\t\t\t\t\t\t\t\t\taddQueryArgs( 'post.php', {\n\t\t\t\t\t\t\t\t\t\t\t\t\tpost: postId,\n\t\t\t\t\t\t\t\t\t\t\t\t\taction: 'edit',\n\t\t\t\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t},\n\t\t[ createSuccessNotice ]\n\t);\n\n\tconst initialPost = useMemo( () => {\n\t\treturn {\n\t\t\ttype: initialPostType,\n\t\t\tid: initialPostId,\n\t\t};\n\t}, [ initialPostType, initialPostId ] );\n\n\tconst backButton =\n\t\tuseViewportMatch( 'medium' ) && isFullscreenActive ? (\n\t\t\t<BackButton initialPost={ initialPost } />\n\t\t) : null;\n\n\treturn (\n\t\t<SlotFillProvider>\n\t\t\t<ErrorBoundary>\n\t\t\t\t<CommandMenu />\n\t\t\t\t<WelcomeGuide postType={ currentPostType } />\n\t\t\t\t<div\n\t\t\t\t\tclassName={ navigateRegionsProps.className }\n\t\t\t\t\t{ ...navigateRegionsProps }\n\t\t\t\t\tref={ navigateRegionsProps.ref }\n\t\t\t\t>\n\t\t\t\t\t<Editor\n\t\t\t\t\t\tsettings={ editorSettings }\n\t\t\t\t\t\tinitialEdits={ initialEdits }\n\t\t\t\t\t\tpostType={ currentPostType }\n\t\t\t\t\t\tpostId={ currentPostId }\n\t\t\t\t\t\ttemplateId={ templateId }\n\t\t\t\t\t\tclassName={ className }\n\t\t\t\t\t\tstyles={ styles }\n\t\t\t\t\t\tforceIsDirty={ hasActiveMetaboxes }\n\t\t\t\t\t\tcontentRef={ paddingAppenderRef }\n\t\t\t\t\t\tdisableIframe={ ! shouldIframe }\n\t\t\t\t\t\t// We should auto-focus the canvas (title) on load.\n\t\t\t\t\t\t// eslint-disable-next-line jsx-a11y/no-autofocus\n\t\t\t\t\t\tautoFocus={ ! isWelcomeGuideVisible }\n\t\t\t\t\t\tonActionPerformed={ onActionPerformed }\n\t\t\t\t\t\textraSidebarPanels={\n\t\t\t\t\t\t\tshowMetaBoxes && <MetaBoxes location=\"side\" />\n\t\t\t\t\t\t}\n\t\t\t\t\t\textraContent={\n\t\t\t\t\t\t\t! isDistractionFree &&\n\t\t\t\t\t\t\tshowMetaBoxes && (\n\t\t\t\t\t\t\t\t<MetaBoxesMain isLegacy={ ! shouldIframe } />\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t<PostLockedModal />\n\t\t\t\t\t\t<EditorInitialization />\n\t\t\t\t\t\t<FullscreenMode isActive={ isFullscreenActive } />\n\t\t\t\t\t\t<BrowserURL hasHistory={ hasHistory } />\n\t\t\t\t\t\t<UnsavedChangesWarning />\n\t\t\t\t\t\t<AutosaveMonitor />\n\t\t\t\t\t\t<LocalAutosaveMonitor />\n\t\t\t\t\t\t<EditPostKeyboardShortcuts />\n\t\t\t\t\t\t<EditorKeyboardShortcutsRegister />\n\t\t\t\t\t\t<BlockKeyboardShortcuts />\n\t\t\t\t\t\t<InitPatternModal />\n\t\t\t\t\t\t<PluginArea onError={ onPluginAreaError } />\n\t\t\t\t\t\t<PostEditorMoreMenu />\n\t\t\t\t\t\t{ backButton }\n\t\t\t\t\t\t<EditorSnackbars />\n\t\t\t\t\t</Editor>\n\t\t\t\t</div>\n\t\t\t</ErrorBoundary>\n\t\t</SlotFillProvider>\n\t);\n}\n\nexport default Layout;\n"],"mappings":"AAAA;AACA;AACA;AACA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;UAClB;UACA;UAAA;UACA6D,SAAS,EAAG,CAAE7C,qBAAuB;UACrCyB,iBAAiB,EAAGA,iBAAmB;UACvCqB,kBAAkB,EACjBhD,aAAa,iBAAI7K,IAAA,CAACV,SAAS;YAAC8G,QAAQ,EAAC;UAAM,CAAE,CAC7C;UACD0H,YAAY,EACX,CAAElD,iBAAiB,IACnBC,aAAa,iBACZ7K,IAAA,CAAC+C,aAAa;YAACC,QAAQ,EAAG,CAAE+G;UAAc,CAAE,CAE7C;UAAA5D,QAAA,gBAEDnG,IAAA,CAACrD,eAAe,IAAE,CAAC,eACnBqD,IAAA,CAACd,oBAAoB,IAAE,CAAC,eACxBc,IAAA,CAACS,cAAc;YAACsN,QAAQ,EAAGvD;UAAoB,CAAE,CAAC,eAClDxK,IAAA,CAACX,UAAU;YAACyL,UAAU,EAAGA;UAAY,CAAE,CAAC,eACxC9K,IAAA,CAACzD,qBAAqB,IAAE,CAAC,eACzByD,IAAA,CAAC3D,eAAe,IAAE,CAAC,eACnB2D,IAAA,CAAC1D,oBAAoB,IAAE,CAAC,eACxB0D,IAAA,CAACb,yBAAyB,IAAE,CAAC,eAC7Ba,IAAA,CAACxD,+BAA+B,IAAE,CAAC,eACnCwD,IAAA,CAACW,sBAAsB,IAAE,CAAC,eAC1BX,IAAA,CAACZ,gBAAgB,IAAE,CAAC,eACpBY,IAAA,CAAC5C,UAAU;YAAC4Q,OAAO,EAAG1B;UAAmB,CAAE,CAAC,eAC5CtM,IAAA,CAACT,kBAAkB,IAAE,CAAC,EACpBiO,UAAU,eACZxN,IAAA,CAACvD,eAAe,IAAE,CAAC;QAAA,CACZ;MAAC,CACL,CAAC;IAAA,CACQ;EAAC,CACC,CAAC;AAErB;AAEA,eAAe+M,MAAM","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["clsx","AutosaveMonitor","LocalAutosaveMonitor","UnsavedChangesWarning","EditorKeyboardShortcutsRegister","EditorSnackbars","ErrorBoundary","PostLockedModal","store","editorStore","privateApis","editorPrivateApis","useSelect","useDispatch","blockEditorPrivateApis","blockEditorStore","PluginArea","__","sprintf","useCallback","useMemo","useId","useRef","useState","chevronDown","chevronUp","noticesStore","preferencesStore","CommandMenu","commandsPrivateApis","coreCommandsPrivateApis","blockLibraryPrivateApis","addQueryArgs","decodeEntities","coreStore","Icon","ResizableBox","SlotFillProvider","Tooltip","VisuallyHidden","__unstableUseNavigateRegions","useNavigateRegions","useMediaQuery","useRefEffect","useViewportMatch","BackButton","EditorInitialization","EditPostKeyboardShortcuts","InitPatternModal","BrowserURL","MetaBoxes","PostEditorMoreMenu","WelcomeGuide","editPostStore","unlock","useEditPostCommands","usePaddingAppender","useShouldIframe","useNavigateToEntityRecord","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","getLayoutStyles","useCommands","useCommandContext","Editor","FullscreenMode","NavigableRegion","BlockKeyboardShortcuts","DESIGN_POST_TYPES","useEditorStyles","additionalStyles","hasThemeStyleSupport","editorSettings","select","isFeatureActive","getEditorSettings","addedStyles","join","_editorSettings$style","_editorSettings$defau","_editorSettings$style2","_editorSettings$style3","presetStyles","styles","filter","style","__unstableType","defaultEditorStyles","hasThemeStyles","length","disableLayoutStyles","push","css","selector","hasBlockGapSupport","hasFallbackGapSupport","fallbackGapValue","baseStyles","MetaBoxesMain","isLegacy","isOpen","openHeight","hasAnyVisible","get","isMetaBoxLocationVisible","set","setPreference","metaBoxesMainRef","isShort","min","max","setHeightConstraints","effectSizeConstraints","node","container","closest","noticeLists","querySelectorAll","resizeHandle","querySelector","deriveConstraints","fullHeight","offsetHeight","nextMax","element","nextMin","observer","window","ResizeObserver","observe","disconnect","separatorRef","separatorHelpId","isUntouched","setIsUntouched","applyHeight","candidateHeight","isPersistent","isInstant","nextHeight","Math","current","ariaValueNow","getAriaValueNow","updateSize","height","width","contents","className","hidden","children","location","isAutoHeight","undefined","usedMax","round","usedAriaValueNow","toggle","onSeparatorKeyDown","event","delta","ArrowUp","ArrowDown","key","pane","resizable","fromHeight","preventDefault","paneLabel","Pane","paneProps","as","ref","defaultSize","minHeight","maxHeight","enable","top","right","bottom","left","topLeft","topRight","bottomRight","bottomLeft","handleClasses","handleComponent","text","role","onKeyDown","id","onPointerDown","pointerId","target","setPointerCapture","onResizeStart","direction","elementRef","onResize","state","onResizeStop","onClick","icon","Layout","postId","initialPostId","postType","initialPostType","settings","initialEdits","shouldIframe","createErrorNotice","currentPost","currentPostId","currentPostType","onNavigateToEntityRecord","onNavigateToPreviousEntityRecord","isEditingTemplate","mode","isFullscreenActive","hasActiveMetaboxes","hasBlockSelected","showIconLabels","isDistractionFree","showMetaBoxes","hasHistory","isWelcomeGuideVisible","templateId","enablePaddingAppender","_getPostType$viewable","getEditedPostTemplateId","canUser","getPostType","supportsTemplateMode","isViewable","viewable","canViewTemplate","kind","name","__unstableGetEditorMode","getEditorMode","getRenderingMode","isRenderingPostOnly","hasMetaBoxes","getBlockSelectionStart","includes","paddingAppenderRef","paddingStyle","commandContext","defaultRenderingMode","document","body","classList","add","remove","navigateRegionsProps","onPluginAreaError","createSuccessNotice","onActionPerformed","actionId","items","href","trashed","post_type","type","ids","newItem","title","rendered","actions","label","post","action","initialPost","backButton","forceIsDirty","contentRef","disableIframe","autoFocus","extraSidebarPanels","extraContent","isActive","onError"],"sources":["@wordpress/edit-post/src/components/layout/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tAutosaveMonitor,\n\tLocalAutosaveMonitor,\n\tUnsavedChangesWarning,\n\tEditorKeyboardShortcutsRegister,\n\tEditorSnackbars,\n\tErrorBoundary,\n\tPostLockedModal,\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { PluginArea } from '@wordpress/plugins';\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\tuseCallback,\n\tuseMemo,\n\tuseId,\n\tuseRef,\n\tuseState,\n} from '@wordpress/element';\nimport { chevronDown, chevronUp } from '@wordpress/icons';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tCommandMenu,\n\tprivateApis as commandsPrivateApis,\n} from '@wordpress/commands';\nimport { privateApis as coreCommandsPrivateApis } from '@wordpress/core-commands';\nimport { privateApis as blockLibraryPrivateApis } from '@wordpress/block-library';\nimport { addQueryArgs } from '@wordpress/url';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { store as coreStore } from '@wordpress/core-data';\nimport {\n\tIcon,\n\tResizableBox,\n\tSlotFillProvider,\n\tTooltip,\n\tVisuallyHidden,\n\t__unstableUseNavigateRegions as useNavigateRegions,\n} from '@wordpress/components';\nimport {\n\tuseMediaQuery,\n\tuseRefEffect,\n\tuseViewportMatch,\n} from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BackButton from '../back-button';\nimport EditorInitialization from '../editor-initialization';\nimport EditPostKeyboardShortcuts from '../keyboard-shortcuts';\nimport InitPatternModal from '../init-pattern-modal';\nimport BrowserURL from '../browser-url';\nimport MetaBoxes from '../meta-boxes';\nimport PostEditorMoreMenu from '../more-menu';\nimport WelcomeGuide from '../welcome-guide';\nimport { store as editPostStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport useEditPostCommands from '../../commands/use-commands';\nimport { usePaddingAppender } from './use-padding-appender';\nimport { useShouldIframe } from './use-should-iframe';\nimport useNavigateToEntityRecord from '../../hooks/use-navigate-to-entity-record';\n\nconst { getLayoutStyles } = unlock( blockEditorPrivateApis );\nconst { useCommands } = unlock( coreCommandsPrivateApis );\nconst { useCommandContext } = unlock( commandsPrivateApis );\nconst { Editor, FullscreenMode, NavigableRegion } = unlock( editorPrivateApis );\nconst { BlockKeyboardShortcuts } = unlock( blockLibraryPrivateApis );\nconst DESIGN_POST_TYPES = [\n\t'wp_template',\n\t'wp_template_part',\n\t'wp_block',\n\t'wp_navigation',\n];\n\nfunction useEditorStyles( ...additionalStyles ) {\n\tconst { hasThemeStyleSupport, editorSettings } = useSelect( ( select ) => {\n\t\treturn {\n\t\t\thasThemeStyleSupport:\n\t\t\t\tselect( editPostStore ).isFeatureActive( 'themeStyles' ),\n\t\t\teditorSettings: select( editorStore ).getEditorSettings(),\n\t\t};\n\t}, [] );\n\n\tconst addedStyles = additionalStyles.join( '\\n' );\n\n\t// Compute the default styles.\n\treturn useMemo( () => {\n\t\tconst presetStyles =\n\t\t\teditorSettings.styles?.filter(\n\t\t\t\t( style ) =>\n\t\t\t\t\tstyle.__unstableType && style.__unstableType !== 'theme'\n\t\t\t) ?? [];\n\n\t\tconst defaultEditorStyles = [\n\t\t\t...( editorSettings?.defaultEditorStyles ?? [] ),\n\t\t\t...presetStyles,\n\t\t];\n\n\t\t// Has theme styles if the theme supports them and if some styles were not preset styles (in which case they're theme styles).\n\t\tconst hasThemeStyles =\n\t\t\thasThemeStyleSupport &&\n\t\t\tpresetStyles.length !== ( editorSettings.styles?.length ?? 0 );\n\n\t\t// If theme styles are not present or displayed, ensure that\n\t\t// base layout styles are still present in the editor.\n\t\tif ( ! editorSettings.disableLayoutStyles && ! hasThemeStyles ) {\n\t\t\tdefaultEditorStyles.push( {\n\t\t\t\tcss: getLayoutStyles( {\n\t\t\t\t\tstyle: {},\n\t\t\t\t\tselector: 'body',\n\t\t\t\t\thasBlockGapSupport: false,\n\t\t\t\t\thasFallbackGapSupport: true,\n\t\t\t\t\tfallbackGapValue: '0.5em',\n\t\t\t\t} ),\n\t\t\t} );\n\t\t}\n\n\t\tconst baseStyles = hasThemeStyles\n\t\t\t? editorSettings.styles ?? []\n\t\t\t: defaultEditorStyles;\n\n\t\tif ( addedStyles ) {\n\t\t\treturn [ ...baseStyles, { css: addedStyles } ];\n\t\t}\n\n\t\treturn baseStyles;\n\t}, [\n\t\teditorSettings.defaultEditorStyles,\n\t\teditorSettings.disableLayoutStyles,\n\t\teditorSettings.styles,\n\t\thasThemeStyleSupport,\n\t\taddedStyles,\n\t] );\n}\n\n/**\n * @param {Object} props\n * @param {boolean} props.isLegacy True when the editor canvas is not in an iframe.\n */\nfunction MetaBoxesMain( { isLegacy } ) {\n\tconst [ isOpen, openHeight, hasAnyVisible ] = useSelect( ( select ) => {\n\t\tconst { get } = select( preferencesStore );\n\t\tconst { isMetaBoxLocationVisible } = select( editPostStore );\n\t\treturn [\n\t\t\tget( 'core/edit-post', 'metaBoxesMainIsOpen' ),\n\t\t\tget( 'core/edit-post', 'metaBoxesMainOpenHeight' ),\n\t\t\tisMetaBoxLocationVisible( 'normal' ) ||\n\t\t\t\tisMetaBoxLocationVisible( 'advanced' ) ||\n\t\t\t\tisMetaBoxLocationVisible( 'side' ),\n\t\t];\n\t}, [] );\n\tconst { set: setPreference } = useDispatch( preferencesStore );\n\tconst metaBoxesMainRef = useRef();\n\tconst isShort = useMediaQuery( '(max-height: 549px)' );\n\n\tconst [ { min, max }, setHeightConstraints ] = useState( () => ( {} ) );\n\t// Keeps the resizable area’s size constraints updated taking into account\n\t// editor notices. The constraints are also used to derive the value for the\n\t// aria-valuenow attribute on the seperator.\n\tconst effectSizeConstraints = useRefEffect( ( node ) => {\n\t\tconst container = node.closest(\n\t\t\t'.interface-interface-skeleton__content'\n\t\t);\n\t\tconst noticeLists = container.querySelectorAll(\n\t\t\t':scope > .components-notice-list'\n\t\t);\n\t\tconst resizeHandle = container.querySelector(\n\t\t\t'.edit-post-meta-boxes-main__presenter'\n\t\t);\n\t\tconst deriveConstraints = () => {\n\t\t\tconst fullHeight = container.offsetHeight;\n\t\t\tlet nextMax = fullHeight;\n\t\t\tfor ( const element of noticeLists ) {\n\t\t\t\tnextMax -= element.offsetHeight;\n\t\t\t}\n\t\t\tconst nextMin = resizeHandle.offsetHeight;\n\t\t\tsetHeightConstraints( { min: nextMin, max: nextMax } );\n\t\t};\n\t\tconst observer = new window.ResizeObserver( deriveConstraints );\n\t\tobserver.observe( container );\n\t\tfor ( const element of noticeLists ) {\n\t\t\tobserver.observe( element );\n\t\t}\n\t\treturn () => observer.disconnect();\n\t}, [] );\n\n\tconst separatorRef = useRef();\n\tconst separatorHelpId = useId();\n\n\tconst [ isUntouched, setIsUntouched ] = useState( true );\n\tconst applyHeight = ( candidateHeight, isPersistent, isInstant ) => {\n\t\tconst nextHeight = Math.min( max, Math.max( min, candidateHeight ) );\n\t\tif ( isPersistent ) {\n\t\t\tsetPreference(\n\t\t\t\t'core/edit-post',\n\t\t\t\t'metaBoxesMainOpenHeight',\n\t\t\t\tnextHeight\n\t\t\t);\n\t\t} else {\n\t\t\tseparatorRef.current.ariaValueNow = getAriaValueNow( nextHeight );\n\t\t}\n\t\tif ( isInstant ) {\n\t\t\tmetaBoxesMainRef.current.updateSize( {\n\t\t\t\theight: nextHeight,\n\t\t\t\t// Oddly, when the event that triggered this was not from the mouse (e.g. keydown),\n\t\t\t\t// if `width` is left unspecified a subsequent drag gesture applies a fixed\n\t\t\t\t// width and the pane fails to widen/narrow with parent width changes from\n\t\t\t\t// sidebars opening/closing or window resizes.\n\t\t\t\twidth: 'auto',\n\t\t\t} );\n\t\t}\n\t};\n\n\tif ( ! hasAnyVisible ) {\n\t\treturn;\n\t}\n\n\tconst contents = (\n\t\t<div\n\t\t\tclassName={ clsx(\n\t\t\t\t// The class name 'edit-post-layout__metaboxes' is retained because some plugins use it.\n\t\t\t\t'edit-post-layout__metaboxes',\n\t\t\t\t! isLegacy && 'edit-post-meta-boxes-main__liner'\n\t\t\t) }\n\t\t\thidden={ ! isLegacy && isShort && ! isOpen }\n\t\t>\n\t\t\t<MetaBoxes location=\"normal\" />\n\t\t\t<MetaBoxes location=\"advanced\" />\n\t\t</div>\n\t);\n\n\tif ( isLegacy ) {\n\t\treturn contents;\n\t}\n\n\tconst isAutoHeight = openHeight === undefined;\n\tlet usedMax = '50%'; // Approximation before max has a value.\n\tif ( max !== undefined ) {\n\t\t// Halves the available max height until a user height is set.\n\t\tusedMax = isAutoHeight && isUntouched ? max / 2 : max;\n\t}\n\n\tconst getAriaValueNow = ( height ) =>\n\t\tMath.round( ( ( height - min ) / ( max - min ) ) * 100 );\n\tconst usedAriaValueNow =\n\t\tmax === undefined || isAutoHeight ? 50 : getAriaValueNow( openHeight );\n\n\tconst toggle = () =>\n\t\tsetPreference( 'core/edit-post', 'metaBoxesMainIsOpen', ! isOpen );\n\n\t// TODO: Support more/all keyboard interactions from the window splitter pattern:\n\t// https://www.w3.org/WAI/ARIA/apg/patterns/windowsplitter/\n\tconst onSeparatorKeyDown = ( event ) => {\n\t\tconst delta = { ArrowUp: 20, ArrowDown: -20 }[ event.key ];\n\t\tif ( delta ) {\n\t\t\tconst pane = metaBoxesMainRef.current.resizable;\n\t\t\tconst fromHeight = isAutoHeight ? pane.offsetHeight : openHeight;\n\t\t\tconst nextHeight = delta + fromHeight;\n\t\t\tapplyHeight( nextHeight, true, true );\n\t\t\tevent.preventDefault();\n\t\t}\n\t};\n\tconst className = 'edit-post-meta-boxes-main';\n\tconst paneLabel = __( 'Meta Boxes' );\n\tlet Pane, paneProps;\n\tif ( isShort ) {\n\t\tPane = NavigableRegion;\n\t\tpaneProps = {\n\t\t\tclassName: clsx( className, 'is-toggle-only' ),\n\t\t};\n\t} else {\n\t\tPane = ResizableBox;\n\t\tpaneProps = /** @type {Parameters<typeof ResizableBox>[0]} */ ( {\n\t\t\tas: NavigableRegion,\n\t\t\tref: metaBoxesMainRef,\n\t\t\tclassName: clsx( className, 'is-resizable' ),\n\t\t\tdefaultSize: { height: openHeight },\n\t\t\tminHeight: min,\n\t\t\tmaxHeight: usedMax,\n\t\t\tenable: {\n\t\t\t\ttop: true,\n\t\t\t\tright: false,\n\t\t\t\tbottom: false,\n\t\t\t\tleft: false,\n\t\t\t\ttopLeft: false,\n\t\t\t\ttopRight: false,\n\t\t\t\tbottomRight: false,\n\t\t\t\tbottomLeft: false,\n\t\t\t},\n\t\t\thandleClasses: { top: 'edit-post-meta-boxes-main__presenter' },\n\t\t\thandleComponent: {\n\t\t\t\ttop: (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<Tooltip text={ __( 'Drag to resize' ) }>\n\t\t\t\t\t\t\t<button // eslint-disable-line jsx-a11y/role-supports-aria-props\n\t\t\t\t\t\t\t\tref={ separatorRef }\n\t\t\t\t\t\t\t\trole=\"separator\" // eslint-disable-line jsx-a11y/no-interactive-element-to-noninteractive-role\n\t\t\t\t\t\t\t\taria-valuenow={ usedAriaValueNow }\n\t\t\t\t\t\t\t\taria-label={ __( 'Drag to resize' ) }\n\t\t\t\t\t\t\t\taria-describedby={ separatorHelpId }\n\t\t\t\t\t\t\t\tonKeyDown={ onSeparatorKeyDown }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t<VisuallyHidden id={ separatorHelpId }>\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'Use up and down arrow keys to resize the metabox pane.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t</>\n\t\t\t\t),\n\t\t\t},\n\t\t\t// Avoids hiccups while dragging over objects like iframes and ensures that\n\t\t\t// the event to end the drag is captured by the target (resize handle)\n\t\t\t// whether or not it’s under the pointer.\n\t\t\tonPointerDown: ( { pointerId, target } ) => {\n\t\t\t\ttarget.setPointerCapture( pointerId );\n\t\t\t},\n\t\t\tonResizeStart: ( event, direction, elementRef ) => {\n\t\t\t\tif ( isAutoHeight ) {\n\t\t\t\t\t// Sets the starting height to avoid visual jumps in height and\n\t\t\t\t\t// aria-valuenow being `NaN` for the first (few) resize events.\n\t\t\t\t\tapplyHeight( elementRef.offsetHeight, false, true );\n\t\t\t\t\tsetIsUntouched( false );\n\t\t\t\t}\n\t\t\t},\n\t\t\tonResize: () =>\n\t\t\t\tapplyHeight( metaBoxesMainRef.current.state.height ),\n\t\t\tonResizeStop: () =>\n\t\t\t\tapplyHeight( metaBoxesMainRef.current.state.height, true ),\n\t\t} );\n\t}\n\n\treturn (\n\t\t<Pane aria-label={ paneLabel } { ...paneProps }>\n\t\t\t{ isShort ? (\n\t\t\t\t<button\n\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\tclassName=\"edit-post-meta-boxes-main__presenter\"\n\t\t\t\t\tonClick={ toggle }\n\t\t\t\t>\n\t\t\t\t\t{ paneLabel }\n\t\t\t\t\t<Icon icon={ isOpen ? chevronUp : chevronDown } />\n\t\t\t\t</button>\n\t\t\t) : (\n\t\t\t\t<meta ref={ effectSizeConstraints } />\n\t\t\t) }\n\t\t\t{ contents }\n\t\t</Pane>\n\t);\n}\n\nfunction Layout( {\n\tpostId: initialPostId,\n\tpostType: initialPostType,\n\tsettings,\n\tinitialEdits,\n} ) {\n\tuseCommands();\n\tuseEditPostCommands();\n\tconst shouldIframe = useShouldIframe();\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\tconst {\n\t\tcurrentPost: { postId: currentPostId, postType: currentPostType },\n\t\tonNavigateToEntityRecord,\n\t\tonNavigateToPreviousEntityRecord,\n\t} = useNavigateToEntityRecord(\n\t\tinitialPostId,\n\t\tinitialPostType,\n\t\t'post-only'\n\t);\n\tconst isEditingTemplate = currentPostType === 'wp_template';\n\tconst {\n\t\tmode,\n\t\tisFullscreenActive,\n\t\thasActiveMetaboxes,\n\t\thasBlockSelected,\n\t\tshowIconLabels,\n\t\tisDistractionFree,\n\t\tshowMetaBoxes,\n\t\thasHistory,\n\t\tisWelcomeGuideVisible,\n\t\ttemplateId,\n\t\tenablePaddingAppender,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst { get } = select( preferencesStore );\n\t\t\tconst { isFeatureActive, getEditedPostTemplateId } = unlock(\n\t\t\t\tselect( editPostStore )\n\t\t\t);\n\t\t\tconst { canUser, getPostType } = select( coreStore );\n\n\t\t\tconst supportsTemplateMode = settings.supportsTemplateMode;\n\t\t\tconst isViewable =\n\t\t\t\tgetPostType( currentPostType )?.viewable ?? false;\n\t\t\tconst canViewTemplate = canUser( 'read', {\n\t\t\t\tkind: 'postType',\n\t\t\t\tname: 'wp_template',\n\t\t\t} );\n\t\t\tconst { __unstableGetEditorMode } = select( blockEditorStore );\n\t\t\tconst { getEditorMode, getRenderingMode } = select( editorStore );\n\t\t\tconst isRenderingPostOnly = getRenderingMode() === 'post-only';\n\n\t\t\treturn {\n\t\t\t\tmode: getEditorMode(),\n\t\t\t\tisFullscreenActive:\n\t\t\t\t\tselect( editPostStore ).isFeatureActive( 'fullscreenMode' ),\n\t\t\t\thasActiveMetaboxes: select( editPostStore ).hasMetaBoxes(),\n\t\t\t\thasBlockSelected:\n\t\t\t\t\t!! select( blockEditorStore ).getBlockSelectionStart(),\n\t\t\t\tshowIconLabels: get( 'core', 'showIconLabels' ),\n\t\t\t\tisDistractionFree: get( 'core', 'distractionFree' ),\n\t\t\t\tshowMetaBoxes:\n\t\t\t\t\t! DESIGN_POST_TYPES.includes( currentPostType ) &&\n\t\t\t\t\tisRenderingPostOnly,\n\t\t\t\tisWelcomeGuideVisible: isFeatureActive( 'welcomeGuide' ),\n\t\t\t\ttemplateId:\n\t\t\t\t\tsupportsTemplateMode &&\n\t\t\t\t\tisViewable &&\n\t\t\t\t\tcanViewTemplate &&\n\t\t\t\t\t! isEditingTemplate\n\t\t\t\t\t\t? getEditedPostTemplateId()\n\t\t\t\t\t\t: null,\n\t\t\t\tenablePaddingAppender:\n\t\t\t\t\t__unstableGetEditorMode() !== 'zoom-out' &&\n\t\t\t\t\tisRenderingPostOnly &&\n\t\t\t\t\t! DESIGN_POST_TYPES.includes( currentPostType ),\n\t\t\t};\n\t\t},\n\t\t[ currentPostType, isEditingTemplate, settings.supportsTemplateMode ]\n\t);\n\tconst [ paddingAppenderRef, paddingStyle ] = usePaddingAppender(\n\t\tenablePaddingAppender\n\t);\n\n\t// Set the right context for the command palette\n\tconst commandContext = hasBlockSelected\n\t\t? 'block-selection-edit'\n\t\t: 'entity-edit';\n\tuseCommandContext( commandContext );\n\tconst editorSettings = useMemo(\n\t\t() => ( {\n\t\t\t...settings,\n\t\t\tonNavigateToEntityRecord,\n\t\t\tonNavigateToPreviousEntityRecord,\n\t\t\tdefaultRenderingMode: 'post-only',\n\t\t} ),\n\t\t[ settings, onNavigateToEntityRecord, onNavigateToPreviousEntityRecord ]\n\t);\n\tconst styles = useEditorStyles( paddingStyle );\n\n\t// We need to add the show-icon-labels class to the body element so it is applied to modals.\n\tif ( showIconLabels ) {\n\t\tdocument.body.classList.add( 'show-icon-labels' );\n\t} else {\n\t\tdocument.body.classList.remove( 'show-icon-labels' );\n\t}\n\n\tconst navigateRegionsProps = useNavigateRegions();\n\n\tconst className = clsx( 'edit-post-layout', 'is-mode-' + mode, {\n\t\t'has-metaboxes': hasActiveMetaboxes,\n\t} );\n\n\tfunction onPluginAreaError( name ) {\n\t\tcreateErrorNotice(\n\t\t\tsprintf(\n\t\t\t\t/* translators: %s: plugin name */\n\t\t\t\t__(\n\t\t\t\t\t'The \"%s\" plugin has encountered an error and cannot be rendered.'\n\t\t\t\t),\n\t\t\t\tname\n\t\t\t)\n\t\t);\n\t}\n\n\tconst { createSuccessNotice } = useDispatch( noticesStore );\n\n\tconst onActionPerformed = useCallback(\n\t\t( actionId, items ) => {\n\t\t\tswitch ( actionId ) {\n\t\t\t\tcase 'move-to-trash':\n\t\t\t\t\t{\n\t\t\t\t\t\tdocument.location.href = addQueryArgs( 'edit.php', {\n\t\t\t\t\t\t\ttrashed: 1,\n\t\t\t\t\t\t\tpost_type: items[ 0 ].type,\n\t\t\t\t\t\t\tids: items[ 0 ].id,\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'duplicate-post':\n\t\t\t\t\t{\n\t\t\t\t\t\tconst newItem = items[ 0 ];\n\t\t\t\t\t\tconst title =\n\t\t\t\t\t\t\ttypeof newItem.title === 'string'\n\t\t\t\t\t\t\t\t? newItem.title\n\t\t\t\t\t\t\t\t: newItem.title?.rendered;\n\t\t\t\t\t\tcreateSuccessNotice(\n\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t// translators: %s: Title of the created post e.g: \"Post 1\".\n\t\t\t\t\t\t\t\t__( '\"%s\" successfully created.' ),\n\t\t\t\t\t\t\t\tdecodeEntities( title )\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t\t\t\tid: 'duplicate-post-action',\n\t\t\t\t\t\t\t\tactions: [\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tlabel: __( 'Edit' ),\n\t\t\t\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\t\t\t\tconst postId = newItem.id;\n\t\t\t\t\t\t\t\t\t\t\tdocument.location.href =\n\t\t\t\t\t\t\t\t\t\t\t\taddQueryArgs( 'post.php', {\n\t\t\t\t\t\t\t\t\t\t\t\t\tpost: postId,\n\t\t\t\t\t\t\t\t\t\t\t\t\taction: 'edit',\n\t\t\t\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t},\n\t\t[ createSuccessNotice ]\n\t);\n\n\tconst initialPost = useMemo( () => {\n\t\treturn {\n\t\t\ttype: initialPostType,\n\t\t\tid: initialPostId,\n\t\t};\n\t}, [ initialPostType, initialPostId ] );\n\n\tconst backButton =\n\t\tuseViewportMatch( 'medium' ) && isFullscreenActive ? (\n\t\t\t<BackButton initialPost={ initialPost } />\n\t\t) : null;\n\n\treturn (\n\t\t<SlotFillProvider>\n\t\t\t<ErrorBoundary>\n\t\t\t\t<CommandMenu />\n\t\t\t\t<WelcomeGuide postType={ currentPostType } />\n\t\t\t\t<div\n\t\t\t\t\tclassName={ navigateRegionsProps.className }\n\t\t\t\t\t{ ...navigateRegionsProps }\n\t\t\t\t\tref={ navigateRegionsProps.ref }\n\t\t\t\t>\n\t\t\t\t\t<Editor\n\t\t\t\t\t\tsettings={ editorSettings }\n\t\t\t\t\t\tinitialEdits={ initialEdits }\n\t\t\t\t\t\tpostType={ currentPostType }\n\t\t\t\t\t\tpostId={ currentPostId }\n\t\t\t\t\t\ttemplateId={ templateId }\n\t\t\t\t\t\tclassName={ className }\n\t\t\t\t\t\tstyles={ styles }\n\t\t\t\t\t\tforceIsDirty={ hasActiveMetaboxes }\n\t\t\t\t\t\tcontentRef={ paddingAppenderRef }\n\t\t\t\t\t\tdisableIframe={ ! shouldIframe }\n\t\t\t\t\t\t// We should auto-focus the canvas (title) on load.\n\t\t\t\t\t\t// eslint-disable-next-line jsx-a11y/no-autofocus\n\t\t\t\t\t\tautoFocus={ ! isWelcomeGuideVisible }\n\t\t\t\t\t\tonActionPerformed={ onActionPerformed }\n\t\t\t\t\t\textraSidebarPanels={\n\t\t\t\t\t\t\tshowMetaBoxes && <MetaBoxes location=\"side\" />\n\t\t\t\t\t\t}\n\t\t\t\t\t\textraContent={\n\t\t\t\t\t\t\t! isDistractionFree &&\n\t\t\t\t\t\t\tshowMetaBoxes && (\n\t\t\t\t\t\t\t\t<MetaBoxesMain isLegacy={ ! shouldIframe } />\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t<PostLockedModal />\n\t\t\t\t\t\t<EditorInitialization />\n\t\t\t\t\t\t<FullscreenMode isActive={ isFullscreenActive } />\n\t\t\t\t\t\t<BrowserURL hasHistory={ hasHistory } />\n\t\t\t\t\t\t<UnsavedChangesWarning />\n\t\t\t\t\t\t<AutosaveMonitor />\n\t\t\t\t\t\t<LocalAutosaveMonitor />\n\t\t\t\t\t\t<EditPostKeyboardShortcuts />\n\t\t\t\t\t\t<EditorKeyboardShortcutsRegister />\n\t\t\t\t\t\t<BlockKeyboardShortcuts />\n\t\t\t\t\t\t<InitPatternModal />\n\t\t\t\t\t\t<PluginArea onError={ onPluginAreaError } />\n\t\t\t\t\t\t<PostEditorMoreMenu />\n\t\t\t\t\t\t{ backButton }\n\t\t\t\t\t\t<EditorSnackbars />\n\t\t\t\t\t</Editor>\n\t\t\t\t</div>\n\t\t\t</ErrorBoundary>\n\t\t</SlotFillProvider>\n\t);\n}\n\nexport default Layout;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SACCC,eAAe,EACfC,oBAAoB,EACpBC,qBAAqB,EACrBC,+BAA+B,EAC/BC,eAAe,EACfC,aAAa,EACbC,eAAe,EACfC,KAAK,IAAIC,WAAW,EACpBC,WAAW,IAAIC,iBAAiB,QAC1B,mBAAmB;AAC1B,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SACCH,WAAW,IAAII,sBAAsB,EACrCN,KAAK,IAAIO,gBAAgB,QACnB,yBAAyB;AAChC,SAASC,UAAU,QAAQ,oBAAoB;AAC/C,SAASC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SACCC,WAAW,EACXC,OAAO,EACPC,KAAK,EACLC,MAAM,EACNC,QAAQ,QACF,oBAAoB;AAC3B,SAASC,WAAW,EAAEC,SAAS,QAAQ,kBAAkB;AACzD,SAASjB,KAAK,IAAIkB,YAAY,QAAQ,oBAAoB;AAC1D,SAASlB,KAAK,IAAImB,gBAAgB,QAAQ,wBAAwB;AAClE,SACCC,WAAW,EACXlB,WAAW,IAAImB,mBAAmB,QAC5B,qBAAqB;AAC5B,SAASnB,WAAW,IAAIoB,uBAAuB,QAAQ,0BAA0B;AACjF,SAASpB,WAAW,IAAIqB,uBAAuB,QAAQ,0BAA0B;AACjF,SAASC,YAAY,QAAQ,gBAAgB;AAC7C,SAASC,cAAc,QAAQ,0BAA0B;AACzD,SAASzB,KAAK,IAAI0B,SAAS,QAAQ,sBAAsB;AACzD,SACCC,IAAI,EACJC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0M,MAAM","ignoreList":[]}
|
|
@@ -22,9 +22,7 @@ import styles from './style.scss';
|
|
|
22
22
|
import headerToolbarStyles from '../header/header-toolbar/style.scss';
|
|
23
23
|
import Header from '../header';
|
|
24
24
|
import VisualEditor from '../visual-editor';
|
|
25
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
26
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
27
|
-
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
25
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
28
26
|
class Layout extends Component {
|
|
29
27
|
constructor() {
|
|
30
28
|
super(...arguments);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Platform","SafeAreaView","View","SafeArea","Component","withSelect","BottomSheetSettings","FloatingToolbar","store","blockEditorStore","compose","withPreferredColorScheme","HTMLTextInput","KeyboardAvoidingView","NoticeList","Tooltip","__unstableAutocompletionItemsSlot","AutocompletionItemsSlot","AutosaveMonitor","OfflineStatus","editorStore","sendNativeEditorDidLayout","styles","headerToolbarStyles","Header","VisualEditor","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","Layout","constructor","arguments","onSafeAreaInsetsUpdate","bind","onRootViewLayout","state","rootViewHeight","safeAreaInsets","top","bottom","right","left","getSafeAreaInsetsForRootView","then","componentDidMount","_isMounted","safeAreaSubscription","addEventListener","componentWillUnmount","remove","result","setState","event","setHeightState","height","nativeEvent","layout","renderHTML","globalStyles","props","parentHeight","style","renderVisual","isReady","setTitleRef","render","getStylesFromColorScheme","mode","isHtmlView","marginBottom","OS","containerStyles","container","containerDark","toolbarKeyboardAvoidingViewStyle","toolbarKeyboardAvoidingView","backgroundColor","editorStyles","background","backgroundDark","Slot","children","onLayout","disableIntervalChecks","flex","flexBasis","withAnimatedHeight","select","__unstableIsEditorReady","isEditorReady","getEditorMode","getSettings","__experimentalGlobalStylesBaseStyles","color"],"sources":["@wordpress/edit-post/src/components/layout/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { Platform, SafeAreaView, View } from 'react-native';\nimport SafeArea from 'react-native-safe-area';\n\n/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { withSelect } from '@wordpress/data';\nimport {\n\tBottomSheetSettings,\n\tFloatingToolbar,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { compose, withPreferredColorScheme } from '@wordpress/compose';\nimport {\n\tHTMLTextInput,\n\tKeyboardAvoidingView,\n\tNoticeList,\n\tTooltip,\n\t__unstableAutocompletionItemsSlot as AutocompletionItemsSlot,\n} from '@wordpress/components';\nimport {\n\tAutosaveMonitor,\n\tOfflineStatus,\n\tstore as editorStore,\n} from '@wordpress/editor';\nimport { sendNativeEditorDidLayout } from '@wordpress/react-native-bridge';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\nimport headerToolbarStyles from '../header/header-toolbar/style.scss';\nimport Header from '../header';\nimport VisualEditor from '../visual-editor';\n\nclass Layout extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.onSafeAreaInsetsUpdate = this.onSafeAreaInsetsUpdate.bind( this );\n\t\tthis.onRootViewLayout = this.onRootViewLayout.bind( this );\n\n\t\tthis.state = {\n\t\t\trootViewHeight: 0,\n\t\t\tsafeAreaInsets: { top: 0, bottom: 0, right: 0, left: 0 },\n\t\t};\n\n\t\tSafeArea.getSafeAreaInsetsForRootView().then(\n\t\t\tthis.onSafeAreaInsetsUpdate\n\t\t);\n\t}\n\n\tcomponentDidMount() {\n\t\tthis._isMounted = true;\n\t\tthis.safeAreaSubscription = SafeArea.addEventListener(\n\t\t\t'safeAreaInsetsForRootViewDidChange',\n\t\t\tthis.onSafeAreaInsetsUpdate\n\t\t);\n\t}\n\n\tcomponentWillUnmount() {\n\t\tthis.safeAreaSubscription?.remove();\n\t\tthis._isMounted = false;\n\t}\n\n\tonSafeAreaInsetsUpdate( result ) {\n\t\tconst { safeAreaInsets } = result;\n\t\tif ( this._isMounted ) {\n\t\t\tthis.setState( { safeAreaInsets } );\n\t\t}\n\t}\n\n\tonRootViewLayout( event ) {\n\t\tif ( this._isMounted ) {\n\t\t\tthis.setHeightState( event );\n\t\t}\n\t}\n\n\tsetHeightState( event ) {\n\t\tconst { height } = event.nativeEvent.layout;\n\t\tif ( height !== this.state.rootViewHeight ) {\n\t\t\tthis.setState(\n\t\t\t\t{ rootViewHeight: height },\n\t\t\t\tsendNativeEditorDidLayout\n\t\t\t);\n\t\t}\n\t}\n\n\trenderHTML() {\n\t\tconst { globalStyles } = this.props;\n\t\treturn (\n\t\t\t<HTMLTextInput\n\t\t\t\tparentHeight={ this.state.rootViewHeight }\n\t\t\t\tstyle={ globalStyles }\n\t\t\t/>\n\t\t);\n\t}\n\n\trenderVisual() {\n\t\tconst { isReady } = this.props;\n\n\t\tif ( ! isReady ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn <VisualEditor setTitleRef={ this.props.setTitleRef } />;\n\t}\n\n\trender() {\n\t\tconst { getStylesFromColorScheme, mode, globalStyles } = this.props;\n\n\t\tconst isHtmlView = mode === 'text';\n\n\t\t// Add a margin view at the bottom for the header.\n\t\tconst marginBottom =\n\t\t\tPlatform.OS === 'android' && ! isHtmlView\n\t\t\t\t? headerToolbarStyles[ 'header-toolbar__container' ].height\n\t\t\t\t: 0;\n\n\t\tconst containerStyles = getStylesFromColorScheme(\n\t\t\tstyles.container,\n\t\t\tstyles.containerDark\n\t\t);\n\n\t\tconst toolbarKeyboardAvoidingViewStyle = {\n\t\t\t...styles.toolbarKeyboardAvoidingView,\n\t\t\tleft: this.state.safeAreaInsets.left,\n\t\t\tright: this.state.safeAreaInsets.right,\n\t\t\tbottom: this.state.safeAreaInsets.bottom,\n\t\t\tbackgroundColor: containerStyles.backgroundColor,\n\t\t};\n\n\t\tconst editorStyles = [\n\t\t\tgetStylesFromColorScheme(\n\t\t\t\tstyles.background,\n\t\t\t\tstyles.backgroundDark\n\t\t\t),\n\t\t\tglobalStyles?.background && {\n\t\t\t\tbackgroundColor: globalStyles.background,\n\t\t\t},\n\t\t];\n\n\t\treturn (\n\t\t\t<Tooltip.Slot>\n\t\t\t\t<SafeAreaView\n\t\t\t\t\tstyle={ containerStyles }\n\t\t\t\t\tonLayout={ this.onRootViewLayout }\n\t\t\t\t>\n\t\t\t\t\t<AutosaveMonitor disableIntervalChecks />\n\t\t\t\t\t<OfflineStatus />\n\t\t\t\t\t<View style={ editorStyles }>\n\t\t\t\t\t\t{ isHtmlView ? this.renderHTML() : this.renderVisual() }\n\t\t\t\t\t\t{ ! isHtmlView && Platform.OS === 'android' && (\n\t\t\t\t\t\t\t<FloatingToolbar />\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<NoticeList />\n\t\t\t\t\t</View>\n\t\t\t\t\t<View\n\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\tflex: 0,\n\t\t\t\t\t\t\tflexBasis: marginBottom,\n\t\t\t\t\t\t\theight: marginBottom,\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t\t{ ! isHtmlView && (\n\t\t\t\t\t\t<KeyboardAvoidingView\n\t\t\t\t\t\t\tparentHeight={ this.state.rootViewHeight }\n\t\t\t\t\t\t\tstyle={ toolbarKeyboardAvoidingViewStyle }\n\t\t\t\t\t\t\twithAnimatedHeight\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ Platform.OS === 'ios' && (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t<AutocompletionItemsSlot />\n\t\t\t\t\t\t\t\t\t<FloatingToolbar />\n\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t<Header />\n\t\t\t\t\t\t\t<BottomSheetSettings />\n\t\t\t\t\t\t</KeyboardAvoidingView>\n\t\t\t\t\t) }\n\t\t\t\t\t{ Platform.OS === 'android' && <AutocompletionItemsSlot /> }\n\t\t\t\t</SafeAreaView>\n\t\t\t</Tooltip.Slot>\n\t\t);\n\t}\n}\n\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\tconst { __unstableIsEditorReady: isEditorReady, getEditorMode } =\n\t\t\tselect( editorStore );\n\t\tconst { getSettings } = select( blockEditorStore );\n\t\tconst globalStyles =\n\t\t\tgetSettings()?.__experimentalGlobalStylesBaseStyles?.color;\n\n\t\treturn {\n\t\t\tisReady: isEditorReady(),\n\t\t\tmode: getEditorMode(),\n\t\t\tglobalStyles,\n\t\t};\n\t} ),\n\twithPreferredColorScheme,\n] )( Layout );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,QAAQ,EAAEC,YAAY,EAAEC,IAAI,QAAQ,cAAc;AAC3D,OAAOC,QAAQ,MAAM,wBAAwB;;AAE7C;AACA;AACA;AACA,SAASC,SAAS,QAAQ,oBAAoB;AAC9C,SAASC,UAAU,QAAQ,iBAAiB;AAC5C,SACCC,mBAAmB,EACnBC,eAAe,EACfC,KAAK,IAAIC,gBAAgB,QACnB,yBAAyB;AAChC,SAASC,OAAO,EAAEC,wBAAwB,QAAQ,oBAAoB;AACtE,SACCC,aAAa,EACbC,oBAAoB,EACpBC,UAAU,EACVC,OAAO,EACPC,iCAAiC,IAAIC,uBAAuB,QACtD,uBAAuB;AAC9B,SACCC,eAAe,EACfC,aAAa,EACbX,KAAK,IAAIY,WAAW,QACd,mBAAmB;AAC1B,SAASC,yBAAyB,QAAQ,gCAAgC;;AAE1E;AACA;AACA;AACA,OAAOC,MAAM,MAAM,cAAc;AACjC,OAAOC,mBAAmB,MAAM,qCAAqC;AACrE,OAAOC,MAAM,MAAM,WAAW;AAC9B,OAAOC,YAAY,MAAM,kBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAE5C,MAAMC,MAAM,SAAS5B,SAAS,CAAC;EAC9B6B,WAAWA,CAAA,EAAG;IACb,KAAK,CAAE,GAAGC,SAAU,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,eAAe,IAAE,CAAC;UAAA,CAClB,CACF,eACDoB,IAAA,CAACH,MAAM,IAAE,CAAC,eACVG,IAAA,CAACrB,mBAAmB,IAAE,CAAC;QAAA,CACF,CACtB,EACCN,QAAQ,CAACyE,EAAE,KAAK,SAAS,iBAAI9C,IAAA,CAACV,uBAAuB,IAAE,CAAC;MAAA,CAC7C;IAAC,CACF,CAAC;EAEjB;AACD;AAEA,eAAeP,OAAO,CAAE,CACvBL,UAAU,CAAIqF,MAAM,IAAM;EACzB,MAAM;IAAEC,uBAAuB,EAAEC,aAAa;IAAEC;EAAc,CAAC,GAC9DH,MAAM,CAAEtE,WAAY,CAAC;EACtB,MAAM;IAAE0E;EAAY,CAAC,GAAGJ,MAAM,CAAEjF,gBAAiB,CAAC;EAClD,MAAMoD,YAAY,GACjBiC,WAAW,CAAC,CAAC,EAAEC,oCAAoC,EAAEC,KAAK;EAE3D,OAAO;IACN9B,OAAO,EAAE0B,aAAa,CAAC,CAAC;IACxBtB,IAAI,EAAEuB,aAAa,CAAC,CAAC;IACrBhC;EACD,CAAC;AACF,CAAE,CAAC,EACHlD,wBAAwB,CACvB,CAAC,CAAEqB,MAAO,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["Platform","SafeAreaView","View","SafeArea","Component","withSelect","BottomSheetSettings","FloatingToolbar","store","blockEditorStore","compose","withPreferredColorScheme","HTMLTextInput","KeyboardAvoidingView","NoticeList","Tooltip","__unstableAutocompletionItemsSlot","AutocompletionItemsSlot","AutosaveMonitor","OfflineStatus","editorStore","sendNativeEditorDidLayout","styles","headerToolbarStyles","Header","VisualEditor","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","Layout","constructor","arguments","onSafeAreaInsetsUpdate","bind","onRootViewLayout","state","rootViewHeight","safeAreaInsets","top","bottom","right","left","getSafeAreaInsetsForRootView","then","componentDidMount","_isMounted","safeAreaSubscription","addEventListener","componentWillUnmount","remove","result","setState","event","setHeightState","height","nativeEvent","layout","renderHTML","globalStyles","props","parentHeight","style","renderVisual","isReady","setTitleRef","render","getStylesFromColorScheme","mode","isHtmlView","marginBottom","OS","containerStyles","container","containerDark","toolbarKeyboardAvoidingViewStyle","toolbarKeyboardAvoidingView","backgroundColor","editorStyles","background","backgroundDark","Slot","children","onLayout","disableIntervalChecks","flex","flexBasis","withAnimatedHeight","select","__unstableIsEditorReady","isEditorReady","getEditorMode","getSettings","__experimentalGlobalStylesBaseStyles","color"],"sources":["@wordpress/edit-post/src/components/layout/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { Platform, SafeAreaView, View } from 'react-native';\nimport SafeArea from 'react-native-safe-area';\n\n/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { withSelect } from '@wordpress/data';\nimport {\n\tBottomSheetSettings,\n\tFloatingToolbar,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { compose, withPreferredColorScheme } from '@wordpress/compose';\nimport {\n\tHTMLTextInput,\n\tKeyboardAvoidingView,\n\tNoticeList,\n\tTooltip,\n\t__unstableAutocompletionItemsSlot as AutocompletionItemsSlot,\n} from '@wordpress/components';\nimport {\n\tAutosaveMonitor,\n\tOfflineStatus,\n\tstore as editorStore,\n} from '@wordpress/editor';\nimport { sendNativeEditorDidLayout } from '@wordpress/react-native-bridge';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\nimport headerToolbarStyles from '../header/header-toolbar/style.scss';\nimport Header from '../header';\nimport VisualEditor from '../visual-editor';\n\nclass Layout extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.onSafeAreaInsetsUpdate = this.onSafeAreaInsetsUpdate.bind( this );\n\t\tthis.onRootViewLayout = this.onRootViewLayout.bind( this );\n\n\t\tthis.state = {\n\t\t\trootViewHeight: 0,\n\t\t\tsafeAreaInsets: { top: 0, bottom: 0, right: 0, left: 0 },\n\t\t};\n\n\t\tSafeArea.getSafeAreaInsetsForRootView().then(\n\t\t\tthis.onSafeAreaInsetsUpdate\n\t\t);\n\t}\n\n\tcomponentDidMount() {\n\t\tthis._isMounted = true;\n\t\tthis.safeAreaSubscription = SafeArea.addEventListener(\n\t\t\t'safeAreaInsetsForRootViewDidChange',\n\t\t\tthis.onSafeAreaInsetsUpdate\n\t\t);\n\t}\n\n\tcomponentWillUnmount() {\n\t\tthis.safeAreaSubscription?.remove();\n\t\tthis._isMounted = false;\n\t}\n\n\tonSafeAreaInsetsUpdate( result ) {\n\t\tconst { safeAreaInsets } = result;\n\t\tif ( this._isMounted ) {\n\t\t\tthis.setState( { safeAreaInsets } );\n\t\t}\n\t}\n\n\tonRootViewLayout( event ) {\n\t\tif ( this._isMounted ) {\n\t\t\tthis.setHeightState( event );\n\t\t}\n\t}\n\n\tsetHeightState( event ) {\n\t\tconst { height } = event.nativeEvent.layout;\n\t\tif ( height !== this.state.rootViewHeight ) {\n\t\t\tthis.setState(\n\t\t\t\t{ rootViewHeight: height },\n\t\t\t\tsendNativeEditorDidLayout\n\t\t\t);\n\t\t}\n\t}\n\n\trenderHTML() {\n\t\tconst { globalStyles } = this.props;\n\t\treturn (\n\t\t\t<HTMLTextInput\n\t\t\t\tparentHeight={ this.state.rootViewHeight }\n\t\t\t\tstyle={ globalStyles }\n\t\t\t/>\n\t\t);\n\t}\n\n\trenderVisual() {\n\t\tconst { isReady } = this.props;\n\n\t\tif ( ! isReady ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn <VisualEditor setTitleRef={ this.props.setTitleRef } />;\n\t}\n\n\trender() {\n\t\tconst { getStylesFromColorScheme, mode, globalStyles } = this.props;\n\n\t\tconst isHtmlView = mode === 'text';\n\n\t\t// Add a margin view at the bottom for the header.\n\t\tconst marginBottom =\n\t\t\tPlatform.OS === 'android' && ! isHtmlView\n\t\t\t\t? headerToolbarStyles[ 'header-toolbar__container' ].height\n\t\t\t\t: 0;\n\n\t\tconst containerStyles = getStylesFromColorScheme(\n\t\t\tstyles.container,\n\t\t\tstyles.containerDark\n\t\t);\n\n\t\tconst toolbarKeyboardAvoidingViewStyle = {\n\t\t\t...styles.toolbarKeyboardAvoidingView,\n\t\t\tleft: this.state.safeAreaInsets.left,\n\t\t\tright: this.state.safeAreaInsets.right,\n\t\t\tbottom: this.state.safeAreaInsets.bottom,\n\t\t\tbackgroundColor: containerStyles.backgroundColor,\n\t\t};\n\n\t\tconst editorStyles = [\n\t\t\tgetStylesFromColorScheme(\n\t\t\t\tstyles.background,\n\t\t\t\tstyles.backgroundDark\n\t\t\t),\n\t\t\tglobalStyles?.background && {\n\t\t\t\tbackgroundColor: globalStyles.background,\n\t\t\t},\n\t\t];\n\n\t\treturn (\n\t\t\t<Tooltip.Slot>\n\t\t\t\t<SafeAreaView\n\t\t\t\t\tstyle={ containerStyles }\n\t\t\t\t\tonLayout={ this.onRootViewLayout }\n\t\t\t\t>\n\t\t\t\t\t<AutosaveMonitor disableIntervalChecks />\n\t\t\t\t\t<OfflineStatus />\n\t\t\t\t\t<View style={ editorStyles }>\n\t\t\t\t\t\t{ isHtmlView ? this.renderHTML() : this.renderVisual() }\n\t\t\t\t\t\t{ ! isHtmlView && Platform.OS === 'android' && (\n\t\t\t\t\t\t\t<FloatingToolbar />\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<NoticeList />\n\t\t\t\t\t</View>\n\t\t\t\t\t<View\n\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\tflex: 0,\n\t\t\t\t\t\t\tflexBasis: marginBottom,\n\t\t\t\t\t\t\theight: marginBottom,\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t\t{ ! isHtmlView && (\n\t\t\t\t\t\t<KeyboardAvoidingView\n\t\t\t\t\t\t\tparentHeight={ this.state.rootViewHeight }\n\t\t\t\t\t\t\tstyle={ toolbarKeyboardAvoidingViewStyle }\n\t\t\t\t\t\t\twithAnimatedHeight\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ Platform.OS === 'ios' && (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t<AutocompletionItemsSlot />\n\t\t\t\t\t\t\t\t\t<FloatingToolbar />\n\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t<Header />\n\t\t\t\t\t\t\t<BottomSheetSettings />\n\t\t\t\t\t\t</KeyboardAvoidingView>\n\t\t\t\t\t) }\n\t\t\t\t\t{ Platform.OS === 'android' && <AutocompletionItemsSlot /> }\n\t\t\t\t</SafeAreaView>\n\t\t\t</Tooltip.Slot>\n\t\t);\n\t}\n}\n\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\tconst { __unstableIsEditorReady: isEditorReady, getEditorMode } =\n\t\t\tselect( editorStore );\n\t\tconst { getSettings } = select( blockEditorStore );\n\t\tconst globalStyles =\n\t\t\tgetSettings()?.__experimentalGlobalStylesBaseStyles?.color;\n\n\t\treturn {\n\t\t\tisReady: isEditorReady(),\n\t\t\tmode: getEditorMode(),\n\t\t\tglobalStyles,\n\t\t};\n\t} ),\n\twithPreferredColorScheme,\n] )( Layout );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,QAAQ,EAAEC,YAAY,EAAEC,IAAI,QAAQ,cAAc;AAC3D,OAAOC,QAAQ,MAAM,wBAAwB;;AAE7C;AACA;AACA;AACA,SAASC,SAAS,QAAQ,oBAAoB;AAC9C,SAASC,UAAU,QAAQ,iBAAiB;AAC5C,SACCC,mBAAmB,EACnBC,eAAe,EACfC,KAAK,IAAIC,gBAAgB,QACnB,yBAAyB;AAChC,SAASC,OAAO,EAAEC,wBAAwB,QAAQ,oBAAoB;AACtE,SACCC,aAAa,EACbC,oBAAoB,EACpBC,UAAU,EACVC,OAAO,EACPC,iCAAiC,IAAIC,uBAAuB,QACtD,uBAAuB;AAC9B,SACCC,eAAe,EACfC,aAAa,EACbX,KAAK,IAAIY,WAAW,QACd,mBAAmB;AAC1B,SAASC,yBAAyB,QAAQ,gCAAgC;;AAE1E;AACA;AACA;AACA,OAAOC,MAAM,MAAM,cAAc;A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