@wordpress/edit-post 6.9.0 → 6.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.
Files changed (91) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/components/header/template-title/edit-template-title.js +11 -2
  3. package/build/components/header/template-title/edit-template-title.js.map +1 -1
  4. package/build/components/keyboard-shortcut-help-modal/index.js +1 -3
  5. package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  6. package/build/components/preferences-modal/index.js +3 -26
  7. package/build/components/preferences-modal/index.js.map +1 -1
  8. package/build/components/sidebar/post-format/index.js +3 -1
  9. package/build/components/sidebar/post-format/index.js.map +1 -1
  10. package/build/components/sidebar/post-schedule/index.js +28 -12
  11. package/build/components/sidebar/post-schedule/index.js.map +1 -1
  12. package/build/components/sidebar/post-slug/index.js +3 -1
  13. package/build/components/sidebar/post-slug/index.js.map +1 -1
  14. package/build/components/sidebar/post-status/index.js +3 -1
  15. package/build/components/sidebar/post-status/index.js.map +1 -1
  16. package/build/components/sidebar/post-template/create-modal.js +1 -1
  17. package/build/components/sidebar/post-template/create-modal.js.map +1 -1
  18. package/build/components/sidebar/post-template/form.js +1 -1
  19. package/build/components/sidebar/post-template/form.js.map +1 -1
  20. package/build/components/sidebar/post-template/index.js +4 -3
  21. package/build/components/sidebar/post-template/index.js.map +1 -1
  22. package/build/components/sidebar/post-url/index.js +68 -0
  23. package/build/components/sidebar/post-url/index.js.map +1 -0
  24. package/build/components/sidebar/post-visibility/index.js +21 -6
  25. package/build/components/sidebar/post-visibility/index.js.map +1 -1
  26. package/build/components/sidebar/settings-sidebar/index.js +2 -4
  27. package/build/components/sidebar/settings-sidebar/index.js.map +1 -1
  28. package/build/components/visual-editor/index.js +4 -2
  29. package/build/components/visual-editor/index.js.map +1 -1
  30. package/build-module/components/header/template-title/edit-template-title.js +12 -2
  31. package/build-module/components/header/template-title/edit-template-title.js.map +1 -1
  32. package/build-module/components/keyboard-shortcut-help-modal/index.js +1 -2
  33. package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  34. package/build-module/components/preferences-modal/index.js +3 -25
  35. package/build-module/components/preferences-modal/index.js.map +1 -1
  36. package/build-module/components/sidebar/post-format/index.js +3 -1
  37. package/build-module/components/sidebar/post-format/index.js.map +1 -1
  38. package/build-module/components/sidebar/post-schedule/index.js +31 -15
  39. package/build-module/components/sidebar/post-schedule/index.js.map +1 -1
  40. package/build-module/components/sidebar/post-slug/index.js +3 -1
  41. package/build-module/components/sidebar/post-slug/index.js.map +1 -1
  42. package/build-module/components/sidebar/post-status/index.js +2 -1
  43. package/build-module/components/sidebar/post-status/index.js.map +1 -1
  44. package/build-module/components/sidebar/post-template/create-modal.js +1 -1
  45. package/build-module/components/sidebar/post-template/create-modal.js.map +1 -1
  46. package/build-module/components/sidebar/post-template/form.js +1 -1
  47. package/build-module/components/sidebar/post-template/form.js.map +1 -1
  48. package/build-module/components/sidebar/post-template/index.js +4 -3
  49. package/build-module/components/sidebar/post-template/index.js.map +1 -1
  50. package/build-module/components/sidebar/post-url/index.js +59 -0
  51. package/build-module/components/sidebar/post-url/index.js.map +1 -0
  52. package/build-module/components/sidebar/post-visibility/index.js +24 -8
  53. package/build-module/components/sidebar/post-visibility/index.js.map +1 -1
  54. package/build-module/components/sidebar/settings-sidebar/index.js +2 -3
  55. package/build-module/components/sidebar/settings-sidebar/index.js.map +1 -1
  56. package/build-module/components/visual-editor/index.js +4 -2
  57. package/build-module/components/visual-editor/index.js.map +1 -1
  58. package/build-style/style-rtl.css +34 -47
  59. package/build-style/style.css +34 -51
  60. package/package.json +27 -27
  61. package/src/components/header/template-title/edit-template-title.js +11 -1
  62. package/src/components/keyboard-shortcut-help-modal/index.js +1 -2
  63. package/src/components/keyboard-shortcut-help-modal/style.scss +0 -5
  64. package/src/components/preferences-modal/index.js +5 -23
  65. package/src/components/preferences-modal/test/index.js +3 -3
  66. package/src/components/sidebar/post-author/style.scss +4 -10
  67. package/src/components/sidebar/post-format/index.js +1 -1
  68. package/src/components/sidebar/post-format/style.scss +5 -0
  69. package/src/components/sidebar/post-schedule/index.js +26 -17
  70. package/src/components/sidebar/post-schedule/style.scss +0 -2
  71. package/src/components/sidebar/post-slug/index.js +1 -1
  72. package/src/components/sidebar/post-slug/style.scss +4 -3
  73. package/src/components/sidebar/post-status/index.js +3 -1
  74. package/src/components/sidebar/post-template/create-modal.js +1 -1
  75. package/src/components/sidebar/post-template/form.js +4 -1
  76. package/src/components/sidebar/post-template/index.js +4 -3
  77. package/src/components/sidebar/post-template/style.scss +0 -10
  78. package/src/components/sidebar/post-url/index.js +51 -0
  79. package/src/components/sidebar/post-url/style.scss +23 -0
  80. package/src/components/sidebar/post-visibility/index.js +22 -8
  81. package/src/components/sidebar/settings-sidebar/index.js +1 -3
  82. package/src/components/sidebar/template/style.scss +35 -0
  83. package/src/components/start-page-options/style.scss +0 -9
  84. package/src/components/visual-editor/index.js +2 -1
  85. package/src/style.scss +2 -1
  86. package/build/components/sidebar/post-link/index.js +0 -182
  87. package/build/components/sidebar/post-link/index.js.map +0 -1
  88. package/build-module/components/sidebar/post-link/index.js +0 -165
  89. package/build-module/components/sidebar/post-link/index.js.map +0 -1
  90. package/src/components/sidebar/post-link/index.js +0 -179
  91. package/src/components/sidebar/post-link/style.scss +0 -20
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-post/src/components/visual-editor/index.js"],"names":["classnames","VisualEditorGlobalKeyboardShortcuts","PostTitle","store","editorStore","WritingFlow","BlockList","BlockTools","blockEditorStore","__unstableUseBlockSelectionClearer","useBlockSelectionClearer","__unstableUseTypewriter","useTypewriter","__unstableUseClipboardHandler","useClipboardHandler","__unstableUseTypingObserver","useTypingObserver","__unstableBlockSettingsMenuFirstItem","__experimentalUseResizeCanvas","useResizeCanvas","__unstableEditorStyles","EditorStyles","useSetting","__experimentalLayoutStyle","LayoutStyle","__unstableUseMouseMoveTypingReset","useMouseMoveTypingReset","__unstableIframe","Iframe","__experimentalUseNoRecursiveRenders","useNoRecursiveRenders","useEffect","useRef","useMemo","Button","__unstableMotion","motion","useSelect","useDispatch","useMergeRefs","arrowLeft","__","BlockInspectorButton","editPostStore","MaybeIframe","children","contentRef","shouldIframe","styles","assets","style","ref","flex","width","height","display","VisualEditor","deviceType","isWelcomeGuideVisible","isTemplateMode","wrapperBlockName","wrapperUniqueId","select","isFeatureActive","isEditingTemplate","__experimentalGetPreviewDeviceType","getCurrentPostId","getCurrentPostType","_isTemplateMode","_wrapperBlockName","isCleanNewPost","hasMetaBoxes","themeSupportsLayout","_settings","getSettings","supportsLayout","__unstableResolvedAssets","clearSelectedBlock","setIsEditingTemplate","desktopCanvasStyles","margin","flexFlow","background","templateModeStyles","borderRadius","border","borderBottom","resizedCanvasStyles","defaultLayout","previewMode","toLowerCase","animatedStyles","paddingBottom","blockSelectionClearerRef","RecursionProvider","layout","type","undefined","titleRef","current","focus","padding","onClose"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SACCC,mCADD,EAECC,SAFD,EAGCC,KAAK,IAAIC,WAHV,QAIO,mBAJP;AAKA,SACCC,WADD,EAECC,SAFD,EAGCC,UAHD,EAICJ,KAAK,IAAIK,gBAJV,EAKCC,kCAAkC,IAAIC,wBALvC,EAMCC,uBAAuB,IAAIC,aAN5B,EAOCC,6BAA6B,IAAIC,mBAPlC,EAQCC,2BAA2B,IAAIC,iBARhC,EASCC,oCATD,EAUCC,6BAA6B,IAAIC,eAVlC,EAWCC,sBAAsB,IAAIC,YAX3B,EAYCC,UAZD,EAaCC,yBAAyB,IAAIC,WAb9B,EAcCC,iCAAiC,IAAIC,uBAdtC,EAeCC,gBAAgB,IAAIC,MAfrB,EAgBCC,mCAAmC,IAAIC,qBAhBxC,QAiBO,yBAjBP;AAkBA,SAASC,SAAT,EAAoBC,MAApB,EAA4BC,OAA5B,QAA2C,oBAA3C;AACA,SAASC,MAAT,EAAiBC,gBA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 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tVisualEditorGlobalKeyboardShortcuts,\n\tPostTitle,\n\tstore as editorStore,\n} from '@wordpress/editor';\nimport {\n\tWritingFlow,\n\tBlockList,\n\tBlockTools,\n\tstore as blockEditorStore,\n\t__unstableUseBlockSelectionClearer as useBlockSelectionClearer,\n\t__unstableUseTypewriter as useTypewriter,\n\t__unstableUseClipboardHandler as useClipboardHandler,\n\t__unstableUseTypingObserver as useTypingObserver,\n\t__unstableBlockSettingsMenuFirstItem,\n\t__experimentalUseResizeCanvas as useResizeCanvas,\n\t__unstableEditorStyles as EditorStyles,\n\tuseSetting,\n\t__experimentalLayoutStyle as LayoutStyle,\n\t__unstableUseMouseMoveTypingReset as useMouseMoveTypingReset,\n\t__unstableIframe as Iframe,\n\t__experimentalUseNoRecursiveRenders as useNoRecursiveRenders,\n} from '@wordpress/block-editor';\nimport { useEffect, useRef, useMemo } from '@wordpress/element';\nimport { Button, __unstableMotion as motion } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useMergeRefs } from '@wordpress/compose';\nimport { arrowLeft } from '@wordpress/icons';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport BlockInspectorButton from './block-inspector-button';\nimport { store as editPostStore } from '../../store';\n\nfunction MaybeIframe( {\n\tchildren,\n\tcontentRef,\n\tshouldIframe,\n\tstyles,\n\tassets,\n\tstyle,\n} ) {\n\tconst ref = useMouseMoveTypingReset();\n\n\tif ( ! shouldIframe ) {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<EditorStyles styles={ styles } />\n\t\t\t\t<WritingFlow\n\t\t\t\t\tref={ contentRef }\n\t\t\t\t\tclassName=\"editor-styles-wrapper\"\n\t\t\t\t\tstyle={ { flex: '1', ...style } }\n\t\t\t\t\ttabIndex={ -1 }\n\t\t\t\t>\n\t\t\t\t\t{ children }\n\t\t\t\t</WritingFlow>\n\t\t\t</>\n\t\t);\n\t}\n\n\treturn (\n\t\t<Iframe\n\t\t\thead={ <EditorStyles styles={ styles } /> }\n\t\t\tassets={ assets }\n\t\t\tref={ ref }\n\t\t\tcontentRef={ contentRef }\n\t\t\tstyle={ { width: '100%', height: '100%', display: 'block' } }\n\t\t\tname=\"editor-canvas\"\n\t\t>\n\t\t\t{ children }\n\t\t</Iframe>\n\t);\n}\n\nexport default function VisualEditor( { styles } ) {\n\tconst {\n\t\tdeviceType,\n\t\tisWelcomeGuideVisible,\n\t\tisTemplateMode,\n\t\twrapperBlockName,\n\t\twrapperUniqueId,\n\t} = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tisFeatureActive,\n\t\t\tisEditingTemplate,\n\t\t\t__experimentalGetPreviewDeviceType,\n\t\t} = select( editPostStore );\n\t\tconst { getCurrentPostId, getCurrentPostType } = select( editorStore );\n\t\tconst _isTemplateMode = isEditingTemplate();\n\t\tlet _wrapperBlockName;\n\n\t\tif ( getCurrentPostType() === 'wp_block' ) {\n\t\t\t_wrapperBlockName = 'core/block';\n\t\t} else if ( ! _isTemplateMode ) {\n\t\t\t_wrapperBlockName = 'core/post-content';\n\t\t}\n\n\t\treturn {\n\t\t\tdeviceType: __experimentalGetPreviewDeviceType(),\n\t\t\tisWelcomeGuideVisible: isFeatureActive( 'welcomeGuide' ),\n\t\t\tisTemplateMode: _isTemplateMode,\n\t\t\twrapperBlockName: _wrapperBlockName,\n\t\t\twrapperUniqueId: getCurrentPostId(),\n\t\t};\n\t}, [] );\n\tconst { isCleanNewPost } = useSelect( editorStore );\n\tconst hasMetaBoxes = useSelect(\n\t\t( select ) => select( editPostStore ).hasMetaBoxes(),\n\t\t[]\n\t);\n\tconst { themeSupportsLayout, assets } = useSelect( ( select ) => {\n\t\tconst _settings = select( blockEditorStore ).getSettings();\n\t\treturn {\n\t\t\tthemeSupportsLayout: _settings.supportsLayout,\n\t\t\tassets: _settings.__unstableResolvedAssets,\n\t\t};\n\t}, [] );\n\tconst { clearSelectedBlock } = useDispatch( blockEditorStore );\n\tconst { setIsEditingTemplate } = useDispatch( editPostStore );\n\tconst desktopCanvasStyles = {\n\t\theight: '100%',\n\t\twidth: '100%',\n\t\tmargin: 0,\n\t\tdisplay: 'flex',\n\t\tflexFlow: 'column',\n\t\t// Default background color so that grey\n\t\t// .edit-post-editor-regions__content color doesn't show through.\n\t\tbackground: 'white',\n\t};\n\tconst templateModeStyles = {\n\t\t...desktopCanvasStyles,\n\t\tborderRadius: '2px 2px 0 0',\n\t\tborder: '1px solid #ddd',\n\t\tborderBottom: 0,\n\t};\n\tconst resizedCanvasStyles = useResizeCanvas( deviceType, isTemplateMode );\n\tconst defaultLayout = useSetting( 'layout' );\n\tconst previewMode = 'is-' + deviceType.toLowerCase() + '-preview';\n\n\tlet animatedStyles = isTemplateMode\n\t\t? templateModeStyles\n\t\t: desktopCanvasStyles;\n\tif ( resizedCanvasStyles ) {\n\t\tanimatedStyles = resizedCanvasStyles;\n\t}\n\n\tlet paddingBottom;\n\n\t// Add a constant padding for the typewritter effect. When typing at the\n\t// bottom, there needs to be room to scroll up.\n\tif ( ! hasMetaBoxes && ! resizedCanvasStyles && ! isTemplateMode ) {\n\t\tpaddingBottom = '40vh';\n\t}\n\n\tconst ref = useRef();\n\tconst contentRef = useMergeRefs( [\n\t\tref,\n\t\tuseClipboardHandler(),\n\t\tuseTypewriter(),\n\t\tuseTypingObserver(),\n\t\tuseBlockSelectionClearer(),\n\t] );\n\n\tconst blockSelectionClearerRef = useBlockSelectionClearer();\n\n\tconst [ , RecursionProvider ] = useNoRecursiveRenders(\n\t\twrapperUniqueId,\n\t\twrapperBlockName\n\t);\n\n\tconst layout = useMemo( () => {\n\t\tif ( isTemplateMode ) {\n\t\t\treturn { type: 'default' };\n\t\t}\n\n\t\tif ( themeSupportsLayout ) {\n\t\t\treturn defaultLayout;\n\t\t}\n\n\t\treturn undefined;\n\t}, [ isTemplateMode, themeSupportsLayout, defaultLayout ] );\n\n\tconst titleRef = useRef();\n\tuseEffect( () => {\n\t\tif ( isWelcomeGuideVisible || ! isCleanNewPost() ) {\n\t\t\treturn;\n\t\t}\n\t\ttitleRef?.current?.focus();\n\t}, [ isWelcomeGuideVisible, isCleanNewPost ] );\n\n\treturn (\n\t\t<BlockTools\n\t\t\t__unstableContentRef={ ref }\n\t\t\tclassName={ classnames( 'edit-post-visual-editor', {\n\t\t\t\t'is-template-mode': isTemplateMode,\n\t\t\t} ) }\n\t\t>\n\t\t\t<VisualEditorGlobalKeyboardShortcuts />\n\t\t\t<motion.div\n\t\t\t\tclassName=\"edit-post-visual-editor__content-area\"\n\t\t\t\tanimate={ {\n\t\t\t\t\tpadding: isTemplateMode ? '48px 48px 0' : '0',\n\t\t\t\t} }\n\t\t\t\tref={ blockSelectionClearerRef }\n\t\t\t>\n\t\t\t\t{ isTemplateMode && (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tclassName=\"edit-post-visual-editor__exit-template-mode\"\n\t\t\t\t\t\ticon={ arrowLeft }\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tclearSelectedBlock();\n\t\t\t\t\t\t\tsetIsEditingTemplate( false );\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Back' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t) }\n\t\t\t\t<motion.div\n\t\t\t\t\tanimate={ animatedStyles }\n\t\t\t\t\tinitial={ desktopCanvasStyles }\n\t\t\t\t\tclassName={ previewMode }\n\t\t\t\t>\n\t\t\t\t\t<MaybeIframe\n\t\t\t\t\t\tshouldIframe={\n\t\t\t\t\t\t\tisTemplateMode ||\n\t\t\t\t\t\t\tdeviceType === 'Tablet' ||\n\t\t\t\t\t\t\tdeviceType === 'Mobile'\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcontentRef={ contentRef }\n\t\t\t\t\t\tstyles={ styles }\n\t\t\t\t\t\tassets={ assets }\n\t\t\t\t\t\tstyle={ { paddingBottom } }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ themeSupportsLayout && ! isTemplateMode && (\n\t\t\t\t\t\t\t<LayoutStyle\n\t\t\t\t\t\t\t\tselector=\".edit-post-visual-editor__post-title-wrapper, .block-editor-block-list__layout.is-root-container\"\n\t\t\t\t\t\t\t\tlayout={ defaultLayout }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ ! isTemplateMode && (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclassName=\"edit-post-visual-editor__post-title-wrapper\"\n\t\t\t\t\t\t\t\tcontentEditable={ false }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<PostTitle ref={ titleRef } />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<RecursionProvider>\n\t\t\t\t\t\t\t<BlockList\n\t\t\t\t\t\t\t\tclassName={\n\t\t\t\t\t\t\t\t\tisTemplateMode\n\t\t\t\t\t\t\t\t\t\t? 'wp-site-blocks'\n\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t__experimentalLayout={ layout }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</RecursionProvider>\n\t\t\t\t\t</MaybeIframe>\n\t\t\t\t</motion.div>\n\t\t\t</motion.div>\n\t\t\t<__unstableBlockSettingsMenuFirstItem>\n\t\t\t\t{ ( { onClose } ) => (\n\t\t\t\t\t<BlockInspectorButton onClick={ onClose } />\n\t\t\t\t) }\n\t\t\t</__unstableBlockSettingsMenuFirstItem>\n\t\t</BlockTools>\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-post/src/components/visual-editor/index.js"],"names":["classnames","VisualEditorGlobalKeyboardShortcuts","PostTitle","store","editorStore","WritingFlow","BlockList","BlockTools","blockEditorStore","__unstableUseBlockSelectionClearer","useBlockSelectionClearer","__unstableUseTypewriter","useTypewriter","__unstableUseClipboardHandler","useClipboardHandler","__unstableUseTypingObserver","useTypingObserver","__unstableBlockSettingsMenuFirstItem","__experimentalUseResizeCanvas","useResizeCanvas","__unstableEditorStyles","EditorStyles","useSetting","__experimentalLayoutStyle","LayoutStyle","__unstableUseMouseMoveTypingReset","useMouseMoveTypingReset","__unstableIframe","Iframe","__experimentalUseNoRecursiveRenders","useNoRecursiveRenders","useEffect","useRef","useMemo","Button","__unstableMotion","motion","useSelect","useDispatch","useMergeRefs","arrowLeft","__","BlockInspectorButton","editPostStore","MaybeIframe","children","contentRef","shouldIframe","styles","assets","style","ref","flex","width","height","display","VisualEditor","deviceType","isWelcomeGuideVisible","isTemplateMode","wrapperBlockName","wrapperUniqueId","select","isFeatureActive","isEditingTemplate","__experimentalGetPreviewDeviceType","getCurrentPostId","getCurrentPostType","_isTemplateMode","_wrapperBlockName","isCleanNewPost","hasMetaBoxes","themeSupportsLayout","_settings","getSettings","supportsLayout","__unstableResolvedAssets","clearSelectedBlock","setIsEditingTemplate","desktopCanvasStyles","margin","flexFlow","background","templateModeStyles","borderRadius","border","borderBottom","resizedCanvasStyles","defaultLayout","previewMode","toLowerCase","animatedStyles","paddingBottom","blockSelectionClearerRef","RecursionProvider","layout","type","undefined","titleRef","current","focus","padding","definitions","onClose"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SACCC,mCADD,EAECC,SAFD,EAGCC,KAAK,IAAIC,WAHV,QAIO,mBAJP;AAKA,SACCC,WADD,EAECC,SAFD,EAGCC,UAHD,EAICJ,KAAK,IAAIK,gBAJV,EAKCC,kCAAkC,IAAIC,wBALvC,EAMCC,uBAAuB,IAAIC,aAN5B,EAOCC,6BAA6B,IAAIC,mBAPlC,EAQCC,2BAA2B,IAAIC,iBARhC,EASCC,oCATD,EAUCC,6BAA6B,IAAIC,eAVlC,EAWCC,sBAAsB,IAAIC,YAX3B,EAYCC,UAZD,EAaCC,yBAAyB,IAAIC,WAb9B,EAcCC,iCAAiC,IAAIC,uBAdtC,EAeCC,gBAAgB,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AAA,oBAAoB,EAAGoC;AANxB,IADD,CA1BD,CALD,CAnBD,CAPD,EAsEC,cAAC,oCAAD,QACG;AAAA,QAAE;AAAEQ,MAAAA;AAAF,KAAF;AAAA,WACD,cAAC,oBAAD;AAAsB,MAAA,OAAO,EAAGA;AAAhC,MADC;AAAA,GADH,CAtED,CADD;AA8EA","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tVisualEditorGlobalKeyboardShortcuts,\n\tPostTitle,\n\tstore as editorStore,\n} from '@wordpress/editor';\nimport {\n\tWritingFlow,\n\tBlockList,\n\tBlockTools,\n\tstore as blockEditorStore,\n\t__unstableUseBlockSelectionClearer as useBlockSelectionClearer,\n\t__unstableUseTypewriter as useTypewriter,\n\t__unstableUseClipboardHandler as useClipboardHandler,\n\t__unstableUseTypingObserver as useTypingObserver,\n\t__unstableBlockSettingsMenuFirstItem,\n\t__experimentalUseResizeCanvas as useResizeCanvas,\n\t__unstableEditorStyles as EditorStyles,\n\tuseSetting,\n\t__experimentalLayoutStyle as LayoutStyle,\n\t__unstableUseMouseMoveTypingReset as useMouseMoveTypingReset,\n\t__unstableIframe as Iframe,\n\t__experimentalUseNoRecursiveRenders as useNoRecursiveRenders,\n} from '@wordpress/block-editor';\nimport { useEffect, useRef, useMemo } from '@wordpress/element';\nimport { Button, __unstableMotion as motion } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useMergeRefs } from '@wordpress/compose';\nimport { arrowLeft } from '@wordpress/icons';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport BlockInspectorButton from './block-inspector-button';\nimport { store as editPostStore } from '../../store';\n\nfunction MaybeIframe( {\n\tchildren,\n\tcontentRef,\n\tshouldIframe,\n\tstyles,\n\tassets,\n\tstyle,\n} ) {\n\tconst ref = useMouseMoveTypingReset();\n\n\tif ( ! shouldIframe ) {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<EditorStyles styles={ styles } />\n\t\t\t\t<WritingFlow\n\t\t\t\t\tref={ contentRef }\n\t\t\t\t\tclassName=\"editor-styles-wrapper\"\n\t\t\t\t\tstyle={ { flex: '1', ...style } }\n\t\t\t\t\ttabIndex={ -1 }\n\t\t\t\t>\n\t\t\t\t\t{ children }\n\t\t\t\t</WritingFlow>\n\t\t\t</>\n\t\t);\n\t}\n\n\treturn (\n\t\t<Iframe\n\t\t\thead={ <EditorStyles styles={ styles } /> }\n\t\t\tassets={ assets }\n\t\t\tref={ ref }\n\t\t\tcontentRef={ contentRef }\n\t\t\tstyle={ { width: '100%', height: '100%', display: 'block' } }\n\t\t\tname=\"editor-canvas\"\n\t\t>\n\t\t\t{ children }\n\t\t</Iframe>\n\t);\n}\n\nexport default function VisualEditor( { styles } ) {\n\tconst {\n\t\tdeviceType,\n\t\tisWelcomeGuideVisible,\n\t\tisTemplateMode,\n\t\twrapperBlockName,\n\t\twrapperUniqueId,\n\t} = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tisFeatureActive,\n\t\t\tisEditingTemplate,\n\t\t\t__experimentalGetPreviewDeviceType,\n\t\t} = select( editPostStore );\n\t\tconst { getCurrentPostId, getCurrentPostType } = select( editorStore );\n\t\tconst _isTemplateMode = isEditingTemplate();\n\t\tlet _wrapperBlockName;\n\n\t\tif ( getCurrentPostType() === 'wp_block' ) {\n\t\t\t_wrapperBlockName = 'core/block';\n\t\t} else if ( ! _isTemplateMode ) {\n\t\t\t_wrapperBlockName = 'core/post-content';\n\t\t}\n\n\t\treturn {\n\t\t\tdeviceType: __experimentalGetPreviewDeviceType(),\n\t\t\tisWelcomeGuideVisible: isFeatureActive( 'welcomeGuide' ),\n\t\t\tisTemplateMode: _isTemplateMode,\n\t\t\twrapperBlockName: _wrapperBlockName,\n\t\t\twrapperUniqueId: getCurrentPostId(),\n\t\t};\n\t}, [] );\n\tconst { isCleanNewPost } = useSelect( editorStore );\n\tconst hasMetaBoxes = useSelect(\n\t\t( select ) => select( editPostStore ).hasMetaBoxes(),\n\t\t[]\n\t);\n\tconst { themeSupportsLayout, assets } = useSelect( ( select ) => {\n\t\tconst _settings = select( blockEditorStore ).getSettings();\n\t\treturn {\n\t\t\tthemeSupportsLayout: _settings.supportsLayout,\n\t\t\tassets: _settings.__unstableResolvedAssets,\n\t\t};\n\t}, [] );\n\tconst { clearSelectedBlock } = useDispatch( blockEditorStore );\n\tconst { setIsEditingTemplate } = useDispatch( editPostStore );\n\tconst desktopCanvasStyles = {\n\t\theight: '100%',\n\t\twidth: '100%',\n\t\tmargin: 0,\n\t\tdisplay: 'flex',\n\t\tflexFlow: 'column',\n\t\t// Default background color so that grey\n\t\t// .edit-post-editor-regions__content color doesn't show through.\n\t\tbackground: 'white',\n\t};\n\tconst templateModeStyles = {\n\t\t...desktopCanvasStyles,\n\t\tborderRadius: '2px 2px 0 0',\n\t\tborder: '1px solid #ddd',\n\t\tborderBottom: 0,\n\t};\n\tconst resizedCanvasStyles = useResizeCanvas( deviceType, isTemplateMode );\n\tconst defaultLayout = useSetting( 'layout' );\n\tconst previewMode = 'is-' + deviceType.toLowerCase() + '-preview';\n\n\tlet animatedStyles = isTemplateMode\n\t\t? templateModeStyles\n\t\t: desktopCanvasStyles;\n\tif ( resizedCanvasStyles ) {\n\t\tanimatedStyles = resizedCanvasStyles;\n\t}\n\n\tlet paddingBottom;\n\n\t// Add a constant padding for the typewritter effect. When typing at the\n\t// bottom, there needs to be room to scroll up.\n\tif ( ! hasMetaBoxes && ! resizedCanvasStyles && ! isTemplateMode ) {\n\t\tpaddingBottom = '40vh';\n\t}\n\n\tconst ref = useRef();\n\tconst contentRef = useMergeRefs( [\n\t\tref,\n\t\tuseClipboardHandler(),\n\t\tuseTypewriter(),\n\t\tuseTypingObserver(),\n\t\tuseBlockSelectionClearer(),\n\t] );\n\n\tconst blockSelectionClearerRef = useBlockSelectionClearer();\n\n\tconst [ , RecursionProvider ] = useNoRecursiveRenders(\n\t\twrapperUniqueId,\n\t\twrapperBlockName\n\t);\n\n\tconst layout = useMemo( () => {\n\t\tif ( isTemplateMode ) {\n\t\t\treturn { type: 'default' };\n\t\t}\n\n\t\tif ( themeSupportsLayout ) {\n\t\t\treturn defaultLayout;\n\t\t}\n\n\t\treturn undefined;\n\t}, [ isTemplateMode, themeSupportsLayout, defaultLayout ] );\n\n\tconst titleRef = useRef();\n\tuseEffect( () => {\n\t\tif ( isWelcomeGuideVisible || ! isCleanNewPost() ) {\n\t\t\treturn;\n\t\t}\n\t\ttitleRef?.current?.focus();\n\t}, [ isWelcomeGuideVisible, isCleanNewPost ] );\n\n\treturn (\n\t\t<BlockTools\n\t\t\t__unstableContentRef={ ref }\n\t\t\tclassName={ classnames( 'edit-post-visual-editor', {\n\t\t\t\t'is-template-mode': isTemplateMode,\n\t\t\t} ) }\n\t\t>\n\t\t\t<VisualEditorGlobalKeyboardShortcuts />\n\t\t\t<motion.div\n\t\t\t\tclassName=\"edit-post-visual-editor__content-area\"\n\t\t\t\tanimate={ {\n\t\t\t\t\tpadding: isTemplateMode ? '48px 48px 0' : '0',\n\t\t\t\t} }\n\t\t\t\tref={ blockSelectionClearerRef }\n\t\t\t>\n\t\t\t\t{ isTemplateMode && (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tclassName=\"edit-post-visual-editor__exit-template-mode\"\n\t\t\t\t\t\ticon={ arrowLeft }\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tclearSelectedBlock();\n\t\t\t\t\t\t\tsetIsEditingTemplate( false );\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Back' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t) }\n\t\t\t\t<motion.div\n\t\t\t\t\tanimate={ animatedStyles }\n\t\t\t\t\tinitial={ desktopCanvasStyles }\n\t\t\t\t\tclassName={ previewMode }\n\t\t\t\t>\n\t\t\t\t\t<MaybeIframe\n\t\t\t\t\t\tshouldIframe={\n\t\t\t\t\t\t\tisTemplateMode ||\n\t\t\t\t\t\t\tdeviceType === 'Tablet' ||\n\t\t\t\t\t\t\tdeviceType === 'Mobile'\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcontentRef={ contentRef }\n\t\t\t\t\t\tstyles={ styles }\n\t\t\t\t\t\tassets={ assets }\n\t\t\t\t\t\tstyle={ { paddingBottom } }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ themeSupportsLayout && ! isTemplateMode && (\n\t\t\t\t\t\t\t<LayoutStyle\n\t\t\t\t\t\t\t\tselector=\".edit-post-visual-editor__post-title-wrapper, .block-editor-block-list__layout.is-root-container\"\n\t\t\t\t\t\t\t\tlayout={ defaultLayout }\n\t\t\t\t\t\t\t\tlayoutDefinitions={ defaultLayout?.definitions }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ ! isTemplateMode && (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclassName=\"edit-post-visual-editor__post-title-wrapper\"\n\t\t\t\t\t\t\t\tcontentEditable={ false }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<PostTitle ref={ titleRef } />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<RecursionProvider>\n\t\t\t\t\t\t\t<BlockList\n\t\t\t\t\t\t\t\tclassName={\n\t\t\t\t\t\t\t\t\tisTemplateMode\n\t\t\t\t\t\t\t\t\t\t? 'wp-site-blocks'\n\t\t\t\t\t\t\t\t\t\t: 'is-layout-flow' // Ensure root level blocks receive default/flow blockGap styling rules.\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t__experimentalLayout={ layout }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</RecursionProvider>\n\t\t\t\t\t</MaybeIframe>\n\t\t\t\t</motion.div>\n\t\t\t</motion.div>\n\t\t\t<__unstableBlockSettingsMenuFirstItem>\n\t\t\t\t{ ( { onClose } ) => (\n\t\t\t\t\t<BlockInspectorButton onClick={ onClose } />\n\t\t\t\t) }\n\t\t\t</__unstableBlockSettingsMenuFirstItem>\n\t\t</BlockTools>\n\t);\n}\n"]}
@@ -468,9 +468,6 @@ body.is-fullscreen-mode .interface-interface-skeleton {
468
468
  .interface-preferences-modal .components-modal__content {
469
469
  padding: 0;
470
470
  }
471
- .interface-preferences-modal .components-modal__content::before {
472
- content: none;
473
- }
474
471
  }
