@wordpress/edit-post 5.0.1-next.253d9b6e21.0 → 5.0.3
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/README.md +2 -5
- package/build/components/header/header-toolbar/index.native.js +10 -3
- package/build/components/header/header-toolbar/index.native.js.map +1 -1
- package/build/components/header/more-menu/index.js +3 -14
- package/build/components/header/more-menu/index.js.map +1 -1
- package/build/components/header/template-title/index.js +1 -1
- package/build/components/header/template-title/index.js.map +1 -1
- package/build/components/header/writing-menu/index.js +7 -10
- package/build/components/header/writing-menu/index.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +1 -1
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/index.js +1 -3
- package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -1
- package/build/components/keyboard-shortcuts/index.js +1 -8
- package/build/components/keyboard-shortcuts/index.js.map +1 -1
- package/build/components/layout/index.js +3 -5
- package/build/components/layout/index.js.map +1 -1
- package/build/components/meta-boxes/index.js +39 -19
- package/build/components/meta-boxes/index.js.map +1 -1
- package/build/components/preferences-modal/index.js +46 -19
- package/build/components/preferences-modal/index.js.map +1 -1
- package/build/components/secondary-sidebar/inserter-sidebar.js +2 -1
- package/build/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
- package/build/components/sidebar/plugin-sidebar/index.js +1 -1
- package/build/components/sidebar/plugin-sidebar/index.js.map +1 -1
- package/build/components/sidebar/post-link/index.js +1 -1
- package/build/components/sidebar/post-link/index.js.map +1 -1
- package/build/components/sidebar/template/actions.js +6 -1
- package/build/components/sidebar/template/actions.js.map +1 -1
- package/build/components/visual-editor/index.js +6 -4
- package/build/components/visual-editor/index.js.map +1 -1
- package/build/editor.js +9 -5
- package/build/editor.js.map +1 -1
- package/build/index.js +22 -12
- package/build/index.js.map +1 -1
- package/build/plugins/welcome-guide-menu-item/index.js +6 -7
- package/build/plugins/welcome-guide-menu-item/index.js.map +1 -1
- package/build/store/actions.js +68 -59
- package/build/store/actions.js.map +1 -1
- package/build/store/defaults.js +0 -9
- package/build/store/defaults.js.map +1 -1
- package/build/store/reducer.js +20 -11
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +24 -10
- package/build/store/selectors.js.map +1 -1
- package/build-module/components/header/header-toolbar/index.native.js +11 -4
- package/build-module/components/header/header-toolbar/index.native.js.map +1 -1
- package/build-module/components/header/more-menu/index.js +5 -15
- package/build-module/components/header/more-menu/index.js.map +1 -1
- package/build-module/components/header/template-title/index.js +1 -1
- package/build-module/components/header/template-title/index.js.map +1 -1
- package/build-module/components/header/writing-menu/index.js +7 -8
- package/build-module/components/header/writing-menu/index.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/index.js +1 -3
- package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -1
- package/build-module/components/keyboard-shortcuts/index.js +1 -8
- package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
- package/build-module/components/layout/index.js +4 -6
- package/build-module/components/layout/index.js.map +1 -1
- package/build-module/components/meta-boxes/index.js +40 -19
- package/build-module/components/meta-boxes/index.js.map +1 -1
- package/build-module/components/preferences-modal/index.js +47 -21
- package/build-module/components/preferences-modal/index.js.map +1 -1
- package/build-module/components/secondary-sidebar/inserter-sidebar.js +2 -1
- package/build-module/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
- package/build-module/components/sidebar/plugin-sidebar/index.js +1 -1
- package/build-module/components/sidebar/plugin-sidebar/index.js.map +1 -1
- package/build-module/components/sidebar/post-link/index.js +1 -1
- package/build-module/components/sidebar/post-link/index.js.map +1 -1
- package/build-module/components/sidebar/template/actions.js +6 -1
- package/build-module/components/sidebar/template/actions.js.map +1 -1
- package/build-module/components/visual-editor/index.js +6 -4
- package/build-module/components/visual-editor/index.js.map +1 -1
- package/build-module/editor.js +9 -6
- package/build-module/editor.js.map +1 -1
- package/build-module/index.js +13 -5
- package/build-module/index.js.map +1 -1
- package/build-module/plugins/welcome-guide-menu-item/index.js +7 -8
- package/build-module/plugins/welcome-guide-menu-item/index.js.map +1 -1
- package/build-module/store/actions.js +66 -59
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/defaults.js +0 -9
- package/build-module/store/defaults.js.map +1 -1
- package/build-module/store/reducer.js +20 -11
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +20 -7
- package/build-module/store/selectors.js.map +1 -1
- package/build-style/style-rtl.css +52 -35
- package/build-style/style.css +52 -35
- package/package.json +27 -27
- package/src/components/header/fullscreen-mode-close/style.scss +2 -2
- package/src/components/header/header-toolbar/index.native.js +8 -2
- package/src/components/header/more-menu/index.js +8 -13
- package/src/components/header/template-title/index.js +3 -1
- package/src/components/header/writing-menu/index.js +7 -8
- package/src/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +15 -12
- package/src/components/keyboard-shortcut-help-modal/index.js +1 -3
- package/src/components/keyboard-shortcut-help-modal/test/__snapshots__/index.js.snap +2 -2
- package/src/components/keyboard-shortcuts/index.js +19 -32
- package/src/components/layout/index.js +4 -10
- package/src/components/meta-boxes/index.js +41 -13
- package/src/components/preferences-modal/index.js +90 -36
- package/src/components/preferences-modal/style.scss +1 -17
- package/src/components/preferences-modal/test/__snapshots__/index.js.snap +297 -142
- package/src/components/secondary-sidebar/inserter-sidebar.js +1 -0
- package/src/components/sidebar/plugin-sidebar/index.js +1 -1
- package/src/components/sidebar/post-link/index.js +5 -1
- package/src/components/sidebar/template/actions.js +6 -1
- package/src/components/text-editor/style.scss +12 -22
- package/src/components/visual-editor/index.js +16 -10
- package/src/components/visual-editor/style.scss +3 -5
- package/src/components/welcome-guide/style.scss +5 -0
- package/src/editor.js +88 -79
- package/src/index.js +15 -5
- package/src/plugins/welcome-guide-menu-item/index.js +7 -12
- package/src/store/actions.js +99 -80
- package/src/store/defaults.js +0 -9
- package/src/store/reducer.js +17 -10
- package/src/store/selectors.js +27 -7
- package/src/store/test/actions.js +0 -11
- package/src/store/test/reducer.js +0 -12
- package/src/store/test/selectors.js +0 -46
- package/build/components/header/feature-toggle/index.js +0 -76
- package/build/components/header/feature-toggle/index.js.map +0 -1
- package/build-module/components/header/feature-toggle/index.js +0 -60
- package/build-module/components/header/feature-toggle/index.js.map +0 -1
- package/src/components/header/feature-toggle/index.js +0 -61
- package/src/components/header/more-menu/test/__snapshots__/index.js.snap +0 -129
- package/src/components/header/more-menu/test/index.js +0 -17
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/edit-post/src/store/selectors.js"],"names":["createSelector","get","includes","some","flatten","values","createRegistrySelector","store","interfaceStore","coreStore","editorStore","getEditorMode","state","getPreference","isEditorSidebarOpened","select","activeGeneralSidebar","getActiveComplementaryArea","isPluginSidebarOpened","getActiveGeneralSidebarName","getPreferences","preferences","preferenceKey","defaultValue","value","undefined","isPublishSidebarOpened","publishSidebarActive","isEditorPanelRemoved","panelName","removedPanels","isEditorPanelEnabled","panels","isEditorPanelOpened","isModalActive","modalName","activeModal","isFeatureActive","feature","features","isPluginItemPinned","pluginName","isItemPinned","getActiveMetaBoxLocations","Object","keys","metaBoxes","locations","filter","location","isMetaBoxLocationActive","isMetaBoxLocationVisible","getMetaBoxesPerLocation","id","length","getAllMetaBoxes","hasMetaBoxes","isSavingMetaBoxes","isSaving","__experimentalGetPreviewDeviceType","deviceType","isInserterOpened","blockInserterPanel","__experimentalGetInsertionPoint","rootClientId","insertionIndex","isListViewOpened","listViewPanel","isEditingTemplate","getEditedPostTemplate","currentTemplate","getEditedPostAttribute","templateWithSameSlug","getEntityRecords","find","template","slug","getEditedEntityRecord","post","getCurrentPost","link","__experimentalGetTemplateForLink"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,cAAP,MAA2B,QAA3B;AACA,SAASC,GAAT,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;AACD,WAAOzD,MAAM,CAAEN,SAAF,CAAN,CAAoBoE,qBAApB,CACN,UADM,EAEN,aAFM,EAGNL,oBAAoB,CAACnB,EAHf,CAAP;AAKA;;AAED,QAAMyB,IAAI,GAAG/D,MAAM,CAAEL,WAAF,CAAN,CAAsBqE,cAAtB,EAAb;;AACA,MAAKD,IAAI,CAACE,IAAV,EAAiB;AAChB,WAAOjE,MAAM,CAAEN,SAAF,CAAN,CAAoBwE,gCAApB,CACNH,IAAI,CAACE,IADC,CAAP;AAGA;;AAED,SAAO,IAAP;AACA,CA3ByD,CAApD","sourcesContent":["/**\n * External dependencies\n */\nimport createSelector from 'rememo';\nimport { get, includes, some, flatten, values } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { createRegistrySelector } from '@wordpress/data';\nimport { store as interfaceStore } from '@wordpress/interface';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as editorStore } from '@wordpress/editor';\n/**\n * Returns the current editing mode.\n *\n * @param {Object} state Global application state.\n *\n * @return {string} Editing mode.\n */\nexport function getEditorMode( state ) {\n\treturn getPreference( state, 'editorMode', 'visual' );\n}\n\n/**\n * Returns true if the editor sidebar is opened.\n *\n * @param {Object} state Global application state\n *\n * @return {boolean} Whether the editor sidebar is opened.\n */\nexport const isEditorSidebarOpened = createRegistrySelector(\n\t( select ) => () => {\n\t\tconst activeGeneralSidebar = select(\n\t\t\tinterfaceStore\n\t\t).getActiveComplementaryArea( 'core/edit-post' );\n\t\treturn includes(\n\t\t\t[ 'edit-post/document', 'edit-post/block' ],\n\t\t\tactiveGeneralSidebar\n\t\t);\n\t}\n);\n\n/**\n * Returns true if the plugin sidebar is opened.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the plugin sidebar is opened.\n */\nexport const isPluginSidebarOpened = createRegistrySelector(\n\t( select ) => () => {\n\t\tconst activeGeneralSidebar = select(\n\t\t\tinterfaceStore\n\t\t).getActiveComplementaryArea( 'core/edit-post' );\n\t\treturn (\n\t\t\t!! activeGeneralSidebar &&\n\t\t\t! includes(\n\t\t\t\t[ 'edit-post/document', 'edit-post/block' ],\n\t\t\t\tactiveGeneralSidebar\n\t\t\t)\n\t\t);\n\t}\n);\n\n/**\n * Returns the current active general sidebar name, or null if there is no\n * general sidebar active. The active general sidebar is a unique name to\n * identify either an editor or plugin sidebar.\n *\n * Examples:\n *\n * - `edit-post/document`\n * - `my-plugin/insert-image-sidebar`\n *\n * @param {Object} state Global application state.\n *\n * @return {?string} Active general sidebar name.\n */\nexport const getActiveGeneralSidebarName = createRegistrySelector(\n\t( select ) => () => {\n\t\treturn select( interfaceStore ).getActiveComplementaryArea(\n\t\t\t'core/edit-post'\n\t\t);\n\t}\n);\n\n/**\n * Returns the preferences (these preferences are persisted locally).\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} Preferences Object.\n */\nexport function getPreferences( state ) {\n\treturn state.preferences;\n}\n\n/**\n *\n * @param {Object} state Global application state.\n * @param {string} preferenceKey Preference Key.\n * @param {*} defaultValue Default Value.\n *\n * @return {*} Preference Value.\n */\nexport function getPreference( state, preferenceKey, defaultValue ) {\n\tconst preferences = getPreferences( state );\n\tconst value = preferences[ preferenceKey ];\n\treturn value === undefined ? defaultValue : value;\n}\n\n/**\n * Returns true if the publish sidebar is opened.\n *\n * @param {Object} state Global application state\n *\n * @return {boolean} Whether the publish sidebar is open.\n */\nexport function isPublishSidebarOpened( state ) {\n\treturn state.publishSidebarActive;\n}\n\n/**\n * Returns true if the given panel was programmatically removed, or false otherwise.\n * All panels are not removed by default.\n *\n * @param {Object} state Global application state.\n * @param {string} panelName A string that identifies the panel.\n *\n * @return {boolean} Whether or not the panel is removed.\n */\nexport function isEditorPanelRemoved( state, panelName ) {\n\treturn includes( state.removedPanels, panelName );\n}\n\n/**\n * Returns true if the given panel is enabled, or false otherwise. Panels are\n * enabled by default.\n *\n * @param {Object} state Global application state.\n * @param {string} panelName A string that identifies the panel.\n *\n * @return {boolean} Whether or not the panel is enabled.\n */\nexport function isEditorPanelEnabled( state, panelName ) {\n\tconst panels = getPreference( state, 'panels' );\n\n\treturn (\n\t\t! isEditorPanelRemoved( state, panelName ) &&\n\t\tget( panels, [ panelName, 'enabled' ], true )\n\t);\n}\n\n/**\n * Returns true if the given panel is open, or false otherwise. Panels are\n * closed by default.\n *\n * @param {Object} state Global application state.\n * @param {string} panelName A string that identifies the panel.\n *\n * @return {boolean} Whether or not the panel is open.\n */\nexport function isEditorPanelOpened( state, panelName ) {\n\tconst panels = getPreference( state, 'panels' );\n\treturn (\n\t\tget( panels, [ panelName ] ) === true ||\n\t\tget( panels, [ panelName, 'opened' ] ) === true\n\t);\n}\n\n/**\n * Returns true if a modal is active, or false otherwise.\n *\n * @param {Object} state Global application state.\n * @param {string} modalName A string that uniquely identifies the modal.\n *\n * @return {boolean} Whether the modal is active.\n */\nexport function isModalActive( state, modalName ) {\n\treturn state.activeModal === modalName;\n}\n\n/**\n * Returns whether the given feature is enabled or not.\n *\n * @param {Object} state Global application state.\n * @param {string} feature Feature slug.\n *\n * @return {boolean} Is active.\n */\nexport function isFeatureActive( state, feature ) {\n\treturn get( state.preferences.features, [ feature ], false );\n}\n\n/**\n * Returns true if the plugin item is pinned to the header.\n * When the value is not set it defaults to true.\n *\n * @param {Object} state Global application state.\n * @param {string} pluginName Plugin item name.\n *\n * @return {boolean} Whether the plugin item is pinned.\n */\nexport const isPluginItemPinned = createRegistrySelector(\n\t( select ) => ( pluginName ) => {\n\t\treturn select( interfaceStore ).isItemPinned(\n\t\t\t'core/edit-post',\n\t\t\tpluginName\n\t\t);\n\t}\n);\n\n/**\n * Returns an array of active meta box locations.\n *\n * @param {Object} state Post editor state.\n *\n * @return {string[]} Active meta box locations.\n */\nexport const getActiveMetaBoxLocations = createSelector(\n\t( state ) => {\n\t\treturn Object.keys( state.metaBoxes.locations ).filter( ( location ) =>\n\t\t\tisMetaBoxLocationActive( state, location )\n\t\t);\n\t},\n\t( state ) => [ state.metaBoxes.locations ]\n);\n\n/**\n * Returns true if a metabox location is active and visible\n *\n * @param {Object} state Post editor state.\n * @param {string} location Meta box location to test.\n *\n * @return {boolean} Whether the meta box location is active and visible.\n */\nexport function isMetaBoxLocationVisible( state, location ) {\n\treturn (\n\t\tisMetaBoxLocationActive( state, location ) &&\n\t\tsome( getMetaBoxesPerLocation( state, location ), ( { id } ) => {\n\t\t\treturn isEditorPanelEnabled( state, `meta-box-${ id }` );\n\t\t} )\n\t);\n}\n\n/**\n * Returns true if there is an active meta box in the given location, or false\n * otherwise.\n *\n * @param {Object} state Post editor state.\n * @param {string} location Meta box location to test.\n *\n * @return {boolean} Whether the meta box location is active.\n */\nexport function isMetaBoxLocationActive( state, location ) {\n\tconst metaBoxes = getMetaBoxesPerLocation( state, location );\n\treturn !! metaBoxes && metaBoxes.length !== 0;\n}\n\n/**\n * Returns the list of all the available meta boxes for a given location.\n *\n * @param {Object} state Global application state.\n * @param {string} location Meta box location to test.\n *\n * @return {?Array} List of meta boxes.\n */\nexport function getMetaBoxesPerLocation( state, location ) {\n\treturn state.metaBoxes.locations[ location ];\n}\n\n/**\n * Returns the list of all the available meta boxes.\n *\n * @param {Object} state Global application state.\n *\n * @return {Array} List of meta boxes.\n */\nexport const getAllMetaBoxes = createSelector(\n\t( state ) => {\n\t\treturn flatten( values( state.metaBoxes.locations ) );\n\t},\n\t( state ) => [ state.metaBoxes.locations ]\n);\n\n/**\n * Returns true if the post is using Meta Boxes\n *\n * @param {Object} state Global application state\n *\n * @return {boolean} Whether there are metaboxes or not.\n */\nexport function hasMetaBoxes( state ) {\n\treturn getActiveMetaBoxLocations( state ).length > 0;\n}\n\n/**\n * Returns true if the Meta Boxes are being saved.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the metaboxes are being saved.\n */\nexport function isSavingMetaBoxes( state ) {\n\treturn state.metaBoxes.isSaving;\n}\n\n/**\n * Returns the current editing canvas device type.\n *\n * @param {Object} state Global application state.\n *\n * @return {string} Device type.\n */\nexport function __experimentalGetPreviewDeviceType( state ) {\n\treturn state.deviceType;\n}\n\n/**\n * Returns true if the inserter is opened.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the inserter is opened.\n */\nexport function isInserterOpened( state ) {\n\treturn !! state.blockInserterPanel;\n}\n\n/**\n * Get the insertion point for the inserter.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} The root client ID and index to insert at.\n */\nexport function __experimentalGetInsertionPoint( state ) {\n\tconst { rootClientId, insertionIndex } = state.blockInserterPanel;\n\treturn { rootClientId, insertionIndex };\n}\n\n/**\n * Returns true if the list view is opened.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the list view is opened.\n */\nexport function isListViewOpened( state ) {\n\treturn state.listViewPanel;\n}\n\n/**\n * Returns true if the template editing mode is enabled.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether we're editing the template.\n */\nexport function isEditingTemplate( state ) {\n\treturn state.isEditingTemplate;\n}\n\n/**\n * Retrieves the template of the currently edited post.\n *\n * @return {Object?} Post Template.\n */\nexport const getEditedPostTemplate = createRegistrySelector(\n\t( select ) => () => {\n\t\tconst currentTemplate = select( editorStore ).getEditedPostAttribute(\n\t\t\t'template'\n\t\t);\n\t\tif ( currentTemplate ) {\n\t\t\tconst templateWithSameSlug = select( coreStore )\n\t\t\t\t.getEntityRecords( 'postType', 'wp_template' )\n\t\t\t\t?.find( ( template ) => template.slug === currentTemplate );\n\t\t\tif ( ! templateWithSameSlug ) {\n\t\t\t\treturn templateWithSameSlug;\n\t\t\t}\n\t\t\treturn select( coreStore ).getEditedEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\t'wp_template',\n\t\t\t\ttemplateWithSameSlug.id\n\t\t\t);\n\t\t}\n\n\t\tconst post = select( editorStore ).getCurrentPost();\n\t\tif ( post.link ) {\n\t\t\treturn select( coreStore ).__experimentalGetTemplateForLink(\n\t\t\t\tpost.link\n\t\t\t);\n\t\t}\n\n\t\treturn null;\n\t}\n);\n"]}
|
|
1
|
+
{"version":3,"sources":["@wordpress/edit-post/src/store/selectors.js"],"names":["createSelector","get","includes","some","flatten","values","createRegistrySelector","store","interfaceStore","coreStore","editorStore","getEditorMode","state","getPreference","isEditorSidebarOpened","select","activeGeneralSidebar","getActiveComplementaryArea","isPluginSidebarOpened","getActiveGeneralSidebarName","getPreferences","preferences","preferenceKey","defaultValue","value","undefined","isPublishSidebarOpened","publishSidebarActive","isEditorPanelRemoved","panelName","removedPanels","isEditorPanelEnabled","panels","isEditorPanelOpened","isModalActive","modalName","activeModal","isFeatureActive","feature","isPluginItemPinned","pluginName","isItemPinned","getActiveMetaBoxLocations","Object","keys","metaBoxes","locations","filter","location","isMetaBoxLocationActive","isMetaBoxLocationVisible","getMetaBoxesPerLocation","id","length","getAllMetaBoxes","hasMetaBoxes","isSavingMetaBoxes","isSaving","__experimentalGetPreviewDeviceType","deviceType","isInserterOpened","blockInserterPanel","__experimentalGetInsertionPoint","rootClientId","insertionIndex","filterValue","isListViewOpened","listViewPanel","isEditingTemplate","areMetaBoxesInitialized","initialized","getEditedPostTemplate","currentTemplate","getEditedPostAttribute","templateWithSameSlug","getEntityRecords","find","template","slug","getEditedEntityRecord","post","getCurrentPost","link","__experimentalGetTemplateForLink"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,cAAP,MAA2B,QAA3B;AACA,SAASC,GAAT,EAAcC,QAAd,EAAwBC,IAAxB,EAA8BC,OAA9B,EAAuCC,MAAvC,QAAqD,QAArD;AAEA;AACA;AACA;;AACA,SAASC,sBAAT,QAAuC,iBAAvC;AACA,SAASC,KAAK,IAAIC,cAAlB,QAAwC,sBAAxC;AACA,SAASD,KAAK,IAAIE,SAAlB,QAAmC,sBAAnC;AACA,SAASF,KAAK,IAAIG,WAAlB,QAAqC,mBAArC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASC,aAAT,CAAwBC,KAAxB,EAAgC;AACtC,SAAOC,aAAa,CAAED,KAAF,EAAS,YAAT,EAAuB,QAAvB,CAApB;AACA;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A,MAAKD,IAAI,CAACE,IAAV,EAAiB;AAChB,WAAOnE,MAAM,CAAEN,SAAF,CAAN,CAAoB0E,gCAApB,CACNH,IAAI,CAACE,IADC,CAAP;AAGA;;AAED,SAAO,IAAP;AACA,CA3ByD,CAApD","sourcesContent":["/**\n * External dependencies\n */\nimport createSelector from 'rememo';\nimport { get, includes, some, flatten, values } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { createRegistrySelector } from '@wordpress/data';\nimport { store as interfaceStore } from '@wordpress/interface';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as editorStore } from '@wordpress/editor';\n/**\n * Returns the current editing mode.\n *\n * @param {Object} state Global application state.\n *\n * @return {string} Editing mode.\n */\nexport function getEditorMode( state ) {\n\treturn getPreference( state, 'editorMode', 'visual' );\n}\n\n/**\n * Returns true if the editor sidebar is opened.\n *\n * @param {Object} state Global application state\n *\n * @return {boolean} Whether the editor sidebar is opened.\n */\nexport const isEditorSidebarOpened = createRegistrySelector(\n\t( select ) => () => {\n\t\tconst activeGeneralSidebar = select(\n\t\t\tinterfaceStore\n\t\t).getActiveComplementaryArea( 'core/edit-post' );\n\t\treturn includes(\n\t\t\t[ 'edit-post/document', 'edit-post/block' ],\n\t\t\tactiveGeneralSidebar\n\t\t);\n\t}\n);\n\n/**\n * Returns true if the plugin sidebar is opened.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the plugin sidebar is opened.\n */\nexport const isPluginSidebarOpened = createRegistrySelector(\n\t( select ) => () => {\n\t\tconst activeGeneralSidebar = select(\n\t\t\tinterfaceStore\n\t\t).getActiveComplementaryArea( 'core/edit-post' );\n\t\treturn (\n\t\t\t!! activeGeneralSidebar &&\n\t\t\t! includes(\n\t\t\t\t[ 'edit-post/document', 'edit-post/block' ],\n\t\t\t\tactiveGeneralSidebar\n\t\t\t)\n\t\t);\n\t}\n);\n\n/**\n * Returns the current active general sidebar name, or null if there is no\n * general sidebar active. The active general sidebar is a unique name to\n * identify either an editor or plugin sidebar.\n *\n * Examples:\n *\n * - `edit-post/document`\n * - `my-plugin/insert-image-sidebar`\n *\n * @param {Object} state Global application state.\n *\n * @return {?string} Active general sidebar name.\n */\nexport const getActiveGeneralSidebarName = createRegistrySelector(\n\t( select ) => () => {\n\t\treturn select( interfaceStore ).getActiveComplementaryArea(\n\t\t\t'core/edit-post'\n\t\t);\n\t}\n);\n\n/**\n * Returns the preferences (these preferences are persisted locally).\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} Preferences Object.\n */\nexport function getPreferences( state ) {\n\treturn state.preferences;\n}\n\n/**\n *\n * @param {Object} state Global application state.\n * @param {string} preferenceKey Preference Key.\n * @param {*} defaultValue Default Value.\n *\n * @return {*} Preference Value.\n */\nexport function getPreference( state, preferenceKey, defaultValue ) {\n\tconst preferences = getPreferences( state );\n\tconst value = preferences[ preferenceKey ];\n\treturn value === undefined ? defaultValue : value;\n}\n\n/**\n * Returns true if the publish sidebar is opened.\n *\n * @param {Object} state Global application state\n *\n * @return {boolean} Whether the publish sidebar is open.\n */\nexport function isPublishSidebarOpened( state ) {\n\treturn state.publishSidebarActive;\n}\n\n/**\n * Returns true if the given panel was programmatically removed, or false otherwise.\n * All panels are not removed by default.\n *\n * @param {Object} state Global application state.\n * @param {string} panelName A string that identifies the panel.\n *\n * @return {boolean} Whether or not the panel is removed.\n */\nexport function isEditorPanelRemoved( state, panelName ) {\n\treturn includes( state.removedPanels, panelName );\n}\n\n/**\n * Returns true if the given panel is enabled, or false otherwise. Panels are\n * enabled by default.\n *\n * @param {Object} state Global application state.\n * @param {string} panelName A string that identifies the panel.\n *\n * @return {boolean} Whether or not the panel is enabled.\n */\nexport function isEditorPanelEnabled( state, panelName ) {\n\tconst panels = getPreference( state, 'panels' );\n\n\treturn (\n\t\t! isEditorPanelRemoved( state, panelName ) &&\n\t\tget( panels, [ panelName, 'enabled' ], true )\n\t);\n}\n\n/**\n * Returns true if the given panel is open, or false otherwise. Panels are\n * closed by default.\n *\n * @param {Object} state Global application state.\n * @param {string} panelName A string that identifies the panel.\n *\n * @return {boolean} Whether or not the panel is open.\n */\nexport function isEditorPanelOpened( state, panelName ) {\n\tconst panels = getPreference( state, 'panels' );\n\treturn (\n\t\tget( panels, [ panelName ] ) === true ||\n\t\tget( panels, [ panelName, 'opened' ] ) === true\n\t);\n}\n\n/**\n * Returns true if a modal is active, or false otherwise.\n *\n * @param {Object} state Global application state.\n * @param {string} modalName A string that uniquely identifies the modal.\n *\n * @return {boolean} Whether the modal is active.\n */\nexport function isModalActive( state, modalName ) {\n\treturn state.activeModal === modalName;\n}\n\n/**\n * Returns whether the given feature is enabled or not.\n *\n * @param {Object} state Global application state.\n * @param {string} feature Feature slug.\n *\n * @return {boolean} Is active.\n */\nexport const isFeatureActive = createRegistrySelector(\n\t( select ) => ( state, feature ) => {\n\t\treturn select( interfaceStore ).isFeatureActive(\n\t\t\t'core/edit-post',\n\t\t\tfeature\n\t\t);\n\t}\n);\n\n/**\n * Returns true if the plugin item is pinned to the header.\n * When the value is not set it defaults to true.\n *\n * @param {Object} state Global application state.\n * @param {string} pluginName Plugin item name.\n *\n * @return {boolean} Whether the plugin item is pinned.\n */\nexport const isPluginItemPinned = createRegistrySelector(\n\t( select ) => ( state, pluginName ) => {\n\t\treturn select( interfaceStore ).isItemPinned(\n\t\t\t'core/edit-post',\n\t\t\tpluginName\n\t\t);\n\t}\n);\n\n/**\n * Returns an array of active meta box locations.\n *\n * @param {Object} state Post editor state.\n *\n * @return {string[]} Active meta box locations.\n */\nexport const getActiveMetaBoxLocations = createSelector(\n\t( state ) => {\n\t\treturn Object.keys( state.metaBoxes.locations ).filter( ( location ) =>\n\t\t\tisMetaBoxLocationActive( state, location )\n\t\t);\n\t},\n\t( state ) => [ state.metaBoxes.locations ]\n);\n\n/**\n * Returns true if a metabox location is active and visible\n *\n * @param {Object} state Post editor state.\n * @param {string} location Meta box location to test.\n *\n * @return {boolean} Whether the meta box location is active and visible.\n */\nexport function isMetaBoxLocationVisible( state, location ) {\n\treturn (\n\t\tisMetaBoxLocationActive( state, location ) &&\n\t\tsome( getMetaBoxesPerLocation( state, location ), ( { id } ) => {\n\t\t\treturn isEditorPanelEnabled( state, `meta-box-${ id }` );\n\t\t} )\n\t);\n}\n\n/**\n * Returns true if there is an active meta box in the given location, or false\n * otherwise.\n *\n * @param {Object} state Post editor state.\n * @param {string} location Meta box location to test.\n *\n * @return {boolean} Whether the meta box location is active.\n */\nexport function isMetaBoxLocationActive( state, location ) {\n\tconst metaBoxes = getMetaBoxesPerLocation( state, location );\n\treturn !! metaBoxes && metaBoxes.length !== 0;\n}\n\n/**\n * Returns the list of all the available meta boxes for a given location.\n *\n * @param {Object} state Global application state.\n * @param {string} location Meta box location to test.\n *\n * @return {?Array} List of meta boxes.\n */\nexport function getMetaBoxesPerLocation( state, location ) {\n\treturn state.metaBoxes.locations[ location ];\n}\n\n/**\n * Returns the list of all the available meta boxes.\n *\n * @param {Object} state Global application state.\n *\n * @return {Array} List of meta boxes.\n */\nexport const getAllMetaBoxes = createSelector(\n\t( state ) => {\n\t\treturn flatten( values( state.metaBoxes.locations ) );\n\t},\n\t( state ) => [ state.metaBoxes.locations ]\n);\n\n/**\n * Returns true if the post is using Meta Boxes\n *\n * @param {Object} state Global application state\n *\n * @return {boolean} Whether there are metaboxes or not.\n */\nexport function hasMetaBoxes( state ) {\n\treturn getActiveMetaBoxLocations( state ).length > 0;\n}\n\n/**\n * Returns true if the Meta Boxes are being saved.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the metaboxes are being saved.\n */\nexport function isSavingMetaBoxes( state ) {\n\treturn state.metaBoxes.isSaving;\n}\n\n/**\n * Returns the current editing canvas device type.\n *\n * @param {Object} state Global application state.\n *\n * @return {string} Device type.\n */\nexport function __experimentalGetPreviewDeviceType( state ) {\n\treturn state.deviceType;\n}\n\n/**\n * Returns true if the inserter is opened.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the inserter is opened.\n */\nexport function isInserterOpened( state ) {\n\treturn !! state.blockInserterPanel;\n}\n\n/**\n * Get the insertion point for the inserter.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} The root client ID, index to insert at and starting filter value.\n */\nexport function __experimentalGetInsertionPoint( state ) {\n\tconst {\n\t\trootClientId,\n\t\tinsertionIndex,\n\t\tfilterValue,\n\t} = state.blockInserterPanel;\n\treturn { rootClientId, insertionIndex, filterValue };\n}\n\n/**\n * Returns true if the list view is opened.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the list view is opened.\n */\nexport function isListViewOpened( state ) {\n\treturn state.listViewPanel;\n}\n\n/**\n * Returns true if the template editing mode is enabled.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether we're editing the template.\n */\nexport function isEditingTemplate( state ) {\n\treturn state.isEditingTemplate;\n}\n\n/**\n * Returns true if meta boxes are initialized.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether meta boxes are initialized.\n */\nexport function areMetaBoxesInitialized( state ) {\n\treturn state.metaBoxes.initialized;\n}\n\n/**\n * Retrieves the template of the currently edited post.\n *\n * @return {Object?} Post Template.\n */\nexport const getEditedPostTemplate = createRegistrySelector(\n\t( select ) => () => {\n\t\tconst currentTemplate = select( editorStore ).getEditedPostAttribute(\n\t\t\t'template'\n\t\t);\n\t\tif ( currentTemplate ) {\n\t\t\tconst templateWithSameSlug = select( coreStore )\n\t\t\t\t.getEntityRecords( 'postType', 'wp_template' )\n\t\t\t\t?.find( ( template ) => template.slug === currentTemplate );\n\t\t\tif ( ! templateWithSameSlug ) {\n\t\t\t\treturn templateWithSameSlug;\n\t\t\t}\n\t\t\treturn select( coreStore ).getEditedEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\t'wp_template',\n\t\t\t\ttemplateWithSameSlug.id\n\t\t\t);\n\t\t}\n\n\t\tconst post = select( editorStore ).getCurrentPost();\n\t\tif ( post.link ) {\n\t\t\treturn select( coreStore ).__experimentalGetTemplateForLink(\n\t\t\t\tpost.link\n\t\t\t);\n\t\t}\n\n\t\treturn null;\n\t}\n);\n"]}
|
|
@@ -122,6 +122,12 @@
|
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
+
@media (min-width: 782px) {
|
|
126
|
+
.components-panel__header + .interface-complementary-area-header {
|
|
127
|
+
margin-top: 0;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
125
131
|
.interface-complementary-area {
|
|
126
132
|
background: #fff;
|
|
127
133
|
color: #1e1e1e;
|
|
@@ -383,6 +389,39 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
383
389
|
bottom: 0;
|
|
384
390
|
}
|
|
385
391
|
|
|
392
|
+
.interface-more-menu-dropdown {
|
|
393
|
+
margin-right: -4px;
|
|
394
|
+
}
|
|
395
|
+
.interface-more-menu-dropdown .components-button {
|
|
396
|
+
width: auto;
|
|
397
|
+
padding: 0 2px;
|
|
398
|
+
}
|
|
399
|
+
@media (min-width: 600px) {
|
|
400
|
+
.interface-more-menu-dropdown {
|
|
401
|
+
margin-right: 0;
|
|
402
|
+
}
|
|
403
|
+
.interface-more-menu-dropdown .components-button {
|
|
404
|
+
padding: 0 4px;
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
.interface-more-menu-dropdown__content .components-popover__content {
|
|
409
|
+
min-width: 280px;
|
|
410
|
+
}
|
|
411
|
+
@media (min-width: 480px) {
|
|
412
|
+
.interface-more-menu-dropdown__content .components-popover__content {
|
|
413
|
+
width: auto;
|
|
414
|
+
max-width: 480px;
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
.interface-more-menu-dropdown__content .components-popover__content .components-dropdown-menu__menu {
|
|
418
|
+
padding: 0;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
.components-popover.interface-more-menu-dropdown__content {
|
|
422
|
+
z-index: 99998;
|
|
423
|
+
}
|
|
424
|
+
|
|
386
425
|
.interface-pinned-items {
|
|
387
426
|
display: flex;
|
|
388
427
|
}
|
|
@@ -644,7 +683,7 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
644
683
|
align-items: center;
|
|
645
684
|
align-self: stretch;
|
|
646
685
|
border: none;
|
|
647
|
-
background: #
|
|
686
|
+
background: #1e1e1e;
|
|
648
687
|
color: #fff;
|
|
649
688
|
border-radius: 0;
|
|
650
689
|
height: 61px;
|
|
@@ -668,7 +707,7 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
668
707
|
bottom: 9px;
|
|
669
708
|
right: 9px;
|
|
670
709
|
border-radius: 4px;
|
|
671
|
-
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) #
|
|
710
|
+
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) #1e1e1e;
|
|
672
711
|
}
|
|
673
712
|
}
|
|
674
713
|
@media (min-width: 782px) and (prefers-reduced-motion: reduce) {
|
|
@@ -1280,51 +1319,34 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
|
|
|
1280
1319
|
}
|
|
1281
1320
|
}
|
|
1282
1321
|
.edit-post-preferences-modal .components-navigation {
|
|
1283
|
-
background-color: #fff;
|
|
1284
1322
|
padding: 0;
|
|
1285
1323
|
max-height: 100%;
|
|
1286
1324
|
overflow-y: auto;
|
|
1325
|
+
color: #000;
|
|
1287
1326
|
}
|
|
1288
1327
|
.edit-post-preferences-modal .components-navigation > * {
|
|
1289
1328
|
padding: 24px 32px;
|
|
1290
1329
|
}
|
|
1291
1330
|
.edit-post-preferences-modal .components-navigation .components-navigation__menu {
|
|
1292
1331
|
margin: 0;
|
|
1293
|
-
color: #1e1e1e;
|
|
1294
|
-
}
|
|
1295
|
-
.edit-post-preferences-modal .components-navigation .components-navigation__menu .components-navigation__item {
|
|
1296
|
-
color: #1e1e1e;
|
|
1297
1332
|
}
|
|
1298
1333
|
.edit-post-preferences-modal .components-navigation .components-navigation__menu .components-navigation__item > button {
|
|
1299
|
-
color: inherit;
|
|
1300
1334
|
padding: 3px 16px;
|
|
1301
1335
|
height: 48px;
|
|
1302
1336
|
margin: 0 -16px;
|
|
1303
1337
|
width: calc(32px + 100%);
|
|
1304
1338
|
}
|
|
1305
1339
|
.edit-post-preferences-modal .components-navigation .components-navigation__menu .components-navigation__item > button:focus {
|
|
1306
|
-
background: #f0f0f0;
|
|
1307
1340
|
font-weight: 500;
|
|
1308
1341
|
}
|
|
1309
|
-
.edit-post-preferences-modal .components-navigation .components-navigation__menu .components-navigation__item > button:hover {
|
|
1310
|
-
color: var(--wp-admin-theme-color);
|
|
1311
|
-
}
|
|
1312
|
-
.edit-post-preferences-modal .components-navigation .components-navigation__menu .components-navigation__item .components-toggle-control__label {
|
|
1313
|
-
color: inherit;
|
|
1314
|
-
}
|
|
1315
1342
|
.edit-post-preferences-modal .components-navigation .components-navigation__menu .components-navigation__menu-title-heading {
|
|
1316
|
-
color: inherit;
|
|
1317
1343
|
border-bottom: 1px solid #ddd;
|
|
1318
1344
|
padding-right: 0;
|
|
1319
1345
|
padding-left: 0;
|
|
1320
1346
|
}
|
|
1321
1347
|
.edit-post-preferences-modal .components-navigation .components-navigation__menu .components-navigation__back-button {
|
|
1322
|
-
color: inherit;
|
|
1323
1348
|
padding-right: 0;
|
|
1324
1349
|
}
|
|
1325
|
-
.edit-post-preferences-modal .components-navigation .components-navigation__menu .components-navigation__back-button:hover {
|
|
1326
|
-
color: var(--wp-admin-theme-color);
|
|
1327
|
-
}
|
|
1328
1350
|
.edit-post-preferences-modal .components-navigation .components-navigation__menu .edit-post-preferences-modal__custom-fields-confirmation-button {
|
|
1329
1351
|
width: auto;
|
|
1330
1352
|
}
|
|
@@ -1662,34 +1684,24 @@ h2.edit-post-template-summary__title {
|
|
|
1662
1684
|
background-color: #fff;
|
|
1663
1685
|
flex-grow: 1;
|
|
1664
1686
|
}
|
|
1665
|
-
.edit-post-text-editor .editor-post-title
|
|
1687
|
+
.edit-post-text-editor .editor-post-title {
|
|
1666
1688
|
max-width: none;
|
|
1667
1689
|
line-height: 1.4;
|
|
1668
|
-
}
|
|
1669
|
-
.edit-post-text-editor .editor-post-title.editor-post-title__block .editor-post-title__input.editor-post-title__input.editor-post-title__input {
|
|
1670
1690
|
font-family: Menlo, Consolas, monaco, monospace;
|
|
1671
1691
|
font-size: 2.5em;
|
|
1672
1692
|
font-weight: normal;
|
|
1673
|
-
}
|
|
1674
|
-
.edit-post-text-editor .editor-post-title.editor-post-title__block .editor-post-title__input {
|
|
1675
1693
|
border: 1px solid #949494;
|
|
1676
|
-
margin-bottom: -1px;
|
|
1677
1694
|
padding: 16px;
|
|
1678
1695
|
}
|
|
1679
1696
|
@media (min-width: 600px) {
|
|
1680
|
-
.edit-post-text-editor .editor-post-title
|
|
1697
|
+
.edit-post-text-editor .editor-post-title {
|
|
1681
1698
|
padding: 24px;
|
|
1682
1699
|
}
|
|
1683
1700
|
}
|
|
1684
|
-
.edit-post-text-editor .editor-post-title
|
|
1701
|
+
.edit-post-text-editor .editor-post-title:focus {
|
|
1685
1702
|
border-color: var(--wp-admin-theme-color);
|
|
1686
1703
|
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
1687
1704
|
}
|
|
1688
|
-
@media (min-width: 600px) {
|
|
1689
|
-
.edit-post-text-editor .editor-post-title.editor-post-title__block {
|
|
1690
|
-
padding: 0;
|
|
1691
|
-
}
|
|
1692
|
-
}
|
|
1693
1705
|
|
|
1694
1706
|
.edit-post-text-editor__body {
|
|
1695
1707
|
width: 100%;
|
|
@@ -1752,10 +1764,9 @@ h2.edit-post-template-summary__title {
|
|
|
1752
1764
|
}
|
|
1753
1765
|
|
|
1754
1766
|
.edit-post-visual-editor__post-title-wrapper .editor-post-title {
|
|
1755
|
-
margin-top: 2em;
|
|
1756
1767
|
margin-right: auto;
|
|
1757
1768
|
margin-left: auto;
|
|
1758
|
-
margin-bottom: 0;
|
|
1769
|
+
margin-bottom: var(--wp--style--block-gap, 0);
|
|
1759
1770
|
}
|
|
1760
1771
|
|
|
1761
1772
|
.edit-post-visual-editor__exit-template-mode {
|
|
@@ -1783,6 +1794,12 @@ h2.edit-post-template-summary__title {
|
|
|
1783
1794
|
background: #00a0d2;
|
|
1784
1795
|
margin: 0 0 16px;
|
|
1785
1796
|
}
|
|
1797
|
+
.edit-post-welcome-guide__image > img {
|
|
1798
|
+
display: block;
|
|
1799
|
+
max-width: 100%;
|
|
1800
|
+
-o-object-fit: cover;
|
|
1801
|
+
object-fit: cover;
|
|
1802
|
+
}
|
|
1786
1803
|
.edit-post-welcome-guide__heading {
|
|
1787
1804
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
|
1788
1805
|
font-size: 24px;
|
package/build-style/style.css
CHANGED
|
@@ -122,6 +122,12 @@
|
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
+
@media (min-width: 782px) {
|
|
126
|
+
.components-panel__header + .interface-complementary-area-header {
|
|
127
|
+
margin-top: 0;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
125
131
|
.interface-complementary-area {
|
|
126
132
|
background: #fff;
|
|
127
133
|
color: #1e1e1e;
|
|
@@ -383,6 +389,39 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
383
389
|
bottom: 0;
|
|
384
390
|
}
|
|
385
391
|
|
|
392
|
+
.interface-more-menu-dropdown {
|
|
393
|
+
margin-left: -4px;
|
|
394
|
+
}
|
|
395
|
+
.interface-more-menu-dropdown .components-button {
|
|
396
|
+
width: auto;
|
|
397
|
+
padding: 0 2px;
|
|
398
|
+
}
|
|
399
|
+
@media (min-width: 600px) {
|
|
400
|
+
.interface-more-menu-dropdown {
|
|
401
|
+
margin-left: 0;
|
|
402
|
+
}
|
|
403
|
+
.interface-more-menu-dropdown .components-button {
|
|
404
|
+
padding: 0 4px;
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
.interface-more-menu-dropdown__content .components-popover__content {
|
|
409
|
+
min-width: 280px;
|
|
410
|
+
}
|
|
411
|
+
@media (min-width: 480px) {
|
|
412
|
+
.interface-more-menu-dropdown__content .components-popover__content {
|
|
413
|
+
width: auto;
|
|
414
|
+
max-width: 480px;
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
.interface-more-menu-dropdown__content .components-popover__content .components-dropdown-menu__menu {
|
|
418
|
+
padding: 0;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
.components-popover.interface-more-menu-dropdown__content {
|
|
422
|
+
z-index: 99998;
|
|
423
|
+
}
|
|
424
|
+
|
|
386
425
|
.interface-pinned-items {
|
|
387
426
|
display: flex;
|
|
388
427
|
}
|
|
@@ -644,7 +683,7 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
644
683
|
align-items: center;
|
|
645
684
|
align-self: stretch;
|
|
646
685
|
border: none;
|
|
647
|
-
background: #
|
|
686
|
+
background: #1e1e1e;
|
|
648
687
|
color: #fff;
|
|
649
688
|
border-radius: 0;
|
|
650
689
|
height: 61px;
|
|
@@ -668,7 +707,7 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
668
707
|
bottom: 9px;
|
|
669
708
|
left: 9px;
|
|
670
709
|
border-radius: 4px;
|
|
671
|
-
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) #
|
|
710
|
+
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) #1e1e1e;
|
|
672
711
|
}
|
|
673
712
|
}
|
|
674
713
|
@media (min-width: 782px) and (prefers-reduced-motion: reduce) {
|
|
@@ -1280,51 +1319,34 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
|
|
|
1280
1319
|
}
|
|
1281
1320
|
}
|
|
1282
1321
|
.edit-post-preferences-modal .components-navigation {
|
|
1283
|
-
background-color: #fff;
|
|
1284
1322
|
padding: 0;
|
|
1285
1323
|
max-height: 100%;
|
|
1286
1324
|
overflow-y: auto;
|
|
1325
|
+
color: #000;
|
|
1287
1326
|
}
|
|
1288
1327
|
.edit-post-preferences-modal .components-navigation > * {
|
|
1289
1328
|
padding: 24px 32px;
|
|
1290
1329
|
}
|
|
1291
1330
|
.edit-post-preferences-modal .components-navigation .components-navigation__menu {
|
|
1292
1331
|
margin: 0;
|
|
1293
|
-
color: #1e1e1e;
|
|
1294
|
-
}
|
|
1295
|
-
.edit-post-preferences-modal .components-navigation .components-navigation__menu .components-navigation__item {
|
|
1296
|
-
color: #1e1e1e;
|
|
1297
1332
|
}
|
|
1298
1333
|
.edit-post-preferences-modal .components-navigation .components-navigation__menu .components-navigation__item > button {
|
|
1299
|
-
color: inherit;
|
|
1300
1334
|
padding: 3px 16px;
|
|
1301
1335
|
height: 48px;
|
|
1302
1336
|
margin: 0 -16px;
|
|
1303
1337
|
width: calc(32px + 100%);
|
|
1304
1338
|
}
|
|
1305
1339
|
.edit-post-preferences-modal .components-navigation .components-navigation__menu .components-navigation__item > button:focus {
|
|
1306
|
-
background: #f0f0f0;
|
|
1307
1340
|
font-weight: 500;
|
|
1308
1341
|
}
|
|
1309
|
-
.edit-post-preferences-modal .components-navigation .components-navigation__menu .components-navigation__item > button:hover {
|
|
1310
|
-
color: var(--wp-admin-theme-color);
|
|
1311
|
-
}
|
|
1312
|
-
.edit-post-preferences-modal .components-navigation .components-navigation__menu .components-navigation__item .components-toggle-control__label {
|
|
1313
|
-
color: inherit;
|
|
1314
|
-
}
|
|
1315
1342
|
.edit-post-preferences-modal .components-navigation .components-navigation__menu .components-navigation__menu-title-heading {
|
|
1316
|
-
color: inherit;
|
|
1317
1343
|
border-bottom: 1px solid #ddd;
|
|
1318
1344
|
padding-left: 0;
|
|
1319
1345
|
padding-right: 0;
|
|
1320
1346
|
}
|
|
1321
1347
|
.edit-post-preferences-modal .components-navigation .components-navigation__menu .components-navigation__back-button {
|
|
1322
|
-
color: inherit;
|
|
1323
1348
|
padding-left: 0;
|
|
1324
1349
|
}
|
|
1325
|
-
.edit-post-preferences-modal .components-navigation .components-navigation__menu .components-navigation__back-button:hover {
|
|
1326
|
-
color: var(--wp-admin-theme-color);
|
|
1327
|
-
}
|
|
1328
1350
|
.edit-post-preferences-modal .components-navigation .components-navigation__menu .edit-post-preferences-modal__custom-fields-confirmation-button {
|
|
1329
1351
|
width: auto;
|
|
1330
1352
|
}
|
|
@@ -1666,34 +1688,24 @@ h2.edit-post-template-summary__title {
|
|
|
1666
1688
|
background-color: #fff;
|
|
1667
1689
|
flex-grow: 1;
|
|
1668
1690
|
}
|
|
1669
|
-
.edit-post-text-editor .editor-post-title
|
|
1691
|
+
.edit-post-text-editor .editor-post-title {
|
|
1670
1692
|
max-width: none;
|
|
1671
1693
|
line-height: 1.4;
|
|
1672
|
-
}
|
|
1673
|
-
.edit-post-text-editor .editor-post-title.editor-post-title__block .editor-post-title__input.editor-post-title__input.editor-post-title__input {
|
|
1674
1694
|
font-family: Menlo, Consolas, monaco, monospace;
|
|
1675
1695
|
font-size: 2.5em;
|
|
1676
1696
|
font-weight: normal;
|
|
1677
|
-
}
|
|
1678
|
-
.edit-post-text-editor .editor-post-title.editor-post-title__block .editor-post-title__input {
|
|
1679
1697
|
border: 1px solid #949494;
|
|
1680
|
-
margin-bottom: -1px;
|
|
1681
1698
|
padding: 16px;
|
|
1682
1699
|
}
|
|
1683
1700
|
@media (min-width: 600px) {
|
|
1684
|
-
.edit-post-text-editor .editor-post-title
|
|
1701
|
+
.edit-post-text-editor .editor-post-title {
|
|
1685
1702
|
padding: 24px;
|
|
1686
1703
|
}
|
|
1687
1704
|
}
|
|
1688
|
-
.edit-post-text-editor .editor-post-title
|
|
1705
|
+
.edit-post-text-editor .editor-post-title:focus {
|
|
1689
1706
|
border-color: var(--wp-admin-theme-color);
|
|
1690
1707
|
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
1691
1708
|
}
|
|
1692
|
-
@media (min-width: 600px) {
|
|
1693
|
-
.edit-post-text-editor .editor-post-title.editor-post-title__block {
|
|
1694
|
-
padding: 0;
|
|
1695
|
-
}
|
|
1696
|
-
}
|
|
1697
1709
|
|
|
1698
1710
|
.edit-post-text-editor__body {
|
|
1699
1711
|
width: 100%;
|
|
@@ -1756,10 +1768,9 @@ h2.edit-post-template-summary__title {
|
|
|
1756
1768
|
}
|
|
1757
1769
|
|
|
1758
1770
|
.edit-post-visual-editor__post-title-wrapper .editor-post-title {
|
|
1759
|
-
margin-top: 2em;
|
|
1760
1771
|
margin-left: auto;
|
|
1761
1772
|
margin-right: auto;
|
|
1762
|
-
margin-bottom: 0;
|
|
1773
|
+
margin-bottom: var(--wp--style--block-gap, 0);
|
|
1763
1774
|
}
|
|
1764
1775
|
|
|
1765
1776
|
.edit-post-visual-editor__exit-template-mode {
|
|
@@ -1787,6 +1798,12 @@ h2.edit-post-template-summary__title {
|
|
|
1787
1798
|
background: #00a0d2;
|
|
1788
1799
|
margin: 0 0 16px;
|
|
1789
1800
|
}
|
|
1801
|
+
.edit-post-welcome-guide__image > img {
|
|
1802
|
+
display: block;
|
|
1803
|
+
max-width: 100%;
|
|
1804
|
+
-o-object-fit: cover;
|
|
1805
|
+
object-fit: cover;
|
|
1806
|
+
}
|
|
1790
1807
|
.edit-post-welcome-guide__heading {
|
|
1791
1808
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
|
1792
1809
|
font-size: 24px;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/edit-post",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.3",
|
|
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.13.10",
|
|
30
|
-
"@wordpress/a11y": "^3.2.
|
|
31
|
-
"@wordpress/api-fetch": "^5.2.
|
|
32
|
-
"@wordpress/block-editor": "^7.0.
|
|
33
|
-
"@wordpress/block-library": "^6.0.1
|
|
34
|
-
"@wordpress/blocks": "^11.
|
|
35
|
-
"@wordpress/components": "^
|
|
36
|
-
"@wordpress/compose": "^5.0.
|
|
37
|
-
"@wordpress/core-data": "^4.0.
|
|
38
|
-
"@wordpress/data": "^6.
|
|
39
|
-
"@wordpress/data-controls": "^2.2.
|
|
40
|
-
"@wordpress/editor": "^
|
|
41
|
-
"@wordpress/element": "^4.0.
|
|
42
|
-
"@wordpress/hooks": "^3.2.1
|
|
43
|
-
"@wordpress/i18n": "^4.2.
|
|
44
|
-
"@wordpress/icons": "^
|
|
45
|
-
"@wordpress/interface": "^4.
|
|
46
|
-
"@wordpress/keyboard-shortcuts": "^3.0.
|
|
47
|
-
"@wordpress/keycodes": "^3.2.
|
|
48
|
-
"@wordpress/media-utils": "^3.0.
|
|
49
|
-
"@wordpress/notices": "^3.2.
|
|
50
|
-
"@wordpress/plugins": "^4.0.
|
|
51
|
-
"@wordpress/primitives": "^3.0.
|
|
52
|
-
"@wordpress/url": "^3.2.
|
|
53
|
-
"@wordpress/viewport": "^4.0.
|
|
54
|
-
"@wordpress/warning": "^2.2.2
|
|
30
|
+
"@wordpress/a11y": "^3.2.3",
|
|
31
|
+
"@wordpress/api-fetch": "^5.2.3",
|
|
32
|
+
"@wordpress/block-editor": "^7.0.3",
|
|
33
|
+
"@wordpress/block-library": "^6.0.1",
|
|
34
|
+
"@wordpress/blocks": "^11.1.1",
|
|
35
|
+
"@wordpress/components": "^18.0.0",
|
|
36
|
+
"@wordpress/compose": "^5.0.3",
|
|
37
|
+
"@wordpress/core-data": "^4.0.3",
|
|
38
|
+
"@wordpress/data": "^6.1.1",
|
|
39
|
+
"@wordpress/data-controls": "^2.2.4",
|
|
40
|
+
"@wordpress/editor": "^12.0.0",
|
|
41
|
+
"@wordpress/element": "^4.0.2",
|
|
42
|
+
"@wordpress/hooks": "^3.2.1",
|
|
43
|
+
"@wordpress/i18n": "^4.2.3",
|
|
44
|
+
"@wordpress/icons": "^6.0.0",
|
|
45
|
+
"@wordpress/interface": "^4.1.1",
|
|
46
|
+
"@wordpress/keyboard-shortcuts": "^3.0.3",
|
|
47
|
+
"@wordpress/keycodes": "^3.2.3",
|
|
48
|
+
"@wordpress/media-utils": "^3.0.2",
|
|
49
|
+
"@wordpress/notices": "^3.2.4",
|
|
50
|
+
"@wordpress/plugins": "^4.0.3",
|
|
51
|
+
"@wordpress/primitives": "^3.0.2",
|
|
52
|
+
"@wordpress/url": "^3.2.3",
|
|
53
|
+
"@wordpress/viewport": "^4.0.3",
|
|
54
|
+
"@wordpress/warning": "^2.2.2",
|
|
55
55
|
"classnames": "^2.3.1",
|
|
56
56
|
"lodash": "^4.17.21",
|
|
57
57
|
"memize": "^1.1.0",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"publishConfig": {
|
|
62
62
|
"access": "public"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "8f7f052bc04e3f4eb50f479ced14be1489b9fa79"
|
|
65
65
|
}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
align-items: center;
|
|
12
12
|
align-self: stretch;
|
|
13
13
|
border: none;
|
|
14
|
-
background:
|
|
14
|
+
background: $gray-900;
|
|
15
15
|
color: $white;
|
|
16
16
|
border-radius: 0;
|
|
17
17
|
height: $header-height + $border-width;
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
bottom: 9px;
|
|
39
39
|
left: 9px;
|
|
40
40
|
border-radius: $radius-block-ui + $border-width + $border-width;
|
|
41
|
-
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus)
|
|
41
|
+
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) $gray-900;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
// Hover color.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import { ScrollView, View } from 'react-native';
|
|
4
|
+
import { Platform, ScrollView, View } from 'react-native';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* WordPress dependencies
|
|
@@ -43,7 +43,13 @@ function HeaderToolbar( {
|
|
|
43
43
|
} ) {
|
|
44
44
|
const scrollViewRef = useRef( null );
|
|
45
45
|
const scrollToStart = () => {
|
|
46
|
-
|
|
46
|
+
// scrollview doesn't seem to automatically adjust to RTL on Android so, scroll to end when Android
|
|
47
|
+
const isAndroid = Platform.OS === 'android';
|
|
48
|
+
if ( isAndroid && isRTL ) {
|
|
49
|
+
scrollViewRef.current.scrollToEnd();
|
|
50
|
+
} else {
|
|
51
|
+
scrollViewRef.current.scrollTo( { x: 0 } );
|
|
52
|
+
}
|
|
47
53
|
};
|
|
48
54
|
const renderHistoryButtons = () => {
|
|
49
55
|
const buttons = [
|
|
@@ -2,9 +2,12 @@
|
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
4
|
import { __ } from '@wordpress/i18n';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
5
|
+
import { MenuGroup } from '@wordpress/components';
|
|
6
|
+
import {
|
|
7
|
+
ActionItem,
|
|
8
|
+
MoreMenuDropdown,
|
|
9
|
+
PinnedItems,
|
|
10
|
+
} from '@wordpress/interface';
|
|
8
11
|
import { useViewportMatch } from '@wordpress/compose';
|
|
9
12
|
|
|
10
13
|
/**
|
|
@@ -17,26 +20,18 @@ import WritingMenu from '../writing-menu';
|
|
|
17
20
|
|
|
18
21
|
const POPOVER_PROPS = {
|
|
19
22
|
className: 'edit-post-more-menu__content',
|
|
20
|
-
position: 'bottom left',
|
|
21
|
-
};
|
|
22
|
-
const TOGGLE_PROPS = {
|
|
23
|
-
tooltipPosition: 'bottom',
|
|
24
23
|
};
|
|
25
24
|
|
|
26
25
|
const MoreMenu = ( { showIconLabels } ) => {
|
|
27
26
|
const isLargeViewport = useViewportMatch( 'large' );
|
|
28
27
|
|
|
29
28
|
return (
|
|
30
|
-
<
|
|
29
|
+
<MoreMenuDropdown
|
|
31
30
|
className="edit-post-more-menu"
|
|
32
|
-
icon={ moreVertical }
|
|
33
|
-
/* translators: button label text should, if possible, be under 16 characters. */
|
|
34
|
-
label={ __( 'Options' ) }
|
|
35
31
|
popoverProps={ POPOVER_PROPS }
|
|
36
32
|
toggleProps={ {
|
|
37
33
|
showTooltip: ! showIconLabels,
|
|
38
34
|
...( showIconLabels && { variant: 'tertiary' } ),
|
|
39
|
-
...TOGGLE_PROPS,
|
|
40
35
|
} }
|
|
41
36
|
>
|
|
42
37
|
{ ( { onClose } ) => (
|
|
@@ -61,7 +56,7 @@ const MoreMenu = ( { showIconLabels } ) => {
|
|
|
61
56
|
</MenuGroup>
|
|
62
57
|
</>
|
|
63
58
|
) }
|
|
64
|
-
</
|
|
59
|
+
</MoreMenuDropdown>
|
|
65
60
|
);
|
|
66
61
|
};
|
|
67
62
|
|
|
@@ -28,7 +28,9 @@ function TemplateTitle() {
|
|
|
28
28
|
return {
|
|
29
29
|
template: _isEditing ? getEditedPostTemplate() : null,
|
|
30
30
|
isEditing: _isEditing,
|
|
31
|
-
title: getEditedPostAttribute( 'title' )
|
|
31
|
+
title: getEditedPostAttribute( 'title' )
|
|
32
|
+
? getEditedPostAttribute( 'title' )
|
|
33
|
+
: __( 'Untitled' ),
|
|
32
34
|
};
|
|
33
35
|
}, [] );
|
|
34
36
|
|