475
472
 
476
473
  .interface-preferences__tabs .components-tab-panel__tabs {
@@ -1008,9 +1005,6 @@ body.is-fullscreen-mode .interface-interface-skeleton {
1008
1005
  .edit-post-keyboard-shortcut-help-modal__section {
1009
1006
  margin: 0 0 2rem 0;
1010
1007
  }
1011
- .edit-post-keyboard-shortcut-help-modal__main-shortcuts .edit-post-keyboard-shortcut-help-modal__shortcut-list {
1012
- margin-top: -25px;
1013
- }
1014
1008
  .edit-post-keyboard-shortcut-help-modal__section-title {
1015
1009
  font-size: 0.9rem;
1016
1010
  font-weight: 600;
@@ -1430,44 +1424,27 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
1430
1424
  padding: 16px;
1431
1425
  }
1432
1426
 
1433
- .editor-post-author__select {
1434
- margin: -5px 0;
1435
- width: 100%;
1436
- }
1437
- @supports (position: sticky) {
1438
- .editor-post-author__select {
1439
- width: auto;
1440
- }
1441
- }
1442
-
1443
- .edit-post-post-link__link-post-name {
1444
- font-weight: 600;
1427
+ .edit-post-post-author {
1428
+ display: flex;
1429
+ flex-direction: column;
1430
+ align-items: stretch;
1445
1431
  }
1446
1432
 
1447
- .edit-post-post-link__preview-label {
1448
- font-weight: 400;
1449
- margin: 0;
1433
+ .edit-post-post-format {
1434
+ display: flex;
1435
+ flex-direction: column;
1436
+ align-items: stretch;
1450
1437
  }
1451
1438
 
1452
- .edit-post-post-link__link {
1453
- text-align: right;
1454
- word-wrap: break-word;
1455
- display: block;
1456
- }
1457
- .edit-post-post-link__preview-link-container {
1458
- direction: ltr;
1459
- }
1460
1439
  .edit-post-post-schedule {
1461
1440
  width: 100%;
1462
1441
  position: relative;
1463
1442
  justify-content: flex-start;
1464
- align-items: flex-start;
1465
1443
  }
1466
1444
  .edit-post-post-schedule span {
1467
1445
  display: block;
1468
1446
  width: 45%;
1469
1447
  flex-shrink: 0;
1470
- padding: 6px 0;
1471
1448
  }
1472
1449
 
1473
1450
  .components-button.edit-post-post-schedule__toggle {
@@ -1483,9 +1460,10 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
1483
1460
  margin: 8px;
1484
1461
  }
1485
1462
 
1486
- .editor-post-slug__input {
1487
- margin: -5px 0;
1488
- padding: 2px;
1463
+ .edit-post-post-slug {
1464
+ display: flex;
1465
+ flex-direction: column;
1466
+ align-items: stretch;
1489
1467
  }
1490
1468
 
1491
1469
  .edit-post-post-status .edit-post-post-publish-dropdown__switch-to-draft {
@@ -1523,19 +1501,34 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
1523
1501
  margin: 8px;
1524
1502
  }
1525
1503
 
1526
- .edit-post-post-template__create-modal .components-modal__header {
1527
- border-bottom: none;
1528
- }
1529
- .edit-post-post-template__create-modal .components-modal__content::before {
1530
- margin-bottom: 4px;
1531
- }
1532
-
1533
1504
  @media (min-width: 782px) {
1534
1505
  .edit-post-post-template__create-form {
1535
1506
  width: 320px;
1536
1507
  }
1537
1508
  }
1538
1509
 
1510
+ .edit-post-post-url {
1511
+ width: 100%;
1512
+ justify-content: flex-start;
1513
+ }
1514
+ .edit-post-post-url span {
1515
+ display: block;
1516
+ width: 45%;
1517
+ flex-shrink: 0;
1518
+ }
1519
+
1520
+ .components-button.edit-post-post-url__toggle {
1521
+ text-align: right;
1522
+ white-space: normal;
1523
+ height: auto;
1524
+ word-break: break-word;
1525
+ }
1526
+
1527
+ .edit-post-post-url__dialog .editor-post-url {
1528
+ min-width: 248px;
1529
+ margin: 8px;
1530
+ }
1531
+
1539
1532
  .edit-post-post-visibility {
1540
1533
  width: 100%;
1541
1534
  justify-content: flex-start;
@@ -1769,12 +1762,6 @@ h2.edit-post-template-summary__title {
1769
1762
  height: 70%;
1770
1763
  }
1771
1764
  }
1772
- .edit-post-start-page-options__modal .components-modal__header {
1773
- border-bottom: none;
1774
- }
1775
- .edit-post-start-page-options__modal .components-modal__content::before {
1776
- content: none;
1777
- }
1778
1765
 
1779
1766
  .edit-post-start-page-options__modal-content .block-editor-block-patterns-list {
1780
1767
  column-count: 2;
@@ -468,9 +468,6 @@ body.is-fullscreen-mode .interface-interface-skeleton {
468
468
  .interface-preferences-modal .components-modal__content {
469
469
  padding: 0;
470
470
  }
471
- .interface-preferences-modal .components-modal__content::before {
472
- content: none;
473
- }
474
471
  }
475
472
 
476
473
  .interface-preferences__tabs .components-tab-panel__tabs {
@@ -1008,9 +1005,6 @@ body.is-fullscreen-mode .interface-interface-skeleton {
1008
1005
  .edit-post-keyboard-shortcut-help-modal__section {
1009
1006
  margin: 0 0 2rem 0;
1010
1007
  }
1011
- .edit-post-keyboard-shortcut-help-modal__main-shortcuts .edit-post-keyboard-shortcut-help-modal__shortcut-list {
1012
- margin-top: -25px;
1013
- }
1014
1008
  .edit-post-keyboard-shortcut-help-modal__section-title {
1015
1009
  font-size: 0.9rem;
1016
1010
  font-weight: 600;
@@ -1430,48 +1424,27 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
1430
1424
  padding: 16px;
1431
1425
  }
1432
1426
 
1433
- .editor-post-author__select {
1434
- margin: -5px 0;
1435
- width: 100%;
1436
- }
1437
- @supports (position: sticky) {
1438
- .editor-post-author__select {
1439
- width: auto;
1440
- }
1441
- }
1442
-
1443
- .edit-post-post-link__link-post-name {
1444
- font-weight: 600;
1445
- }
1446
-
1447
- .edit-post-post-link__preview-label {
1448
- font-weight: 400;
1449
- margin: 0;
1450
- }
1451
-
1452
- .edit-post-post-link__link {
1453
- text-align: left;
1454
- word-wrap: break-word;
1455
- display: block;
1427
+ .edit-post-post-author {
1428
+ display: flex;
1429
+ flex-direction: column;
1430
+ align-items: stretch;
1456
1431
  }
1457
1432
 
1458
- /* rtl:begin:ignore */
1459
- .edit-post-post-link__preview-link-container {
1460
- direction: ltr;
1433
+ .edit-post-post-format {
1434
+ display: flex;
1435
+ flex-direction: column;
1436
+ align-items: stretch;
1461
1437
  }
1462
1438
 
1463
- /* rtl:end:ignore */
1464
1439
  .edit-post-post-schedule {
1465
1440
  width: 100%;
1466
1441
  position: relative;
1467
1442
  justify-content: flex-start;
1468
- align-items: flex-start;
1469
1443
  }
1470
1444
  .edit-post-post-schedule span {
1471
1445
  display: block;
1472
1446
  width: 45%;
1473
1447
  flex-shrink: 0;
1474
- padding: 6px 0;
1475
1448
  }
1476
1449
 
1477
1450
  .components-button.edit-post-post-schedule__toggle {
@@ -1487,9 +1460,10 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
1487
1460
  margin: 8px;
1488
1461
  }
1489
1462
 
1490
- .editor-post-slug__input {
1491
- margin: -5px 0;
1492
- padding: 2px;
1463
+ .edit-post-post-slug {
1464
+ display: flex;
1465
+ flex-direction: column;
1466
+ align-items: stretch;
1493
1467
  }
1494
1468
 
1495
1469
  .edit-post-post-status .edit-post-post-publish-dropdown__switch-to-draft {
@@ -1527,19 +1501,34 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
1527
1501
  margin: 8px;
1528
1502
  }
1529
1503
 
1530
- .edit-post-post-template__create-modal .components-modal__header {
1531
- border-bottom: none;
1532
- }
1533
- .edit-post-post-template__create-modal .components-modal__content::before {
1534
- margin-bottom: 4px;
1535
- }
1536
-
1537
1504
  @media (min-width: 782px) {
1538
1505
  .edit-post-post-template__create-form {
1539
1506
  width: 320px;
1540
1507
  }
1541
1508
  }
1542
1509
 
1510
+ .edit-post-post-url {
1511
+ width: 100%;
1512
+ justify-content: flex-start;
1513
+ }
1514
+ .edit-post-post-url span {
1515
+ display: block;
1516
+ width: 45%;
1517
+ flex-shrink: 0;
1518
+ }
1519
+
1520
+ .components-button.edit-post-post-url__toggle {
1521
+ text-align: left;
1522
+ white-space: normal;
1523
+ height: auto;
1524
+ word-break: break-word;
1525
+ }
1526
+
1527
+ .edit-post-post-url__dialog .editor-post-url {
1528
+ min-width: 248px;
1529
+ margin: 8px;
1530
+ }
1531
+
1543
1532
  .edit-post-post-visibility {
1544
1533
  width: 100%;
1545
1534
  justify-content: flex-start;
@@ -1773,12 +1762,6 @@ h2.edit-post-template-summary__title {
1773
1762
  height: 70%;
1774
1763
  }
1775
1764
  }
1776
- .edit-post-start-page-options__modal .components-modal__header {
1777
- border-bottom: none;
1778
- }
1779
- .edit-post-start-page-options__modal .components-modal__content::before {
1780
- content: none;
1781
- }
1782
1765
 
1783
1766
  .edit-post-start-page-options__modal-content .block-editor-block-patterns-list {
1784
1767
  column-count: 2;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/edit-post",
3
- "version": "6.9.0",
3
+ "version": "6.10.0",
4
4
  "description": "Edit Post module for WordPress.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -27,31 +27,31 @@
27
27
  "react-native": "src/index",
28
28
  "dependencies": {
29
29
  "@babel/runtime": "^7.16.0",
30
- "@wordpress/a11y": "^3.12.0",
31
- "@wordpress/api-fetch": "^6.9.0",
32
- "@wordpress/block-editor": "^9.4.0",
33
- "@wordpress/block-library": "^7.9.0",
34
- "@wordpress/blocks": "^11.11.0",
35
- "@wordpress/components": "^19.14.0",
36
- "@wordpress/compose": "^5.10.0",
37
- "@wordpress/core-data": "^4.10.0",
38
- "@wordpress/data": "^6.12.0",
39
- "@wordpress/deprecated": "^3.12.0",
40
- "@wordpress/editor": "^12.11.0",
41
- "@wordpress/element": "^4.10.0",
42
- "@wordpress/hooks": "^3.12.0",
43
- "@wordpress/i18n": "^4.12.0",
44
- "@wordpress/icons": "^9.3.0",
45
- "@wordpress/interface": "^4.11.0",
46
- "@wordpress/keyboard-shortcuts": "^3.10.0",
47
- "@wordpress/keycodes": "^3.12.0",
48
- "@wordpress/media-utils": "^4.3.0",
49
- "@wordpress/notices": "^3.12.0",
50
- "@wordpress/plugins": "^4.10.0",
51
- "@wordpress/preferences": "^2.4.0",
52
- "@wordpress/url": "^3.13.0",
53
- "@wordpress/viewport": "^4.10.0",
54
- "@wordpress/warning": "^2.12.0",
30
+ "@wordpress/a11y": "^3.13.0",
31
+ "@wordpress/api-fetch": "^6.10.0",
32
+ "@wordpress/block-editor": "^9.5.0",
33
+ "@wordpress/block-library": "^7.10.0",
34
+ "@wordpress/blocks": "^11.12.0",
35
+ "@wordpress/components": "^19.15.0",
36
+ "@wordpress/compose": "^5.11.0",
37
+ "@wordpress/core-data": "^4.11.0",
38
+ "@wordpress/data": "^6.13.0",
39
+ "@wordpress/deprecated": "^3.13.0",
40
+ "@wordpress/editor": "^12.12.0",
41
+ "@wordpress/element": "^4.11.0",
42
+ "@wordpress/hooks": "^3.13.0",
43
+ "@wordpress/i18n": "^4.13.0",
44
+ "@wordpress/icons": "^9.4.0",
45
+ "@wordpress/interface": "^4.12.0",
46
+ "@wordpress/keyboard-shortcuts": "^3.11.0",
47
+ "@wordpress/keycodes": "^3.13.0",
48
+ "@wordpress/media-utils": "^4.4.0",
49
+ "@wordpress/notices": "^3.13.0",
50
+ "@wordpress/plugins": "^4.11.0",
51
+ "@wordpress/preferences": "^2.5.0",
52
+ "@wordpress/url": "^3.14.0",
53
+ "@wordpress/viewport": "^4.11.0",
54
+ "@wordpress/warning": "^2.13.0",
55
55
  "classnames": "^2.3.1",
56
56
  "lodash": "^4.17.21",
57
57
  "memize": "^1.1.0",
@@ -64,5 +64,5 @@
64
64
  "publishConfig": {
65
65
  "access": "public"
66
66
  },
67
- "gitHead": "a80eeb62ec7cb1418b9915c277e084a29d6665e3"
67
+ "gitHead": "9d9d33bbdf317a4381b8ca1713e43bb50df653b3"
68
68
  }
@@ -9,6 +9,7 @@ import { mapValues } from 'lodash';
9
9
  import { __ } from '@wordpress/i18n';
10
10
  import { TextControl } from '@wordpress/components';
11
11
  import { useDispatch, useSelect } from '@wordpress/data';
12
+ import { useState } from '@wordpress/element';
12
13
  import { store as editorStore } from '@wordpress/editor';
13
14
  import { store as coreStore } from '@wordpress/core-data';
14
15
 
@@ -18,6 +19,7 @@ import { store as coreStore } from '@wordpress/core-data';
18
19
  import { store as editPostStore } from '../../../store';
19
20
 
20
21
  export default function EditTemplateTitle() {
22
+ const [ forceEmpty, setForceEmpty ] = useState( false );
21
23
  const { template } = useSelect( ( select ) => {
22
24
  const { getEditedPostTemplate } = select( editPostStore );
23
25
  return {
@@ -45,11 +47,18 @@ export default function EditTemplateTitle() {
45
47
  <div className="edit-site-template-details__group">
46
48
  <TextControl
47
49
  label={ __( 'Title' ) }
48
- value={ templateTitle }
50
+ value={ forceEmpty ? '' : templateTitle }
49
51
  help={ __(
50
52
  'Give the template a title that indicates its purpose, e.g. "Full Width".'
51
53
  ) }
52
54
  onChange={ ( newTitle ) => {
55
+ // Allow having the field temporarily empty while typing.
56
+ if ( ! newTitle && ! forceEmpty ) {
57
+ setForceEmpty( true );
58
+ return;
59
+ }
60
+ setForceEmpty( false );
61
+
53
62
  const settings = getEditorSettings();
54
63
  const newAvailableTemplates = mapValues(
55
64
  settings.availableTemplates,
@@ -68,6 +77,7 @@ export default function EditTemplateTitle() {
68
77
  title: newTitle,
69
78
  } );
70
79
  } }
80
+ onBlur={ () => setForceEmpty( false ) }
71
81
  />
72
82
  </div>
73
83
  );
@@ -2,7 +2,6 @@
2
2
  * External dependencies
3
3
  */
4
4
  import classnames from 'classnames';
5
- import { isString } from 'lodash';
6
5
 
7
6
  /**
8
7
  * WordPress dependencies
@@ -41,7 +40,7 @@ const ShortcutList = ( { shortcuts } ) => (
41
40
  className="edit-post-keyboard-shortcut-help-modal__shortcut"
42
41
  key={ index }
43
42
  >
44
- { isString( shortcut ) ? (
43
+ { typeof shortcut === 'string' ? (
45
44
  <DynamicShortcut name={ shortcut } />
46
45
  ) : (
47
46
  <Shortcut { ...shortcut } />
@@ -3,11 +3,6 @@
3
3
  margin: 0 0 2rem 0;
4
4
  }
5
5
 
6
- &__main-shortcuts .edit-post-keyboard-shortcut-help-modal__shortcut-list {
7
- // Push the shortcut to be flush with top modal header.
8
- margin-top: -$grid-unit-30 -$border-width;
9
- }
10
-
11
6
  &__section-title {
12
7
  font-size: 0.9rem;
13
8
  font-weight: 600;
@@ -19,7 +19,6 @@ import {
19
19
  PostTypeSupportCheck,
20
20
  store as editorStore,
21
21
  } from '@wordpress/editor';
22
- import { store as coreStore } from '@wordpress/core-data';
23
22
  import {
24
23
  PreferencesModal,
25
24
  PreferencesModalTabs,
@@ -45,15 +44,10 @@ const MODAL_NAME = 'edit-post/preferences';
45
44
  export default function EditPostPreferencesModal() {
46
45
  const isLargeViewport = useViewportMatch( 'medium' );
47
46
  const { closeModal } = useDispatch( editPostStore );
48
- const { isModalActive, isViewable } = useSelect( ( select ) => {
49
- const { getEditedPostAttribute } = select( editorStore );
50
- const { getPostType } = select( coreStore );
51
- const postType = getPostType( getEditedPostAttribute( 'type' ) );
52
- return {
53
- isModalActive: select( editPostStore ).isModalActive( MODAL_NAME ),
54
- isViewable: get( postType, [ 'viewable' ], false ),
55
- };
56
- }, [] );
47
+ const isModalActive = useSelect(
48
+ ( select ) => select( editPostStore ).isModalActive( MODAL_NAME ),
49
+ []
50
+ );
57
51
  const showBlockBreadcrumbsOption = useSelect(
58
52
  ( select ) => {
59
53
  const { getEditorSettings } = select( editorStore );
@@ -200,18 +194,6 @@ export default function EditPostPreferencesModal() {
200
194
  ) }
201
195
  >
202
196
  <EnablePluginDocumentSettingPanelOption.Slot />
203
- { isViewable && (
204
- <EnablePanelOption
205
- label={ __( 'Permalink' ) }
206
- panelName="post-link"
207
- />
208
- ) }
209
- { isViewable && (
210
- <EnablePanelOption
211
- label={ __( 'Template' ) }
212
- panelName="template"
213
- />
214
- ) }
215
197
  <PostTaxonomies
216
198
  taxonomyWrapper={ ( content, taxonomy ) => (
217
199
  <EnablePanelOption
@@ -260,7 +242,7 @@ export default function EditPostPreferencesModal() {
260
242
  ),
261
243
  },
262
244
  ],
263
- [ isViewable, isLargeViewport, showBlockBreadcrumbsOption ]
245
+ [ isLargeViewport, showBlockBreadcrumbsOption ]
264
246
  );
265
247
 
266
248
  if ( ! isModalActive ) {
@@ -21,13 +21,13 @@ jest.mock( '@wordpress/compose/src/hooks/use-viewport-match', () => jest.fn() );
21
21
  describe( 'EditPostPreferencesModal', () => {
22
22
  describe( 'should match snapshot when the modal is active', () => {
23
23
  it( 'large viewports', () => {
24
- useSelect.mockImplementation( () => ( { isModalActive: true } ) );
24
+ useSelect.mockImplementation( () => true );
25
25
  useViewportMatch.mockImplementation( () => true );
26
26
  const wrapper = shallow( <EditPostPreferencesModal /> );
27
27
  expect( wrapper ).toMatchSnapshot();
28
28
  } );
29
29
  it( 'small viewports', () => {
30
- useSelect.mockImplementation( () => ( { isModalActive: true } ) );
30
+ useSelect.mockImplementation( () => true );
31
31
  useViewportMatch.mockImplementation( () => false );
32
32
  const wrapper = shallow( <EditPostPreferencesModal /> );
33
33
  expect( wrapper ).toMatchSnapshot();
@@ -35,7 +35,7 @@ describe( 'EditPostPreferencesModal', () => {
35
35
  } );
36
36
 
37
37
  it( 'should not render when the modal is not active', () => {
38
- useSelect.mockImplementation( () => ( { isModalActive: false } ) );
38
+ useSelect.mockImplementation( () => false );
39
39
  const wrapper = shallow( <EditPostPreferencesModal /> );
40
40
  expect( wrapper.isEmptyRender() ).toBe( true );
41
41
  } );
@@ -1,11 +1,5 @@
1
- .editor-post-author__select {
2
- margin: -5px 0;
3
-
4
- // Set the width of the author select box in IE11 to prevent it overflowing
5
- // outside of the container because of IE11 flexbox bugs.
6
- // We reset it to `width: auto;` for non-IE11 browsers.
7
- width: 100%;
8
- @supports (position: sticky) {
9
- width: auto;
10
- }
1
+ .edit-post-post-author {
2
+ display: flex;
3
+ flex-direction: column;
4
+ align-items: stretch;
11
5
  }
@@ -10,7 +10,7 @@ import {
10
10
  export function PostFormat() {
11
11
  return (
12
12
  <PostFormatCheck>
13
- <PanelRow>
13
+ <PanelRow className="edit-post-post-format">
14
14
  <PostFormatForm />
15
15
  </PanelRow>
16
16
  </PostFormatCheck>
@@ -0,0 +1,5 @@
1
+ .edit-post-post-format {
2
+ display: flex;
3
+ flex-direction: column;
4
+ align-items: stretch;
5
+ }